diff options
author | Thorsten Behrens <tbehrens@suse.com> | 2013-02-17 14:14:02 +0100 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2013-02-18 10:22:04 +0000 |
commit | d536dbb4871b6a32b7066de2485b4453fe32496d (patch) | |
tree | eaa2d64cf0c369b8ab36043d0f072f6392b9993d /l10ntools | |
parent | 00967d738e02155d793830e23e5c33696f3a759a (diff) |
Fix fdo#60754 - no translations for langs sorting after qtz
Adjust check to not rely on lexicographical order. This amends
8ae3ddca7e99d2bdbaadd5e0c82de2f0fbd30f91.
Change-Id: I0e9ea916f2efaf21a8f44df4483a55ce7f6be33f
Reviewed-on: https://gerrit.libreoffice.org/2196
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/stringmerge.cxx | 5 | ||||
-rw-r--r-- | l10ntools/source/treemerge.cxx | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/l10ntools/source/stringmerge.cxx b/l10ntools/source/stringmerge.cxx index 378548eaa93a..133a5bf20356 100644 --- a/l10ntools/source/stringmerge.cxx +++ b/l10ntools/source/stringmerge.cxx @@ -132,13 +132,14 @@ void StringParser::Merge( MergeDataFile aMergeDataFile( rMergeSrc, static_cast<OString>( m_pSource->name ), false ); const std::vector<OString> vLanguages = aMergeDataFile.GetLanguages(); - if( vLanguages.size()>=2 && vLanguages[0] != m_sLang ) + if( vLanguages.size()>=2 && + vLanguages[vLanguages[0]=="qtz" ? 1 : 0] != m_sLang ) { std::cerr << "stringex error: given language conflicts with " << "language of Mergedata file: " << m_sLang.getStr() << " - " - << vLanguages[vLanguages[0]=="qtz" ? 0 : 1].getStr() << std::endl; + << vLanguages[vLanguages[0]=="qtz" ? 1 : 0].getStr() << std::endl; return; } diff --git a/l10ntools/source/treemerge.cxx b/l10ntools/source/treemerge.cxx index 8f022de20a28..6529a10d200d 100644 --- a/l10ntools/source/treemerge.cxx +++ b/l10ntools/source/treemerge.cxx @@ -283,13 +283,13 @@ void TreeParser::Merge( rMergeSrc, static_cast<OString>( m_pSource->name ), false, false ); const std::vector<OString> vLanguages = aMergeDataFile.GetLanguages(); if( vLanguages.size()>=2 && - vLanguages[vLanguages[0]=="qtz" ? 0 : 1] != m_sLang ) + vLanguages[vLanguages[0]=="qtz" ? 1 : 0] != m_sLang ) { std::cerr << "Treex error: given language conflicts with " << "language of Mergedata file: " << m_sLang.getStr() << " - " - << vLanguages[vLanguages[0]=="qtz" ? 0 : 1].getStr() << std::endl; + << vLanguages[vLanguages[0]=="qtz" ? 1 : 0].getStr() << std::endl; return; } lcl_MergeLevel( |