From a18193252adc4936a89c433476369770cf81c58f Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sun, 16 Jun 2019 22:43:31 +0200 Subject: [PATCH] Add plural information for additional languages Also error out if a language is not found. --- wwwtools/pg-make-po | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wwwtools/pg-make-po b/wwwtools/pg-make-po index 7aad458..4434869 100755 --- a/wwwtools/pg-make-po +++ b/wwwtools/pg-make-po @@ -43,8 +43,10 @@ my %plural_forms = ( 'es' => 'en', 'fa' => 'ja', 'fr' => 'fr', + 'he' => 'en', 'hr' => 'ru', 'hu' => 'en', + 'id' => 'en', 'it' => 'en', 'ja' => 'ja', 'ko' => 'ja', @@ -59,6 +61,8 @@ my %plural_forms = ( 'sv' => 'en', 'ta' => 'en', 'tr' => 'ja', + 'uk' => 'ru', + 'vi' => 'ja', 'zh_CN' => 'ja', 'zh_TW' => 'ja', ); @@ -140,7 +144,7 @@ foreach (@ARGV) { } if (!-f "$dirname/po/$lang.po.mrg" && -f "$dirname/po/$lang.po.new") { - my $pe = $plural_rules{ $plural_forms{$lang} }; + my $pe = $plural_rules{ $plural_forms{$lang} } or die "missing plural support for language \"$lang\"\n"; $pe =~ s/\&/\\\&/g; system( "cat $dirname/po/$lang.po.new | sed '/Plural-Forms:/s/nplurals=INTEGER; plural=EXPRESSION;/$pe/' >$outdir/$catalogname-$lang.po" -- 2.39.5