From dfdb5c36fc761b1e126afa86422fd05d40cdb04d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 11 Jan 2021 10:48:13 +0100 Subject: [PATCH] =?utf8?q?locales-Skript:=20all/more=20f=C3=BCr=20js=20ber?= =?utf8?q?=C3=BCcksichtigen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Ein Eintrag wird aus all/more genommen, wenn hier vorhanden, sonst aus all. --- scripts/locales.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"); -- 2.20.1