summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2020-07-08 20:03:09 +0200
committerDaniel Kesselberg <mail@danielkesselberg.de>2020-07-09 21:11:27 +0200
commit5ba982545256b204f83154dcbd0a2672996463a8 (patch)
tree5d7eb1361a74b42045b8be052e11e06a10979529 /core/src
parentc354f6d2ebfc348a94b9cadb12257b973dafff88 (diff)
downloadnextcloud-server-5ba982545256b204f83154dcbd0a2672996463a8.tar.gz
nextcloud-server-5ba982545256b204f83154dcbd0a2672996463a8.zip
Fix parsing of language code
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'core/src')
-rw-r--r--core/src/OC/l10n.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/OC/l10n.js b/core/src/OC/l10n.js
index 8eeb978b6d9..2d4c96d61d0 100644
--- a/core/src/OC/l10n.js
+++ b/core/src/OC/l10n.js
@@ -168,7 +168,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'
}
@@ -178,7 +178,7 @@ const L10n = {
}
if (language.length > 3) {
- language = language.substring(0, language.lastIndexOf('_'))
+ language = language.substring(0, language.lastIndexOf('-'))
}
/*