You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ja...@apache.org on 2013/03/24 16:14:33 UTC
svn commit: r1460395 - in /openoffice/branches/l10n/main/l10ntools/source:
gConSrc.hxx gConSrcWrap.cxx gConXhpWrap.cxx
Author: jani
Date: Sun Mar 24 15:14:33 2013
New Revision: 1460395
URL: http://svn.apache.org/r1460395
Log:
1version src merge
Modified:
openoffice/branches/l10n/main/l10ntools/source/gConSrc.hxx
openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx
openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx
Modified: openoffice/branches/l10n/main/l10ntools/source/gConSrc.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConSrc.hxx?rev=1460395&r1=1460394&r2=1460395&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConSrc.hxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConSrc.hxx Sun Mar 24 15:14:33 2013
@@ -71,5 +71,6 @@ class convert_src : public convert_gen_i
void execute();
void trim(std::string& sText);
void buildKey(std::string& sKey);
+ void insertLanguagePart(std::string& sKey, std::string& sTextType);
};
#endif
\ No newline at end of file
Modified: openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx?rev=1460395&r1=1460394&r2=1460395&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx Sun Mar 24 15:14:33 2013
@@ -208,7 +208,11 @@ void convert_src::setNL(char *syyText, b
sKey += "." + msCmd + "." + msTextName;
if (msValue.size() && msValue != "-")
+ {
mcMemory.setSourceKey(miLineNo, msSourceFile, sKey, msValue);
+ if (mbMergeMode)
+ insertLanguagePart(sKey, msTextName);
+ }
}
if (!bMacro && mbExpectMacro)
@@ -326,3 +330,21 @@ void convert_src::buildKey(std::string&
if (mcStack[nL].size())
sKey += (sKey.size() ? "." : "") + mcStack[nL];
}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+void convert_src::insertLanguagePart(std::string& sKey, std::string& sTextType)
+{
+ std::string sLang, sText, sTagText;
+
+
+ // prepare to read all languages
+ mcMemory.prepareMerge();
+ for (; mcMemory.getMergeLang(sLang, sText);)
+ {
+ // Prepare tag start and end
+ sTagText = sTextType + "[ " + sLang + " ] = \"" + sText + "\"\n";
+ writeSourceFile(sTagText);
+ }
+}
\ No newline at end of file
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx?rev=1460395&r1=1460394&r2=1460395&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx Sun Mar 24 15:14:33 2013
@@ -401,7 +401,8 @@ std::string& convert_xhp::copySourceSpec
writeSourceFile(msLine, i);
mcMemory.getMergeLang(sLang, sText);
writeSourceFile(sText,i);
- writeSourceFile(std::string(yytext), i);
+ std::string sYY(yytext);
+ writeSourceFile(sYY, i);
}
msLine.clear();
break;