[Libreoffice-commits] core.git: l10ntools/source
Zolnai Tamás
zolnaitamas2000 at gmail.com
Tue Jun 11 05:59:44 PDT 2013
l10ntools/source/merge.cxx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 58a9d35b84947510f78e3ffeb6d1ef9a9adac0cb
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Tue Jun 11 11:37:53 2013 +0200
fdo#65483 Invalid po lines caused missing translations
L10ntools merge skipped reading po files entirely when got
an invalid entry from one of these po files, by now just
skip the invalid po file instead.
Change-Id: I787d531e1842e53e2074690b1300a204abd928f5
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index f9dd4da..fab9e6e 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -291,6 +291,7 @@ MergeDataFile::MergeDataFile(
bool bFirstLang = true;
while( !aInputStream.eof() )
{
+ bool bSkipCurrentPOFile = false;
const OString sFileName( lcl_NormalizeFilename(rFile) );
const bool bReadAll = sFileName.isEmpty();
const OString sPoFileName(sPoFile.data(), sPoFile.length());
@@ -318,10 +319,11 @@ MergeDataFile::MergeDataFile(
{
if( !lcl_ReadPoChecked(aNextPo, aPoInput, sPoFileName) )
{
- return;
+ bSkipCurrentPOFile = true;
+ break;
}
} while( !aPoInput.eof() && aNextPo.getSourceFile() != sFileName && !bReadAll );
- while( !aPoInput.eof() && (aNextPo.getSourceFile() == sFileName || bReadAll ))
+ while( !aPoInput.eof() && (aNextPo.getSourceFile() == sFileName || bReadAll ) && !bSkipCurrentPOFile )
{
PoEntry aActPo( aNextPo );
@@ -356,7 +358,8 @@ MergeDataFile::MergeDataFile(
}
if( !lcl_ReadPoChecked(aNextPo, aPoInput, sPoFileName) )
{
- return;
+ bSkipCurrentPOFile = true;
+ break;
}
} while( !aPoInput.eof() &&
( bInSameComp = PoEntry::IsInSameComp(aActPo, aNextPo) ) );
More information about the Libreoffice-commits
mailing list