From 81de66ffafb120a9f8a020cc1dbc3ef0f2ae94ad Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Wed, 8 Jul 2020 20:03:09 +0200 Subject: [PATCH] Fix parsing of language code Signed-off-by: Daniel Kesselberg --- core/src/OC/l10n.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/OC/l10n.js b/core/src/OC/l10n.js index 6495f514c7d..ccba89fae3d 100644 --- a/core/src/OC/l10n.js +++ b/core/src/OC/l10n.js @@ -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('-')) } /* -- 2.39.5