diff options
author | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-09 17:27:33 +0000 |
---|---|---|
committer | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-09 17:27:33 +0000 |
commit | afebae164ec8e050af2b1952be53b5fecd3400f7 (patch) | |
tree | b2e3dafa68acfb23e54709ea964090c6498558a6 /remoting/tools/verify_resources.py | |
parent | bc68e0d907e34d22f63c0bc6ab76ea934eb7c545 (diff) | |
download | chromium_src-afebae164ec8e050af2b1952be53b5fecd3400f7.zip chromium_src-afebae164ec8e050af2b1952be53b5fecd3400f7.tar.gz chromium_src-afebae164ec8e050af2b1952be53b5fecd3400f7.tar.bz2 |
Localized Chromoting Host on Windows.
This CL introduces remoting/tools/localize.py script. The script is based on Jinja2 templating language. It is used to generate localizable resources (string table, dialogs, message table and version information) from a common template. The translated strings are taken from json files (used by the webapp as well), which, in turn, are generated from remoting_strings.grd.
Collateral changes:
- Branding of Window resources has been moved to remoting_strings.grd. .ver files are not used anymore.
- Updated verify_resources.py so that it could recognize strings used by Jinja2 templates.
- Fixed the dialog layouts for RTL languages.
TBR=cpu@chromium.org
BUG=155204
Review URL: https://chromiumcodereview.appspot.com/18323017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210591 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/tools/verify_resources.py')
-rwxr-xr-x | remoting/tools/verify_resources.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/remoting/tools/verify_resources.py b/remoting/tools/verify_resources.py index 045f95d..4ffd494 100755 --- a/remoting/tools/verify_resources.py +++ b/remoting/tools/verify_resources.py @@ -72,6 +72,10 @@ def ExtractTagFromLine(file_type, line): # Manifest style m = re.search('__MSG_(.*)__', line) if m: return m.group(1) + elif file_type == 'jinja2': + # Jinja2 template file + m = re.search('\{\%\s+trans\s+\%\}([A-Z0-9_]+)\{\%\s+endtrans\s+\%\}', line) + if m: return m.group(1) return None @@ -85,7 +89,7 @@ def VerifyFile(filename, messages, used_tags): base_name, extension = os.path.splitext(filename) extension = extension[1:] - if extension not in ['js', 'cc', 'html', 'json']: + if extension not in ['js', 'cc', 'html', 'json', 'jinja2']: raise Exception("Unknown file type: %s" % extension) result = True |