summaryrefslogtreecommitdiff
path: root/util/jsgen.pl
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-10-07 13:35:34 +0200
committerYorhel <git@yorhel.nl>2009-10-07 13:38:17 +0200
commitde8d188a37b651a59a6460c0ead0e7aa4edab858 (patch)
treeca4ad19d682e98c797108ec820aff8e111973a2f /util/jsgen.pl
parent2c7b95fb3dc6bb25ac4b4171fb881f9f587bd62f (diff)
L10N: Extracted some common Javascript strings
Diffstat (limited to 'util/jsgen.pl')
-rwxr-xr-xutil/jsgen.pl8
1 files changed, 6 insertions, 2 deletions
diff --git a/util/jsgen.pl b/util/jsgen.pl
index 894fa1b9..3ae63157 100755
--- a/util/jsgen.pl
+++ b/util/jsgen.pl
@@ -19,8 +19,11 @@ use LangFile;
use VNDB::L10N;
-my $jskeys = qr{^_menu_emptysearch$};
-
+my $jskeys = qr{^(?:
+ _js_.+|
+ _menu_emptysearch|
+ _vnpage_uopt_10?vote
+ )$}x;
sub l10n {
# Using JSON::XS or something may be shorter and less error prone,
@@ -47,6 +50,7 @@ sub l10n {
$lang{$l->[0]} = 1 if $type eq 'tl';
if($type eq 'tl' && $cur) {
my($lang, $sync, $val) = @$l;
+ next if !$val;
$val =~ s/"/\\"/g;
$val =~ s/\n/\\n/g;
$r[$#r] .= ',' if $cur == 2;