Merge pull request #21857 from nextcloud/backport/21760/stable19
[stable19] Fix parsing of language code
This commit is contained in:
commit
3019e59aad
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
|
@ -167,7 +167,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'
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ const L10n = {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (language.length > 3) {
|
if (language.length > 3) {
|
||||||
language = language.substring(0, language.lastIndexOf('_'))
|
language = language.substring(0, language.lastIndexOf('-'))
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue