summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorHeiko Tietze <tietze.heiko@gmail.com>2020-06-03 19:49:28 +0200
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2020-06-04 08:59:02 +0200
commit2788cc07e9d0d078b53a7280d524175c03c51e12 (patch)
tree59bcd39b82bdfa48c44f3f6a461a10da0c8780da /sfx2
parent417353e1c0dca23d888f554ff272f66e40b77eab (diff)
Resolves tdf#127401 - Chinese locale pointing to wrong hub forward address
zh is replaced by zh-cn for donation and whatsnew commands Change-Id: Ibd56e94983882bd9090d176cb42ae0a7a1f88065 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95450 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appserv.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 6dd813fdf7be..c61a8ab7a3a7 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -551,6 +551,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
{
// Open donation page based on language + script (BCP47) with language as fall back.
OUString aLang = LanguageTag(utl::ConfigManager::getUILocale()).getLanguage();
+ if (aLang == "zh") aLang = "zh-cn";//tdf#127401
OUString aBcp47 = LanguageTag(utl::ConfigManager::getUILocale()).getBcp47();
OUString sURL(officecfg::Office::Common::Menus::DonationURL::get() + //https://hub.libreoffice.org/donation/
"?BCP47=" + aBcp47 + "&LOlang=" + aLang );
@@ -560,9 +561,11 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
case SID_WHATSNEW:
{
// Open release notes depending on version and locale
+ OUString aLang = LanguageTag(utl::ConfigManager::getUILocale()).getLanguage();
+ if (aLang == "zh") aLang = "zh-cn";//tdf#127401
OUString sURL(officecfg::Office::Common::Menus::ReleaseNotesURL::get() + //https://hub.libreoffice.org/ReleaseNotes/
"?LOvers=" + utl::ConfigManager::getProductVersion() +
- "&LOlocale=" + LanguageTag(utl::ConfigManager::getUILocale()).getBcp47() );
+ "&LOlocale=" + aLang );
sfx2::openUriExternally(sURL, false);
break;
}