diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-11-08 11:24:15 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-11-08 15:40:59 +0100 |
commit | 396d29d9deccef6fa4ecf9ea8aa6a5d6f6065c53 (patch) | |
tree | 6650841a2d301ab35e630071c445bfa34e6e0fe2 /cui/source/dialogs/about.cxx | |
parent | 9fb7c77e5cfc5add880aee18e36a851b8929137a (diff) |
Related: tdf#121238 show ui language as well as locale
Change-Id: I350c71f50fdb8f0602badd7a7ad13b3a7c2c85e0
Reviewed-on: https://gerrit.libreoffice.org/63083
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source/dialogs/about.cxx')
-rw-r--r-- | cui/source/dialogs/about.cxx | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 5a564389f590..648073c75f4c 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -81,6 +81,7 @@ AboutDialog::AboutDialog(vcl::Window* pParent) m_aBasedTextStr = get<FixedText>("libreoffice")->GetText(); m_aBasedDerivedTextStr = get<FixedText>("derived")->GetText(); m_aLocaleStr = get<FixedText>("locale")->GetText(); + m_aUILocaleStr = get<FixedText>("uilocale")->GetText(); m_buildIdLinkString = m_pBuildIdLink->GetText(); m_pVersion->SetText(GetVersionString()); @@ -307,6 +308,7 @@ OUString AboutDialog::GetVersionString() OUString sBuildId = GetBuildId(); OUString aLocaleStr = Application::GetSettings().GetLanguageTag().getBcp47() + " (" + GetLocaleString() + ")"; + OUString aUILocaleStr = Application::GetSettings().GetUILanguageTag().getBcp47(); if (!sBuildId.trim().isEmpty()) { @@ -328,16 +330,19 @@ OUString AboutDialog::GetVersionString() sVersion += "\n" EXTRA_BUILDID; } - if (!aLocaleStr.trim().isEmpty()) + if (m_aLocaleStr.indexOf("$LOCALE") == -1) { - sVersion += "\n"; - if (m_aLocaleStr.indexOf("$LOCALE") == -1) - { - SAL_WARN( "cui.dialogs", "translated locale string in translations doesn't contain $LOCALE placeholder" ); - m_aLocaleStr += " $LOCALE"; - } - sVersion += m_aLocaleStr.replaceAll("$LOCALE", aLocaleStr); + SAL_WARN( "cui.dialogs", "translated locale string in translations doesn't contain $LOCALE placeholder" ); + m_aLocaleStr += " $LOCALE"; + } + sVersion += "\n" + m_aLocaleStr.replaceAll("$LOCALE", aLocaleStr); + + if (m_aUILocaleStr.indexOf("$LOCALE") == -1) + { + SAL_WARN( "cui.dialogs", "translated uilocale string in translations doesn't contain $LOCALE placeholder" ); + m_aUILocaleStr += " $LOCALE"; } + sVersion += "; " + m_aUILocaleStr.replaceAll("$LOCALE", aUILocaleStr); OUString aCalcMode = "Calc: "; // Calc calculation mode @@ -359,7 +364,7 @@ OUString AboutDialog::GetVersionString() aCalcMode += "threaded"; } - sVersion += "; " + aCalcMode; + sVersion += "\n" + aCalcMode; return sVersion; } |