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

Unified Diff: remoting/webapp/build-webapp.py

Issue 905553002: [Chromoting] Pass list of locale files into build-webapp in a single file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove --locales option from build-webapp.py Created 5 years, 10 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
« remoting/remoting_webapp.gypi ('K') | « remoting/tools/build/remoting_localize.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/build-webapp.py
diff --git a/remoting/webapp/build-webapp.py b/remoting/webapp/build-webapp.py
index 9868b6c142ff99b04df5fb8c5f1c8ca2d3dbf09c..2b13062406dbf0ab927e9ac62f56b22dd5cbd8c3 100755
--- a/remoting/webapp/build-webapp.py
+++ b/remoting/webapp/build-webapp.py
@@ -374,14 +374,14 @@ def main():
'--app_description <description> '
'--app_capabilities <capabilities...> '
'[--appid <appid>] '
- '[--locales <locales...>] '
+ '[--locales_listfile <locales-listfile-name>] '
'[--jinja_paths <paths...>] '
'[--service_environment <service_environment>]')
return 1
arg_type = ''
files = []
- locales = []
+ locales_listfile = ''
jinja_paths = []
app_id = None
app_name = None
@@ -390,7 +390,7 @@ def main():
service_environment = ''
for arg in sys.argv[7:]:
- if arg in ['--locales',
+ if arg in ['--locales_listfile',
'--jinja_paths',
'--appid',
'--app_name',
@@ -398,8 +398,9 @@ def main():
'--app_capabilities',
'--service_environment']:
arg_type = arg
- elif arg_type == '--locales':
- locales.append(arg)
+ elif arg_type == '--locales_listfile':
+ locales_listfile = arg
+ arg_type = ''
elif arg_type == '--jinja_paths':
jinja_paths.append(arg)
elif arg_type == '--appid':
@@ -419,6 +420,14 @@ def main():
else:
files.append(arg)
+ # Load the locales files from the locales_listfile.
+ if not locales_listfile:
+ raise Exception('You must specify a locales_listfile')
+ locales = []
+ with open(locales_listfile) as input:
+ for s in input:
+ locales.append(s.rstrip())
+
return buildWebApp(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4],
sys.argv[5], sys.argv[6], app_id, app_name,
app_description, app_capabilities, files, locales,
« remoting/remoting_webapp.gypi ('K') | « remoting/tools/build/remoting_localize.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698