summaryrefslogtreecommitdiffstats
path: root/tools/buildscripts/repack_locales.py
diff options
context:
space:
mode:
authorMichael BrĂ¼ning <michael.bruning@qt.io>2019-02-05 14:50:22 +0100
committerMichael BrĂ¼ning <michael.bruning@qt.io>2019-02-05 16:56:24 +0100
commit7aa06a1614b7ca6508d96ee2e8ef0f4c49038a6f (patch)
tree4331533a6c0fa7a843c831d66e62472a7f8a4d30 /tools/buildscripts/repack_locales.py
parent5e92adf5f85c4ec8340d5b7e92166a5e4f8e9883 (diff)
parentf17f815878d1d3f02f464347d2807555cab00a88 (diff)
Merge remote-tracking branch 'origin/dev' into 5.13
Conflicts: src/core/content_browser_client_qt.cpp src/core/content_browser_client_qt.h Change-Id: I3da791a82dab56fd7535ba1e4c0ab1d9ca74f547
Diffstat (limited to 'tools/buildscripts/repack_locales.py')
-rwxr-xr-xtools/buildscripts/repack_locales.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/buildscripts/repack_locales.py b/tools/buildscripts/repack_locales.py
index 103fdaf69..8f1ae190b 100755
--- a/tools/buildscripts/repack_locales.py
+++ b/tools/buildscripts/repack_locales.py
@@ -56,6 +56,8 @@ INT_DIR = None
# The target platform. If it is not defined, sys.platform will be used.
OS = None
+ENABLE_EXTENSIONS = False
+
# Extra input files.
EXTRA_INPUT_FILES = []
@@ -109,6 +111,14 @@ def calc_inputs(locale):
inputs.append(os.path.join(SHARE_INT_DIR, 'chrome',
'chromium_strings_%s.pak' % locale))
+ if ENABLE_EXTENSIONS:
+ # For example:
+ # '<(SHARED_INTERMEDIATE_DIR)/extensions/strings/extensions_strings_da.pak
+ # TODO(jamescook): When Android stops building extensions code move this
+ # to the OS != 'ios' and OS != 'android' section below.
+ inputs.append(os.path.join(SHARE_INT_DIR, 'extensions', 'strings',
+ 'extensions_strings_%s.pak' % locale))
+
# Add any extra input files.
for extra_file in EXTRA_INPUT_FILES:
inputs.append('%s_%s.pak' % (extra_file, locale))
@@ -158,6 +168,7 @@ def DoMain(argv):
global INT_DIR
global OS
global EXTRA_INPUT_FILES
+ global ENABLE_EXTENSIONS
parser = optparse.OptionParser("usage: %prog [options] locales")
parser.add_option("-i", action="store_true", dest="inputs", default=False,
@@ -177,6 +188,9 @@ def DoMain(argv):
locale suffix and \".pak\" extension.")
parser.add_option("-p", action="store", dest="os",
help="The target OS. (e.g. mac, linux, win, etc.)")
+ parser.add_option("--enable-extensions", action="store",
+ dest="enable_extensions",
+ help="Whether to include strings for extensions")
options, locales = parser.parse_args(argv)
if not locales:
@@ -188,6 +202,7 @@ def DoMain(argv):
SHARE_INT_DIR = options.share_int_dir
EXTRA_INPUT_FILES = options.extra_input
OS = options.os
+ ENABLE_EXTENSIONS = options.enable_extensions == '1'
if not OS:
if sys.platform == 'darwin':