indem Texte, die ausschließlich dort vorhanden sind, nicht in all
eingetragen werden. Texte, die vorher schon in all sind, bleiben aber
erhalten. Das sind dann (vermutlich) die Texte, die in more für ein
Kundenprojekt eine andere Übersetzung haben sollen (und nicht neu hinzu
kamen).
# merge entries to translate with entries from files 'missing' and 'lost'
merge_texts();
# merge entries to translate with entries from files 'missing' and 'lost'
merge_texts();
+# Generate "all" without translations in more_texts.
+# But keep the ones which are in both old_texts (texts) and more_texts,
+# because this are ones which are overwritten in more_texts for custom usage.
+my %to_keep;
+$to_keep{$_} = 1 for grep { !!$self->{more_texts}{$_} } keys %old_texts;
+my @new_all = grep { $to_keep{$_} || !$self->{more_texts}{$_} } sort keys %alllocales;
+
generate_file(
file => "$locales_dir/all",
header => $ALL_HEADER,
data_name => '$self->{texts}',
generate_file(
file => "$locales_dir/all",
header => $ALL_HEADER,
data_name => '$self->{texts}',
- data_sub => sub { _print_line($_, $self->{texts}{$_}, @_) for sort keys %alllocales },
+ data_sub => sub { _print_line($_, $self->{texts}{$_}, @_) for @new_all },
);
open(my $js_file, '>:encoding(utf8)', $javascript_output_dir .'/locale/'. $locale .'.js') || die;
);
open(my $js_file, '>:encoding(utf8)', $javascript_output_dir .'/locale/'. $locale .'.js') || die;