diff options
author | gwilson@google.com <gwilson@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-18 23:10:43 +0000 |
---|---|---|
committer | gwilson@google.com <gwilson@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-18 23:10:43 +0000 |
commit | b32afece494a7439721771224f19f9741eedf181 (patch) | |
tree | 2fd3b95c6f78354425fef24c43d1d92f9f3dc2d7 /chrome | |
parent | 0952b15f6f25aec2a4b63fe98d42100a30866429 (diff) | |
download | chromium_src-b32afece494a7439721771224f19f9741eedf181.zip chromium_src-b32afece494a7439721771224f19f9741eedf181.tar.gz chromium_src-b32afece494a7439721771224f19f9741eedf181.tar.bz2 |
Modifies setup to have all the supported languages available for the in-application EULA dialog.
Review URL: http://codereview.chromium.org/21437
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9989 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/installer/setup/setup.rc | 74 | ||||
-rw-r--r-- | chrome/installer/util/l10n_string_util.cc | 59 |
2 files changed, 124 insertions, 9 deletions
diff --git a/chrome/installer/setup/setup.rc b/chrome/installer/setup/setup.rc index d37774c..e4051c3 100644 --- a/chrome/installer/setup/setup.rc +++ b/chrome/installer/setup/setup.rc @@ -73,15 +73,87 @@ IDR_EULA_ICO.PNG EULA "..\\..\\app\\theme\\google_chrome\\eula_icon.png" IDR_EULA_CSS.CSS HTML "eula\\oem.css" IDR_EULA_JSC.JS HTML "eula\\oem.js" +IDR_OEMPG_AR.HTML HTML "eula\\oem_ar.html" +IDR_OEMPG_BG.HTML HTML "eula\\oem_bg.html" +IDR_OEMPG_CA.HTML HTML "eula\\oem_ca.html" +IDR_OEMPG_CS.HTML HTML "eula\\oem_cs.html" +IDR_OEMPG_DA.HTML HTML "eula\\oem_da.html" +IDR_OEMPG_DE.HTML HTML "eula\\oem_de.html" +IDR_OEMPG_EL.HTML HTML "eula\\oem_el.html" IDR_OEMPG_EN.HTML HTML "eula\\oem_en.html" +IDR_OEMPG_EN_GB.HTML HTML "eula\\oem_en-GB.html" +IDR_OEMPG_ES.HTML HTML "eula\\oem_es.html" IDR_OEMPG_ES_419.HTML HTML "eula\\oem_es-419.html" +IDR_OEMPG_ET.HTML HTML "eula\\oem_et.html" +IDR_OEMPG_FI.HTML HTML "eula\\oem_fi.html" +IDR_OEMPG_FIL.HTML HTML "eula\\oem_fil.html" IDR_OEMPG_FR.HTML HTML "eula\\oem_fr.html" +IDR_OEMPG_HI.HTML HTML "eula\\oem_hi.html" +IDR_OEMPG_HR.HTML HTML "eula\\oem_hr.html" +IDR_OEMPG_HU.HTML HTML "eula\\oem_hu.html" +IDR_OEMPG_ID.HTML HTML "eula\\oem_id.html" +IDR_OEMPG_IT.HTML HTML "eula\\oem_it.html" +IDR_OEMPG_JA.HTML HTML "eula\\oem_ja.html" +IDR_OEMPG_KO.HTML HTML "eula\\oem_ko.html" +IDR_OEMPG_LT.HTML HTML "eula\\oem_lt.html" +IDR_OEMPG_LV.HTML HTML "eula\\oem_lv.html" +IDR_OEMPG_NL.HTML HTML "eula\\oem_nl.html" +IDR_OEMPG_PL.HTML HTML "eula\\oem_pl.html" IDR_OEMPG_PT_BR.HTML HTML "eula\\oem_pt-BR.html" - +IDR_OEMPG_PT_PT.HTML HTML "eula\\oem_pt-PT.html" +IDR_OEMPG_RO.HTML HTML "eula\\oem_ro.html" +IDR_OEMPG_RU.HTML HTML "eula\\oem_ru.html" +IDR_OEMPG_SK.HTML HTML "eula\\oem_sk.html" +IDR_OEMPG_SL.HTML HTML "eula\\oem_sl.html" +IDR_OEMPG_SR.HTML HTML "eula\\oem_sr.html" +IDR_OEMPG_SV.HTML HTML "eula\\oem_sv.html" +IDR_OEMPG_TH.HTML HTML "eula\\oem_th.html" +IDR_OEMPG_TR.HTML HTML "eula\\oem_tr.html" +IDR_OEMPG_UK.HTML HTML "eula\\oem_uk.html" +IDR_OEMPG_VI.HTML HTML "eula\\oem_vi.html" +IDR_OEMPG_ZH_CN.HTML HTML "eula\\oem_zh-CN.html" +IDR_OEMPG_ZH_TW.HTML HTML "eula\\oem_zh-TW.html" + +IDR_TERMS_AR.HTML HTML "..\\..\\app\\resources\\terms\\terms_ar.html" +IDR_TERMS_BG.HTML HTML "..\\..\\app\\resources\\terms\\terms_bg.html" +IDR_TERMS_CA.HTML HTML "..\\..\\app\\resources\\terms\\terms_ca.html" +IDR_TERMS_CS.HTML HTML "..\\..\\app\\resources\\terms\\terms_cs.html" +IDR_TERMS_DA.HTML HTML "..\\..\\app\\resources\\terms\\terms_da.html" +IDR_TERMS_DE.HTML HTML "..\\..\\app\\resources\\terms\\terms_de.html" +IDR_TERMS_EL.HTML HTML "..\\..\\app\\resources\\terms\\terms_el.html" IDR_TERMS_EN.HTML HTML "..\\..\\app\\resources\\terms\\terms_en.html" +IDR_TERMS_EN_GB.HTML HTML "..\\..\\app\\resources\\terms\\terms_en-GB.html" +IDR_TERMS_ES.HTML HTML "..\\..\\app\\resources\\terms\\terms_es.html" IDR_TERMS_ES_419.HTML HTML "..\\..\\app\\resources\\terms\\terms_es-419.html" +IDR_TERMS_ET.HTML HTML "..\\..\\app\\resources\\terms\\terms_et.html" +IDR_TERMS_FI.HTML HTML "..\\..\\app\\resources\\terms\\terms_fi.html" +IDR_TERMS_FIL.HTML HTML "..\\..\\app\\resources\\terms\\terms_fil.html" IDR_TERMS_FR.HTML HTML "..\\..\\app\\resources\\terms\\terms_fr.html" +IDR_TERMS_HI.HTML HTML "..\\..\\app\\resources\\terms\\terms_hi.html" +IDR_TERMS_HR.HTML HTML "..\\..\\app\\resources\\terms\\terms_hr.html" +IDR_TERMS_HU.HTML HTML "..\\..\\app\\resources\\terms\\terms_hu.html" +IDR_TERMS_ID.HTML HTML "..\\..\\app\\resources\\terms\\terms_id.html" +IDR_TERMS_IT.HTML HTML "..\\..\\app\\resources\\terms\\terms_it.html" +IDR_TERMS_JA.HTML HTML "..\\..\\app\\resources\\terms\\terms_ja.html" +IDR_TERMS_KO.HTML HTML "..\\..\\app\\resources\\terms\\terms_ko.html" +IDR_TERMS_LT.HTML HTML "..\\..\\app\\resources\\terms\\terms_lt.html" +IDR_TERMS_LV.HTML HTML "..\\..\\app\\resources\\terms\\terms_lv.html" +IDR_TERMS_NL.HTML HTML "..\\..\\app\\resources\\terms\\terms_nl.html" +IDR_TERMS_PL.HTML HTML "..\\..\\app\\resources\\terms\\terms_pl.html" IDR_TERMS_PT_BR.HTML HTML "..\\..\\app\\resources\\terms\\terms_pt-BR.html" +IDR_TERMS_PT_PT.HTML HTML "..\\..\\app\\resources\\terms\\terms_pt-PT.html" +IDR_TERMS_RO.HTML HTML "..\\..\\app\\resources\\terms\\terms_ro.html" +IDR_TERMS_RU.HTML HTML "..\\..\\app\\resources\\terms\\terms_ru.html" +IDR_TERMS_SK.HTML HTML "..\\..\\app\\resources\\terms\\terms_sk.html" +IDR_TERMS_SL.HTML HTML "..\\..\\app\\resources\\terms\\terms_sl.html" +IDR_TERMS_SR.HTML HTML "..\\..\\app\\resources\\terms\\terms_sr.html" +IDR_TERMS_SV.HTML HTML "..\\..\\app\\resources\\terms\\terms_sv.html" +IDR_TERMS_TH.HTML HTML "..\\..\\app\\resources\\terms\\terms_th.html" +IDR_TERMS_TR.HTML HTML "..\\..\\app\\resources\\terms\\terms_tr.html" +IDR_TERMS_UK.HTML HTML "..\\..\\app\\resources\\terms\\terms_uk.html" +IDR_TERMS_VI.HTML HTML "..\\..\\app\\resources\\terms\\terms_vi.html" +IDR_TERMS_ZH_CN.HTML HTML "..\\..\\app\\resources\\terms\\terms_zh-CN.html" +IDR_TERMS_ZH_TW.HTML HTML "..\\..\\app\\resources\\terms\\terms_zh-TW.html" #endif // defined(GOOGLE_CHROME_BUILD) diff --git a/chrome/installer/util/l10n_string_util.cc b/chrome/installer/util/l10n_string_util.cc index 49c27e7..0675dca 100644 --- a/chrome/installer/util/l10n_string_util.cc +++ b/chrome/installer/util/l10n_string_util.cc @@ -168,16 +168,59 @@ std::wstring GetLocalizedEulaResource() { int len = ::GetModuleFileNameW(NULL, full_exe_path, MAX_PATH); if (len <= 0 && len >= MAX_PATH) return L""; - // The default language is English, but we also support Spanish,French and - // Portuguese. std::wstring language = GetSystemLanguage(); const wchar_t* resource = L"IDR_OEMPG_EN.HTML"; - if (language == L"fr") - resource = L"IDR_OEMPG_FR.HTML"; - else if (language == L"es-419") - resource = L"IDR_OEMPG_ES_419.HTML"; - else if (language == L"pt-br") - resource = L"IDR_OEMPG_PT_BR.HTML"; + + static std::map<int, wchar_t*> html_map; + if (html_map.empty()) { + html_map[IDS_L10N_OFFSET_AR] = L"IDR_OEMPG_AR.HTML"; + html_map[IDS_L10N_OFFSET_BG] = L"IDR_OEMPG_BG.HTML"; + html_map[IDS_L10N_OFFSET_CA] = L"IDR_OEMPG_CA.HTML"; + html_map[IDS_L10N_OFFSET_CS] = L"IDR_OEMPG_CS.HTML"; + html_map[IDS_L10N_OFFSET_DA] = L"IDR_OEMPG_DA.HTML"; + html_map[IDS_L10N_OFFSET_DE] = L"IDR_OEMPG_DE.HTML"; + html_map[IDS_L10N_OFFSET_EL] = L"IDR_OEMPG_EL.HTML"; + html_map[IDS_L10N_OFFSET_EN_US] = L"IDR_OEMPG_EN.HTML"; + html_map[IDS_L10N_OFFSET_EN_GB] = L"IDR_OEMPG_EN_GB.HTML"; + html_map[IDS_L10N_OFFSET_ES] = L"IDR_OEMPG_ES.HTML"; + html_map[IDS_L10N_OFFSET_ES_419] = L"IDR_OEMPG_ES_419.HTML"; + html_map[IDS_L10N_OFFSET_ET] = L"IDR_OEMPG_ET.HTML"; + html_map[IDS_L10N_OFFSET_FI] = L"IDR_OEMPG_FI.HTML"; + html_map[IDS_L10N_OFFSET_FIL] = L"IDR_OEMPG_FIL.HTML"; + html_map[IDS_L10N_OFFSET_FR] = L"IDR_OEMPG_FR.HTML"; + html_map[IDS_L10N_OFFSET_HI] = L"IDR_OEMPG_HI.HTML"; + html_map[IDS_L10N_OFFSET_HR] = L"IDR_OEMPG_HR.HTML"; + html_map[IDS_L10N_OFFSET_HU] = L"IDR_OEMPG_HU.HTML"; + html_map[IDS_L10N_OFFSET_ID] = L"IDR_OEMPG_ID.HTML"; + html_map[IDS_L10N_OFFSET_IT] = L"IDR_OEMPG_IT.HTML"; + html_map[IDS_L10N_OFFSET_JA] = L"IDR_OEMPG_JA.HTML"; + html_map[IDS_L10N_OFFSET_KO] = L"IDR_OEMPG_KO.HTML"; + html_map[IDS_L10N_OFFSET_LT] = L"IDR_OEMPG_LT.HTML"; + html_map[IDS_L10N_OFFSET_LV] = L"IDR_OEMPG_LV.HTML"; + html_map[IDS_L10N_OFFSET_NL] = L"IDR_OEMPG_NL.HTML"; + html_map[IDS_L10N_OFFSET_NO] = L"IDR_OEMPG_NO.HTML"; + html_map[IDS_L10N_OFFSET_PL] = L"IDR_OEMPG_PL.HTML"; + html_map[IDS_L10N_OFFSET_PT_BR] = L"IDR_OEMPG_PT_BR.HTML"; + html_map[IDS_L10N_OFFSET_PT_PT] = L"IDR_OEMPG_PT_PT.HTML"; + html_map[IDS_L10N_OFFSET_RO] = L"IDR_OEMPG_RO.HTML"; + html_map[IDS_L10N_OFFSET_RU] = L"IDR_OEMPG_RU.HTML"; + html_map[IDS_L10N_OFFSET_SK] = L"IDR_OEMPG_SK.HTML"; + html_map[IDS_L10N_OFFSET_SL] = L"IDR_OEMPG_SL.HTML"; + html_map[IDS_L10N_OFFSET_SR] = L"IDR_OEMPG_SR.HTML"; + html_map[IDS_L10N_OFFSET_SV] = L"IDR_OEMPG_SV.HTML"; + html_map[IDS_L10N_OFFSET_TH] = L"IDR_OEMPG_TH.HTML"; + html_map[IDS_L10N_OFFSET_TR] = L"IDR_OEMPG_TR.HTML"; + html_map[IDS_L10N_OFFSET_UK] = L"IDR_OEMPG_UK.HTML"; + html_map[IDS_L10N_OFFSET_VI] = L"IDR_OEMPG_VI.HTML"; + html_map[IDS_L10N_OFFSET_ZH_CN] = L"IDR_OEMPG_ZH_CN.HTML"; + html_map[IDS_L10N_OFFSET_ZH_TW] = L"IDR_OEMPG_ZH_TW.HTML"; + } + + std::map<int, wchar_t*>::iterator it = html_map.find( + GetLanguageOffset(language)); + if (it != html_map.end()) + resource = it->second; + // Spaces and DOS paths must be url encoded. std::wstring url_path = StringPrintf(L"res://%ls/#23/%ls", full_exe_path, resource); |