Merge pull request #14325 from owncloud/fix-plurals-with-quotes

Correctly create the expected key for plurals with quotes
This commit is contained in:
Lukas Reschke 2015-02-20 16:35:53 +01:00
commit df2e712a8e
1 changed files with 5 additions and 2 deletions

View File

@ -153,8 +153,11 @@ elsif( $task eq 'write' ){
elsif( defined( $string->msgstr_n() )){
# plural translations
my @variants = ();
my $identifier = $string->msgid()."::".$string->msgid_plural();
$identifier =~ s/"/_/g;
my $msgid = $string->msgid();
$msgid =~ s/^"(.*)"$/$1/;
my $msgid_plural = $string->msgid_plural();
$msgid_plural =~ s/^"(.*)"$/$1/;
my $identifier = "_" . $msgid."_::_".$msgid_plural . "_";
foreach my $variant ( sort { $a <=> $b} keys( %{$string->msgstr_n()} )){
push( @variants, $string->msgstr_n()->{$variant} );