cui/inc/strings.hrc                    |    5 +++++
 cui/source/dialogs/AdditionsDialog.cxx |   25 +++++++++++++++++++++++--
 2 files changed, 28 insertions(+), 2 deletions(-)

New commits:
commit b957454e5ed46029ea0ca06a7d345d9608bfa4a1
Author:     Gabor Kelemen <kelem...@ubuntu.com>
AuthorDate: Tue Jan 11 20:00:18 2022 +0100
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Wed Jan 12 02:40:38 2022 +0100

    tdf#142564 Localize extension category names
    
    Change-Id: I57ca7cb194bd325f621841edc24e3af9ef7c3b3e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128305
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>

diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc
index 92e9cb7ed7ae..e2c56b8a0d45 100644
--- a/cui/inc/strings.hrc
+++ b/cui/inc/strings.hrc
@@ -391,6 +391,11 @@
 #define RID_CUISTR_ADDITIONS_SEARCHING              
NC_("RID_SVXSTR_ADDITIONS_SEARCHING", "Searching...")
 #define RID_CUISTR_ADDITIONS_LOADING                
NC_("RID_SVXSTR_ADDITIONS_LOADING", "Loading...")
 #define RID_CUISTR_ADDITIONS_DIALOG_TITLE_PREFIX    
NC_("RID_SVXSTR_ADDITIONS_DIALOG_TITLE_PREFIX", "Extensions")
+#define RID_CUISTR_ADDITIONS_DICTIONARY             
NC_("RID_SVXSTR_ADDITIONS_DICTIONARY", "Extensions: Dictionary")
+#define RID_CUISTR_ADDITIONS_GALLERY                
NC_("RID_SVXSTR_ADDITIONS_GALLERY", "Extensions: Gallery")
+#define RID_CUISTR_ADDITIONS_ICONS                  
NC_("RID_SVXSTR_ADDITIONS_ICONS", "Extensions: Icons")
+#define RID_CUISTR_ADDITIONS_PALETTES               
NC_("RID_SVXSTR_ADDITIONS_PALETTES", "Extensions: Color Palette")
+#define RID_CUISTR_ADDITIONS_TEMPLATES              
NC_("RID_SVXSTR_ADDITIONS_TEMPLATES", "Extensions: Templates")
 
 #define RID_CUISTR_UI_APPLYALL                      
NC_("RID_SVXSTR_UI_APPLYALL", "Apply to %MODULE")
 
diff --git a/cui/source/dialogs/AdditionsDialog.cxx 
b/cui/source/dialogs/AdditionsDialog.cxx
index d5b58b5c8aba..d2337d7333a5 100644
--- a/cui/source/dialogs/AdditionsDialog.cxx
+++ b/cui/source/dialogs/AdditionsDialog.cxx
@@ -452,8 +452,29 @@ AdditionsDialog::AdditionsDialog(weld::Window* pParent, 
const OUString& sAdditio
 
     OUString titlePrefix = CuiResId(RID_CUISTR_ADDITIONS_DIALOG_TITLE_PREFIX);
     if (!m_sTag.isEmpty())
-    {
-        this->set_title(titlePrefix + ": " + sAdditionsTag);
+    { // tdf#142564 localize extension category names
+        OUString sDialogTitle = "";
+        if (sAdditionsTag == "Templates")
+        {
+            sDialogTitle = CuiResId(RID_CUISTR_ADDITIONS_TEMPLATES);
+        }
+        else if (sAdditionsTag == "Dictionary")
+        {
+            sDialogTitle = CuiResId(RID_CUISTR_ADDITIONS_DICTIONARY);
+        }
+        else if (sAdditionsTag == "Gallery")
+        {
+            sDialogTitle = CuiResId(RID_CUISTR_ADDITIONS_GALLERY);
+        }
+        else if (sAdditionsTag == "Icons")
+        {
+            sDialogTitle = CuiResId(RID_CUISTR_ADDITIONS_ICONS);
+        }
+        else if (sAdditionsTag == "Color Palette")
+        {
+            sDialogTitle = CuiResId(RID_CUISTR_ADDITIONS_PALETTES);
+        }
+        this->set_title(sDialogTitle);
     }
     else
     {

Reply via email to