openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1531796 - in /openoffice/branches/l10n40/main/l10ntools/source: gConXhp.hxx gConXhpWrap.cxx gConXhplex.l gL10nMemDB.cxx
Date Mon, 14 Oct 2013 05:48:31 GMT
Author: jani
Date: Mon Oct 14 05:48:30 2013
New Revision: 1531796

URL: http://svn.apache.org/r1531796
Log:
changed xhp converter to handle tags <.../> even if they are marked for translation
(which is silly, but happens).

Modified:
    openoffice/branches/l10n40/main/l10ntools/source/gConXhp.hxx
    openoffice/branches/l10n40/main/l10ntools/source/gConXhpWrap.cxx
    openoffice/branches/l10n40/main/l10ntools/source/gConXhplex.l
    openoffice/branches/l10n40/main/l10ntools/source/gL10nMemDB.cxx

Modified: openoffice/branches/l10n40/main/l10ntools/source/gConXhp.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/l10ntools/source/gConXhp.hxx?rev=1531796&r1=1531795&r2=1531796&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/l10ntools/source/gConXhp.hxx (original)
+++ openoffice/branches/l10n40/main/l10ntools/source/gConXhp.hxx Mon Oct 14 05:48:30 2013
@@ -42,6 +42,7 @@ class convert_xhp : public convert_gen_i
     void setString(char *yytext);
     void openTag(char *yytext);
     void closeTag(char *yytext);
+    void closeTagNOvalue(char *yytext);
     void setId(char *yytext);
     void setLang(char *yytext);
     void setRef(char *yytext);

Modified: openoffice/branches/l10n40/main/l10ntools/source/gConXhpWrap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/l10ntools/source/gConXhpWrap.cxx?rev=1531796&r1=1531795&r2=1531796&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/l10ntools/source/gConXhpWrap.cxx (original)
+++ openoffice/branches/l10n40/main/l10ntools/source/gConXhpWrap.cxx Mon Oct 14 05:48:30 2013
@@ -161,6 +161,15 @@ void convert_xhp::closeTag(char *yytext)
 
 
 /**********************   I M P L E M E N T A T I O N   **********************/
+void convert_xhp::closeTagNOvalue(char *yytext)
+{
+  copySourceSpecial(yytext, 0);
+  meExpectValue = VALUE_NOT_USED;
+}
+
+
+
+/**********************   I M P L E M E N T A T I O N   **********************/
 void convert_xhp::setId(char *yytext)
 {
   int          nL, nE;
@@ -314,8 +323,8 @@ void convert_xhp::stopComment(char *yyte
 /**********************   I M P L E M E N T A T I O N   **********************/
 void convert_xhp::handleSpecial(char *yytext)
 {
-  int          nX    = msCollector.size();
   std::string& sText = copySourceSpecial(yytext, 0);
+  int          nX    = msCollector.size();
 
 
   if (meExpectValue != VALUE_IS_VALUE || meExpectValue != VALUE_IS_VALUE_TAG)

Modified: openoffice/branches/l10n40/main/l10ntools/source/gConXhplex.l
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/l10ntools/source/gConXhplex.l?rev=1531796&r1=1531795&r2=1531796&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/l10ntools/source/gConXhplex.l (original)
+++ openoffice/branches/l10n40/main/l10ntools/source/gConXhplex.l Mon Oct 14 05:48:30 2013
@@ -77,6 +77,12 @@ IDENT [\.a-zA-Z0-9_-]+
 
 
 
+\/\> {
+  LOCptr->closeTagNOvalue(yytext);
+}
+
+
+
 \> {
   LOCptr->closeTag(yytext);
 }

Modified: openoffice/branches/l10n40/main/l10ntools/source/gL10nMemDB.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/l10ntools/source/gL10nMemDB.cxx?rev=1531796&r1=1531795&r2=1531796&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/l10ntools/source/gL10nMemDB.cxx (original)
+++ openoffice/branches/l10n40/main/l10ntools/source/gL10nMemDB.cxx Mon Oct 14 05:48:30 2013
@@ -438,7 +438,10 @@ bool l10nMem_db::getMergeLang(std::strin
 
   // update pointers
   sLang = mcLangList[miCurLangInx].msName;
-  sMsgStr = mcENUSlist[miCurENUSinx].mcLangText[miCurLangInx].msMsgStr;
+  if (!sMsgStr.size())
+    sMsgStr = "NOT TRANSLATED";
+  else
+    sMsgStr = mcENUSlist[miCurENUSinx].mcLangText[miCurLangInx].msMsgStr;
   return true;
 }
 



Mime
View raw message