From 511a838afdb1d028bf184bb56c9ead39312987ca Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 13 Jul 2010 12:57:07 +0200 Subject: (re-)add 'untranslated' ts targets these files are not meant for commit, but it's good to have a quick way to create templates. --- .gitignore | 1 + translations/check-ts.pl | 2 +- translations/translations.pri | 6 ++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index fdb6843..4d5aa9b 100644 --- a/.gitignore +++ b/.gitignore @@ -114,6 +114,7 @@ tools/qtestlib/chart/chart* tools/qtestlib/updater/updater* tools/activeqt/testcon/testcon.tlb translations/*.qm +translations/*_untranslated.ts qrc_*.cpp # xemacs temporary files diff --git a/translations/check-ts.pl b/translations/check-ts.pl index 5f38703..0ff9d17 100755 --- a/translations/check-ts.pl +++ b/translations/check-ts.pl @@ -49,7 +49,7 @@ my @groups = ("assistant", "designer", "linguist", "qt_help", "qtconfig", "qvfb" my %scores = (); my %langs = (); -my $files = join("\n", <*.ts>); +my $files = join("\n", <*_??.ts>); my $res = `xmlpatterns -param files=\"$files\" check-ts.xq`; for my $i (split(/ /, $res)) { $i =~ /^([^.]+).ts:(.*)$/; diff --git a/translations/translations.pri b/translations/translations.pri index b41f2a0..735411e 100644 --- a/translations/translations.pri +++ b/translations/translations.pri @@ -25,7 +25,8 @@ defineTest(addTsTargets) { lang = $$replace(file, .*_((.._)?..)\\.ts$, \\1) addTsTarget(ts-$$lang, ts-$$1-$$lang, $$2, $$file) } - addTsTarget(ts-all, ts-$$1-all, $$2, $$files) + addTsTarget(ts-untranslated, ts-$$1-untranslated, $$2, $$PWD/$${1}_untranslated.ts) + addTsTarget(ts-all, ts-$$1-all, $$2, $$PWD/$${1}_untranslated.ts $$files) } addTsTargets(qt, -I../include -I../include/Qt \ @@ -59,6 +60,7 @@ check-ts.depends = ts-all ts.commands = \ @echo \"The \'ts\' target has been removed in favor of more fine-grained targets.\" && \ - echo \"Use \'ts--\' or \'ts-\' instead.\" + echo \"Use \'ts--\' or \'ts-\' instead. To add a language,\" && \ + echo \"use \'untranslated\' for , rename the files and re-run \'qmake\'.\" QMAKE_EXTRA_TARGETS += $$unique(TS_TARGETS) ts check-ts -- cgit v0.12