summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorZolnai Tamás <zolnaitamas2000@gmail.com>2013-06-11 11:37:53 +0200
committerZolnai Tamás <zolnaitamas2000@gmail.com>2013-06-11 11:37:53 +0200
commit58a9d35b84947510f78e3ffeb6d1ef9a9adac0cb (patch)
tree97463313d11cb080c6ff2c28f7705382492ba38a /l10ntools
parentf741d948b6910622d199e8d14ca1e3ecd7475156 (diff)
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
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/merge.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index f9dd4da5d2be..fab9e6ed5246 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) ) );