Revision 032056b3
Von Jan Büren vor mehr als 8 Jahren hinzugefügt
scripts/locales.pl | ||
---|---|---|
if (-f "$locales_dir/all") {
|
||
require "$locales_dir/all";
|
||
}
|
||
# load custom translation (more_texts)
|
||
for my $file (glob("${locales_dir}/more/*")) {
|
||
if (open my $in, "<", "$file") {
|
||
local $/ = undef;
|
||
my $code = <$in>;
|
||
eval($code);
|
||
close($in);
|
||
$self->{more_texts_temp}{$_} = $self->{more_texts}{$_} for keys %{ $self->{more_texts} };
|
||
}
|
||
}
|
||
$self->{more_texts} = delete $self->{more_texts_temp};
|
||
|
||
if (-f "$locales_dir/missing") {
|
||
require "$locales_dir/missing" ;
|
||
unlink "$locales_dir/missing";
|
||
... | ... | |
|
||
|
||
# calc and generate missing
|
||
my @new_missing = grep { !$self->{texts}{$_} } sort keys %alllocales;
|
||
# don't add missing ones if we have a translation in more_texts
|
||
my @new_missing = grep { !$self->{more_texts}{$_} && !$self->{texts}{$_} } sort keys %alllocales;
|
||
|
||
if (@new_missing) {
|
||
if ($opt_c) {
|
Auch abrufbar als: Unified diff
Generierung des missing files von locales verbessert
Alle Übersetzungen die schon unterhalb von $locale/more/*
gemacht worden sind, nicht mehr als nicht übersetzt in missing ausgeben.