diff options
author | blizzz <blizzz@owncloud.com> | 2013-12-09 01:41:06 -0800 |
---|---|---|
committer | blizzz <blizzz@owncloud.com> | 2013-12-09 01:41:06 -0800 |
commit | bc3650e48c7ec4f05794c2bd98a90cca3090f1e3 (patch) | |
tree | a0b803667cc20bae695e0cf84c7bc5777f9b4d5a | |
parent | 079d20a80e9412ae7787ce689d46e9b3859b348b (diff) | |
parent | 67957294c2ae7232f39690d25efd19cefa9d0ef4 (diff) | |
download | nextcloud-server-bc3650e48c7ec4f05794c2bd98a90cca3090f1e3.tar.gz nextcloud-server-bc3650e48c7ec4f05794c2bd98a90cca3090f1e3.zip |
Merge pull request #6231 from owncloud/fix-plural-l10n
fix plural translation - fixes #6226
-rw-r--r-- | core/js/js.js | 2 | ||||
-rw-r--r-- | lib/private/l10n.php | 2 | ||||
-rw-r--r-- | tests/data/l10n/cs.php | 2 | ||||
-rw-r--r-- | tests/data/l10n/de.php | 2 | ||||
-rw-r--r-- | tests/data/l10n/ru.php | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/core/js/js.js b/core/js/js.js index f5991cfc9dd..d9b3b54e0a1 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -115,7 +115,7 @@ t.cache = {}; */ function n(app, text_singular, text_plural, count, vars) { initL10N(app); - var identifier = '_' + text_singular + '__' + text_plural + '_'; + var identifier = '_' + text_singular + '_::_' + text_plural + '_'; if( typeof( t.cache[app][identifier] ) !== 'undefined' ){ var translation = t.cache[app][identifier]; if ($.isArray(translation)) { diff --git a/lib/private/l10n.php b/lib/private/l10n.php index 2d440850459..98665c84c55 100644 --- a/lib/private/l10n.php +++ b/lib/private/l10n.php @@ -262,7 +262,7 @@ class OC_L10N implements \OCP\IL10N { */ public function n($text_singular, $text_plural, $count, $parameters = array()) { $this->init(); - $identifier = "_${text_singular}__${text_plural}_"; + $identifier = "_${text_singular}_::_${text_plural}_"; if( array_key_exists($identifier, $this->translations)) { return new OC_L10N_String( $this, $identifier, $parameters, $count ); } diff --git a/tests/data/l10n/cs.php b/tests/data/l10n/cs.php index 1c5907bc148..de106ede026 100644 --- a/tests/data/l10n/cs.php +++ b/tests/data/l10n/cs.php @@ -1,5 +1,5 @@ <?php $TRANSLATIONS = array( - "_%n window__%n windows_" => array("%n okno", "%n okna", "%n oken") + "_%n window_::_%n windows_" => array("%n okno", "%n okna", "%n oken") ); $PLURAL_FORMS = "nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;"; diff --git a/tests/data/l10n/de.php b/tests/data/l10n/de.php index 858ec8af49c..93c9ab4209e 100644 --- a/tests/data/l10n/de.php +++ b/tests/data/l10n/de.php @@ -1,5 +1,5 @@ <?php $TRANSLATIONS = array( - "_%n file__%n files_" => array("%n Datei", "%n Dateien") + "_%n file_::_%n files_" => array("%n Datei", "%n Dateien") ); $PLURAL_FORMS = "nplurals=2; plural=(n != 1);"; diff --git a/tests/data/l10n/ru.php b/tests/data/l10n/ru.php index dd46293db6c..b778e8d79af 100644 --- a/tests/data/l10n/ru.php +++ b/tests/data/l10n/ru.php @@ -1,5 +1,5 @@ <?php $TRANSLATIONS = array( - "_%n file__%n files_" => array("%n файл", "%n файла", "%n файлов") + "_%n file_::_%n files_" => array("%n файл", "%n файла", "%n файлов") ); $PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"; |