| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 #e.g. '<(SHARED_INTERMEDIATE_DIR)/device/bluetooth/strings/ | 93 #e.g. '<(SHARED_INTERMEDIATE_DIR)/device/bluetooth/strings/ |
| 94 # device_bluetooth_strings_da.pak', | 94 # device_bluetooth_strings_da.pak', |
| 95 inputs.append(os.path.join(SHARE_INT_DIR, 'device', 'bluetooth', 'strings', | 95 inputs.append(os.path.join(SHARE_INT_DIR, 'device', 'bluetooth', 'strings', |
| 96 'device_bluetooth_strings_%s.pak' % locale)) | 96 'device_bluetooth_strings_%s.pak' % locale)) |
| 97 | 97 |
| 98 #e.g. '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings_da.pak', | 98 #e.g. '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings_da.pak', |
| 99 inputs.append(os.path.join(SHARE_INT_DIR, 'ui', 'app_locale_settings', | 99 inputs.append(os.path.join(SHARE_INT_DIR, 'ui', 'app_locale_settings', |
| 100 'app_locale_settings_%s.pak' % locale)) | 100 'app_locale_settings_%s.pak' % locale)) |
| 101 | 101 |
| 102 |
| 103 if OS != 'ios' and OS != 'android': |
| 104 #e.g. '<(SHARED_INTERMEDIATE_DIR)/third_party/libaddressinput/ |
| 105 # libaddressinput_strings_da.pak', |
| 106 inputs.append(os.path.join(SHARE_INT_DIR, 'third_party', 'libaddressinput', |
| 107 'libaddressinput_strings_%s.pak' % locale)) |
| 108 |
| 102 #e.g. '<(grit_out_dir)/google_chrome_strings_da.pak' | 109 #e.g. '<(grit_out_dir)/google_chrome_strings_da.pak' |
| 103 # or | 110 # or |
| 104 # '<(grit_out_dir)/chromium_strings_da.pak' | 111 # '<(grit_out_dir)/chromium_strings_da.pak' |
| 105 inputs.append(os.path.join( | 112 inputs.append(os.path.join( |
| 106 GRIT_DIR, '%s_strings_%s.pak' % (BRANDING, locale))) | 113 GRIT_DIR, '%s_strings_%s.pak' % (BRANDING, locale))) |
| 107 | 114 |
| 108 # Add any extra input files. | 115 # Add any extra input files. |
| 109 for extra_file in EXTRA_INPUT_FILES: | 116 for extra_file in EXTRA_INPUT_FILES: |
| 110 inputs.append('%s_%s.pak' % (extra_file, locale)) | 117 inputs.append('%s_%s.pak' % (extra_file, locale)) |
| 111 | 118 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 223 |
| 217 if print_outputs: | 224 if print_outputs: |
| 218 return list_outputs(locales) | 225 return list_outputs(locales) |
| 219 | 226 |
| 220 return repack_locales(locales) | 227 return repack_locales(locales) |
| 221 | 228 |
| 222 if __name__ == '__main__': | 229 if __name__ == '__main__': |
| 223 results = DoMain(sys.argv[1:]) | 230 results = DoMain(sys.argv[1:]) |
| 224 if results: | 231 if results: |
| 225 print results | 232 print results |
| OLD | NEW |