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

Side by Side Diff: chrome/tools/build/repack_locales.py

Issue 1377213003: [MD settings] moving settings strings to a separate grd file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Helper script to repack paks for a list of locales. 6 """Helper script to repack paks for a list of locales.
7 7
8 Gyp doesn't have any built-in looping capability, so this just provides a way to 8 Gyp doesn't have any built-in looping capability, so this just provides a way to
9 loop over a list of locales when repacking pak files, thus avoiding a 9 loop over a list of locales when repacking pak files, thus avoiding a
10 proliferation of mostly duplicate, cut-n-paste gyp actions. 10 proliferation of mostly duplicate, cut-n-paste gyp actions.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 return os.path.join(INT_DIR, 'repack', locale + '.pak') 64 return os.path.join(INT_DIR, 'repack', locale + '.pak')
65 65
66 66
67 def calc_inputs(locale): 67 def calc_inputs(locale):
68 """Determine the files that need processing for the given locale.""" 68 """Determine the files that need processing for the given locale."""
69 inputs = [] 69 inputs = []
70 70
71 #e.g. '<(grit_out_dir)/generated_resources_da.pak' 71 #e.g. '<(grit_out_dir)/generated_resources_da.pak'
72 inputs.append(os.path.join(GRIT_DIR, 'generated_resources_%s.pak' % locale)) 72 inputs.append(os.path.join(GRIT_DIR, 'generated_resources_%s.pak' % locale))
73 73
74 #e.g. '<(grit_out_dir)/settings_strings_da.pak'
75 inputs.append(os.path.join(GRIT_DIR, 'settings_strings_%s.pak' % locale))
76
74 #e.g. '<(grit_out_dir)/locale_settings_da.pak' 77 #e.g. '<(grit_out_dir)/locale_settings_da.pak'
75 inputs.append(os.path.join(GRIT_DIR, 'locale_settings_%s.pak' % locale)) 78 inputs.append(os.path.join(GRIT_DIR, 'locale_settings_%s.pak' % locale))
76 79
77 #e.g. '<(grit_out_dir)/platform_locale_settings_da.pak' 80 #e.g. '<(grit_out_dir)/platform_locale_settings_da.pak'
78 inputs.append(os.path.join(GRIT_DIR, 81 inputs.append(os.path.join(GRIT_DIR,
79 'platform_locale_settings_%s.pak' % locale)) 82 'platform_locale_settings_%s.pak' % locale))
80 83
81 #e.g. '<(SHARED_INTERMEDIATE_DIR)/components/strings/ 84 #e.g. '<(SHARED_INTERMEDIATE_DIR)/components/strings/
82 # components_strings_da.pak', 85 # components_strings_da.pak',
83 inputs.append(os.path.join(SHARE_INT_DIR, 'components', 'strings', 86 inputs.append(os.path.join(SHARE_INT_DIR, 'components', 'strings',
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 288
286 if print_outputs: 289 if print_outputs:
287 return list_outputs(locales) 290 return list_outputs(locales)
288 291
289 return repack_locales(locales) 292 return repack_locales(locales)
290 293
291 if __name__ == '__main__': 294 if __name__ == '__main__':
292 results = DoMain(sys.argv[1:]) 295 results = DoMain(sys.argv[1:])
293 if results: 296 if results:
294 print results 297 print results
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698