diff options
author | Pierre Rossi <pierre.rossi@digia.com> | 2013-12-02 18:23:45 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-03 11:57:52 +0100 |
commit | 3e635f23d06a622db23c7d3e99cae574735534d9 (patch) | |
tree | a057592ee2170d096620e6f3ccf37a37bba4c531 /src/core/resources | |
parent | 430f202718f7311c541a7243870719e2df456f2f (diff) |
Get localized strings in the render process
Building on top of the repacking of .pak files, we now ship
the whole array of repacked locales and pick the appropriate one at runtime.
Change-Id: I0096e3eac6a1fc83885fd11e0fa55a746f8e45d8
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'src/core/resources')
-rw-r--r-- | src/core/resources/repack_locales.gypi | 27 | ||||
-rw-r--r-- | src/core/resources/resources.gyp | 16 |
2 files changed, 43 insertions, 0 deletions
diff --git a/src/core/resources/repack_locales.gypi b/src/core/resources/repack_locales.gypi new file mode 100644 index 000000000..e906d2178 --- /dev/null +++ b/src/core/resources/repack_locales.gypi @@ -0,0 +1,27 @@ +# 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. + +{ + 'action_name': 'repack_locales', + 'variables': { + 'repack_extra_flags%': [], + 'repack_output_dir%': '<(SHARED_INTERMEDIATE_DIR)', + 'repack_locales_script%': ['python', '<(qtwebengine_root)/tools/buildscripts/repack_locales.py'], + }, + 'inputs': [ + '<(qtwebengine_root)/tools/buildscripts/repack_locales.py', + '<!@pymod_do_main(repack_locales -i -p <(OS) -s <(SHARED_INTERMEDIATE_DIR) -x <(repack_output_dir) <(repack_extra_flags) <(locales))' + ], + 'outputs': [ + '<!@pymod_do_main(repack_locales -o -p <(OS) -s <(SHARED_INTERMEDIATE_DIR) -x <(repack_output_dir) <(locales))' + ], + 'action': [ + '<@(repack_locales_script)', + '-p', '<(OS)', + '-s', '<(SHARED_INTERMEDIATE_DIR)', + '-x', '<(repack_output_dir)/.', + '<@(repack_extra_flags)', + '<@(locales)', + ], +} diff --git a/src/core/resources/resources.gyp b/src/core/resources/resources.gyp index 4747829ae..44ffcd703 100644 --- a/src/core/resources/resources.gyp +++ b/src/core/resources/resources.gyp @@ -1,5 +1,17 @@ { + 'variables': { + # Used in repack_locales + 'locales': [ + 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', + 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he', + 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv', + 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', + 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk', + 'vi', 'zh-CN', 'zh-TW', + ], + }, 'dependencies': [ + '<(chromium_src_dir)/webkit/webkit_resources.gyp:webkit_strings', '<(chromium_src_dir)/webkit/webkit_resources.gyp:webkit_resources', '<(chromium_src_dir)/content/browser/devtools/devtools_resources.gyp:devtools_resources', ], @@ -12,6 +24,10 @@ 'action_name': 'repack_resources', 'includes': [ 'repack_resources.gypi' ], }, + { + 'action_name': 'repack_locales', + 'includes': [ 'repack_locales.gypi' ], + }, ] } ] |