From 6a560fd51eee392c9cbcca91eea3f2bb6a307f0c Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 25 Oct 2019 13:29:51 +0200 Subject: [PATCH] Don't pass in the locale as the language This messes with the translation of the date names etc. Signed-off-by: Roeland Jago Douma --- lib/private/TemplateLayout.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 94b39e951a5..e7809b5a39d 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -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(), -- 2.39.5