diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2015-02-18 13:20:38 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2015-02-18 13:22:06 +0100 |
commit | 602845f33eb8cc0d74a078cf0af9f0fbff5ba6cd (patch) | |
tree | 575e084551ec7a607b4ffa700f0bdee290fa4543 /l10n | |
parent | 0833a6e332766c842a1c890c29db7ac731fa008a (diff) | |
download | nextcloud-server-602845f33eb8cc0d74a078cf0af9f0fbff5ba6cd.tar.gz nextcloud-server-602845f33eb8cc0d74a078cf0af9f0fbff5ba6cd.zip |
Correctly create the expected key for plurals with quotes
Ported from the administration repo:
https://github.com/owncloud/administration/commit/c67eaa11c04d0989ee9331c97788a0225a82e7f5
and
https://github.com/owncloud/administration/commit/41b0f9fa3a9c6183972f971eea3875b98e22217a
Diffstat (limited to 'l10n')
-rw-r--r-- | l10n/l10n.pl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/l10n/l10n.pl b/l10n/l10n.pl index 26ed4ecba30..4f8d8debb8d 100644 --- a/l10n/l10n.pl +++ b/l10n/l10n.pl @@ -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} ); |