summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2013-02-17 14:14:02 +0100
committerAndras Timar <atimar@suse.com>2013-02-18 10:22:04 +0000
commitd536dbb4871b6a32b7066de2485b4453fe32496d (patch)
treeeaa2d64cf0c369b8ab36043d0f072f6392b9993d
parent00967d738e02155d793830e23e5c33696f3a759a (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>
-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(