]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix parsing of language code
authorDaniel Kesselberg <mail@danielkesselberg.de>
Wed, 8 Jul 2020 18:03:09 +0000 (20:03 +0200)
committerJulius Härtl <jus@bitgrid.net>
Thu, 23 Jul 2020 06:33:32 +0000 (08:33 +0200)
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
core/src/OC/l10n.js

index 6495f514c7d1db6a1afe3f332ed674140bc4b5af..ccba89fae3de6a9c3fe7b58c31309bcccb0e27d8 100644 (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('-'))
                }
 
                /*