aboutsummaryrefslogtreecommitdiffstats
path: root/touch_translations.pl
diff options
context:
space:
mode:
authorPolish Language Team <polish>2000-10-27 12:18:20 +0000
committerPolish Language Team <polish>2000-10-27 12:18:20 +0000
commitb835319ec536458bf2768d248fd0657af9c6e0a2 (patch)
treeef508369f68baf1be2a08639aecdee14c688c17a /touch_translations.pl
parent11ee541c6653b913a41498a5b8aeaef6a2052ed5 (diff)
The language argument $(LANGUAGE) in Makefile.common is just a two-letter
code. Added a hash "code" => "full-language-name" CVS version numbers touch_translations.pl: 1.1 -> 1.2
Diffstat (limited to 'touch_translations.pl')
-rwxr-xr-xtouch_translations.pl33
1 files changed, 27 insertions, 6 deletions
diff --git a/touch_translations.pl b/touch_translations.pl
index efcabd5c50b..71750b07944 100755
--- a/touch_translations.pl
+++ b/touch_translations.pl
@@ -22,11 +22,31 @@
# This should contain all languages
-@langs = ("arabic", "chinese", "croatian", "danish", "dutch", "english",
- "esperanto", "finnish", "french", "german", "hungarian",
- "italian", "japanese", "korean", "norwegian", "polish",
- "portuguese", "romanian", "russian", "spanish", "swedish",
- "turkish");
+%langs = (
+ "ar" => "arabic",
+ "zh" => "chinese",
+ "hr" => "croatian",
+ "da" => "danish",
+ "nl" => "dutch",
+ "en" => "english",
+ "eo" => "esperanto",
+ "fi" => "finnish",
+ "fr" => "french",
+ "de" => "german",
+ "hu" => "hungarian",
+ "it" => "italian",
+ "ja" => "japanese",
+ "ko" => "korean",
+ "no" => "norwegian",
+ "pl" => "polish",
+ "pt" => "portuguese",
+ "ro" => "romanian",
+ "ru" => "russian",
+ "es" => "spanish",
+ "sv" => "swedish",
+ "tr" => "turkish");
+
+@langs = values(%langs);
# Set this to 1 for debugging
$debug = 1;
@@ -75,7 +95,8 @@ sub when_forced {
}
$argfile = $ARGV[0] or die "Invalid number of arguments";
-$arglang = $ARGV[1] or die "Invalid number of arguments";
+die "Invalid number of arguments" unless $ARGV[1];
+$arglang = $langs{$ARGV[1]} or die "Invalid lang argument";
$argfile =~ m+(.*)/(.*)\.wml+ or die "pattern does not match";
my ($path, $file) = ($1, $2);

© 2014-2024 Faster IT GmbH | imprint | privacy policy