summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-12-04 19:59:44 +0100
committerYorhel <git@yorhel.nl>2010-12-04 19:59:44 +0100
commit14f690993eb8329f496277aa49b81ddc7e4cd1ae (patch)
tree124180bd87a60077734db68a8ab6603ccf1ec50f /util
parented13a12f91b5455cac47e4375f0dbc326d3179e5 (diff)
JS: Display TL lang in its own language in TL selector dropdown
This is how it used to be before the JS files were split. I simply forgot to update this code to behave the same.
Diffstat (limited to 'util')
-rwxr-xr-xutil/jsgen.pl7
1 files changed, 3 insertions, 4 deletions
diff --git a/util/jsgen.pl b/util/jsgen.pl
index 03b79ab5..5bd15c8f 100755
--- a/util/jsgen.pl
+++ b/util/jsgen.pl
@@ -55,9 +55,6 @@ sub l10n {
"mt('$k'$s"
}
#eg;
- # also add the _lang_* for all languages for which we have a translation
- my $jskeys_lang = join '|', VNDB::L10N::languages();
- push @keys, qr/_lang_(?:$jskeys_lang)/;
# generate header
my $r = "L10N_STR = {\n";
@@ -113,7 +110,9 @@ sub jsgen {
$common .= sprintf "animated = [ %s ];\n", join ', ', @{$S{animated}};
$common .= sprintf "voiced = [ %s ];\n", join ', ', @{$S{voiced}};
$common .= sprintf "vn_lengths = [ %s ];\n", join ', ', @{$S{vn_lengths}};
- $common .= sprintf "L10N_LANG = [ %s ];\n", join(', ', map qq{"$_"}, VNDB::L10N::languages());
+ $common .= sprintf "L10N_LANG = [ %s ];\n", join(', ', map
+ sprintf('["%s","%s"]', $_, $lang{$_}{"_lang_$_"}||$lang{en}{"_lang_$_"}),
+ VNDB::L10N::languages());
open my $JS, '<:utf8', "$ROOT/data/script.js" or die $!;
my $js .= join '', <$JS>;