diff options
-rw-r--r-- | chrome/SConscript | 6 | ||||
-rw-r--r-- | chrome/app/chrome_strings.scons | 27 | ||||
-rw-r--r-- | chrome/app/chromium_strings.grd | 50 | ||||
-rw-r--r-- | chrome/app/generated_resources.grd | 65 | ||||
-rw-r--r-- | chrome/app/google_chrome_strings.grd | 50 | ||||
-rw-r--r-- | chrome/app/resources/SConscript | 230 | ||||
-rwxr-xr-x | chrome/app/resources/locale_settings.grd | 51 | ||||
-rw-r--r-- | chrome/common/resource_bundle_linux.cc | 13 | ||||
-rw-r--r-- | webkit/glue/webkit_strings.grd | 51 |
9 files changed, 279 insertions, 264 deletions
diff --git a/chrome/SConscript b/chrome/SConscript index 95b7e1f..b2071f4 100644 --- a/chrome/SConscript +++ b/chrome/SConscript @@ -619,12 +619,6 @@ sconscript_files = [ if not env.WantSystemLib('hunspell'): sconscript_files.append('third_party/hunspell/SConscript') -# TODO(port) -if env.Bit('windows'): - sconscript_files.extend([ - 'app/resources/SConscript', - ]) - env.SConscript(sconscript_files, exports=['env', 'env_res', 'env_test']) # TODO(port) diff --git a/chrome/app/chrome_strings.scons b/chrome/app/chrome_strings.scons index 562ef54..b4e6fa1 100644 --- a/chrome/app/chrome_strings.scons +++ b/chrome/app/chrome_strings.scons @@ -22,15 +22,24 @@ for grd_file in grd_files: '$TARGET_ROOT/grit_derived_sources/fake_' + os.path.basename(grd_file), grd_file) -if env.Bit('linux'): - # TODO(tc): Generate all the locales and handle official build vs chromium - # build. - lang_pak = env.Repack('$TARGET_ROOT/locales/en-US.pak', - ['$TARGET_ROOT/grit_derived_sources/generated_resources_en-US.pak', - '$TARGET_ROOT/grit_derived_sources/chromium_strings_en-US.pak', - '$TARGET_ROOT/grit_derived_sources/locale_settings_en-US.pak', +languages = [ 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', + 'en-US', 'es', 'es-419', 'et', 'fi', 'fil', 'fr', 'gu', 'he', 'hi', 'hr', + 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv', 'ml', 'mr', 'nl', 'nb', + 'or', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', 'sk', 'sl', 'sr', 'sv', 'ta', + 'te', 'th', 'tr', 'uk', 'vi', 'zh-CN', 'zh-TW' ] + +# TODO(tc): Handle official build vs chromium build. Currently we assume +# chromium builds only. +for lang in languages: + lang_pak = env.Repack('$TARGET_ROOT/locales/%s.pak' % lang, + ['$TARGET_ROOT/grit_derived_sources/generated_resources_%s.pak' % lang, + '$TARGET_ROOT/grit_derived_sources/chromium_strings_%s.pak' % lang, + '$TARGET_ROOT/grit_derived_sources/locale_settings_%s.pak' % lang, ] ) i = env.Install('$DESTINATION_ROOT/locales', lang_pak) - env.Requires('$DESTINATION_ROOT/chrome', i) - env.Requires('$DESTINATION_ROOT/unit_tests', i) + +# Only require that en-US.pak is build when building chrome. +env.Requires('$DESTINATION_ROOT/chrome', '$DESTINATION_ROOT/locales/en-US.pak') +env.Requires('$DESTINATION_ROOT/unit_tests', + '$DESTINATION_ROOT/locales/en-US.pak') diff --git a/chrome/app/chromium_strings.grd b/chrome/app/chromium_strings.grd index ac6186c..53f053f 100644 --- a/chrome/app/chromium_strings.grd +++ b/chrome/app/chromium_strings.grd @@ -63,7 +63,57 @@ be available for now. --> <output filename="strings_zh-CN.rc" type="rc_all" lang="zh-CN" /> <output filename="strings_zh-TW.rc" type="rc_all" lang="zh-TW" /> + <output filename="chromium_strings_ar.pak" type="data_package" lang="ar" /> + <output filename="chromium_strings_bg.pak" type="data_package" lang="bg" /> + <output filename="chromium_strings_bn.pak" type="data_package" lang="bn" /> + <output filename="chromium_strings_ca.pak" type="data_package" lang="ca" /> + <output filename="chromium_strings_cs.pak" type="data_package" lang="cs" /> + <output filename="chromium_strings_da.pak" type="data_package" lang="da" /> + <output filename="chromium_strings_de.pak" type="data_package" lang="de" /> + <output filename="chromium_strings_el.pak" type="data_package" lang="el" /> + <output filename="chromium_strings_en-GB.pak" type="data_package" lang="en-GB" /> <output filename="chromium_strings_en-US.pak" type="data_package" lang="en" /> + <output filename="chromium_strings_es.pak" type="data_package" lang="es" /> + <output filename="chromium_strings_es-419.pak" type="data_package" lang="es-419" /> + <output filename="chromium_strings_et.pak" type="data_package" lang="et" /> + <output filename="chromium_strings_fi.pak" type="data_package" lang="fi" /> + <output filename="chromium_strings_fil.pak" type="data_package" lang="fil" /> + <output filename="chromium_strings_fr.pak" type="data_package" lang="fr" /> + <output filename="chromium_strings_gu.pak" type="data_package" lang="gu" /> + <output filename="chromium_strings_he.pak" type="data_package" lang="he" /> + <output filename="chromium_strings_hi.pak" type="data_package" lang="hi" /> + <output filename="chromium_strings_hr.pak" type="data_package" lang="hr" /> + <output filename="chromium_strings_hu.pak" type="data_package" lang="hu" /> + <output filename="chromium_strings_id.pak" type="data_package" lang="id" /> + <output filename="chromium_strings_it.pak" type="data_package" lang="it" /> + <output filename="chromium_strings_ja.pak" type="data_package" lang="ja" /> + <output filename="chromium_strings_kn.pak" type="data_package" lang="kn" /> + <output filename="chromium_strings_ko.pak" type="data_package" lang="ko" /> + <output filename="chromium_strings_lt.pak" type="data_package" lang="lt" /> + <output filename="chromium_strings_lv.pak" type="data_package" lang="lv" /> + <output filename="chromium_strings_ml.pak" type="data_package" lang="ml" /> + <output filename="chromium_strings_mr.pak" type="data_package" lang="mr" /> + <output filename="chromium_strings_nl.pak" type="data_package" lang="nl" /> + <output filename="chromium_strings_nb.pak" type="data_package" lang="no" /> + <!-- 'no' for Norwegian Bokmål. It should be 'nb'. --> + <output filename="chromium_strings_or.pak" type="data_package" lang="or" /> + <output filename="chromium_strings_pl.pak" type="data_package" lang="pl" /> + <output filename="chromium_strings_pt-BR.pak" type="data_package" lang="pt-BR" /> + <output filename="chromium_strings_pt-PT.pak" type="data_package" lang="pt-PT" /> + <output filename="chromium_strings_ro.pak" type="data_package" lang="ro" /> + <output filename="chromium_strings_ru.pak" type="data_package" lang="ru" /> + <output filename="chromium_strings_sk.pak" type="data_package" lang="sk" /> + <output filename="chromium_strings_sl.pak" type="data_package" lang="sl" /> + <output filename="chromium_strings_sr.pak" type="data_package" lang="sr" /> + <output filename="chromium_strings_sv.pak" type="data_package" lang="sv" /> + <output filename="chromium_strings_ta.pak" type="data_package" lang="ta" /> + <output filename="chromium_strings_te.pak" type="data_package" lang="te" /> + <output filename="chromium_strings_th.pak" type="data_package" lang="th" /> + <output filename="chromium_strings_tr.pak" type="data_package" lang="tr" /> + <output filename="chromium_strings_uk.pak" type="data_package" lang="uk" /> + <output filename="chromium_strings_vi.pak" type="data_package" lang="vi" /> + <output filename="chromium_strings_zh-CN.pak" type="data_package" lang="zh-CN" /> + <output filename="chromium_strings_zh-TW.pak" type="data_package" lang="zh-TW" /> </outputs> <translations> <!-- No translations available. --> diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 96cae76..4e79365 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -62,7 +62,58 @@ each locale. --> <output filename="generated_resources_zh-CN.rc" type="rc_all" lang="zh-CN" /> <output filename="generated_resources_zh-TW.rc" type="rc_all" lang="zh-TW" /> + <output filename="generated_resources_ar.pak" type="data_package" lang="ar" /> + <output filename="generated_resources_bg.pak" type="data_package" lang="bg" /> + <output filename="generated_resources_bn.pak" type="data_package" lang="bn" /> + <output filename="generated_resources_ca.pak" type="data_package" lang="ca" /> + <output filename="generated_resources_cs.pak" type="data_package" lang="cs" /> + <output filename="generated_resources_da.pak" type="data_package" lang="da" /> + <output filename="generated_resources_de.pak" type="data_package" lang="de" /> + <output filename="generated_resources_el.pak" type="data_package" lang="el" /> + <output filename="generated_resources_en-GB.pak" type="data_package" lang="en-GB" /> <output filename="generated_resources_en-US.pak" type="data_package" lang="en" /> + <output filename="generated_resources_es.pak" type="data_package" lang="es" /> + <output filename="generated_resources_es-419.pak" type="data_package" lang="es-419" /> + <output filename="generated_resources_et.pak" type="data_package" lang="et" /> + <output filename="generated_resources_fi.pak" type="data_package" lang="fi" /> + <output filename="generated_resources_fil.pak" type="data_package" lang="fil" /> + <output filename="generated_resources_fr.pak" type="data_package" lang="fr" /> + <output filename="generated_resources_gu.pak" type="data_package" lang="gu" /> + <output filename="generated_resources_he.pak" type="data_package" lang="he" /> + <output filename="generated_resources_hi.pak" type="data_package" lang="hi" /> + <output filename="generated_resources_hr.pak" type="data_package" lang="hr" /> + <output filename="generated_resources_hu.pak" type="data_package" lang="hu" /> + <output filename="generated_resources_id.pak" type="data_package" lang="id" /> + <output filename="generated_resources_it.pak" type="data_package" lang="it" /> + <output filename="generated_resources_ja.pak" type="data_package" lang="ja" /> + <output filename="generated_resources_kn.pak" type="data_package" lang="kn" /> + <output filename="generated_resources_ko.pak" type="data_package" lang="ko" /> + <output filename="generated_resources_lt.pak" type="data_package" lang="lt" /> + <output filename="generated_resources_lv.pak" type="data_package" lang="lv" /> + <output filename="generated_resources_ml.pak" type="data_package" lang="ml" /> + <output filename="generated_resources_mr.pak" type="data_package" lang="mr" /> + <output filename="generated_resources_nl.pak" type="data_package" lang="nl" /> + <!-- The translation console uses 'no' for Norwegian Bokmål. It should + be 'nb'. --> + <output filename="generated_resources_nb.pak" type="data_package" lang="no" /> + <output filename="generated_resources_or.pak" type="data_package" lang="or" /> + <output filename="generated_resources_pl.pak" type="data_package" lang="pl" /> + <output filename="generated_resources_pt-BR.pak" type="data_package" lang="pt-BR" /> + <output filename="generated_resources_pt-PT.pak" type="data_package" lang="pt-PT" /> + <output filename="generated_resources_ro.pak" type="data_package" lang="ro" /> + <output filename="generated_resources_ru.pak" type="data_package" lang="ru" /> + <output filename="generated_resources_sk.pak" type="data_package" lang="sk" /> + <output filename="generated_resources_sl.pak" type="data_package" lang="sl" /> + <output filename="generated_resources_sr.pak" type="data_package" lang="sr" /> + <output filename="generated_resources_sv.pak" type="data_package" lang="sv" /> + <output filename="generated_resources_ta.pak" type="data_package" lang="ta" /> + <output filename="generated_resources_te.pak" type="data_package" lang="te" /> + <output filename="generated_resources_th.pak" type="data_package" lang="th" /> + <output filename="generated_resources_tr.pak" type="data_package" lang="tr" /> + <output filename="generated_resources_uk.pak" type="data_package" lang="uk" /> + <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" /> </outputs> <translations> <file path="resources/generated_resources_ar.xtb" lang="ar" /> @@ -116,20 +167,6 @@ each locale. --> <file path="resources/generated_resources_zh-TW.xtb" lang="zh-TW" /> </translations> <release seq="1" allow_pseudo="false"> - <includes> - <!-- TODO add a list of your included resources here, e.g. BMP and GIF - resources. --> - </includes> - <structures> - <!-- TODO add a list of all your structured resources here, e.g. HTML - templates, menus, dialogs etc. Note that for menus, dialogs and version - information resources you reference an .rc file containing them.--> - </structures> - <identifiers> - <!-- TODO, e.g.: - <identifier name="TEST_IDENTIFIER" id="1000"/> - --> - </identifiers> <messages fallback_to_english="true"> <!-- TODO add all of your "string table" messages here. Remember to change nontranslateable parts of the messages into placeholders (using the diff --git a/chrome/app/google_chrome_strings.grd b/chrome/app/google_chrome_strings.grd index ec1eb41..6d76021 100644 --- a/chrome/app/google_chrome_strings.grd +++ b/chrome/app/google_chrome_strings.grd @@ -63,7 +63,57 @@ Chrome supports. --> <output filename="strings_google_chrome_zh-CN.rc" type="rc_all" lang="zh-CN" /> <output filename="strings_google_chrome_zh-TW.rc" type="rc_all" lang="zh-TW" /> + <output filename="google_chrome_strings_ar.pak" type="data_package" lang="ar" /> + <output filename="google_chrome_strings_bg.pak" type="data_package" lang="bg" /> + <output filename="google_chrome_strings_bn.pak" type="data_package" lang="bn" /> + <output filename="google_chrome_strings_ca.pak" type="data_package" lang="ca" /> + <output filename="google_chrome_strings_cs.pak" type="data_package" lang="cs" /> + <output filename="google_chrome_strings_da.pak" type="data_package" lang="da" /> + <output filename="google_chrome_strings_de.pak" type="data_package" lang="de" /> + <output filename="google_chrome_strings_el.pak" type="data_package" lang="el" /> + <output filename="google_chrome_strings_en-GB.pak" type="data_package" lang="en-GB" /> <output filename="google_chrome_strings_en-US.pak" type="data_package" lang="en" /> + <output filename="google_chrome_strings_es.pak" type="data_package" lang="es" /> + <output filename="google_chrome_strings_es-419.pak" type="data_package" lang="es-419" /> + <output filename="google_chrome_strings_et.pak" type="data_package" lang="et" /> + <output filename="google_chrome_strings_fi.pak" type="data_package" lang="fi" /> + <output filename="google_chrome_strings_fil.pak" type="data_package" lang="fil" /> + <output filename="google_chrome_strings_fr.pak" type="data_package" lang="fr" /> + <output filename="google_chrome_strings_gu.pak" type="data_package" lang="gu" /> + <output filename="google_chrome_strings_he.pak" type="data_package" lang="he" /> + <output filename="google_chrome_strings_hi.pak" type="data_package" lang="hi" /> + <output filename="google_chrome_strings_hr.pak" type="data_package" lang="hr" /> + <output filename="google_chrome_strings_hu.pak" type="data_package" lang="hu" /> + <output filename="google_chrome_strings_id.pak" type="data_package" lang="id" /> + <output filename="google_chrome_strings_it.pak" type="data_package" lang="it" /> + <output filename="google_chrome_strings_ja.pak" type="data_package" lang="ja" /> + <output filename="google_chrome_strings_kn.pak" type="data_package" lang="kn" /> + <output filename="google_chrome_strings_ko.pak" type="data_package" lang="ko" /> + <output filename="google_chrome_strings_lt.pak" type="data_package" lang="lt" /> + <output filename="google_chrome_strings_lv.pak" type="data_package" lang="lv" /> + <output filename="google_chrome_strings_ml.pak" type="data_package" lang="ml" /> + <output filename="google_chrome_strings_mr.pak" type="data_package" lang="mr" /> + <output filename="google_chrome_strings_nl.pak" type="data_package" lang="nl" /> + <output filename="google_chrome_strings_nb.pak" type="data_package" lang="no" /> + <!-- 'no' for Norwegian Bokmål. It should be 'nb'. --> + <output filename="google_chrome_strings_or.pak" type="data_package" lang="or" /> + <output filename="google_chrome_strings_pl.pak" type="data_package" lang="pl" /> + <output filename="google_chrome_strings_pt-BR.pak" type="data_package" lang="pt-BR" /> + <output filename="google_chrome_strings_pt-PT.pak" type="data_package" lang="pt-PT" /> + <output filename="google_chrome_strings_ro.pak" type="data_package" lang="ro" /> + <output filename="google_chrome_strings_ru.pak" type="data_package" lang="ru" /> + <output filename="google_chrome_strings_sk.pak" type="data_package" lang="sk" /> + <output filename="google_chrome_strings_sl.pak" type="data_package" lang="sl" /> + <output filename="google_chrome_strings_sr.pak" type="data_package" lang="sr" /> + <output filename="google_chrome_strings_sv.pak" type="data_package" lang="sv" /> + <output filename="google_chrome_strings_ta.pak" type="data_package" lang="ta" /> + <output filename="google_chrome_strings_te.pak" type="data_package" lang="te" /> + <output filename="google_chrome_strings_th.pak" type="data_package" lang="th" /> + <output filename="google_chrome_strings_tr.pak" type="data_package" lang="tr" /> + <output filename="google_chrome_strings_uk.pak" type="data_package" lang="uk" /> + <output filename="google_chrome_strings_vi.pak" type="data_package" lang="vi" /> + <output filename="google_chrome_strings_zh-CN.pak" type="data_package" lang="zh-CN" /> + <output filename="google_chrome_strings_zh-TW.pak" type="data_package" lang="zh-TW" /> </outputs> <translations> <file path="resources/google_chrome_strings_ar.xtb" lang="ar" /> diff --git a/chrome/app/resources/SConscript b/chrome/app/resources/SConscript deleted file mode 100644 index bddca68..0000000 --- a/chrome/app/resources/SConscript +++ /dev/null @@ -1,230 +0,0 @@ -# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -Import(['env', 'env_res']) - -AddTargetGroup('all_languages', 'resource dlls for languages can be built') - -env_res = env_res.Clone() - -env.Append( - LINKFLAGS = [ - '/INCREMENTAL:NO', - '/DELAYLOAD:"dwmapi.dll"', - '/DELAYLOAD:"uxtheme.dll"', - - '/NOENTRY', - '/BASE:"0x3CF00000"', - '/MACHINE:X86', - '/FIXED:No', - - '/safeseh', - '/dynamicbase', - '/ignore:4199', - '/nxcompat', - ], - PDB = '${TARGET}.pdb', - no_import_lib = True, # We don't need the .lib and .exp. -) - -env_res.Append( - CPPPATH = [ - '.', - '$CHROME_SRC_DIR/chrome/Debug/obj/chrome_dll', - '$CHROME_SRC_DIR', - '$CHROME_SRC_DIR/chrome/Debug/obj', - ], - RCFLAGS = [ - ['/l', '0x409'], - ['/I', '$TARGET_ROOT/grit_derived_sources'], - ], -) - -env_dll = env.Clone(COMPONENT_LIBRARY_GROUPS = ['all_languages']) - -locale_list = [ - 'ar', - 'bg', - 'bn', - 'ca', - 'cs', - 'da', - 'de', - 'el', - 'en-GB', - 'en-US', - 'es-419', - 'es', - 'et', - 'fi', - 'fil', - 'fr', - 'gu', - 'he', - 'hi', - 'hr', - 'hu', - 'id', - 'it', - 'ja', - 'kn', - 'ko', - 'lt', - 'lv', - 'ml', - 'mr', - 'nb', - 'nl', - 'or', - 'pl', - 'pt-BR', - 'pt-PT', - 'ro', - 'ru', - 'sk', - 'sl', - 'sr', - 'sv', - 'ta', - 'te', - 'th', - 'tr', - 'uk', - 'vi', - 'zh-CN', - 'zh-TW', -] - -# TODO(sgk): remove these when we no longer want to worry about -# consistent GUIDs in the .vcproj files from checkin to checkin. -locale_GUIDMap = { - 'ar' : '{3AB90E6A-56FF-4C9D-B918-AB76DDBF8BE8}', - 'bg' : '{5BDB7EE1-A1FD-410C-9598-21519A1B7952}', - 'bn' : '{4B60E8B8-416F-40B2-8A54-F75970A21992}', - 'ca' : '{F7790A54-4078-4E4A-8231-818BE9FB1F94}', - 'cs' : '{7EA8C4AB-F9C6-4FA1-8B0A-74F5650430B2}', - 'da' : '{A493331B-3180-49FE-8D0E-D121645E63AD}', - 'de' : '{BA62FF5E-08A6-4102-9675-C12E8C9D4CC0}', - 'el' : '{D314F1B3-9299-4866-8362-08BF811B0FA3}', - 'en-GB' : '{34231B28-C51C-4C1C-AF07-C763668B1404}', - 'en-US' : '{CAE2D1E6-3F19-492F-A35C-68AA7ACAD6D3}', - 'es-419' : '{FA660037-EB40-4A43-AA9D-9653C57F2789}', - 'es' : '{5AEA4BF6-27CD-47FC-9370-D87771CFA196}', - 'et' : '{0557BC3C-DE87-4127-BDAA-9BD9BDB13FB4}', - 'fi' : '{64D81334-DE73-457D-8FC1-9492508A2663}', - 'fil' : '{3A932C39-AFA9-4BDC-B775-F71A426D04BF}', - 'fr' : '{0D54A5C4-B78B-41A2-BF8A-5DA48AC90495}', - 'gu' : '{256DECCE-9886-4C21-96A5-EE47DF5E07E9}', - 'he' : '{A28310B8-7BD0-4CDF-A7D8-59CAB42AA1C4}', - 'hi' : '{228DD844-9926-420E-B193-6973BF2A4D0B}', - 'hr' : '{CE1426F6-7D2B-4574-9929-58387BF7B05F}', - 'hu' : '{AFF332BF-AF3D-4D35-86FC-42A727F01D36}', - 'id' : '{E3DF045F-2174-4685-9CF7-0630A79F324B}', - 'it' : '{275F2993-EE9B-4E00-9C85-10A182FD423A}', - 'ja' : '{B2D715CE-4CBB-415A-A032-E700C90ADF91}', - 'kn' : '{3E6B24F6-9FA9-4066-859E-BF747FA3080A}', - 'ko' : '{32167995-4014-4E4C-983B-F7E17C24EB25}', - 'lt' : '{80E37CB5-059D-4F4B-AEF6-08265468D368}', - 'lv' : '{A5C5D801-4026-49F2-BBF1-250941855306}', - 'ml' : '{CAB69303-0F02-4C68-A12E-FFE55DB52526}', - 'mr' : '{A464166F-8507-49B4-9B02-5CB77C498B25}', - 'nb' : '{B30B0E1F-1CE9-4DEF-A752-7498FD709C1F}', - 'nl' : '{63011A7B-CE4D-4DF1-B5DA-1B133C14A2E8}', - 'or' : '{E07D267C-34C3-4DDB-8B41-94697808714A}', - 'pl' : '{9F53807E-9382-47BD-8371-E5D04F517E9C}', - 'pt-BR' : '{2F914112-2657-49EC-8EA6-3BA63340DE27}', - 'pt-PT' : '{0A13F602-B497-4BC1-ABD8-03CA8E95B2AF}', - 'ro' : '{C70D3509-57C4-4326-90C1-2EC0AE34848D}', - 'ru' : '{7D456640-3619-4D23-A56D-E0084400CCBF}', - 'sk' : '{82F5BFE5-FDCE-47D4-8B38-BEEBED561681}', - 'sl' : '{C2A444C2-9D74-4AD7-AE7C-04F5EDA17060}', - 'sr' : '{300C6A09-663E-48B6-8E07-A0D50CAF8F25}', - 'sv' : '{B0D5BD91-6153-4CA6-BC2F-4E3BD43E5DB7}', - 'ta' : '{7A0BA0C5-0D90-49AE-919A-4BE096F69E4F}', - 'te' : '{9D13D9B8-6C28-42A7-935C-B769EBC55BAA}', - 'th' : '{226B3533-1FF3-42F6-A8E3-C4DDBC955290}', - 'tr' : '{65C78BBB-8FCB-48E4-94C8-1F0F981929AF}', - 'uk' : '{182D578D-2DAC-4BB7-AFEC-9A2855E56F94}', - 'vi' : '{DA5C6FCB-FCFD-49B8-8DDA-8351638096DB}', - 'zh-CN' : '{C0C7DA58-C90D-4BDE-AE44-588997339F5D}', - 'zh-TW' : '{E7B11CF0-FE40-4A69-AE20-1B882F4D7585}', -} - -gcs_rc = '$TARGET_ROOT/grit_derived_sources/google_chrome_strings_%s.rc' -cs_rc = '$TARGET_ROOT/grit_derived_sources/chromium_strings_%s.rc' -gr_rc = '$TARGET_ROOT/grit_derived_sources/generated_resources_%s.rc' -ws_res = '$TARGET_ROOT/grit_derived_sources/webkit_strings_%s.res' - -dest_vcproj = '$CHROME_SRC_DIR/chrome/app/locales/%s.vcproj' - -locale_dlls = [] - -for locale in locale_list: - res = env_res.RES('locale_settings_%s.rc' % locale) - gr_res = env_res.RES(gr_rc % locale) - - # TODO(sgk): find out why this implicit dependency isn't discovered - env.Depends(res, gcs_rc % locale) - env.Depends(res, cs_rc % locale) - - dll = env_dll.ChromeSharedLibrary(locale, - [ gr_res % locale, - res, - ws_res % locale]) - locale_dlls.append(dll) - - p = env.ChromeMSVSProject('../locales/%s.vcproj' % locale, - dest=dest_vcproj % locale, - guid=locale_GUIDMap.get(locale), - buildtargets=dll, - relative_path_substitutions = [ - ('../../../..', '$(OutDir)'), - ], - tools=[ - 'VCPreBuildEventTool', - 'VCCustomBuildTool', - 'VCXMLDataGeneratorTool', - 'VCWebServiceProxyGeneratorTool', - 'VCMIDLTool', - 'VCCLCompilerTool', - 'VCManagedResourceCompilerTool', - 'VCResourceCompilerTool', - 'VCPreLinkEventTool', - 'VCLinkerTool', - 'VCALinkTool', - 'VCManifestTool', - 'VCXDCMakeTool', - 'VCBscMakeTool', - 'VCFxCopTool', - 'VCAppVerifierTool', - 'VCWebDeploymentTool', - 'VCPostBuildEventTool', - ], - ConfigurationType='2') - - if locale == 'en-US': - kw = {'CharacterSet' : '1'} - else: - kw = {} - - p.AddConfig('Debug|Win32', - InheritedPropertySheets=[ - '$(SolutionDir)../build/common.vsprops', - '$(SolutionDir)../build/debug.vsprops', - '../../tools/build/win/data_dll.vsprops', - '../../tools/build/win/language_dll.vsprops', - ], - **kw) - - p.AddConfig('Release|Win32', - InheritedPropertySheets=[ - '$(SolutionDir)../build/common.vsprops', - '$(SolutionDir)../build/release.vsprops', - '../../tools/build/win/data_dll.vsprops', - '../../tools/build/win/language_dll.vsprops', - ], - **kw) - -i = env.Install('$DESTINATION_ROOT/locales/', locale_dlls) -env.Alias('chrome_locales', i) diff --git a/chrome/app/resources/locale_settings.grd b/chrome/app/resources/locale_settings.grd index 406a8c2..fd44e67 100755 --- a/chrome/app/resources/locale_settings.grd +++ b/chrome/app/resources/locale_settings.grd @@ -57,7 +57,58 @@ <output filename="locale_settings_zh-CN.rc" type="rc_all" lang="zh-CN" /> <output filename="locale_settings_zh-TW.rc" type="rc_all" lang="zh-TW" /> + <output filename="locale_settings_ar.pak" type="data_package" lang="ar" /> + <output filename="locale_settings_bg.pak" type="data_package" lang="bg" /> + <output filename="locale_settings_bn.pak" type="data_package" lang="bn" /> + <output filename="locale_settings_ca.pak" type="data_package" lang="ca" /> + <output filename="locale_settings_cs.pak" type="data_package" lang="cs" /> + <output filename="locale_settings_da.pak" type="data_package" lang="da" /> + <output filename="locale_settings_de.pak" type="data_package" lang="de" /> + <output filename="locale_settings_el.pak" type="data_package" lang="el" /> + <output filename="locale_settings_en-GB.pak" type="data_package" lang="en-GB" /> <output filename="locale_settings_en-US.pak" type="data_package" lang="en" /> + <output filename="locale_settings_es.pak" type="data_package" lang="es" /> + <output filename="locale_settings_es-419.pak" type="data_package" lang="es-419" /> + <output filename="locale_settings_et.pak" type="data_package" lang="et" /> + <output filename="locale_settings_fi.pak" type="data_package" lang="fi" /> + <output filename="locale_settings_fil.pak" type="data_package" lang="fil" /> + <output filename="locale_settings_fr.pak" type="data_package" lang="fr" /> + <output filename="locale_settings_gu.pak" type="data_package" lang="gu" /> + <output filename="locale_settings_he.pak" type="data_package" lang="he" /> + <output filename="locale_settings_hi.pak" type="data_package" lang="hi" /> + <output filename="locale_settings_hr.pak" type="data_package" lang="hr" /> + <output filename="locale_settings_hu.pak" type="data_package" lang="hu" /> + <output filename="locale_settings_id.pak" type="data_package" lang="id" /> + <output filename="locale_settings_it.pak" type="data_package" lang="it" /> + <output filename="locale_settings_ja.pak" type="data_package" lang="ja" /> + <output filename="locale_settings_kn.pak" type="data_package" lang="kn" /> + <output filename="locale_settings_ko.pak" type="data_package" lang="ko" /> + <output filename="locale_settings_lt.pak" type="data_package" lang="lt" /> + <output filename="locale_settings_lv.pak" type="data_package" lang="lv" /> + <output filename="locale_settings_ml.pak" type="data_package" lang="ml" /> + <output filename="locale_settings_mr.pak" type="data_package" lang="mr" /> + <output filename="locale_settings_nl.pak" type="data_package" lang="nl" /> + <!-- The translation console uses 'no' for Norwegian Bokmål. It should + be 'nb'. --> + <output filename="locale_settings_nb.pak" type="data_package" lang="no" /> + <output filename="locale_settings_or.pak" type="data_package" lang="or" /> + <output filename="locale_settings_pl.pak" type="data_package" lang="pl" /> + <output filename="locale_settings_pt-BR.pak" type="data_package" lang="pt-BR" /> + <output filename="locale_settings_pt-PT.pak" type="data_package" lang="pt-PT" /> + <output filename="locale_settings_ro.pak" type="data_package" lang="ro" /> + <output filename="locale_settings_ru.pak" type="data_package" lang="ru" /> + <output filename="locale_settings_sk.pak" type="data_package" lang="sk" /> + <output filename="locale_settings_sl.pak" type="data_package" lang="sl" /> + <output filename="locale_settings_sr.pak" type="data_package" lang="sr" /> + <output filename="locale_settings_sv.pak" type="data_package" lang="sv" /> + <output filename="locale_settings_ta.pak" type="data_package" lang="ta" /> + <output filename="locale_settings_te.pak" type="data_package" lang="te" /> + <output filename="locale_settings_th.pak" type="data_package" lang="th" /> + <output filename="locale_settings_tr.pak" type="data_package" lang="tr" /> + <output filename="locale_settings_uk.pak" type="data_package" lang="uk" /> + <output filename="locale_settings_vi.pak" type="data_package" lang="vi" /> + <output filename="locale_settings_zh-CN.pak" type="data_package" lang="zh-CN" /> + <output filename="locale_settings_zh-TW.pak" type="data_package" lang="zh-TW" /> </outputs> <translations> <file path="locale_settings_ar.xtb" lang="ar" /> diff --git a/chrome/common/resource_bundle_linux.cc b/chrome/common/resource_bundle_linux.cc index 4d51215..0a5112f 100644 --- a/chrome/common/resource_bundle_linux.cc +++ b/chrome/common/resource_bundle_linux.cc @@ -39,12 +39,15 @@ void ResourceBundle::LoadResources(const std::wstring& pref_locale) { bool success = resources_data_->Load(resources_data_path); DCHECK(success) << "failed to load chrome.pak"; - FilePath locale_path; - PathService::Get(chrome::DIR_LOCALES, &locale_path); - // TODO(tc): Handle other locales properly. - // http://code.google.com/p/chromium/issues/detail?id=8125 - locale_path = locale_path.Append(FILE_PATH_LITERAL("en-US.pak")); DCHECK(locale_resources_data_ == NULL) << "locale data already loaded!"; + const FilePath& locale_path = GetLocaleFilePath(pref_locale); + if (locale_path.value().empty()) { + // It's possible that there are no locale dlls found, in which case we just + // return. + NOTREACHED(); + return; + } + locale_resources_data_ = new base::DataPack; success = locale_resources_data_->Load(locale_path); DCHECK(success) << "failed to load locale pak file"; diff --git a/webkit/glue/webkit_strings.grd b/webkit/glue/webkit_strings.grd index 33dc30c..f2e7a36a 100644 --- a/webkit/glue/webkit_strings.grd +++ b/webkit/glue/webkit_strings.grd @@ -98,7 +98,58 @@ below: <output filename="webkit_strings_zh-CN.rc" type="rc_all" lang="zh-CN" /> <output filename="webkit_strings_zh-TW.rc" type="rc_all" lang="zh-TW" /> + <output filename="webkit_strings_ar.pak" type="data_package" lang="ar" /> + <output filename="webkit_strings_bg.pak" type="data_package" lang="bg" /> + <output filename="webkit_strings_bn.pak" type="data_package" lang="bn" /> + <output filename="webkit_strings_ca.pak" type="data_package" lang="ca" /> + <output filename="webkit_strings_cs.pak" type="data_package" lang="cs" /> + <output filename="webkit_strings_da.pak" type="data_package" lang="da" /> + <output filename="webkit_strings_de.pak" type="data_package" lang="de" /> + <output filename="webkit_strings_el.pak" type="data_package" lang="el" /> + <output filename="webkit_strings_en-GB.pak" type="data_package" lang="en-GB" /> <output filename="webkit_strings_en-US.pak" type="data_package" lang="en" /> + <output filename="webkit_strings_es.pak" type="data_package" lang="es" /> + <output filename="webkit_strings_es-419.pak" type="data_package" lang="es-419" /> + <output filename="webkit_strings_et.pak" type="data_package" lang="et" /> + <output filename="webkit_strings_fi.pak" type="data_package" lang="fi" /> + <output filename="webkit_strings_fil.pak" type="data_package" lang="fil" /> + <output filename="webkit_strings_fr.pak" type="data_package" lang="fr" /> + <output filename="webkit_strings_gu.pak" type="data_package" lang="gu" /> + <output filename="webkit_strings_he.pak" type="data_package" lang="he" /> + <output filename="webkit_strings_hi.pak" type="data_package" lang="hi" /> + <output filename="webkit_strings_hr.pak" type="data_package" lang="hr" /> + <output filename="webkit_strings_hu.pak" type="data_package" lang="hu" /> + <output filename="webkit_strings_id.pak" type="data_package" lang="id" /> + <output filename="webkit_strings_it.pak" type="data_package" lang="it" /> + <output filename="webkit_strings_ja.pak" type="data_package" lang="ja" /> + <output filename="webkit_strings_kn.pak" type="data_package" lang="kn" /> + <output filename="webkit_strings_ko.pak" type="data_package" lang="ko" /> + <output filename="webkit_strings_lt.pak" type="data_package" lang="lt" /> + <output filename="webkit_strings_lv.pak" type="data_package" lang="lv" /> + <output filename="webkit_strings_ml.pak" type="data_package" lang="ml" /> + <output filename="webkit_strings_mr.pak" type="data_package" lang="mr" /> + <output filename="webkit_strings_nl.pak" type="data_package" lang="nl" /> + <!-- The translation console uses 'no' for Norwegian Bokmål. It should + be 'nb'. --> + <output filename="webkit_strings_nb.pak" type="data_package" lang="no" /> + <output filename="webkit_strings_or.pak" type="data_package" lang="or" /> + <output filename="webkit_strings_pl.pak" type="data_package" lang="pl" /> + <output filename="webkit_strings_pt-BR.pak" type="data_package" lang="pt-BR" /> + <output filename="webkit_strings_pt-PT.pak" type="data_package" lang="pt-PT" /> + <output filename="webkit_strings_ro.pak" type="data_package" lang="ro" /> + <output filename="webkit_strings_ru.pak" type="data_package" lang="ru" /> + <output filename="webkit_strings_sk.pak" type="data_package" lang="sk" /> + <output filename="webkit_strings_sl.pak" type="data_package" lang="sl" /> + <output filename="webkit_strings_sr.pak" type="data_package" lang="sr" /> + <output filename="webkit_strings_sv.pak" type="data_package" lang="sv" /> + <output filename="webkit_strings_ta.pak" type="data_package" lang="ta" /> + <output filename="webkit_strings_te.pak" type="data_package" lang="te" /> + <output filename="webkit_strings_th.pak" type="data_package" lang="th" /> + <output filename="webkit_strings_tr.pak" type="data_package" lang="tr" /> + <output filename="webkit_strings_uk.pak" type="data_package" lang="uk" /> + <output filename="webkit_strings_vi.pak" type="data_package" lang="vi" /> + <output filename="webkit_strings_zh-CN.pak" type="data_package" lang="zh-CN" /> + <output filename="webkit_strings_zh-TW.pak" type="data_package" lang="zh-TW" /> </outputs> <translations> <file path="resources/webkit_strings_ar.xtb" lang="ar" /> |