| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 if USE_ASH: | 85 if USE_ASH: |
| 86 #e.g. '<(SHARED_INTERMEDIATE_DIR)/ash/strings/ash_strings_da.pak', | 86 #e.g. '<(SHARED_INTERMEDIATE_DIR)/ash/strings/ash_strings_da.pak', |
| 87 inputs.append(os.path.join(SHARE_INT_DIR, 'ash', 'strings', | 87 inputs.append(os.path.join(SHARE_INT_DIR, 'ash', 'strings', |
| 88 'ash_strings_%s.pak' % locale)) | 88 'ash_strings_%s.pak' % locale)) |
| 89 | 89 |
| 90 if CHROMEOS: | 90 if CHROMEOS: |
| 91 inputs.append(os.path.join(SHARE_INT_DIR, 'ui', 'chromeos', 'strings', | 91 inputs.append(os.path.join(SHARE_INT_DIR, 'ui', 'chromeos', 'strings', |
| 92 'ui_chromeos_strings_%s.pak' % locale)) | 92 'ui_chromeos_strings_%s.pak' % locale)) |
| 93 | 93 |
| 94 if OS != 'ios': | 94 if OS != 'ios': |
| 95 #e.g. '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_da.pak' | 95 #e.g. |
| 96 inputs.append(os.path.join(SHARE_INT_DIR, 'webkit', | 96 # '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_da.pak' |
| 97 'webkit_strings_%s.pak' % locale)) | 97 inputs.append(os.path.join(SHARE_INT_DIR, 'content', 'app', 'strings', |
| 98 'content_strings_%s.pak' % locale)) |
| 98 | 99 |
| 99 #e.g. '<(SHARED_INTERMEDIATE_DIR)/ui/strings_da.pak', | 100 #e.g. '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_da.pak', |
| 100 inputs.append(os.path.join(SHARE_INT_DIR, 'ui', 'strings', | 101 inputs.append(os.path.join(SHARE_INT_DIR, 'ui', 'strings', |
| 101 'ui_strings_%s.pak' % locale)) | 102 'ui_strings_%s.pak' % locale)) |
| 102 | 103 |
| 103 #e.g. '<(SHARED_INTERMEDIATE_DIR)/device/bluetooth/strings/ | 104 #e.g. '<(SHARED_INTERMEDIATE_DIR)/device/bluetooth/strings/ |
| 104 # device_bluetooth_strings_da.pak', | 105 # device_bluetooth_strings_da.pak', |
| 105 inputs.append(os.path.join(SHARE_INT_DIR, 'device', 'bluetooth', 'strings', | 106 inputs.append(os.path.join(SHARE_INT_DIR, 'device', 'bluetooth', 'strings', |
| 106 'device_bluetooth_strings_%s.pak' % locale)) | 107 'device_bluetooth_strings_%s.pak' % locale)) |
| 107 | 108 |
| 108 #e.g. '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_da.pak', | 109 #e.g. '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_da.pak', |
| 109 inputs.append(os.path.join(SHARE_INT_DIR, 'ui', 'strings', | 110 inputs.append(os.path.join(SHARE_INT_DIR, 'ui', 'strings', |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 | 253 |
| 253 if print_outputs: | 254 if print_outputs: |
| 254 return list_outputs(locales) | 255 return list_outputs(locales) |
| 255 | 256 |
| 256 return repack_locales(locales) | 257 return repack_locales(locales) |
| 257 | 258 |
| 258 if __name__ == '__main__': | 259 if __name__ == '__main__': |
| 259 results = DoMain(sys.argv[1:]) | 260 results = DoMain(sys.argv[1:]) |
| 260 if results: | 261 if results: |
| 261 print results | 262 print results |
| OLD | NEW |