Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
Use BrowserProcessImpl::GetApplicationLocale for
Browse files Browse the repository at this point in the history
`BraveContentBrowserClient::GetApplicationLocale` because the result of
`extension_l10n_util::CurrentLocaleOrDefault` will be normalized by
`l10n_util::NormalizeLocale` which means turning en-US to en_US

`chrome.i18n.getUILanguage` uses `RenderThread::GetLocale()` which reads
from switch `--lang` appended when renderer process created and the
value is reading from `ContentBrowserClient::GetApplicationLocale`

fix brave/browser-laptop#11624

Auditors: @bridiver, @bbondy
  • Loading branch information
darkdh committed Aug 2, 2018
1 parent 4ffc7f0 commit b46f734
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion brave/browser/brave_content_browser_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ std::string BraveContentBrowserClient::GetApplicationLocale() {
if (BrowserThread::CurrentlyOn(BrowserThread::IO)) {
return io_thread_application_locale.Get();
} else {
return extensions_part_->GetApplicationLocale();
return g_browser_process->GetApplicationLocale();
}
}

Expand Down

0 comments on commit b46f734

Please sign in to comment.