summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-10-01 11:37:21 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-10-01 12:15:34 (GMT)
commitce7cf03ab1346b5f447db3d849d2c183abce0138 (patch)
tree6e825acf1346cafa9e6c02296accdab7a6378bde /tools
parentec05eed4fa68b7b1af2dead4fdbb83cd3a758ac0 (diff)
downloadQt-ce7cf03ab1346b5f447db3d849d2c183abce0138.zip
Qt-ce7cf03ab1346b5f447db3d849d2c183abce0138.tar.gz
Qt-ce7cf03ab1346b5f447db3d849d2c183abce0138.tar.bz2
make -{source,target}-language actually override values from files
-help says it does, and it kinda makes sense
Diffstat (limited to 'tools')
-rw-r--r--tools/linguist/lconvert/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/linguist/lconvert/main.cpp b/tools/linguist/lconvert/main.cpp
index c342def..3cc9509 100644
--- a/tools/linguist/lconvert/main.cpp
+++ b/tools/linguist/lconvert/main.cpp
@@ -215,10 +215,6 @@ int main(int argc, char *argv[])
return usage(args);
tr.setLanguageCode(Translator::guessLanguageCodeFromFileName(inFiles[0].name));
- if (!targetLanguage.isEmpty())
- tr.setLanguageCode(targetLanguage);
- if (!sourceLanguage.isEmpty())
- tr.setSourceLanguageCode(sourceLanguage);
if (!tr.load(inFiles[0].name, cd, inFiles[0].format)) {
qWarning() << qPrintable(cd.error());
@@ -237,6 +233,10 @@ int main(int argc, char *argv[])
tr.replaceSorted(tr2.message(j));
}
+ if (!targetLanguage.isEmpty())
+ tr.setLanguageCode(targetLanguage);
+ if (!sourceLanguage.isEmpty())
+ tr.setSourceLanguageCode(sourceLanguage);
if (noObsolete)
tr.stripObsoleteMessages();
if (noFinished)