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 12:03:23 +0200
commit1f91be7dddafa67cd2985e1528e1cb1951bf8edf (patch)
tree2334dc353f1c9a5c4fcd121a0e391aea5dd5a8ef /l10ntools
parent21c21e8fd0e94dbb9efcd1220d012fd80867eae2 (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 (cherry picked from commit 58a9d35b84947510f78e3ffeb6d1ef9a9adac0cb)
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) ) );