Revision 032056b3
Von Jan Büren vor etwa 8 Jahren hinzugefügt
scripts/locales.pl | ||
---|---|---|
112 | 112 |
if (-f "$locales_dir/all") { |
113 | 113 |
require "$locales_dir/all"; |
114 | 114 |
} |
115 |
# load custom translation (more_texts) |
|
116 |
for my $file (glob("${locales_dir}/more/*")) { |
|
117 |
if (open my $in, "<", "$file") { |
|
118 |
local $/ = undef; |
|
119 |
my $code = <$in>; |
|
120 |
eval($code); |
|
121 |
close($in); |
|
122 |
$self->{more_texts_temp}{$_} = $self->{more_texts}{$_} for keys %{ $self->{more_texts} }; |
|
123 |
} |
|
124 |
} |
|
125 |
$self->{more_texts} = delete $self->{more_texts_temp}; |
|
126 |
|
|
115 | 127 |
if (-f "$locales_dir/missing") { |
116 | 128 |
require "$locales_dir/missing" ; |
117 | 129 |
unlink "$locales_dir/missing"; |
... | ... | |
164 | 176 |
|
165 | 177 |
|
166 | 178 |
# calc and generate missing |
167 |
my @new_missing = grep { !$self->{texts}{$_} } sort keys %alllocales; |
|
179 |
# don't add missing ones if we have a translation in more_texts |
|
180 |
my @new_missing = grep { !$self->{more_texts}{$_} && !$self->{texts}{$_} } sort keys %alllocales; |
|
168 | 181 |
|
169 | 182 |
if (@new_missing) { |
170 | 183 |
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.