diff options
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/propmerge.cxx | 8 | ||||
-rw-r--r-- | l10ntools/source/treemerge.cxx | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/l10ntools/source/propmerge.cxx b/l10ntools/source/propmerge.cxx index 91ea78b048ee..a4440e96d79d 100644 --- a/l10ntools/source/propmerge.cxx +++ b/l10ntools/source/propmerge.cxx @@ -182,13 +182,15 @@ void PropParser::Merge( const OString &rMergeSrc, const OString &rDestinationFil MergeDataFile aMergeDataFile( rMergeSrc, m_sSource, false ); - const std::vector<OString> aLanguages = aMergeDataFile.GetLanguages(); - if( m_sLang != "qtz" && !aLanguages.empty() && aLanguages[0] != m_sLang ) + const std::vector<OString> vLanguages = aMergeDataFile.GetLanguages(); + if( m_sLang != "qtz" && vLanguages.size()>=2 && + vLanguages[vLanguages[0]!="qtz" ? 0 : 1] != m_sLang ) { std::cerr << "Propex error: given language conflicts with " << "language of Mergedata file: " - << m_sLang.getStr() << " - " << aLanguages[0].getStr() << std::endl; + << m_sLang.getStr() << " - " + << vLanguages[vLanguages[0]!="qtz" ? 0 : 1].getStr() << std::endl; return; } diff --git a/l10ntools/source/treemerge.cxx b/l10ntools/source/treemerge.cxx index ed96da2348a5..bc9596ceab16 100644 --- a/l10ntools/source/treemerge.cxx +++ b/l10ntools/source/treemerge.cxx @@ -282,12 +282,14 @@ void TreeParser::Merge( MergeDataFile aMergeDataFile( rMergeSrc, static_cast<OString>( m_pSource->name ), false ); const std::vector<OString> vLanguages = aMergeDataFile.GetLanguages(); - if( !vLanguages.empty() && vLanguages[0] != m_sLang ) + if( vLanguages.size()>=2 && + vLanguages[vLanguages[0]=="qtz" ? 0 : 1] != m_sLang ) { std::cerr << "Treex error: given language conflicts with " << "language of Mergedata file: " - << m_sLang.getStr() << " - " << vLanguages[0].getStr() << std::endl; + << m_sLang.getStr() << " - " + << vLanguages[vLanguages[0]=="qtz" ? 0 : 1].getStr() << std::endl; return; } lcl_MergeLevel( |