Merge pull request #6231 from owncloud/fix-plural-l10n
fix plural translation - fixes #6226
This commit is contained in:
commit
bc3650e48c
5 changed files with 5 additions and 5 deletions
|
@ -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)) {
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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;";
|
||||
|
|
|
@ -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);";
|
||||
|
|
|
@ -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);";
|
||||
|
|
Loading…
Reference in a new issue