~chromium-team/chromium-browser/translations-pump

« back to all changes in this revision

Viewing changes to process-and-export

  • Committer: Chad MILLER
  • Date: 2015-10-19 18:42:18 UTC
  • Revision ID: chad.miller@canonical.com-20151019184218-benco7vjulfva1lc
.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/python3
2
 
# -*- coding: utf-8 -*-
3
2
 
4
3
"""
5
4
Copyright Canonical, 2014, 2015.
58
57
 
59
58
# A None domain is something we wish to ignore.
60
59
GRD_PATHFRAGMENT_TO_GETTEXT_DOMAIN = {
 
60
    "accessibility/extensions/strings/accessibility_extensions_strings.grd": "chromium-browser",
 
61
    "android/java/strings/android_chrome_strings.grd": None,
 
62
    "android/java/strings/android_ui_strings.grd": None,
61
63
    "android_webview/java/strings/android_webview_strings.grd": None,
62
64
    "android_webview/ui/aw_resources.grd": None,
63
65
    "android_webview/ui/aw_strings.grd": None,
 
66
    "app/address_input_strings.grd": "chromium-browser",
 
67
    "app/chromium_strings.grd": "chromium_strings",
 
68
    "app/generated_resources.grd": "chromium-browser",
 
69
    "app/google_chrome_strings.grd": "chromium-browser",
 
70
    "app_list/resources/app_list_resources.grd": "chromium-browser",
 
71
    "app/resources/locale_settings_chromiumos.grd": None,
 
72
    "app/resources/locale_settings_google_chromeos.grd": None,
 
73
    "app/resources/locale_settings.grd": None,   # Not strings.
 
74
    "app/resources/locale_settings_linux.grd": None,   # Not strings.
 
75
    "app/resources/locale_settings_mac.grd": None,
 
76
    "app/resources/locale_settings_win.grd": None,
 
77
    "app/settings_strings.grd": "chromium-browser",
 
78
    "app/theme/chrome_unscaled_resources.grd": None,
 
79
    "app/theme/theme_resources.grd": None,
64
80
    "ash/ash_strings.grd": None,
65
81
    "ash/resources/ash_resources.grd": None,
66
 
    "chrome/android/java/strings/android_chrome_strings.grd": None,
67
 
    "chrome/app/address_input_strings.grd": "chromium-browser",
68
 
    "chrome/app/chromium_strings.grd": "chromium_strings",
69
 
    "chrome/app/generated_resources.grd": "chromium-browser",
70
 
    "chrome/app/google_chrome_strings.grd": "chromium-browser",
71
 
    "chrome/app/resources/locale_settings_chromiumos.grd": None,
72
 
    "chrome/app/resources/locale_settings_google_chromeos.grd": None,
73
 
    "chrome/app/resources/locale_settings.grd": None,   # Not strings.
74
 
    "chrome/app/resources/locale_settings_linux.grd": None,   # Not strings.
75
 
    "chrome/app/resources/locale_settings_mac.grd": None,
76
 
    "chrome/app/resources/locale_settings_win.grd": None,
77
 
    "chrome/app/theme/chrome_unscaled_resources.grd": None,
78
 
    "chrome/app/theme/theme_resources.grd": None,
79
 
    "chrome/browser/browser_resources.grd": "chromium-browser",
80
 
    "chrome/browser/devtools/device/webrtc/resources.grd": "chromium-browser",
81
 
    "chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings.grd": "chromium-browser",
82
 
    "chrome/browser/resources/component_extension_resources.grd": "chromium-browser",
83
 
    "chrome/browser/resources/invalidations_resources.grd": "chromium-browser",
84
 
    "chrome/browser/resources/memory_internals_resources.grd": "chromium-browser",
85
 
    "chrome/browser/resources/net_internals_resources.grd": "chromium-browser",
86
 
    "chrome/browser/resources/options_resources.grd": "chromium-browser",
87
 
    "chrome/browser/resources/options_test_resources.grd": None,
88
 
    "chrome/browser/resources/password_manager_internals_resources.grd": "chromium-browser",
89
 
    "chrome/browser/resources/quota_internals_resources.grd": "chromium-browser",
90
 
    "chrome/browser/resources/settings/settings_resources.grd": "chromium-browser",
91
 
    "chrome/browser/resources/signin_internals_resources.grd": "chromium-browser",
92
 
    "chrome/browser/resources/sync_file_system_internals_resources.grd": "chromium-browser",
93
 
    "chrome/browser/resources/sync_internals_resources.grd": "chromium-browser",
94
 
    "chrome/browser/resources/translate_internals_resources.grd": "chromium-browser",
 
82
    "blimp/client/android/java/strings/android_blimp_strings.grd": None,
 
83
    "browser/browser_resources.grd": "chromium-browser",
 
84
    "browser/devtools/device/webrtc/resources.grd": "chromium-browser",
 
85
    "browser/resources/chromeos/chromevox/strings/chromevox_strings.grd": "chromium-browser",
 
86
    "browser/resources/component_extension_resources.grd": "chromium-browser",
 
87
    "browser/resources/invalidations_resources.grd": "chromium-browser",
 
88
    "browser/resources/memory_internals_resources.grd": "chromium-browser",
 
89
    "browser/resources/net_internals_resources.grd": "chromium-browser",
 
90
    "browser/resources/options_resources.grd": "chromium-browser",
 
91
    "browser/resources/options_test_resources.grd": None,
 
92
    "browser/resources/password_manager_internals_resources.grd": "chromium-browser",
 
93
    "browser/resources/quota_internals_resources.grd": "chromium-browser",
 
94
    "browser/resources/settings/settings_resources.grd": "chromium-browser",
 
95
    "browser/resources/signin_internals_resources.grd": "chromium-browser",
 
96
    "browser/resources/sync_file_system_internals_resources.grd": "chromium-browser",
 
97
    "browser/resources/sync_internals_resources.grd": "chromium-browser",
 
98
    "browser/resources/translate_internals_resources.grd": "chromium-browser",
95
99
    "chromecast/app/resources/chromecast_settings.grd": None,
96
100
    "chromecast/app/resources/shell_resources.grd": None,
97
 
    "chrome/common/common_resources.grd": "chromium-browser",
98
 
    "chrome/common/extensions_api_resources.grd": "chromium-browser",
99
 
    "chrome/renderer/resources/renderer_resources.grd": "chromium-browser",
100
 
    "chrome/test/data/webui_test_resources.grd": None,
 
101
    "chromeos/resources/ui_chromeos_resources.grd": None,
 
102
    "chromeos/ui_chromeos_strings.grd": None,
101
103
    "cloud_print/service/win/service_resources.grd": None,
102
104
    "cloud_print/virtual_driver/win/install/virtual_driver_setup_resources.grd": None,
 
105
    "common/common_resources.grd": "chromium-browser",
 
106
    "common/extensions_api_resources.grd": "chromium-browser",
103
107
    "components/chrome_apps/chrome_apps_resources.grd": None,
 
108
    "components/components_chromium_strings.grd": "chromium-browser",
 
109
    "components/components_google_chrome_strings.grd": "chromium-browser",
104
110
    "components/components_strings.grd": "chromium-browser",
105
111
    "components/html_viewer/html_viewer_resources.grd": None,
106
112
    "components/policy/resources/policy_templates.grd": "chromium-browser",
117
123
    "extensions/extensions_strings.grd": "chromium-browser",
118
124
    "extensions/renderer/resources/extensions_renderer_resources.grd": "chromium-browser",
119
125
    "extensions/shell/app_shell_resources.grd": "chromium-browser",
 
126
    "file_manager/file_manager_resources.grd": "chromium-browser",
 
127
    "ios/chrome/app/strings/ios_chromium_strings.grd": None,
 
128
    "ios/chrome/app/strings/ios_google_chrome_strings.grd": None,
 
129
    "ios/chrome/app/strings/ios_locale_settings.grd": None,
 
130
    "ios/chrome/app/strings/ios_strings.grd": None,
120
131
    "ios/chrome/app/strings/ios_strings_resources.grd": None,
121
132
    "ios/chrome/app/theme/ios_theme_resources.grd": None,
 
133
    "ios/chrome/today_extension/strings/ios_today_extension_strings.grd": None,
 
134
    "keyboard/keyboard_resources.grd": "chromium-browser",
 
135
    "login/login_resources.grd": "chromium-browser",
122
136
    "net/base/net_resources.grd": "chromium-browser",
123
137
    "remoting/resources/remoting_strings.grd": "remoting_strings",
 
138
    "renderer/resources/renderer_resources.grd": "chromium-browser",
 
139
    "resources/ui_resources.grd": "chromium-browser",
 
140
    "resources/ui_unscaled_resources.grd": "chromium-browser",
 
141
    "strings/app_locale_settings.grd": "chromium-browser",
 
142
    "strings/ui_strings.grd": "chromium-browser",
 
143
    "test/data/webui_test_resources.grd": None,
124
144
    "third_party/libaddressinput/src/cpp/res/messages.grd": "chromium-browser",
125
145
    "third_party/WebKit/public/blink_image_resources.grd": "chromium-browser",
126
146
    "third_party/WebKit/public/blink_resources.grd": "chromium-browser",
130
150
    "tools/grit/grit/testdata/substitute_no_ids.grd": None,
131
151
    "tools/grit/grit/testdata/whitelist_resources.grd": None,
132
152
    "tools/grit/grit/testdata/whitelist_strings.grd": None,
133
 
    "ui/accessibility/extensions/strings/accessibility_extensions_strings.grd": "chromium-browser",
134
 
    "ui/android/java/strings/android_ui_strings.grd": None,
135
 
    "ui/chromeos/resources/ui_chromeos_resources.grd": None,
136
 
    "ui/chromeos/ui_chromeos_strings.grd": None,
137
 
    "ui/file_manager/file_manager_resources.grd": "chromium-browser",
138
 
    "ui/keyboard/keyboard_resources.grd": "chromium-browser",
139
 
    "ui/login/login_resources.grd": "chromium-browser",
140
 
    "ui/oobe/oobe_resources.grd": "chromium-browser",
141
 
    "ui/resources/ui_resources.grd": "chromium-browser",
142
 
    "ui/resources/ui_unscaled_resources.grd": "chromium-browser",
143
 
    "ui/strings/app_locale_settings.grd": "chromium-browser",
144
 
    "ui/strings/ui_strings.grd": "chromium-browser",
145
 
    "ui/views/resources/views_resources.grd": "chromium-browser",
146
 
    "ui/webui/resources/webui_resources.grd": "chromium-browser",
 
153
    "views/resources/views_resources.grd": "chromium-browser",
 
154
    "webui/resources/webui_resources.grd": "chromium-browser",
147
155
}
148
156
used_grd_pathfragment_to_gettext_domain = set()
149
157
 
326
334
    translator_logger.addHandler(logging.FileHandler("notes-to-translators", "w"))
327
335
    translator_logger.setLevel(logging.DEBUG)
328
336
 
329
 
 
330
337
    if args.profile:
331
338
        import cProfile
332
339
        cProfile.run('process(args.chromium_source, args.chromium_destination, args.launchpad_source, args.launchpad_destination)')