diff options
author | Andras Becsi <andras.becsi@digia.com> | 2014-10-10 18:42:30 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-10-04 10:16:28 +0200 |
commit | c2c96d1d5de3c8e561d593f4afe1bbdf55097148 (patch) | |
tree | 4a02b6117d8aa372fbdd2f6f91827ed2b75fe4bf /chromium/ui | |
parent | 37e5edd4fc8489568943e336689eab7a050dd15e (diff) | |
download | qtwebengine-chromium-c2c96d1d5de3c8e561d593f4afe1bbdf55097148.tar.gz |
Enable localization codepath on OS X and Linux
Change-Id: I5471953dbe08ee5afb92d24baeb94863fb8de98e
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/ui')
-rw-r--r-- | chromium/ui/base/l10n/l10n_util.cc | 8 | ||||
-rw-r--r-- | chromium/ui/base/resource/resource_bundle.cc | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/chromium/ui/base/l10n/l10n_util.cc b/chromium/ui/base/l10n/l10n_util.cc index 897c5b80b3d..129bd331350 100644 --- a/chromium/ui/base/l10n/l10n_util.cc +++ b/chromium/ui/base/l10n/l10n_util.cc @@ -474,7 +474,7 @@ bool CheckAndResolveLocale(const std::string& locale, return CheckAndResolveLocale(locale, resolved_locale, /*perform_io=*/true); } -#if defined(OS_APPLE) +#if defined(OS_APPLE) && !defined(TOOLKIT_QT) std::string GetApplicationLocaleInternalMac(const std::string& pref_locale) { // Use any override (Cocoa for the browser), otherwise use the preference // passed to the function. @@ -491,7 +491,7 @@ std::string GetApplicationLocaleInternalMac(const std::string& pref_locale) { } #endif -#if !defined(OS_APPLE) +#if !defined(OS_APPLE) || defined(TOOLKIT_QT) std::string GetApplicationLocaleInternalNonMac(const std::string& pref_locale) { std::string resolved_locale; std::vector<std::string> candidates; @@ -524,7 +524,7 @@ std::string GetApplicationLocaleInternalNonMac(const std::string& pref_locale) { // On Android, query java.util.Locale for the default locale. candidates.push_back(base::android::GetDefaultLocaleString()); -#elif defined(USE_GLIB) && !BUILDFLAG(IS_CHROMEOS_ASH) +#elif defined(USE_GLIB) && !BUILDFLAG(IS_CHROMEOS_ASH) && !defined(TOOLKIT_QT) // GLib implements correct environment variable parsing with // the precedence order: LANGUAGE, LC_ALL, LC_MESSAGES and LANG. // We used to use our custom parsing code along with ICU for this purpose. @@ -561,7 +561,7 @@ std::string GetApplicationLocaleInternalNonMac(const std::string& pref_locale) { #endif // !defined(OS_APPLE) std::string GetApplicationLocaleInternal(const std::string& pref_locale) { -#if defined(OS_APPLE) +#if defined(OS_APPLE) && !defined(TOOLKIT_QT) return GetApplicationLocaleInternalMac(pref_locale); #else return GetApplicationLocaleInternalNonMac(pref_locale); diff --git a/chromium/ui/base/resource/resource_bundle.cc b/chromium/ui/base/resource/resource_bundle.cc index 65b1649050a..5c6aca562e1 100644 --- a/chromium/ui/base/resource/resource_bundle.cc +++ b/chromium/ui/base/resource/resource_bundle.cc @@ -74,7 +74,7 @@ const size_t kPngChunkMetadataSize = 12; // length, type, crc32 const unsigned char kPngScaleChunkType[4] = { 'c', 's', 'C', 'l' }; const unsigned char kPngDataChunkType[4] = { 'I', 'D', 'A', 'T' }; -#if !defined(OS_APPLE) +#if !defined(OS_APPLE) || defined(TOOLKIT_QT) const char kPakFileExtension[] = ".pak"; #endif @@ -364,7 +364,7 @@ void ResourceBundle::AddDataPackFromFileRegion( } } -#if !defined(OS_APPLE) +#if !defined(OS_APPLE) || defined(TOOLKIT_QT) // static base::FilePath ResourceBundle::GetLocaleFilePath( const std::string& app_locale) { |