Revision 10b4930b
Von Thomas Heck vor mehr als 11 Jahren hinzugefügt
scripts/locales.pl | ||
---|---|---|
29 | 29 |
|
30 | 30 |
parse_args(); |
31 | 31 |
|
32 |
my $locale; |
|
32 | 33 |
my $basedir = "../.."; |
33 | 34 |
my $locales_dir = "."; |
34 | 35 |
my $bindir = "$basedir/bin/mozilla"; |
... | ... | |
37 | 38 |
my $dbupdir2 = "$basedir/sql/Pg-upgrade2"; |
38 | 39 |
my $menufile = "menu.ini"; |
39 | 40 |
my @javascript_dirs = ($basedir .'/js', $basedir .'/templates/webpages'); |
41 |
my $javascript_output_dir = $basedir .'/js'; |
|
40 | 42 |
my $submitsearch = qr/type\s*=\s*[\"\']?submit/i; |
41 | 43 |
our $self = {}; |
42 | 44 |
our $missing = {}; |
... | ... | |
139 | 141 |
data_sub => sub { _print_line($_, $self->{texts}{$_}, @_) for sort keys %alllocales }, |
140 | 142 |
); |
141 | 143 |
|
142 |
open(my $js_file, '>:encoding(utf8)', $locales_dir .'/js.js') || die;
|
|
144 |
open(my $js_file, '>:encoding(utf8)', $javascript_output_dir .'/locale/'. $locale .'js') || die;
|
|
143 | 145 |
print $js_file '{'; |
144 | 146 |
my $first_entry = 1; |
145 | 147 |
for my $key (sort(keys(%jslocale))) { |
... | ... | |
248 | 250 |
my $ok = 0; |
249 | 251 |
foreach my $dir ("../locale/$arg", "locale/$arg", "../$arg", $arg) { |
250 | 252 |
next unless -d $dir && -f "$dir/all" && -f "$dir/LANGUAGE"; |
253 |
|
|
254 |
$locale = $arg; |
|
255 |
|
|
251 | 256 |
$ok = chdir $dir; |
252 | 257 |
last; |
253 | 258 |
} |
Auch abrufbar als: Unified diff
JS-Übersetzungen in den js-Ordner verschoben