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-18 15:20:38 +0300
committerJoas Schilling <nickvergessen@gmx.de>2015-02-18 15:22:06 +0300
commit602845f33eb8cc0d74a078cf0af9f0fbff5ba6cd (patch)
tree575e084551ec7a607b4ffa700f0bdee290fa4543 /l10n
parent0833a6e332766c842a1c890c29db7ac731fa008a (diff)
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.pl7
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} );