Chromium Code Reviews| Index: ios/chrome/tools/strings/generate_localizable_strings.py |
| diff --git a/ios/chrome/tools/strings/generate_localizable_strings.py b/ios/chrome/tools/strings/generate_localizable_strings.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cd993b76cce69641adb5f27387247e34d88ca090 |
| --- /dev/null |
| +++ b/ios/chrome/tools/strings/generate_localizable_strings.py |
| @@ -0,0 +1,25 @@ |
| +# Copyright 2016 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. |
| + |
| +import os |
| +import sys |
| + |
|
justincohen
2016/05/20 15:39:01
comment explaining what the script does.
|
| + |
| +def Main(args): |
| + if len(args) < 5: |
| + sys.stderr.write( |
| + 'usage: %s tool config include_dir datapack_dir output_dir locales ...' |
| + % os.path.basename(sys.argv[0])) |
| + sys.exit(1) |
| + |
| + tool, config_file, include_dir, datapack_dir, output_dir = args[:5] |
| + locales = args[5:] |
| + |
| + os.execv(tool, [tool, '-c', config_file, '-I', include_dir, '-p', |
|
justincohen
2016/05/20 15:39:00
I guess gn can't call out to exec itself? This is
|
| + datapack_dir, '-o', output_dir] + locales) |
| + sys.exit(1) |
| + |
| + |
| +if __name__ == '__main__': |
| + Main(sys.argv[1:]) |