diff options
-rwxr-xr-x | build/android/process_resources.py | 25 | ||||
-rw-r--r-- | build/common.gypi | 3 | ||||
-rw-r--r-- | build/java.gypi | 43 | ||||
-rw-r--r-- | build/java_apk.gypi | 19 | ||||
-rw-r--r-- | chrome/android/java/strings/android_chrome_strings.grd | 86 | ||||
-rw-r--r-- | chrome/app/generated_resources.grd | 57 | ||||
-rw-r--r-- | chrome/chrome.gyp | 4 | ||||
-rw-r--r-- | content/public/android/java/strings/android_content_strings.grd | 86 | ||||
-rw-r--r-- | ui/android/java/strings/android_ui_strings.grd | 86 |
9 files changed, 232 insertions, 177 deletions
diff --git a/build/android/process_resources.py b/build/android/process_resources.py index f5de24d..63582df 100755 --- a/build/android/process_resources.py +++ b/build/android/process_resources.py @@ -8,6 +8,7 @@ import optparse import os +import shlex import subprocess from pylib import build_utils @@ -23,8 +24,11 @@ def ParseArgs(): parser.add_option('--android-sdk-tools', help='path to the Android SDK platform tools folder') parser.add_option('--R-dir', help='directory to hold generated R.java') - parser.add_option('--res-dir', help='directory containing resources') - parser.add_option('--out-res-dir', + parser.add_option('--res-dirs', + help='directories containing resources to be packaged') + parser.add_option('--crunch-input-dir', + help='directory containing images to be crunched') + parser.add_option('--crunch-output-dir', help='directory to hold crunched resources') parser.add_option('--non-constant-id', action='store_true') parser.add_option('--custom-package', help='Java package for R.java') @@ -40,10 +44,10 @@ def ParseArgs(): parser.error('No positional arguments should be given.') # Check that required options have been provided. - required_options = ('android_sdk', 'android_sdk_tools', - 'R_dir', 'res_dir', 'out_res_dir') + required_options = ('android_sdk', 'android_sdk_tools', 'R_dir', 'res_dirs', + 'crunch_input_dir', 'crunch_output_dir') for option_name in required_options: - if getattr(options, option_name) is None: + if not getattr(options, option_name): parser.error('--%s is required' % option_name.replace('_', '-')) return options @@ -65,14 +69,13 @@ def main(): 'package', '-m', '-M', options.android_manifest, - '-S', options.res_dir, '--auto-add-overlay', '-I', android_jar, '--output-text-symbols', options.R_dir, '-J', options.R_dir] - # If strings.xml was generated from a grd file, it will be in out_res_dir. - if os.path.isdir(options.out_res_dir): - package_command += ['-S', options.out_res_dir] + res_dirs = shlex.split(options.res_dirs) + for res_dir in res_dirs: + package_command += ['-S', res_dir] if options.non_constant_id: package_command.append('--non-constant-id') if options.custom_package: @@ -83,8 +86,8 @@ def main(): # images to display correctly. subprocess.check_call([aapt, 'crunch', - '-S', options.res_dir, - '-C', options.out_res_dir]) + '-S', options.crunch_input_dir, + '-C', options.crunch_output_dir]) build_utils.Touch(options.stamp) diff --git a/build/common.gypi b/build/common.gypi index 2aa4ef1..5f9b152 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -1434,7 +1434,8 @@ ], }], ['OS=="android"', { - 'grit_defines': ['-D', 'android'], + 'grit_defines': ['-D', 'android', + '-E', 'ANDROID_JAVA_TAGGED_ONLY=true'], }], ['OS=="mac"', { 'grit_defines': ['-D', 'scale_factors=2x'], diff --git a/build/java.gypi b/build/java.gypi index 17a12fc9..1ab72c2 100644 --- a/build/java.gypi +++ b/build/java.gypi @@ -41,6 +41,9 @@ # R_package_relpath - Same as R_package, but replace each '.' with '/'. # java_strings_grd - The name of the grd file from which to generate localized # strings.xml files, if any. +# res_extra_dirs - A list of extra directories containing Android resources. +# These directories may be generated at build time. +# res_extra_files - A list of the files in res_extra_dirs. { 'dependencies': [ @@ -59,6 +62,9 @@ 'generated_R_dirs': [], 'has_java_resources%': 0, 'java_strings_grd%': '', + 'res_extra_dirs': [], + 'res_extra_files': [], + 'resource_input_paths': ['>@(res_extra_files)'], 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)', 'classes_dir': '<(intermediate_dir)/classes', 'compile_stamp': '<(intermediate_dir)/compile.stamp', @@ -74,15 +80,14 @@ ['has_java_resources == 1', { 'variables': { 'res_dir': '<(java_in_dir)/res', - 'out_res_dir': '<(intermediate_dir)/res', + 'res_crunched_dir': '<(intermediate_dir)/res_crunched', + 'res_input_dirs': ['<(res_dir)', '<@(res_extra_dirs)'], + 'resource_input_paths': ['<!@(find <(res_dir) -type f)'], 'R_dir': '<(intermediate_dir)/java_R', 'R_text_file': '<(R_dir)/R.txt', 'R_stamp': '<(intermediate_dir)/resources.stamp', 'generated_src_dirs': ['<(R_dir)'], 'additional_input_paths': ['<(R_stamp)'], - # grit_grd_file is used by grit_action.gypi, included below. - 'grit_grd_file': '<(java_in_dir)/strings/<(java_strings_grd)', - 'resource_input_paths': [], }, 'all_dependent_settings': { 'variables': { @@ -90,29 +95,29 @@ # generated_R_dirs and additional_R_files. 'generated_R_dirs': ['<(R_dir)'], 'additional_input_paths': ['<(R_stamp)'], - 'additional_R_text_files': ['<(R_text_file)'], # Dependent APKs include this target's resources via - # additional_res_dirs and additional_res_packages. - 'additional_res_dirs': ['<(out_res_dir)', '<(res_dir)'], + # additional_res_dirs, additional_res_packages, and + # additional_R_text_files. + 'additional_res_dirs': ['<(res_crunched_dir)', '<@(res_input_dirs)'], 'additional_res_packages': ['<(R_package)'], + 'additional_R_text_files': ['<(R_text_file)'], }, }, 'conditions': [ ['java_strings_grd != ""', { 'variables': { - 'resource_input_paths': [ - # TODO(newt): replace this with .../values/strings.xml once - # the English strings.xml is generated as well? That would be - # simpler and faster and should be equivalent. - '<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(out_res_dir)" <(grit_grd_file))', - ], + 'res_grit_dir': '<(intermediate_dir)/res_grit', + 'res_input_dirs': ['<(res_grit_dir)'], + 'grit_grd_file': '<(java_in_dir)/strings/<(java_strings_grd)', + 'resource_input_paths': ['<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(res_grit_dir)" <(grit_grd_file))'], }, 'actions': [ { 'action_name': 'generate_localized_strings_xml', 'variables': { - 'grit_out_dir': '<(out_res_dir)', + 'grit_additional_defines': ['-E', 'ANDROID_JAVA_TAGGED_ONLY=false'], + 'grit_out_dir': '<(res_grit_dir)', # resource_ids is unneeded since we don't generate .h headers. 'grit_resource_ids': '', }, @@ -132,8 +137,7 @@ 'inputs': [ '<(DEPTH)/build/android/pylib/build_utils.py', '<(DEPTH)/build/android/process_resources.py', - '<!@(find <(res_dir) -type f)', - '<@(resource_input_paths)', + '>@(resource_input_paths)', ], 'outputs': [ '<(R_stamp)', @@ -143,14 +147,15 @@ '--android-sdk', '<(android_sdk)', '--android-sdk-tools', '<(android_sdk_tools)', '--R-dir', '<(R_dir)', - '--res-dir', '<(res_dir)', - '--out-res-dir', '<(out_res_dir)', + '--res-dirs', '<(res_input_dirs)', + '--crunch-input-dir', '>(res_dir)', + '--crunch-output-dir', '<(res_crunched_dir)', '--android-manifest', '<(android_manifest)', '--non-constant-id', '--custom-package', '<(R_package)', '--stamp', '<(R_stamp)', - # Add list of inputs to the command line, so if inputs change + # Add hash of inputs to the command line, so if inputs change # (e.g. if a resource if removed), the command will be re-run. # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. '--ignore=>!(echo \'>(_inputs)\' | md5sum)', diff --git a/build/java_apk.gypi b/build/java_apk.gypi index 3f3e706..0aea316 100644 --- a/build/java_apk.gypi +++ b/build/java_apk.gypi @@ -69,7 +69,7 @@ 'additional_res_packages': [], 'is_test_apk%': 0, 'java_strings_grd%': '', - 'grit_grd_file%': '', + 'res_grit_files': [], 'library_manifest_paths%' : [], }, 'sources': [ @@ -118,16 +118,18 @@ }], ['java_strings_grd != ""', { 'variables': { - 'out_res_dir': '<(SHARED_INTERMEDIATE_DIR)/<(package_name)_apk/res', - 'additional_res_dirs': ['<(out_res_dir)'], + 'res_grit_dir': '<(SHARED_INTERMEDIATE_DIR)/<(package_name)_apk/res_grit', + 'additional_res_dirs': ['<(res_grit_dir)'], # grit_grd_file is used by grit_action.gypi, included below. 'grit_grd_file': '<(java_in_dir)/strings/<(java_strings_grd)', + 'res_grit_files': ['<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(res_grit_dir)" <(grit_grd_file))'], }, 'actions': [ { 'action_name': 'generate_localized_strings_xml', 'variables': { - 'grit_out_dir': '<(out_res_dir)', + 'grit_additional_defines': ['-E', 'ANDROID_JAVA_TAGGED_ONLY=false'], + 'grit_out_dir': '<(res_grit_dir)', # resource_ids is unneeded since we don't generate .h headers. 'grit_resource_ids': '', }, @@ -152,19 +154,12 @@ '>@(native_libs_paths)', '>@(additional_input_paths)', '>@(library_manifest_paths)', + '<@(res_grit_files)', ], 'conditions': [ ['resource_dir!=""', { 'inputs': ['<!@(find <(java_in_dir)/<(resource_dir) -name "*")'] }], - ['java_strings_grd != ""', { - 'inputs': [ - # TODO(newt): replace this with .../values/strings.xml once - # the English strings.xml is generated as well? That would be - # simpler and faster and should be equivalent. - '<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(out_res_dir)" <(grit_grd_file))', - ], - }], ['is_test_apk == 1', { 'variables': { 'additional_res_dirs=': [], diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd index 8955e43..b3bb383 100644 --- a/chrome/android/java/strings/android_chrome_strings.grd +++ b/chrome/android/java/strings/android_chrome_strings.grd @@ -154,47 +154,47 @@ <file lang="zh-TW" path="translations/android_chrome_strings_zh-TW.xtb" /> </translations> <outputs> - <output filename="values-ar/strings.xml" lang="ar" type="android" /> - <output filename="values-bg/strings.xml" lang="bg" type="android" /> - <output filename="values-ca/strings.xml" lang="ca" type="android" /> - <output filename="values-cs/strings.xml" lang="cs" type="android" /> - <output filename="values-da/strings.xml" lang="da" type="android" /> - <output filename="values-de/strings.xml" lang="de" type="android" /> - <output filename="values-el/strings.xml" lang="el" type="android" /> - <output filename="values/strings.xml" lang="en" type="android" /> - <output filename="values-en-rGB/strings.xml" lang="en-GB" type="android" /> - <output filename="values-es/strings.xml" lang="es" type="android" /> - <output filename="values-es-rUS/strings.xml" lang="es-419" type="android" /> - <output filename="values-fa/strings.xml" lang="fa" type="android" /> - <output filename="values-fi/strings.xml" lang="fi" type="android" /> - <output filename="values-tl/strings.xml" lang="fil" type="android" /> - <output filename="values-fr/strings.xml" lang="fr" type="android" /> - <output filename="values-hi/strings.xml" lang="hi" type="android" /> - <output filename="values-hr/strings.xml" lang="hr" type="android" /> - <output filename="values-hu/strings.xml" lang="hu" type="android" /> - <output filename="values-in/strings.xml" lang="id" type="android" /> - <output filename="values-it/strings.xml" lang="it" type="android" /> - <output filename="values-iw/strings.xml" lang="iw" type="android" /> - <output filename="values-ja/strings.xml" lang="ja" type="android" /> - <output filename="values-ko/strings.xml" lang="ko" type="android" /> - <output filename="values-lt/strings.xml" lang="lt" type="android" /> - <output filename="values-lv/strings.xml" lang="lv" type="android" /> - <output filename="values-nl/strings.xml" lang="nl" type="android" /> - <output filename="values-nb/strings.xml" lang="no" type="android" /> - <output filename="values-pl/strings.xml" lang="pl" type="android" /> - <output filename="values-pt-rBR/strings.xml" lang="pt-BR" type="android" /> - <output filename="values-pt-rPT/strings.xml" lang="pt-PT" type="android" /> - <output filename="values-ro/strings.xml" lang="ro" type="android" /> - <output filename="values-ru/strings.xml" lang="ru" type="android" /> - <output filename="values-sk/strings.xml" lang="sk" type="android" /> - <output filename="values-sl/strings.xml" lang="sl" type="android" /> - <output filename="values-sr/strings.xml" lang="sr" type="android" /> - <output filename="values-sv/strings.xml" lang="sv" type="android" /> - <output filename="values-th/strings.xml" lang="th" type="android" /> - <output filename="values-tr/strings.xml" lang="tr" type="android" /> - <output filename="values-uk/strings.xml" lang="uk" type="android" /> - <output filename="values-vi/strings.xml" lang="vi" type="android" /> - <output filename="values-zh-rCN/strings.xml" lang="zh-CN" type="android" /> - <output filename="values-zh-rTW/strings.xml" lang="zh-TW" type="android" /> + <output filename="values-ar/android_chrome_strings.xml" lang="ar" type="android" /> + <output filename="values-bg/android_chrome_strings.xml" lang="bg" type="android" /> + <output filename="values-ca/android_chrome_strings.xml" lang="ca" type="android" /> + <output filename="values-cs/android_chrome_strings.xml" lang="cs" type="android" /> + <output filename="values-da/android_chrome_strings.xml" lang="da" type="android" /> + <output filename="values-de/android_chrome_strings.xml" lang="de" type="android" /> + <output filename="values-el/android_chrome_strings.xml" lang="el" type="android" /> + <output filename="values/android_chrome_strings.xml" lang="en" type="android" /> + <output filename="values-en-rGB/android_chrome_strings.xml" lang="en-GB" type="android" /> + <output filename="values-es/android_chrome_strings.xml" lang="es" type="android" /> + <output filename="values-es-rUS/android_chrome_strings.xml" lang="es-419" type="android" /> + <output filename="values-fa/android_chrome_strings.xml" lang="fa" type="android" /> + <output filename="values-fi/android_chrome_strings.xml" lang="fi" type="android" /> + <output filename="values-tl/android_chrome_strings.xml" lang="fil" type="android" /> + <output filename="values-fr/android_chrome_strings.xml" lang="fr" type="android" /> + <output filename="values-hi/android_chrome_strings.xml" lang="hi" type="android" /> + <output filename="values-hr/android_chrome_strings.xml" lang="hr" type="android" /> + <output filename="values-hu/android_chrome_strings.xml" lang="hu" type="android" /> + <output filename="values-in/android_chrome_strings.xml" lang="id" type="android" /> + <output filename="values-it/android_chrome_strings.xml" lang="it" type="android" /> + <output filename="values-iw/android_chrome_strings.xml" lang="iw" type="android" /> + <output filename="values-ja/android_chrome_strings.xml" lang="ja" type="android" /> + <output filename="values-ko/android_chrome_strings.xml" lang="ko" type="android" /> + <output filename="values-lt/android_chrome_strings.xml" lang="lt" type="android" /> + <output filename="values-lv/android_chrome_strings.xml" lang="lv" type="android" /> + <output filename="values-nl/android_chrome_strings.xml" lang="nl" type="android" /> + <output filename="values-nb/android_chrome_strings.xml" lang="no" type="android" /> + <output filename="values-pl/android_chrome_strings.xml" lang="pl" type="android" /> + <output filename="values-pt-rBR/android_chrome_strings.xml" lang="pt-BR" type="android" /> + <output filename="values-pt-rPT/android_chrome_strings.xml" lang="pt-PT" type="android" /> + <output filename="values-ro/android_chrome_strings.xml" lang="ro" type="android" /> + <output filename="values-ru/android_chrome_strings.xml" lang="ru" type="android" /> + <output filename="values-sk/android_chrome_strings.xml" lang="sk" type="android" /> + <output filename="values-sl/android_chrome_strings.xml" lang="sl" type="android" /> + <output filename="values-sr/android_chrome_strings.xml" lang="sr" type="android" /> + <output filename="values-sv/android_chrome_strings.xml" lang="sv" type="android" /> + <output filename="values-th/android_chrome_strings.xml" lang="th" type="android" /> + <output filename="values-tr/android_chrome_strings.xml" lang="tr" type="android" /> + <output filename="values-uk/android_chrome_strings.xml" lang="uk" type="android" /> + <output filename="values-vi/android_chrome_strings.xml" lang="vi" type="android" /> + <output filename="values-zh-rCN/android_chrome_strings.xml" lang="zh-CN" type="android" /> + <output filename="values-zh-rTW/android_chrome_strings.xml" lang="zh-TW" type="android" /> </outputs> -</grit>
\ No newline at end of file +</grit> diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 0e70f3d..987d647 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -110,6 +110,53 @@ are declared in build/common.gypi. <output filename="generated_resources_vi.pak" type="data_package" lang="vi" /> <output filename="generated_resources_zh-CN.pak" type="data_package" lang="zh-CN" /> <output filename="generated_resources_zh-TW.pak" type="data_package" lang="zh-TW" /> + + <!-- On Android, output some strings into Android's xml string format. + These strings are tagged with formatter_data="android_java" --> + <if expr="pp_ifdef('android')"> + <output filename="java/res/values-ar/generated_resources.xml" lang="ar" type="android" context="android_java" /> + <output filename="java/res/values-bg/generated_resources.xml" lang="bg" type="android" context="android_java" /> + <output filename="java/res/values-ca/generated_resources.xml" lang="ca" type="android" context="android_java" /> + <output filename="java/res/values-cs/generated_resources.xml" lang="cs" type="android" context="android_java" /> + <output filename="java/res/values-da/generated_resources.xml" lang="da" type="android" context="android_java" /> + <output filename="java/res/values-de/generated_resources.xml" lang="de" type="android" context="android_java" /> + <output filename="java/res/values-el/generated_resources.xml" lang="el" type="android" context="android_java" /> + <output filename="java/res/values/generated_resources.xml" lang="en" type="android" context="android_java" /> + <output filename="java/res/values-en-rGB/generated_resources.xml" lang="en-GB" type="android" context="android_java" /> + <output filename="java/res/values-es/generated_resources.xml" lang="es" type="android" context="android_java" /> + <output filename="java/res/values-es-rUS/generated_resources.xml" lang="es-419" type="android" context="android_java" /> + <output filename="java/res/values-fa/generated_resources.xml" lang="fa" type="android" context="android_java" /> + <output filename="java/res/values-fi/generated_resources.xml" lang="fi" type="android" context="android_java" /> + <output filename="java/res/values-tl/generated_resources.xml" lang="fil" type="android" context="android_java" /> + <output filename="java/res/values-fr/generated_resources.xml" lang="fr" type="android" context="android_java" /> + <output filename="java/res/values-hi/generated_resources.xml" lang="hi" type="android" context="android_java" /> + <output filename="java/res/values-hr/generated_resources.xml" lang="hr" type="android" context="android_java" /> + <output filename="java/res/values-hu/generated_resources.xml" lang="hu" type="android" context="android_java" /> + <output filename="java/res/values-in/generated_resources.xml" lang="id" type="android" context="android_java" /> + <output filename="java/res/values-it/generated_resources.xml" lang="it" type="android" context="android_java" /> + <output filename="java/res/values-iw/generated_resources.xml" lang="he" type="android" context="android_java" /> + <output filename="java/res/values-ja/generated_resources.xml" lang="ja" type="android" context="android_java" /> + <output filename="java/res/values-ko/generated_resources.xml" lang="ko" type="android" context="android_java" /> + <output filename="java/res/values-lt/generated_resources.xml" lang="lt" type="android" context="android_java" /> + <output filename="java/res/values-lv/generated_resources.xml" lang="lv" type="android" context="android_java" /> + <output filename="java/res/values-nl/generated_resources.xml" lang="nl" type="android" context="android_java" /> + <output filename="java/res/values-nb/generated_resources.xml" lang="no" type="android" context="android_java" /> + <output filename="java/res/values-pl/generated_resources.xml" lang="pl" type="android" context="android_java" /> + <output filename="java/res/values-pt-rBR/generated_resources.xml" lang="pt-BR" type="android" context="android_java" /> + <output filename="java/res/values-pt-rPT/generated_resources.xml" lang="pt-PT" type="android" context="android_java" /> + <output filename="java/res/values-ro/generated_resources.xml" lang="ro" type="android" context="android_java" /> + <output filename="java/res/values-ru/generated_resources.xml" lang="ru" type="android" context="android_java" /> + <output filename="java/res/values-sk/generated_resources.xml" lang="sk" type="android" context="android_java" /> + <output filename="java/res/values-sl/generated_resources.xml" lang="sl" type="android" context="android_java" /> + <output filename="java/res/values-sr/generated_resources.xml" lang="sr" type="android" context="android_java" /> + <output filename="java/res/values-sv/generated_resources.xml" lang="sv" type="android" context="android_java" /> + <output filename="java/res/values-th/generated_resources.xml" lang="th" type="android" context="android_java" /> + <output filename="java/res/values-tr/generated_resources.xml" lang="tr" type="android" context="android_java" /> + <output filename="java/res/values-uk/generated_resources.xml" lang="uk" type="android" context="android_java" /> + <output filename="java/res/values-vi/generated_resources.xml" lang="vi" type="android" context="android_java" /> + <output filename="java/res/values-zh-rCN/generated_resources.xml" lang="zh-CN" type="android" context="android_java" /> + <output filename="java/res/values-zh-rTW/generated_resources.xml" lang="zh-TW" type="android" context="android_java" /> + </if> </outputs> <translations> <file path="resources/generated_resources_am.xtb" lang="am" /> @@ -10189,19 +10236,19 @@ The following plug-in is unresponsive: <ph name="PLUGIN_NAME">$1 </message> <!-- Sad Tab Strings --> - <message name="IDS_SAD_TAB_TITLE" desc="The title of the sad tab page that is shown when a tab crashes. This is intended to be a humorous exclamation of dismay."> + <message name="IDS_SAD_TAB_TITLE" desc="The title of the sad tab page that is shown when a tab crashes. This is intended to be a humorous exclamation of dismay." formatter_data="android_java"> Aw, Snap! </message> - <message name="IDS_SAD_TAB_MESSAGE" desc="The message displayed on the sad tab page."> + <message name="IDS_SAD_TAB_MESSAGE" desc="The message displayed on the sad tab page." formatter_data="android_java"> Something went wrong while displaying this webpage. To continue, reload or go to another page. </message> - <message name="IDS_SAD_TAB_HELP_MESSAGE" desc="The help message displayed on the sad tab page, with IDS_SAD_TAB_HELP_LINK embedded as a link to help."> + <message name="IDS_SAD_TAB_HELP_MESSAGE" desc="The help message displayed on the sad tab page, with IDS_SAD_TAB_HELP_LINK embedded as a link to help." formatter_data="android_java"> If you're seeing this frequently, try these <ph name="HELP_LINK">$1<ex>suggestions</ex></ph>. </message> - <message name="IDS_SAD_TAB_HELP_LINK" desc="The link text displayed on the sad tab page pointing the users to a help article."> + <message name="IDS_SAD_TAB_HELP_LINK" desc="The link text displayed on the sad tab page pointing the users to a help article." formatter_data="android_java"> suggestions </message> - <message name="IDS_SAD_TAB_RELOAD_LABEL" desc="Button label in the sad tab page for reloading a page."> + <message name="IDS_SAD_TAB_RELOAD_LABEL" desc="Button label in the sad tab page for reloading a page." formatter_data="android_java"> Reload </message> diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index c8acc25..94407c6 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -1085,6 +1085,7 @@ 'target_name': 'chrome_java', 'type': 'none', 'dependencies': [ + 'chrome_resources.gyp:chrome_strings', 'profile_sync_service_model_type_selection_java', 'toolbar_model_security_levels_java', '../base/base.gyp:base', @@ -1101,6 +1102,9 @@ 'R_package': 'org.chromium.chrome', 'R_package_relpath': 'org/chromium/chrome', 'java_strings_grd': 'android_chrome_strings.grd', + # Include xml string files generated from generated_resources.grd + 'res_extra_dirs': ['<(SHARED_INTERMEDIATE_DIR)/chrome/java/res'], + 'res_extra_files': ['<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(SHARED_INTERMEDIATE_DIR)/chrome" app/generated_resources.grd)'], }, 'includes': [ '../build/java.gypi', diff --git a/content/public/android/java/strings/android_content_strings.grd b/content/public/android/java/strings/android_content_strings.grd index 26c801e..16f26ae 100644 --- a/content/public/android/java/strings/android_content_strings.grd +++ b/content/public/android/java/strings/android_content_strings.grd @@ -99,47 +99,47 @@ <file lang="zh-TW" path="translations/android_content_strings_zh-TW.xtb" /> </translations> <outputs> - <output filename="values-ar/strings.xml" lang="ar" type="android" /> - <output filename="values-bg/strings.xml" lang="bg" type="android" /> - <output filename="values-ca/strings.xml" lang="ca" type="android" /> - <output filename="values-cs/strings.xml" lang="cs" type="android" /> - <output filename="values-da/strings.xml" lang="da" type="android" /> - <output filename="values-de/strings.xml" lang="de" type="android" /> - <output filename="values-el/strings.xml" lang="el" type="android" /> - <output filename="values/strings.xml" lang="en" type="android" /> - <output filename="values-en-rGB/strings.xml" lang="en-GB" type="android" /> - <output filename="values-es/strings.xml" lang="es" type="android" /> - <output filename="values-es-rUS/strings.xml" lang="es-419" type="android" /> - <output filename="values-fa/strings.xml" lang="fa" type="android" /> - <output filename="values-fi/strings.xml" lang="fi" type="android" /> - <output filename="values-tl/strings.xml" lang="fil" type="android" /> - <output filename="values-fr/strings.xml" lang="fr" type="android" /> - <output filename="values-hi/strings.xml" lang="hi" type="android" /> - <output filename="values-hr/strings.xml" lang="hr" type="android" /> - <output filename="values-hu/strings.xml" lang="hu" type="android" /> - <output filename="values-in/strings.xml" lang="id" type="android" /> - <output filename="values-it/strings.xml" lang="it" type="android" /> - <output filename="values-iw/strings.xml" lang="iw" type="android" /> - <output filename="values-ja/strings.xml" lang="ja" type="android" /> - <output filename="values-ko/strings.xml" lang="ko" type="android" /> - <output filename="values-lt/strings.xml" lang="lt" type="android" /> - <output filename="values-lv/strings.xml" lang="lv" type="android" /> - <output filename="values-nl/strings.xml" lang="nl" type="android" /> - <output filename="values-nb/strings.xml" lang="no" type="android" /> - <output filename="values-pl/strings.xml" lang="pl" type="android" /> - <output filename="values-pt-rBR/strings.xml" lang="pt-BR" type="android" /> - <output filename="values-pt-rPT/strings.xml" lang="pt-PT" type="android" /> - <output filename="values-ro/strings.xml" lang="ro" type="android" /> - <output filename="values-ru/strings.xml" lang="ru" type="android" /> - <output filename="values-sk/strings.xml" lang="sk" type="android" /> - <output filename="values-sl/strings.xml" lang="sl" type="android" /> - <output filename="values-sr/strings.xml" lang="sr" type="android" /> - <output filename="values-sv/strings.xml" lang="sv" type="android" /> - <output filename="values-th/strings.xml" lang="th" type="android" /> - <output filename="values-tr/strings.xml" lang="tr" type="android" /> - <output filename="values-uk/strings.xml" lang="uk" type="android" /> - <output filename="values-vi/strings.xml" lang="vi" type="android" /> - <output filename="values-zh-rCN/strings.xml" lang="zh-CN" type="android" /> - <output filename="values-zh-rTW/strings.xml" lang="zh-TW" type="android" /> + <output filename="values-ar/android_content_strings.xml" lang="ar" type="android" /> + <output filename="values-bg/android_content_strings.xml" lang="bg" type="android" /> + <output filename="values-ca/android_content_strings.xml" lang="ca" type="android" /> + <output filename="values-cs/android_content_strings.xml" lang="cs" type="android" /> + <output filename="values-da/android_content_strings.xml" lang="da" type="android" /> + <output filename="values-de/android_content_strings.xml" lang="de" type="android" /> + <output filename="values-el/android_content_strings.xml" lang="el" type="android" /> + <output filename="values/android_content_strings.xml" lang="en" type="android" /> + <output filename="values-en-rGB/android_content_strings.xml" lang="en-GB" type="android" /> + <output filename="values-es/android_content_strings.xml" lang="es" type="android" /> + <output filename="values-es-rUS/android_content_strings.xml" lang="es-419" type="android" /> + <output filename="values-fa/android_content_strings.xml" lang="fa" type="android" /> + <output filename="values-fi/android_content_strings.xml" lang="fi" type="android" /> + <output filename="values-tl/android_content_strings.xml" lang="fil" type="android" /> + <output filename="values-fr/android_content_strings.xml" lang="fr" type="android" /> + <output filename="values-hi/android_content_strings.xml" lang="hi" type="android" /> + <output filename="values-hr/android_content_strings.xml" lang="hr" type="android" /> + <output filename="values-hu/android_content_strings.xml" lang="hu" type="android" /> + <output filename="values-in/android_content_strings.xml" lang="id" type="android" /> + <output filename="values-it/android_content_strings.xml" lang="it" type="android" /> + <output filename="values-iw/android_content_strings.xml" lang="iw" type="android" /> + <output filename="values-ja/android_content_strings.xml" lang="ja" type="android" /> + <output filename="values-ko/android_content_strings.xml" lang="ko" type="android" /> + <output filename="values-lt/android_content_strings.xml" lang="lt" type="android" /> + <output filename="values-lv/android_content_strings.xml" lang="lv" type="android" /> + <output filename="values-nl/android_content_strings.xml" lang="nl" type="android" /> + <output filename="values-nb/android_content_strings.xml" lang="no" type="android" /> + <output filename="values-pl/android_content_strings.xml" lang="pl" type="android" /> + <output filename="values-pt-rBR/android_content_strings.xml" lang="pt-BR" type="android" /> + <output filename="values-pt-rPT/android_content_strings.xml" lang="pt-PT" type="android" /> + <output filename="values-ro/android_content_strings.xml" lang="ro" type="android" /> + <output filename="values-ru/android_content_strings.xml" lang="ru" type="android" /> + <output filename="values-sk/android_content_strings.xml" lang="sk" type="android" /> + <output filename="values-sl/android_content_strings.xml" lang="sl" type="android" /> + <output filename="values-sr/android_content_strings.xml" lang="sr" type="android" /> + <output filename="values-sv/android_content_strings.xml" lang="sv" type="android" /> + <output filename="values-th/android_content_strings.xml" lang="th" type="android" /> + <output filename="values-tr/android_content_strings.xml" lang="tr" type="android" /> + <output filename="values-uk/android_content_strings.xml" lang="uk" type="android" /> + <output filename="values-vi/android_content_strings.xml" lang="vi" type="android" /> + <output filename="values-zh-rCN/android_content_strings.xml" lang="zh-CN" type="android" /> + <output filename="values-zh-rTW/android_content_strings.xml" lang="zh-TW" type="android" /> </outputs> -</grit>
\ No newline at end of file +</grit> diff --git a/ui/android/java/strings/android_ui_strings.grd b/ui/android/java/strings/android_ui_strings.grd index b646d58..d5db6e5 100644 --- a/ui/android/java/strings/android_ui_strings.grd +++ b/ui/android/java/strings/android_ui_strings.grd @@ -54,47 +54,47 @@ <file lang="zh-TW" path="translations/android_ui_strings_zh-TW.xtb" /> </translations> <outputs> - <output filename="values-ar/strings.xml" lang="ar" type="android" /> - <output filename="values-bg/strings.xml" lang="bg" type="android" /> - <output filename="values-ca/strings.xml" lang="ca" type="android" /> - <output filename="values-cs/strings.xml" lang="cs" type="android" /> - <output filename="values-da/strings.xml" lang="da" type="android" /> - <output filename="values-de/strings.xml" lang="de" type="android" /> - <output filename="values-el/strings.xml" lang="el" type="android" /> - <output filename="values/strings.xml" lang="en" type="android" /> - <output filename="values-en-rGB/strings.xml" lang="en-GB" type="android" /> - <output filename="values-es/strings.xml" lang="es" type="android" /> - <output filename="values-es-rUS/strings.xml" lang="es-419" type="android" /> - <output filename="values-fa/strings.xml" lang="fa" type="android" /> - <output filename="values-fi/strings.xml" lang="fi" type="android" /> - <output filename="values-tl/strings.xml" lang="fil" type="android" /> - <output filename="values-fr/strings.xml" lang="fr" type="android" /> - <output filename="values-hi/strings.xml" lang="hi" type="android" /> - <output filename="values-hr/strings.xml" lang="hr" type="android" /> - <output filename="values-hu/strings.xml" lang="hu" type="android" /> - <output filename="values-in/strings.xml" lang="id" type="android" /> - <output filename="values-it/strings.xml" lang="it" type="android" /> - <output filename="values-iw/strings.xml" lang="iw" type="android" /> - <output filename="values-ja/strings.xml" lang="ja" type="android" /> - <output filename="values-ko/strings.xml" lang="ko" type="android" /> - <output filename="values-lt/strings.xml" lang="lt" type="android" /> - <output filename="values-lv/strings.xml" lang="lv" type="android" /> - <output filename="values-nl/strings.xml" lang="nl" type="android" /> - <output filename="values-nb/strings.xml" lang="no" type="android" /> - <output filename="values-pl/strings.xml" lang="pl" type="android" /> - <output filename="values-pt-rBR/strings.xml" lang="pt-BR" type="android" /> - <output filename="values-pt-rPT/strings.xml" lang="pt-PT" type="android" /> - <output filename="values-ro/strings.xml" lang="ro" type="android" /> - <output filename="values-ru/strings.xml" lang="ru" type="android" /> - <output filename="values-sk/strings.xml" lang="sk" type="android" /> - <output filename="values-sl/strings.xml" lang="sl" type="android" /> - <output filename="values-sr/strings.xml" lang="sr" type="android" /> - <output filename="values-sv/strings.xml" lang="sv" type="android" /> - <output filename="values-th/strings.xml" lang="th" type="android" /> - <output filename="values-tr/strings.xml" lang="tr" type="android" /> - <output filename="values-uk/strings.xml" lang="uk" type="android" /> - <output filename="values-vi/strings.xml" lang="vi" type="android" /> - <output filename="values-zh-rCN/strings.xml" lang="zh-CN" type="android" /> - <output filename="values-zh-rTW/strings.xml" lang="zh-TW" type="android" /> + <output filename="values-ar/android_ui_strings.xml" lang="ar" type="android" /> + <output filename="values-bg/android_ui_strings.xml" lang="bg" type="android" /> + <output filename="values-ca/android_ui_strings.xml" lang="ca" type="android" /> + <output filename="values-cs/android_ui_strings.xml" lang="cs" type="android" /> + <output filename="values-da/android_ui_strings.xml" lang="da" type="android" /> + <output filename="values-de/android_ui_strings.xml" lang="de" type="android" /> + <output filename="values-el/android_ui_strings.xml" lang="el" type="android" /> + <output filename="values/android_ui_strings.xml" lang="en" type="android" /> + <output filename="values-en-rGB/android_ui_strings.xml" lang="en-GB" type="android" /> + <output filename="values-es/android_ui_strings.xml" lang="es" type="android" /> + <output filename="values-es-rUS/android_ui_strings.xml" lang="es-419" type="android" /> + <output filename="values-fa/android_ui_strings.xml" lang="fa" type="android" /> + <output filename="values-fi/android_ui_strings.xml" lang="fi" type="android" /> + <output filename="values-tl/android_ui_strings.xml" lang="fil" type="android" /> + <output filename="values-fr/android_ui_strings.xml" lang="fr" type="android" /> + <output filename="values-hi/android_ui_strings.xml" lang="hi" type="android" /> + <output filename="values-hr/android_ui_strings.xml" lang="hr" type="android" /> + <output filename="values-hu/android_ui_strings.xml" lang="hu" type="android" /> + <output filename="values-in/android_ui_strings.xml" lang="id" type="android" /> + <output filename="values-it/android_ui_strings.xml" lang="it" type="android" /> + <output filename="values-iw/android_ui_strings.xml" lang="iw" type="android" /> + <output filename="values-ja/android_ui_strings.xml" lang="ja" type="android" /> + <output filename="values-ko/android_ui_strings.xml" lang="ko" type="android" /> + <output filename="values-lt/android_ui_strings.xml" lang="lt" type="android" /> + <output filename="values-lv/android_ui_strings.xml" lang="lv" type="android" /> + <output filename="values-nl/android_ui_strings.xml" lang="nl" type="android" /> + <output filename="values-nb/android_ui_strings.xml" lang="no" type="android" /> + <output filename="values-pl/android_ui_strings.xml" lang="pl" type="android" /> + <output filename="values-pt-rBR/android_ui_strings.xml" lang="pt-BR" type="android" /> + <output filename="values-pt-rPT/android_ui_strings.xml" lang="pt-PT" type="android" /> + <output filename="values-ro/android_ui_strings.xml" lang="ro" type="android" /> + <output filename="values-ru/android_ui_strings.xml" lang="ru" type="android" /> + <output filename="values-sk/android_ui_strings.xml" lang="sk" type="android" /> + <output filename="values-sl/android_ui_strings.xml" lang="sl" type="android" /> + <output filename="values-sr/android_ui_strings.xml" lang="sr" type="android" /> + <output filename="values-sv/android_ui_strings.xml" lang="sv" type="android" /> + <output filename="values-th/android_ui_strings.xml" lang="th" type="android" /> + <output filename="values-tr/android_ui_strings.xml" lang="tr" type="android" /> + <output filename="values-uk/android_ui_strings.xml" lang="uk" type="android" /> + <output filename="values-vi/android_ui_strings.xml" lang="vi" type="android" /> + <output filename="values-zh-rCN/android_ui_strings.xml" lang="zh-CN" type="android" /> + <output filename="values-zh-rTW/android_ui_strings.xml" lang="zh-TW" type="android" /> </outputs> -</grit>
\ No newline at end of file +</grit> |