From: Bernd Bleßmann Date: Mon, 11 Jan 2021 09:48:13 +0000 (+0100) Subject: locales-Skript: all/more für js berücksichtigen X-Git-Tag: kivitendo-mebil_0.1-0~9^2~535 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=dfdb5c36fc761b1e126afa86422fd05d40cdb04d;p=kivitendo-erp.git locales-Skript: all/more für js berücksichtigen Ein Eintrag wird aus all/more genommen, wenn hier vorhanden, sonst aus all. --- diff --git a/scripts/locales.pl b/scripts/locales.pl index 7891fe9c4..8837a8c78 100755 --- a/scripts/locales.pl +++ b/scripts/locales.pl @@ -162,7 +162,8 @@ open(my $js_file, '>:encoding(utf8)', $javascript_output_dir .'/locale/'. $local print $js_file 'namespace("kivi").setupLocale({'; my $first_entry = 1; for my $key (sort(keys(%jslocale))) { - print $js_file ((!$first_entry ? ',' : '') ."\n". _double_quote($key) .':'. _double_quote($self->{texts}{$key})); + my $trans = $self->{more_texts}{$key} // $self->{texts}{$key}; + print $js_file ((!$first_entry ? ',' : '') ."\n". _double_quote($key) .':'. _double_quote($trans)); $first_entry = 0; } print $js_file ("\n");