Merge pull request #21760 from nextcloud/fix/20453/get-plural

Fix parsing of language code
This commit is contained in:
Roeland Jago Douma 2020-07-09 22:08:59 +02:00 committed by GitHub
commit e18e4511d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -168,7 +168,7 @@ const L10n = {
*/ */
_getPlural: function(number) { _getPlural: function(number) {
let language = OC.getLanguage() let language = OC.getLanguage()
if (language === 'pt_BR') { if (language === 'pt-BR') {
// temporary set a locale for brazilian // temporary set a locale for brazilian
language = 'xbr' language = 'xbr'
} }
@ -178,7 +178,7 @@ const L10n = {
} }
if (language.length > 3) { if (language.length > 3) {
language = language.substring(0, language.lastIndexOf('_')) language = language.substring(0, language.lastIndexOf('-'))
} }
/* /*