diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-03-26 20:15:33 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-03-26 20:15:33 +0100 |
commit | 74a9fc29b43b54ec8aa9f6b9cac1cbfa4a5136e2 (patch) | |
tree | 9489220921b93420730b13a9dd7c23a1d0e6ec29 /l10n/l10n.pl | |
parent | c8c722bc6de3a58e10ba42a55a178d3ba9308bae (diff) | |
parent | ae60108692a2c34b0ab474e7d9fa35bb8b689992 (diff) | |
download | nextcloud-server-74a9fc29b43b54ec8aa9f6b9cac1cbfa4a5136e2.tar.gz nextcloud-server-74a9fc29b43b54ec8aa9f6b9cac1cbfa4a5136e2.zip |
Merge pull request #14399 from owncloud/ignore-empty-plurals
Ignore empty plurals just like with singulars
Diffstat (limited to 'l10n/l10n.pl')
-rw-r--r-- | l10n/l10n.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/l10n/l10n.pl b/l10n/l10n.pl index 4f8d8debb8d..0ff25944d6c 100644 --- a/l10n/l10n.pl +++ b/l10n/l10n.pl @@ -145,7 +145,7 @@ elsif( $task eq 'write' ){ my @js_strings = (); my $plurals; - foreach my $string ( @{$array} ){ + TRANSLATIONS: foreach my $string ( @{$array} ){ if( $string->msgid() eq '""' ){ # Translator information $plurals = getPluralInfo( $string->msgstr()); @@ -160,6 +160,7 @@ elsif( $task eq 'write' ){ my $identifier = "_" . $msgid."_::_".$msgid_plural . "_"; foreach my $variant ( sort { $a <=> $b} keys( %{$string->msgstr_n()} )){ + next TRANSLATIONS if $string->msgstr_n()->{$variant} eq '""'; push( @variants, $string->msgstr_n()->{$variant} ); } @@ -168,7 +169,7 @@ elsif( $task eq 'write' ){ } else{ # singular translations - next if $string->msgstr() eq '""'; + next TRANSLATIONS if $string->msgstr() eq '""'; push( @strings, $string->msgid()." => ".$string->msgstr()); push( @js_strings, $string->msgid()." : ".$string->msgstr()); } |