Commit 9d44ab25 authored by toyoshim@chromium.org's avatar toyoshim@chromium.org

Translate: Bug fix: need to normalize the language code for Translate UI

Take over this CL from hajimehoshi@chromium.org, and just rebase the CL
to trunk.

Original description by hajimehoshi@ follows;

Before passing the language code to Translate UI, this must be
normalized (like 'hi-IN' -> 'hi').

I mistakenly droped this process when moving GetTranslateLanguages from
translate_bubble_view.cc to translate_tab_helper.cc
(https://codereview.chromium.org/203223002) :-(

BUG=380137
R=toyoshim@chromium.org
TBR=hajimehoshi@chromium.org

Review URL: https://codereview.chromium.org/322733002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275786 0039d316-1c4b-4281-b951-d872f2087c98
parent dde9dfde
...@@ -126,7 +126,8 @@ void ChromeTranslateClient::GetTranslateLanguages( ...@@ -126,7 +126,8 @@ void ChromeTranslateClient::GetTranslateLanguages(
if (!chrome_translate_client) if (!chrome_translate_client)
return; return;
*source = chrome_translate_client->GetLanguageState().original_language(); *source = TranslateDownloadManager::GetLanguageCode(
chrome_translate_client->GetLanguageState().original_language());
Profile* profile = Profile* profile =
Profile::FromBrowserContext(web_contents->GetBrowserContext()); Profile::FromBrowserContext(web_contents->GetBrowserContext());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment