From: Daniel Kesselberg Date: Wed, 8 Jul 2020 18:03:09 +0000 (+0200) Subject: Fix parsing of language code X-Git-Tag: v20.0.0beta1~273^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5ba982545256b204f83154dcbd0a2672996463a8;p=nextcloud-server.git Fix parsing of language code Signed-off-by: Daniel Kesselberg --- 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('-')) } /*