Merge pull request #21857 from nextcloud/backport/21760/stable19

[stable19] Fix parsing of language code
This commit is contained in:
Morris Jobke 2020-07-20 16:27:42 +02:00 committed by GitHub
commit 3019e59aad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 8 additions and 8 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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