Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/l10n
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2015-02-20 13:36:56 +0300
committerJoas Schilling <nickvergessen@gmx.de>2015-02-20 13:36:56 +0300
commit3ab9ad2d7849c58e3b1048e49d158a1742aa4fd4 (patch)
tree374c2183d39d0ff7857b1b39adddbedb4c5d8dbe /l10n
parent79ef5eda9688c998a51bfbb3f24f5274cc83bcc2 (diff)
Ignore empty plurals just like with singulars
The js and php code of n() has fallbacks for when the key is missing. However there is no fallback, when the key is defined with an array of empty strings. So we just don't extract them anymore and use the english language.
Diffstat (limited to 'l10n')
-rw-r--r--l10n/l10n.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/l10n/l10n.pl b/l10n/l10n.pl
index 26ed4ecba30..b4ad1d034dd 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());
@@ -157,6 +157,7 @@ elsif( $task eq 'write' ){
$identifier =~ s/"/_/g;
foreach my $variant ( sort { $a <=> $b} keys( %{$string->msgstr_n()} )){
+ next TRANSLATIONS if $string->msgstr_n()->{$variant} eq '""';
push( @variants, $string->msgstr_n()->{$variant} );
}
@@ -165,7 +166,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());
}