Chromium Code Reviews| Index: ios/chrome/tools/build/ios_repack_extension_locales.py |
| diff --git a/ios/chrome/tools/build/ios_repack_today_extension_locales.py b/ios/chrome/tools/build/ios_repack_extension_locales.py |
| similarity index 90% |
| rename from ios/chrome/tools/build/ios_repack_today_extension_locales.py |
| rename to ios/chrome/tools/build/ios_repack_extension_locales.py |
| index d7e233406afecfa340919012c15b8816467c1127..607e1f22acb0e99e05e2c7a6bc9a1e004608eb90 100755 |
| --- a/ios/chrome/tools/build/ios_repack_today_extension_locales.py |
| +++ b/ios/chrome/tools/build/ios_repack_extension_locales.py |
| @@ -3,7 +3,7 @@ |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| -"""Helper script to repack paks for a list of locales for today extension. |
| +"""Helper script to repack paks for a list of locales for extension. |
|
sdefresne
2016/03/10 13:48:33
nit: extension -> extensions
Olivier
2016/03/10 14:31:15
Done.
|
| Gyp doesn't have any built-in looping capability, so this just provides a way to |
| loop over a list of locales when repacking pak files, thus avoiding a |
| @@ -42,9 +42,12 @@ def calc_inputs(options, locale): |
| """Determine the files that need processing for the given locale.""" |
| inputs = [] |
| - #e.g. 'out/Debug/gen/ios/today_extension/ios_today_extension_strings_da.pak' |
| - inputs.append(os.path.join(options.share_int_dir, 'ios', 'today_extension', |
| - 'ios_today_extension_strings_%s.pak' % (locale))) |
| + #e.g. 'out/Debug/gen/ios/%extension_name%/ios_%extension_name%_strings_da.pak' |
|
sdefresne
2016/03/10 13:48:33
nit: %variable% is unusual on un*x, can you change
Olivier
2016/03/10 14:31:16
Done.
|
| + inputs.append(os.path.join( |
|
sdefresne
2016/03/10 13:48:33
nit: keep the original formatting
inputs.append
Olivier
2016/03/10 14:31:15
It does not fit, so I put it on next line.
|
| + options.share_int_dir, |
| + 'ios', |
| + options.extension_name, |
| + 'ios_%s_strings_%s.pak' % (options.extension_name, locale))) |
| # Add any extra input files. |
| for extra_file in options.extra_input: |
| @@ -109,6 +112,9 @@ def DoMain(argv): |
| "-b", action="store", dest="branding", |
| help="Branding type of this build.") |
| parser.add_option( |
| + "-n", action="store", dest="extension_name", |
| + help="Name of the extension.") |
| + parser.add_option( |
| "-e", action="append", dest="extra_input", default=[], |
| help="Full path to an extra input pak file without the " |
| "locale suffix and \".pak\" extension.") |
| @@ -120,6 +126,9 @@ def DoMain(argv): |
| if not locales: |
| parser.error('Please specificy at least one locale to process.\n') |
| + if not options.extension_name: |
| + parser.error('Please specificy extension name.\n') |
| + |
| if not (options.out_dir and options.share_int_dir): |
| parser.error('Please specify all of "-x" and "-s".\n') |
| if options.print_inputs and options.print_outputs: |