]> 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)
committerRoeland Jago Douma <roeland@famdouma.nl>
Fri, 25 Oct 2019 11:29:51 +0000 (13:29 +0200)
This messes with the translation of the date names etc.

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

index 94b39e951a5a324b5533bd755c809d694b67e120..e7809b5a39da10aab9ff1cffc6ac05a161cca0e3 100644 (file)
@@ -142,7 +142,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);
@@ -164,7 +163,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(),