fix plural translation - fixes #6226

This commit is contained in:
Morris Jobke 2013-12-07 11:38:01 +01:00
parent 6a747106db
commit 4c4c9096c4
2 changed files with 2 additions and 2 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 );
}