]> source.dussan.org Git - nextcloud-server.git/commitdiff
Don't pass in the locale as the language
authorRoeland Jago Douma <roeland@famdouma.nl>
Fri, 25 Oct 2019 11:29:51 +0000 (13:29 +0200)
committerBackportbot <backportbot-noreply@rullzer.com>
Sat, 26 Oct 2019 10:15:46 +0000 (10:15 +0000)
This messes with the translation of the date names etc.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
lib/private/TemplateLayout.php

index f23ec97119f5b3db70674370f1fa43902484a319..c833b56cebdfa41557b562c4c9a23b2507b12af6 100644 (file)
@@ -140,7 +140,6 @@ class TemplateLayout extends \OC_Template {
                // Send the language and the locale to our layouts
                $lang = \OC::$server->getL10NFactory()->findLanguage();
                $locale = \OC::$server->getL10NFactory()->findLocale($lang);
-               $localeLang = \OC::$server->getL10NFactory()->findLanguageFromLocale('lib', $locale);
 
                $lang = str_replace('_', '-', $lang);
                $this->assign('language', $lang);
@@ -162,7 +161,7 @@ class TemplateLayout extends \OC_Template {
                if ($this->config->getSystemValue('installed', false) && $renderAs != 'error') {
                        if (\OC::$server->getContentSecurityPolicyNonceManager()->browserSupportsCspV3()) {
                                $jsConfigHelper = new JSConfigHelper(
-                                       \OC::$server->getL10N('lib', $localeLang ?: $lang),
+                                       \OC::$server->getL10N('lib'),
                                        \OC::$server->query(Defaults::class),
                                        \OC::$server->getAppManager(),
                                        \OC::$server->getSession(),