diff options
Diffstat (limited to 'tools/linguist')
-rw-r--r-- | tools/linguist/lconvert/main.cpp | 8 | ||||
-rw-r--r-- | tools/linguist/lupdate/main.cpp | 9 |
2 files changed, 8 insertions, 9 deletions
diff --git a/tools/linguist/lconvert/main.cpp b/tools/linguist/lconvert/main.cpp index 67553a0..6f5f86a 100644 --- a/tools/linguist/lconvert/main.cpp +++ b/tools/linguist/lconvert/main.cpp @@ -234,10 +234,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()); @@ -256,6 +252,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) diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp index e8cf121..6b554e0 100644 --- a/tools/linguist/lupdate/main.cpp +++ b/tools/linguist/lupdate/main.cpp @@ -114,12 +114,11 @@ static void printUsage() " Name of a .pro file. Useful for files with .pro\n" " file syntax but different file suffix\n" " -source-language <language>[_<region>]\n" - " Specify/override the language of the source strings. Defaults to\n" - " POSIX if not specified and the file does not name it yet.\n" + " Specify the language of the source strings for new files.\n" + " Defaults to POSIX if not specified.\n" " -target-language <language>[_<region>]\n" - " Specify/override the language of the translation.\n" - " The target language is guessed from the file name if this option\n" - " is not specified and the file contents name no language yet.\n" + " Specify the language of the translations for new files.\n" + " Guessed from the file name if not specified.\n" " -version\n" " Display the version of lupdate and exit.\n" ).arg(m_defaultExtensions)); |