[Libreoffice-commits] .: Branch 'feature/killsdf' - l10ntools/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Oct 8 14:05:28 PDT 2012


 l10ntools/source/renewpo.cxx |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 961728d58cb80e7eff11baf8d44c0d37dd1074c9
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date:   Mon Oct 8 23:03:00 2012 +0200

    Make renewpo to ignore double id in xml/xrm
    
    Change-Id: I01329beded3e81040726f525cdb5886b5f3a8c63

diff --git a/l10ntools/source/renewpo.cxx b/l10ntools/source/renewpo.cxx
index 83b3051..4a11c36 100644
--- a/l10ntools/source/renewpo.cxx
+++ b/l10ntools/source/renewpo.cxx
@@ -147,14 +147,17 @@ void HandleLanguage(struct dirent* pLangEntry, const OString& rPath,
             if (!sActUnTrans.getToken(vTypes[nIndex],'\t').isEmpty())
             {
                 /**Because of xrmex there are duplicated id's,
-                   only use this if xrmex have already fixed
+                   only use this if xrmex have already fixed*/
+                const OString sSource =
+                    sActUnTrans.getToken(PoEntry::SOURCEFILE,'\t');
+                const OString sEnding =
+                    sSource.copy(sSource.getLength()-4, 4);
                 if (sActUnTrans.getToken(PoEntry::GROUPID,'\t')==
                     sActUnTrans.getToken(PoEntry::LOCALID,'\t') &&
-                    sActUnTrans.getToken(PoEntry::SOURCEFILE,'\t').
-                                endsWith(".xrm"))
+                    ( sEnding == ".xrm" || sEnding == ".xml" ))
                 {
                     sActUnTrans = DelLocalId(sActUnTrans);
-                }*/
+                }
                 PoEntry aPE(sActUnTrans, vTypes[nIndex]);
                 const OString sActStr =
                     sActTrans.getToken(vTypes[nIndex],'\t');


More information about the Libreoffice-commits mailing list