Merge pull request #6231 from owncloud/fix-plural-l10n

fix plural translation - fixes #6226
This commit is contained in:
blizzz 2013-12-09 01:41:06 -08:00
commit bc3650e48c
5 changed files with 5 additions and 5 deletions

View File

@ -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)) {

View File

@ -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 );
}

View File

@ -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;";

View File

@ -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);";

View File

@ -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);";