OLD | NEW |
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 # For example: | 105 # For example: |
106 # '<(SHARED_INTERMEDIATE_DIR)/extensions/strings/extensions_strings_da.pak | 106 # '<(SHARED_INTERMEDIATE_DIR)/extensions/strings/extensions_strings_da.pak |
107 # TODO(jamescook): When Android stops building extensions code move this | 107 # TODO(jamescook): When Android stops building extensions code move this |
108 # to the OS != 'ios' and OS != 'android' section below. | 108 # to the OS != 'ios' and OS != 'android' section below. |
109 inputs.append(os.path.join(SHARE_INT_DIR, 'extensions', 'strings', | 109 inputs.append(os.path.join(SHARE_INT_DIR, 'extensions', 'strings', |
110 'extensions_strings_%s.pak' % locale)) | 110 'extensions_strings_%s.pak' % locale)) |
111 | 111 |
112 if ENABLE_AUTOFILL_DIALOG and OS != 'ios' and OS != 'android': | 112 if ENABLE_AUTOFILL_DIALOG and OS != 'ios' and OS != 'android': |
113 #e.g. '<(SHARED_INTERMEDIATE_DIR)/third_party/libaddressinput/ | 113 #e.g. '<(SHARED_INTERMEDIATE_DIR)/third_party/libaddressinput/ |
| 114 # libaddressinput_strings_da.pak', |
| 115 inputs.append(os.path.join(SHARE_INT_DIR, 'third_party', 'libaddressinput', |
| 116 'libaddressinput_strings_%s.pak' % locale)) |
| 117 |
| 118 #e.g. '<(SHARED_INTERMEDIATE_DIR)/grit/libaddressinput/ |
114 # address_input_strings_da.pak', | 119 # address_input_strings_da.pak', |
115 inputs.append(os.path.join(SHARE_INT_DIR, 'third_party', 'libaddressinput', | 120 inputs.append(os.path.join(SHARE_INT_DIR, 'grit', 'libaddressinput', |
116 'address_input_strings_%s.pak' % locale)) | 121 'address_input_strings_%s.pak' % locale)) |
117 | 122 |
118 #e.g. '<(grit_out_dir)/google_chrome_strings_da.pak' | 123 #e.g. '<(grit_out_dir)/google_chrome_strings_da.pak' |
119 # or | 124 # or |
120 # '<(grit_out_dir)/chromium_strings_da.pak' | 125 # '<(grit_out_dir)/chromium_strings_da.pak' |
121 inputs.append(os.path.join( | 126 inputs.append(os.path.join( |
122 GRIT_DIR, '%s_strings_%s.pak' % (BRANDING, locale))) | 127 GRIT_DIR, '%s_strings_%s.pak' % (BRANDING, locale))) |
123 | 128 |
124 # Add any extra input files. | 129 # Add any extra input files. |
125 for extra_file in EXTRA_INPUT_FILES: | 130 for extra_file in EXTRA_INPUT_FILES: |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 246 |
242 if print_outputs: | 247 if print_outputs: |
243 return list_outputs(locales) | 248 return list_outputs(locales) |
244 | 249 |
245 return repack_locales(locales) | 250 return repack_locales(locales) |
246 | 251 |
247 if __name__ == '__main__': | 252 if __name__ == '__main__': |
248 results = DoMain(sys.argv[1:]) | 253 results = DoMain(sys.argv[1:]) |
249 if results: | 254 if results: |
250 print results | 255 print results |
OLD | NEW |