Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Unified Diff: ios/chrome/tools/strings/generate_localizable_strings.py

Issue 2001613002: [iOS/GN] Add template for generate_localizable_strings tool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@{interlude}
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/tools/strings/generate_localizable_strings.gni ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:])
« no previous file with comments | « ios/chrome/tools/strings/generate_localizable_strings.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698