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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 98 |
99 #e.g. '<(SHARED_INTERMEDIATE_DIR)/ui/strings_da.pak', | 99 #e.g. '<(SHARED_INTERMEDIATE_DIR)/ui/strings_da.pak', |
100 inputs.append(os.path.join(SHARE_INT_DIR, 'ui', 'strings', | 100 inputs.append(os.path.join(SHARE_INT_DIR, 'ui', 'strings', |
101 'ui_strings_%s.pak' % locale)) | 101 'ui_strings_%s.pak' % locale)) |
102 | 102 |
103 #e.g. '<(SHARED_INTERMEDIATE_DIR)/device/bluetooth/strings/ | 103 #e.g. '<(SHARED_INTERMEDIATE_DIR)/device/bluetooth/strings/ |
104 # device_bluetooth_strings_da.pak', | 104 # device_bluetooth_strings_da.pak', |
105 inputs.append(os.path.join(SHARE_INT_DIR, 'device', 'bluetooth', 'strings', | 105 inputs.append(os.path.join(SHARE_INT_DIR, 'device', 'bluetooth', 'strings', |
106 'device_bluetooth_strings_%s.pak' % locale)) | 106 'device_bluetooth_strings_%s.pak' % locale)) |
107 | 107 |
108 #e.g. '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings_da.pak', | 108 #e.g. '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_da.pak', |
109 inputs.append(os.path.join(SHARE_INT_DIR, 'ui', 'app_locale_settings', | 109 inputs.append(os.path.join(SHARE_INT_DIR, 'ui', 'strings', |
110 'app_locale_settings_%s.pak' % locale)) | 110 'app_locale_settings_%s.pak' % locale)) |
111 | 111 |
112 # For example: | 112 # For example: |
113 # '<(SHARED_INTERMEDIATE_DIR)/extensions/strings/extensions_strings_da.pak | 113 # '<(SHARED_INTERMEDIATE_DIR)/extensions/strings/extensions_strings_da.pak |
114 # TODO(jamescook): When Android stops building extensions code move this | 114 # TODO(jamescook): When Android stops building extensions code move this |
115 # to the OS != 'ios' and OS != 'android' section below. | 115 # to the OS != 'ios' and OS != 'android' section below. |
116 inputs.append(os.path.join(SHARE_INT_DIR, 'extensions', 'strings', | 116 inputs.append(os.path.join(SHARE_INT_DIR, 'extensions', 'strings', |
117 'extensions_strings_%s.pak' % locale)) | 117 'extensions_strings_%s.pak' % locale)) |
118 | 118 |
119 if ENABLE_AUTOFILL_DIALOG and OS != 'ios' and OS != 'android': | 119 if ENABLE_AUTOFILL_DIALOG and OS != 'ios' and OS != 'android': |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 | 252 |
253 if print_outputs: | 253 if print_outputs: |
254 return list_outputs(locales) | 254 return list_outputs(locales) |
255 | 255 |
256 return repack_locales(locales) | 256 return repack_locales(locales) |
257 | 257 |
258 if __name__ == '__main__': | 258 if __name__ == '__main__': |
259 results = DoMain(sys.argv[1:]) | 259 results = DoMain(sys.argv[1:]) |
260 if results: | 260 if results: |
261 print results | 261 print results |
OLD | NEW |