Author: jani
Date: Sun Sep 29 20:04:41 2013
New Revision: 1527393
URL: http://svn.apache.org/r1527393
Log:
ulf merge WORKS!
Modified:
openoffice/branches/l10n40/main/l10ntools/source/gConUlfWrap.cxx
openoffice/branches/l10n40/main/l10ntools/source/gL10nMemDB.cxx
Modified: openoffice/branches/l10n40/main/l10ntools/source/gConUlfWrap.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/l10ntools/source/gConUlfWrap.cxx?rev=1527393&r1=1527392&r2=1527393&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/l10ntools/source/gConUlfWrap.cxx (original)
+++ openoffice/branches/l10n40/main/l10ntools/source/gConUlfWrap.cxx Sun Sep 29
20:04:41 2013
@@ -90,7 +90,6 @@ void convert_ulf::setValue(char *syyText
nL = sText.rfind("\"");
sText.erase(nL);
- mcMemory.setSourceKey(miLineNo, msSourceFile, msKey, sText);
if (mbMergeMode)
{
// prepare to read all languages
@@ -98,8 +97,11 @@ void convert_ulf::setValue(char *syyText
for (; mcMemory.getMergeLang(sLang, sText);)
{
// Prepare tag
- sText = sLang + " = \"" + sText + "\"\n";
+ sText = "\"\n" + sLang + " = \"" + sText;
writeSourceFile(sText);
}
}
+ else
+ mcMemory.setSourceKey(miLineNo, msSourceFile, msKey, sText);
+
}
Modified: openoffice/branches/l10n40/main/l10ntools/source/gL10nMemDB.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/l10ntools/source/gL10nMemDB.cxx?rev=1527393&r1=1527392&r2=1527393&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/l10ntools/source/gL10nMemDB.cxx (original)
+++ openoffice/branches/l10n40/main/l10ntools/source/gL10nMemDB.cxx Sun Sep 29
20:04:41 2013
@@ -421,7 +421,7 @@ void l10nMem_db::addKey(int
/********************** I M P L E M E N T A T I O N **********************/
int l10nMem_db::prepareMerge()
{
- miCurLangInx = -1;
+ miCurLangInx = 0;
return mcLangList.size();
}
@@ -436,16 +436,8 @@ bool l10nMem_db::getMergeLang(std::strin
return false;
// update pointers
- if (!miCurLangInx)
- {
- sLang = "en-US";
- sMsgStr = mcENUSlist[miCurENUSinx].msMsgId;
- }
- else
- {
- sLang = mcLangList[miCurLangInx].msName;
- sMsgStr = mcENUSlist[miCurENUSinx].mcLangText[miCurLangInx].msMsgStr;
- }
+ sLang = mcLangList[miCurLangInx].msName;
+ sMsgStr = mcENUSlist[miCurENUSinx].mcLangText[miCurLangInx].msMsgStr;
return true;
}