[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - configmgr/source sd/source
Andras Timar (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jun 15 19:41:34 UTC 2020
configmgr/source/access.cxx | 2 +-
sd/source/core/CustomAnimationPreset.cxx | 4 ++--
sd/source/core/TransitionPreset.cxx | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 4bcfd38b16611842be84dda4113ecfa8a79d5d63
Author: Andras Timar <andras.timar at collabora.com>
AuthorDate: Mon Jun 15 09:20:24 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Mon Jun 15 21:41:01 2020 +0200
Use getBcp47() instead of getLanguage()
getLanguage() only returns the language code which can be
ambiguous in case of UI localization, when there are more
than one language variants. Fallback to the first variant
caused mixed language UI, e.g. en-US vs. en-GB, pt vs. pt-BR,
zh-CN vs. zh-TW.
Change-Id: I888423cd4b3c65dbdb900ff3b6bc308fa119be4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96312
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index c7ad2c538ae8..0c89942cb0c8 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -1387,7 +1387,7 @@ rtl::Reference< ChildAccess > Access::getChild(OUString const & name) {
// here we override it with the actual current-user's language to
// support per-view localization in LOK.
if (comphelper::LibreOfficeKit::isActive())
- locale = comphelper::LibreOfficeKit::getLanguageTag().getLanguage();
+ locale = comphelper::LibreOfficeKit::getLanguageTag().getBcp47();
if (!locale.isEmpty()) {
// Find best match using an adaption of RFC 4647 lookup matching
diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx
index 401cff4b8c8b..56cb9a429538 100644
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -539,8 +539,8 @@ const CustomAnimationPresets& CustomAnimationPresets::getCustomAnimationPresets(
// Support localization per-view. Currently not useful for Desktop
// but very much critical for LOK. The cache now is per-language.
const OUString aLang = comphelper::LibreOfficeKit::isActive()
- ? comphelper::LibreOfficeKit::getLanguageTag().getLanguage()
- : SvtSysLocaleOptions().GetLanguageTag().getLanguage();
+ ? comphelper::LibreOfficeKit::getLanguageTag().getBcp47()
+ : SvtSysLocaleOptions().GetLanguageTag().getBcp47();
SolarMutexGuard aGuard;
const auto it = mPresetsMap.find(aLang);
diff --git a/sd/source/core/TransitionPreset.cxx b/sd/source/core/TransitionPreset.cxx
index ce373f55dd27..58fbf69407e5 100644
--- a/sd/source/core/TransitionPreset.cxx
+++ b/sd/source/core/TransitionPreset.cxx
@@ -382,8 +382,8 @@ const TransitionPresetList& TransitionPreset::getTransitionPresetList()
// Support localization per-view. Currently not useful for Desktop
// but very much critical for LOK. The cache now is per-language.
const OUString aLang = comphelper::LibreOfficeKit::isActive()
- ? comphelper::LibreOfficeKit::getLanguageTag().getLanguage()
- : SvtSysLocaleOptions().GetLanguageTag().getLanguage();
+ ? comphelper::LibreOfficeKit::getLanguageTag().getBcp47()
+ : SvtSysLocaleOptions().GetLanguageTag().getBcp47();
SolarMutexGuard aGuard;
const auto it = mPresetsMap.find(aLang);
More information about the Libreoffice-commits
mailing list