cui/source/dialogs/about.cxx |   11 ++++++-----
 include/vcl/svapp.hxx        |    2 +-
 vcl/source/app/svapp.cxx     |   24 ++++++++++++++++--------
 3 files changed, 23 insertions(+), 14 deletions(-)

New commits:
commit 5863e5a06069a005023f97013ffd170f121d3f8a
Author:     Heiko Tietze <tietze.he...@gmail.com>
AuthorDate: Fri Jul 10 13:43:04 2020 +0200
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Wed Jul 29 03:17:40 2020 +0200

    Resolves tdf#132066 - Localization of special text in about window
    
    Copy all version infos in English
    
    Change-Id: I6719e27f721b0ff9f06efb4ea63e286e6d58ebf4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98498
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    (cherry picked from commit b4b8665bd370a869196e2f63acc2cdde7a37a4df)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99603
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 53f05d52b2e1..efeef5a9c002 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -250,16 +250,17 @@ OUString AboutDialog::GetCopyrightString() {
   return aCopyrightString;
 }
 
+//special labels to comply with previous version info
 IMPL_LINK_NOARG(AboutDialog, HandleClick, weld::Button &, void) {
   css::uno::Reference<css::datatransfer::clipboard::XClipboard> xClipboard =
       css::datatransfer::clipboard::SystemClipboard::create(
           comphelper::getProcessComponentContext());
 
-  OUString sInfo = "Version: " + m_pVersionLabel->get_label() // version
-                   + "\nBuild ID: " + GetBuildString() // build id
-                   + "\n" + m_pEnvLabel->get_label() + "; " + 
m_pUILabel->get_label() // env+UI
-                   + "\nLocale: " + m_pLocaleLabel->get_label() // locale
-                   + "\n" + m_pMiscLabel->get_label(); // misc
+  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
 
   vcl::unohelper::TextDataObject::CopyStringTo(sInfo, xClipboard);
 }
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 48a764b80125..6d520bb1d32d 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -906,7 +906,7 @@ public:
      * bSelection = 0 to return all info, 1 for environment only,
      *   and 2 for VCL/render related infos
      */
-    static OUString             GetHWOSConfInfo(const int bSelection = 0);
+    static OUString             GetHWOSConfInfo(const int bSelection = 0, bool 
bLocalize = true);
 
     /** Load a localized branding PNG file as a bitmap.
 
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index ea01d31c0829..faf2d6f90ab0 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1135,7 +1135,15 @@ OUString Application::GetAppName()
 
 enum {hwAll=0, hwEnv=1, hwUI=2};
 
-OUString Application::GetHWOSConfInfo(const int bSelection)
+static OUString Localize(const char *pId, const bool bLocalize)
+{
+    if (bLocalize)
+        return VclResId(pId);
+    else
+        return Translate::get(pId, Translate::Create("vcl", 
LanguageTag("en-US")));
+}
+
+OUString Application::GetHWOSConfInfo(const int bSelection, const bool 
bLocalize)
 {
     ImplSVData* pSVData = ImplGetSVData();
     OUStringBuffer aDetails;
@@ -1147,7 +1155,7 @@ OUString Application::GetHWOSConfInfo(const int 
bSelection)
     };
 
     if (bSelection != hwUI) {
-        appendDetails("; ", VclResId(SV_APP_CPUTHREADS)
+        appendDetails("; ", Localize(SV_APP_CPUTHREADS, bLocalize)
                                 + 
OUString::number(std::thread::hardware_concurrency()));
 
         OUString aVersion;
@@ -1156,21 +1164,21 @@ OUString Application::GetHWOSConfInfo(const int 
bSelection)
         else
             aVersion = "-";
 
-        appendDetails("; ", VclResId(SV_APP_OSVERSION) + aVersion);
+        appendDetails("; ", Localize(SV_APP_OSVERSION, bLocalize) + aVersion);
     }
 
     if (bSelection != hwEnv) {
-        appendDetails("; ", VclResId(SV_APP_UIRENDER));
+        appendDetails("; ", Localize(SV_APP_UIRENDER, bLocalize));
 #if HAVE_FEATURE_SKIA
         if ( SkiaHelper::isVCLSkiaEnabled() )
         {
             switch(SkiaHelper::renderMethodToUse())
             {
                 case SkiaHelper::RenderVulkan:
-                    appendDetails("", VclResId(SV_APP_SKIA_VULKAN));
+                    appendDetails("", Localize(SV_APP_SKIA_VULKAN, bLocalize));
                     break;
                 case SkiaHelper::RenderRaster:
-                    appendDetails("", VclResId(SV_APP_SKIA_RASTER));
+                    appendDetails("", Localize(SV_APP_SKIA_RASTER, bLocalize));
                     break;
             }
         }
@@ -1178,10 +1186,10 @@ OUString Application::GetHWOSConfInfo(const int 
bSelection)
 #endif
 #if HAVE_FEATURE_OPENGL
         if ( OpenGLWrapper::isVCLOpenGLEnabled() )
-            appendDetails("", VclResId(SV_APP_GL));
+            appendDetails("", Localize(SV_APP_GL, bLocalize));
         else
 #endif
-            appendDetails("", VclResId(SV_APP_DEFAULT));
+            appendDetails("", Localize(SV_APP_DEFAULT, bLocalize));
 
 #if (defined LINUX || defined _WIN32 || defined MACOSX)
         appendDetails("; ", SV_APP_VCLBACKEND + GetToolkitName());
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to