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

Side by Side Diff: ios/chrome/tools/build/ios_repack_locales.py

Issue 1679283002: Componentize Chrome terms of service, Accept-Languages & default encoding. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase && use a qualified include for the new file Created 4 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 unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 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 for iOS. 6 """Helper script to repack paks for a list of locales for iOS.
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 24 matching lines...) Expand all
35 locale = 'en' 35 locale = 'en'
36 else: 36 else:
37 locale = locale.replace('-', '_') 37 locale = locale.replace('-', '_')
38 return os.path.join(options.out_dir, locale + '.lproj', 'locale.pak') 38 return os.path.join(options.out_dir, locale + '.lproj', 'locale.pak')
39 39
40 40
41 def calc_inputs(options, locale): 41 def calc_inputs(options, locale):
42 """Determine the files that need processing for the given locale.""" 42 """Determine the files that need processing for the given locale."""
43 inputs = [] 43 inputs = []
44 44
45 #e.g. 'out/Debug/gen/components/strings/components_locale_settings_da.pak'
46 inputs.append(os.path.join(options.share_int_dir, 'components', 'strings',
47 'components_locale_settings_%s.pak' % locale))
48
45 #e.g. 'out/Debug/gen/components/strings/components_strings_da.pak' 49 #e.g. 'out/Debug/gen/components/strings/components_strings_da.pak'
46 inputs.append(os.path.join(options.share_int_dir, 'components', 'strings', 50 inputs.append(os.path.join(options.share_int_dir, 'components', 'strings',
47 'components_strings_%s.pak' % locale)) 51 'components_strings_%s.pak' % locale))
48 52
49 #e.g. 'out/Debug/gen/components/strings/components_chromium_strings_da.pak' 53 #e.g. 'out/Debug/gen/components/strings/components_chromium_strings_da.pak'
50 # or 'out/Debug/gen/components/strings/ 54 # or 'out/Debug/gen/components/strings/
51 # components_google_chrome_strings_da.pak' 55 # components_google_chrome_strings_da.pak'
52 inputs.append(os.path.join(options.share_int_dir, 'components', 'strings', 56 inputs.append(os.path.join(options.share_int_dir, 'components', 'strings',
53 'components_%s_strings_%s.pak' % (options.branding, locale))) 57 'components_%s_strings_%s.pak' % (options.branding, locale)))
54 58
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 160
157 if options.print_outputs: 161 if options.print_outputs:
158 return quote_filenames(list_outputs(options, locales)) 162 return quote_filenames(list_outputs(options, locales))
159 163
160 return repack_locales(options, locales) 164 return repack_locales(options, locales)
161 165
162 if __name__ == '__main__': 166 if __name__ == '__main__':
163 results = DoMain(sys.argv[1:]) 167 results = DoMain(sys.argv[1:])
164 if results: 168 if results:
165 print results 169 print results
OLDNEW
« no previous file with comments | « ios/chrome/ios_chrome_resources.gyp ('k') | tools/copyright_scanner/third_party_files_whitelist.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698