# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
'''The '''
from __future__ import print_function
import os
from grit import xtb_reader from grit.node import base
xtb_file = open(self.ToRealPath(self.GetInputPath()), 'rb') try:
lang = xtb_reader.Parse(xtb_file,
self.UberClique().GenerateXtbParserCallback(
self.attrs['lang'], debug=debug),
defs=defs,
target_platform=target_platform) except:
print("Exception during parsing of %s" % self.GetInputPath()) raise # Translation console uses non-standard language codes 'iw' and 'no' for # Hebrew and Norwegian Bokmal instead of 'he' and 'nb' used in Chrome. # Note that some Chrome's .grd still use 'no' instead of 'nb', but 'nb' is # always used for generated .pak files.
ALTERNATIVE_LANG_CODE_MAP = { 'he': 'iw', 'nb': 'no' } assert (lang == self.attrs['lang'] or
lang == ALTERNATIVE_LANG_CODE_MAP[self.attrs['lang']]), ( 'The XTB file you reference must contain messages in the language ' 'specified\nby the \'lang\' attribute.')
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.