Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename the variable aswell
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen authored and rullzer committed Mar 27, 2019
commit 156419af80347607370698ff71422533ef8f590e
14 changes: 7 additions & 7 deletions core/js/l10n.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,26 +167,26 @@ OC.L10N = {
* @private
*/
_getPlural: function(number) {
var locale = OC.getLanguage();
if ('pt_BR' === locale) {
var language = OC.getLanguage();
if ('pt_BR' === language) {
// temporary set a locale for brazilian
locale = 'xbr';
language = 'xbr';
}

if (typeof locale === 'undefined') {
if (typeof language === 'undefined') {
return (1 == number) ? 0 : 1;
}

if (locale.length > 3) {
locale = locale.substring(0, locale.lastIndexOf('_'));
if (language.length > 3) {
language = language.substring(0, language.lastIndexOf('_'));
}

/*
* The plural rules are derived from code of the Zend Framework (2010-09-25),
* which is subject to the new BSD license (http://framework.zend.com/license/new-bsd).
* Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
*/
switch (locale) {
switch (language) {
case 'az':
case 'bo':
case 'dz':
Expand Down