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

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

Issue 239543005: Introduce extensions_strings.grd (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move localized strings Created 6 years, 8 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 | Annotate | Revision Log
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 #e.g. '<(SHARED_INTERMEDIATE_DIR)/device/bluetooth/strings/ 95 #e.g. '<(SHARED_INTERMEDIATE_DIR)/device/bluetooth/strings/
96 # device_bluetooth_strings_da.pak', 96 # device_bluetooth_strings_da.pak',
97 inputs.append(os.path.join(SHARE_INT_DIR, 'device', 'bluetooth', 'strings', 97 inputs.append(os.path.join(SHARE_INT_DIR, 'device', 'bluetooth', 'strings',
98 'device_bluetooth_strings_%s.pak' % locale)) 98 'device_bluetooth_strings_%s.pak' % locale))
99 99
100 #e.g. '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings_da.pak', 100 #e.g. '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings_da.pak',
101 inputs.append(os.path.join(SHARE_INT_DIR, 'ui', 'app_locale_settings', 101 inputs.append(os.path.join(SHARE_INT_DIR, 'ui', 'app_locale_settings',
102 'app_locale_settings_%s.pak' % locale)) 102 'app_locale_settings_%s.pak' % locale))
103 103
104 # For example:
105 # '<(SHARED_INTERMEDIATE_DIR)/extensions/strings/extensions_strings_da.pak
106 # TODO(jamescook): When Android stops building extensions code move this
107 # to the OS != 'ios' and OS != 'android' section below.
108 inputs.append(os.path.join(SHARE_INT_DIR, 'extensions', 'strings',
109 'extensions_strings_%s.pak' % locale))
104 110
105 if OS != 'ios' and OS != 'android': 111 if OS != 'ios' and OS != 'android':
106 #e.g. '<(SHARED_INTERMEDIATE_DIR)/third_party/libaddressinput/ 112 #e.g. '<(SHARED_INTERMEDIATE_DIR)/third_party/libaddressinput/
107 # libaddressinput_strings_da.pak', 113 # libaddressinput_strings_da.pak',
108 inputs.append(os.path.join(SHARE_INT_DIR, 'third_party', 'libaddressinput', 114 inputs.append(os.path.join(SHARE_INT_DIR, 'third_party', 'libaddressinput',
109 'libaddressinput_strings_%s.pak' % locale)) 115 'libaddressinput_strings_%s.pak' % locale))
110 116
111 #e.g. '<(grit_out_dir)/google_chrome_strings_da.pak' 117 #e.g. '<(grit_out_dir)/google_chrome_strings_da.pak'
112 # or 118 # or
113 # '<(grit_out_dir)/chromium_strings_da.pak' 119 # '<(grit_out_dir)/chromium_strings_da.pak'
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 235
230 if print_outputs: 236 if print_outputs:
231 return list_outputs(locales) 237 return list_outputs(locales)
232 238
233 return repack_locales(locales) 239 return repack_locales(locales)
234 240
235 if __name__ == '__main__': 241 if __name__ == '__main__':
236 results = DoMain(sys.argv[1:]) 242 results = DoMain(sys.argv[1:])
237 if results: 243 if results:
238 print results 244 print results
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698