Hi,

The attached patch allows localizers to translate the string "My
AutoText" which comes from mytexts.bau.
It has been unresolved since 2006:
http://qa.openoffice.org/issues/show_bug.cgi?id=66304
There is a thread about this issue on [libreoffice-l10n] and I would
not mind, if the patch could be added to libreoffice-3-3 branch, too.
It adds only one string, and if it was not translated by some language
teams, that would not be a regression.

Cheers,
Andras
From d2e8cac612e5fc2588eca1cda41298aba69c55d9 Mon Sep 17 00:00:00 2001
From: Andras Timar <ti...@fsf.hu>
Date: Sun, 14 Nov 2010 23:44:41 +0100
Subject: [PATCH] Made the "My AutoText" string localizable, #i66304#

---
 sw/source/ui/inc/misc.hrc      |    1 +
 sw/source/ui/misc/glossary.cxx |    4 ++
 sw/source/ui/misc/glossary.src |   94 ++--------------------------------------
 3 files changed, 9 insertions(+), 90 deletions(-)

diff --git a/sw/source/ui/inc/misc.hrc b/sw/source/ui/inc/misc.hrc
index 72db977..6e71237 100644
--- a/sw/source/ui/inc/misc.hrc
+++ b/sw/source/ui/inc/misc.hrc
@@ -96,6 +96,7 @@
 #define MN_REDLINE_POPUP			(RC_MISC_BEGIN + 61)
 #define STR_REMOVE_WARNING          (RC_MISC_BEGIN + 62)
 #define STRRES_NUMTYPES          	(RC_MISC_BEGIN + 63)
+#define STR_MY_AUTOTEXT          	(RC_MISC_BEGIN + 64)
 
 #define MISC_ACT_END 				STRRES_NUMTYPES
 
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index e945333..dc59ccc 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -742,6 +742,8 @@ void SwGlossaryDlg::Init()
     SvLBoxEntry* pSelEntry = 0;
     const String sSelStr(::GetCurrGlosGroup()->GetToken(0, GLOS_DELIM));
     const sal_uInt16 nSelPath = static_cast< sal_uInt16 >(::GetCurrGlosGroup()->GetToken(1, GLOS_DELIM).ToInt32());
+    const String sMyAutoTextEnglish = String::CreateFromAscii("My AutoText");
+    const String sMyAutoTextTranslated   (SW_RESSTR(STR_MY_AUTOTEXT));
     for(sal_uInt16 nId = 0; nId < nCnt; ++nId )
     {
         String sTitle;
@@ -750,6 +752,8 @@ void SwGlossaryDlg::Init()
             continue;
         if(!sTitle.Len())
             sTitle = sGroupName.GetToken( 0, GLOS_DELIM );
+        if(sTitle == sMyAutoTextEnglish)
+            sTitle.SearchAndReplace( sMyAutoTextEnglish, sMyAutoTextTranslated);
         SvLBoxEntry* pEntry = aCategoryBox.InsertEntry( sTitle );
         sal_uInt16 nPath = static_cast< sal_uInt16 >(sGroupName.GetToken( 1, GLOS_DELIM ).ToInt32());
 
diff --git a/sw/source/ui/misc/glossary.src b/sw/source/ui/misc/glossary.src
index 12d6ab9..88a6db7 100644
--- a/sw/source/ui/misc/glossary.src
+++ b/sw/source/ui/misc/glossary.src
@@ -371,93 +371,7 @@ InfoBox MSG_NO_GLOSSARIES
 {
     Message [ en-US ] = "There is no AutoText in this file.";
 };
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+String STR_MY_AUTOTEXT
+{
+    Text[ en-US ] = "My AutoText";
+};
-- 
1.7.0.4

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to