diff options
author | miguelg@chromium.org <miguelg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-28 11:49:43 +0000 |
---|---|---|
committer | miguelg@chromium.org <miguelg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-28 11:49:43 +0000 |
commit | b786318943b4c26df87d539a1d3e5eb7e552a542 (patch) | |
tree | e12f6c562d658233a3a2df4fa9a33204e8ff8695 | |
parent | 55408232315796def5b7de50a037b6d77348df58 (diff) | |
download | chromium_src-b786318943b4c26df87d539a1d3e5eb7e552a542.zip chromium_src-b786318943b4c26df87d539a1d3e5eb7e552a542.tar.gz chromium_src-b786318943b4c26df87d539a1d3e5eb7e552a542.tar.bz2 |
Revert 257427 "Merge 256612 "On mobile. Do not check for ICU tra..."
> Merge 256612 "On mobile. Do not check for ICU translations when ..."
>
> > On mobile. Do not check for ICU translations when receiving new translate languages.
> >
> > BUG=350932
> >
> > Review URL: https://codereview.chromium.org/194963005
>
> TBR=miguelg@chromium.org
>
> Review URL: https://codereview.chromium.org/201913002
TBR=miguelg@chromium.org
Review URL: https://codereview.chromium.org/216863002
git-svn-id: svn://svn.chromium.org/chrome/branches/1847/src@260107 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | components/translate/core/browser/translate_language_list.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/components/translate/core/browser/translate_language_list.cc b/components/translate/core/browser/translate_language_list.cc index 6491350..d41af2e 100644 --- a/components/translate/core/browser/translate_language_list.cc +++ b/components/translate/core/browser/translate_language_list.cc @@ -119,7 +119,7 @@ TranslateLanguageList::TranslateLanguageList() : resource_requests_allowed_(false), request_pending_(false) { // We default to our hard coded list of languages in // |kDefaultSupportedLanguages|. This list will be overriden by a server - // providing supported languages list. + // providing supported langauges list. for (size_t i = 0; i < arraysize(kDefaultSupportedLanguages); ++i) all_supported_languages_.insert(kDefaultSupportedLanguages[i]); @@ -294,10 +294,9 @@ void TranslateLanguageList::SetSupportedLanguages( NOTREACHED(); return; } -#if !defined(OS_ANDROID) && !defined(OS_IOS) + const std::string& locale = TranslateDownloadManager::GetInstance()->application_locale(); -#endif // !defined(OS_ANDROID) && !defined(OS_IOS) // Now we can clear language list. all_supported_languages_.clear(); @@ -307,15 +306,10 @@ void TranslateLanguageList::SetSupportedLanguages( !iter.IsAtEnd(); iter.Advance()) { const std::string& lang = iter.key(); - - // Mobile can provide manual triggers for languages where we don't yet - // have an ICU translation -#if !defined(OS_ANDROID) && !defined(OS_IOS) if (!l10n_util::IsLocaleNameTranslated(lang.c_str(), locale)) { TranslateBrowserMetrics::ReportUndisplayableLanguage(lang); continue; } -#endif // !defined(OS_ANDROID) && !defined(OS_IOS) all_supported_languages_.insert(lang); if (message.empty()) message += lang; @@ -338,10 +332,8 @@ void TranslateLanguageList::SetSupportedLanguages( for (base::DictionaryValue::Iterator iter(*alpha_languages); !iter.IsAtEnd(); iter.Advance()) { const std::string& lang = iter.key(); -#if !defined(OS_ANDROID) && !defined(OS_IOS) if (!l10n_util::IsLocaleNameTranslated(lang.c_str(), locale)) continue; -#endif // !defined(OS_ANDROID) && !defined(OS_IOS) alpha_languages_.insert(lang); } } |