Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(894)

Unified Diff: components/translate/core/browser/translate_manager.cc

Issue 2802613004: fix target language issue under three locales (Hebrew[iw->he], Fillipion[tl->fil], and Nowreign[no-… (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/translate/core/browser/translate_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/translate/core/browser/translate_manager.cc
diff --git a/components/translate/core/browser/translate_manager.cc b/components/translate/core/browser/translate_manager.cc
index 8491a2adb164dbb1db06b4f48d0af8ca082ea006..4f5bc5fbd6765d12d5e54cbc2e2f2d7df1d4136d 100644
--- a/components/translate/core/browser/translate_manager.cc
+++ b/components/translate/core/browser/translate_manager.cc
@@ -514,6 +514,8 @@ std::string TranslateManager::GetTargetLanguage(const TranslatePrefs* prefs) {
// Get the browser's user interface language.
language = TranslateDownloadManager::GetLanguageCode(
TranslateDownloadManager::GetInstance()->application_locale());
+ // Map 'he', 'nb', 'fil' back to 'iw', 'no', 'tl'
+ translate::ToTranslateLanguageSynonym(&language);
jungshik at Google 2017/04/11 18:45:32 Shouldn't Google Translate API take care of this i
}
if (TranslateDownloadManager::IsSupportedLanguage(language))
return language;
« no previous file with comments | « no previous file | components/translate/core/browser/translate_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698