From 885b72726cd788273b305da33d04c65cfa130d09 Mon Sep 17 00:00:00 2001 From: "thomasvl@chromium.org" Date: Wed, 12 Aug 2009 20:33:05 +0000 Subject: Move the menu bar l10n into the xib file. Localize the menu bar titles. Have the browser platform delegate startup the resource bundle system so we can fetch localization data. Make l10n_util::GetApplicationLocale return what cocoa says for the language so we match what the UI is using. TEST=everything still works. BUG=17380 Review URL: http://codereview.chromium.org/164413 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23215 0039d316-1c4b-4281-b951-d872f2087c98 --- app/l10n_util.cc | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'app/l10n_util.cc') diff --git a/app/l10n_util.cc b/app/l10n_util.cc index 751a41c..1330263 100644 --- a/app/l10n_util.cc +++ b/app/l10n_util.cc @@ -220,15 +220,12 @@ namespace l10n_util { // Represents the locale-specific text direction. static TextDirection g_text_direction = UNKNOWN_DIRECTION; +// On the Mac, we don't want to test preferences or ICU for the language, +// we want to use whatever Cocoa is using when it loaded the main nib file. +// It handles all the mapping and fallbacks for us, we just need to ask. +// See l10n_util_mac for that implementation. +#if !defined(OS_MACOSX) std::string GetApplicationLocale(const std::wstring& pref_locale) { -#if defined(OS_MACOSX) - // On the mac, we don't want to test preferences or ICU for the language, - // we want to use whatever Cocoa is using when it loaded the main nib file. - // It handles all the mapping and fallbacks for us, we just need to ask - // Cocoa. - // TODO(pinkerton): break this out into a .mm and ask Cocoa. - return "en"; -#else FilePath locale_path; PathService::Get(app::DIR_LOCALES, &locale_path); std::string resolved_locale; @@ -269,8 +266,8 @@ std::string GetApplicationLocale(const std::wstring& pref_locale) { NOTREACHED(); return std::string(); -#endif } +#endif // !defined(OS_MACOSX) string16 GetDisplayNameForLocale(const std::string& locale_code, const std::string& display_locale, -- cgit v1.1