diff options
author | mnaganov@chromium.org <mnaganov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-24 14:44:16 +0000 |
---|---|---|
committer | mnaganov@chromium.org <mnaganov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-24 14:44:16 +0000 |
commit | e2069f485f5b9b5b2af2079ae52f1f1273397a6b (patch) | |
tree | caca6ba90418e2cf3c5dc75e8e2a19825cd2cb3e /tools/grit | |
parent | 36c565a32e1b60f3f7d02be640959f2ff9b2c762 (diff) | |
download | chromium_src-e2069f485f5b9b5b2af2079ae52f1f1273397a6b.zip chromium_src-e2069f485f5b9b5b2af2079ae52f1f1273397a6b.tar.gz chromium_src-e2069f485f5b9b5b2af2079ae52f1f1273397a6b.tar.bz2 |
DevTools l10n: merge Inspector's and DevTools's strings; also, disable l10n until mgr agreeement.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/173267
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24094 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/grit')
-rw-r--r-- | tools/grit/grit/format/js_map_format.py | 7 | ||||
-rw-r--r-- | tools/grit/grit/format/js_map_format_unittest.py | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/tools/grit/grit/format/js_map_format.py b/tools/grit/grit/format/js_map_format.py index 94efb6b..ac7d47f 100644 --- a/tools/grit/grit/format/js_map_format.py +++ b/tools/grit/grit/format/js_map_format.py @@ -25,7 +25,7 @@ class TopLevel(interface.ItemFormatter): if not begin_item: return '' else: - return '''// Copyright %d Google Inc. All Rights Reserved. + return '''// Copyright %d Google Inc. All Rights Reserved. // This file is automatically generated by GRIT. Do not edit. ''' % (util.GetCurrentYear()) @@ -35,7 +35,10 @@ class StringTable(interface.ItemFormatter): def Format(self, item, lang='en', begin_item=True, output_dir='.'): if begin_item: - return '' + return ''' +// Check to see if already defined in current scope. +var localizedStrings = localizedStrings || {}; +''' else: return '\n' diff --git a/tools/grit/grit/format/js_map_format_unittest.py b/tools/grit/grit/format/js_map_format_unittest.py index fcd812b..0ed7fd3 100644 --- a/tools/grit/grit/format/js_map_format_unittest.py +++ b/tools/grit/grit/format/js_map_format_unittest.py @@ -51,6 +51,9 @@ class JsMapFormatUnittest(unittest.TestCase): build.RcBuilder.ProcessNode(root, DummyOutput('js_map_format', 'en'), buf) output = buf.getvalue() test = u""" +// Check to see if already defined in current scope. +var localizedStrings = localizedStrings || {}; + localizedStrings["Simple message."] = "Simple message."; localizedStrings["element\u2019s \u201c%s\u201d attribute"] = "element\u2019s \u201c%s\u201d attribute"; localizedStrings["%d error, %d warning"] = "%1$d error, %2$d warning"; @@ -73,6 +76,9 @@ localizedStrings["A \\\"double quoted\\\" message."] = "A \\\"double quoted\\\" build.RcBuilder.ProcessNode(root, DummyOutput('js_map_format', 'fr'), buf) output = buf.getvalue() test = u""" +// Check to see if already defined in current scope. +var localizedStrings = localizedStrings || {}; + localizedStrings["Hello!"] = "H\xe9P\xe9ll\xf4P\xf4!"; localizedStrings["Hello %s"] = "H\xe9P\xe9ll\xf4P\xf4 %s"; """ |