summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2013-02-17 14:14:02 +0100
committerThorsten Behrens <tbehrens@suse.com>2013-02-18 11:17:35 +0100
commit5fd7c66733620ffaf06172cb9998bd73b7a2f9ba (patch)
tree9f8b3190c6ebdaecd3aec091d061ff4ac16c41dd
parent21bec368ad670e368d4b5cadae1c07962710f115 (diff)
Fix fdo#60754 - no translations for langs sorting after qtz
Adjust check to not rely on lexicographical order. This amends 8ae3ddca7e99d2bdbaadd5e0c82de2f0fbd30f91. Change-Id: I5023b07af819eb09ea9dc569bdbac806f936485f
-rw-r--r--android/sdremote/Makefile2
-rw-r--r--l10ntools/source/stringmerge.cxx5
-rw-r--r--l10ntools/source/treemerge.cxx4
3 files changed, 7 insertions, 4 deletions
diff --git a/android/sdremote/Makefile b/android/sdremote/Makefile
index 3972a065e38b..9d9712ad6a72 100644
--- a/android/sdremote/Makefile
+++ b/android/sdremote/Makefile
@@ -54,5 +54,7 @@ translations.done: $(foreach lang,$(call android_get_langlist),$(call android_ge
translations.clean:
rm -rf $(foreach lang,$(call android_get_langlist),$(call android_get_podir,$(lang)))
+ rm -rf $(foreach lang,$(call android_get_langlist),translations-$(lang).db)
+ rm translations.done
# vim: set noet sw=4 ts=4:
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(