diff options
author | Heiko Tietze <tietze.heiko@gmail.com> | 2020-07-30 11:20:53 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-07-31 23:09:17 +0200 |
commit | 3abc852f2f582b3abdd082b274ceeea67b21a0ab (patch) | |
tree | 88747cd53ebf9ddb5a8879b84cfff5a0d259fb69 /cui | |
parent | 99284a22f3cda8518cd2207128928c2e455c89ee (diff) |
Resolves tdf#132066 - Localization of special text in about window
Copy all version infos in English
Follow-up to 56b2214c3aa40c2e2522eba5584063fb34e003ba
Change-Id: Id093305261ec957137c56f61048c660e80e5c795
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99773
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/about.cxx | 17 | ||||
-rw-r--r-- | cui/source/inc/about.hxx | 2 |
2 files changed, 13 insertions, 6 deletions
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index efeef5a9c002..3d9df9849fc3 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -27,6 +27,7 @@ #include <vcl/svapp.hxx> //Application:: #include <vcl/virdev.hxx> //VirtualDevice #include <vcl/weld.hxx> +#include <unotools/resmgr.hxx> //Translate #include <config_buildid.h> //EXTRA_BUILDID #include <dialmgr.hxx> //CuiResId @@ -169,7 +170,7 @@ OUString AboutDialog::GetBuildString() { return sBuildId; } -OUString AboutDialog::GetLocaleString() { +OUString AboutDialog::GetLocaleString(const bool bLocalized) { OUString sLocaleStr; @@ -190,7 +191,12 @@ OUString AboutDialog::GetLocaleString() { OUString aUILocaleStr = Application::GetSettings().GetUILanguageTag().getBcp47(); - OUString sUILocaleStr(CuiResId(RID_SVXSTR_ABOUT_UILOCALE)); + OUString sUILocaleStr; + if (bLocalized) + sUILocaleStr = CuiResId(RID_SVXSTR_ABOUT_UILOCALE); + else + sUILocaleStr = Translate::get(RID_SVXSTR_ABOUT_UILOCALE, Translate::Create("cui", LanguageTag("en-US"))); + if (sUILocaleStr.indexOf("$LOCALE") == -1) { SAL_WARN("cui.dialogs", "translated uilocale string in translations " "doesn't contain $LOCALE placeholder"); @@ -250,7 +256,8 @@ OUString AboutDialog::GetCopyrightString() { return aCopyrightString; } -//special labels to comply with previous version info +// special labels to comply with previous version info +// untranslated English for QA IMPL_LINK_NOARG(AboutDialog, HandleClick, weld::Button &, void) { css::uno::Reference<css::datatransfer::clipboard::XClipboard> xClipboard = css::datatransfer::clipboard::SystemClipboard::create( @@ -259,8 +266,8 @@ IMPL_LINK_NOARG(AboutDialog, HandleClick, weld::Button &, void) { OUString sInfo = "Version: " + m_pVersionLabel->get_label() + "\n" // version "Build ID: " + GetBuildString() + "\n" + // build id Application::GetHWOSConfInfo(0,false) + "\n" // env+UI - "Locale: " + m_pLocaleLabel->get_label() + "\n" + // locale - m_pMiscLabel->get_label(); // misc + "Locale: " + GetLocaleString(false) + "\n" + // locale + GetMiscString(); // misc vcl::unohelper::TextDataObject::CopyStringTo(sInfo, xClipboard); } diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx index 2262da38de96..df689fdb12ef 100644 --- a/cui/source/inc/about.hxx +++ b/cui/source/inc/about.hxx @@ -44,7 +44,7 @@ private: static OUString GetVersionString(); static OUString GetBuildString(); - static OUString GetLocaleString(); + static OUString GetLocaleString(bool bLocalized = true); static OUString GetMiscString(); static OUString GetCopyrightString(); |