Browse Source

Adding german translations possible fix to locale

Julio 9 years ago
parent
commit
8701e46968

+ 0 - 2
src/Chamilo/CoreBundle/EventListener/LegacyLoginListener.php

@@ -67,7 +67,6 @@ class LegacyLoginListener implements EventSubscriberInterface
                             }
 
                             $languages = ['german' => 'de', 'english' => 'en', 'spanish' => 'es', 'french' => 'fr'];
-
                             if ($user && isset($languages[$user->getLanguage()])) {
                                 $locale = $languages[$user->getLanguage()];
                                 $user->setLocale($locale);
@@ -77,7 +76,6 @@ class LegacyLoginListener implements EventSubscriberInterface
                                 // if no explicit locale has been set on this request, use one from the session
                                 $request->setLocale($locale);
                                 $request->getSession()->set('_locale', $locale);
-
                             }
 
                             $token = new UsernamePasswordToken($user, null, "main", $user->getRoles());

+ 1 - 0
src/Chamilo/CoreBundle/EventListener/UserLocaleListener.php

@@ -54,6 +54,7 @@ class UserLocaleListener
 
             if ($user && isset($languages[$user->getLanguage()])) {
                 $user->setLocale($languages[$user->getLanguage()]);
+                $event->getRequest()->setLocale($user->getLocale());
                 $this->session->set('_locale', $user->getLocale());
                 $this->session->set('_locale_user', $user->getLocale());
             }

+ 0 - 1
src/Chamilo/CoreBundle/Menu/NavBuilder.php

@@ -215,7 +215,6 @@ class NavBuilder extends ContainerAware
                 $translator->trans('Profile'),
                 array('route' => 'fos_user_profile_show')
             )->setAttribute('divider_append', true);*/
-
             $dropdown->addChild(
                 $translator->trans('Inbox'),
                 array(

+ 26 - 0
src/Chamilo/CoreBundle/Resources/translations/messages.de.po

@@ -0,0 +1,26 @@
+msgid "My courses"
+msgstr "Meine Kurse"
+
+msgid "Home"
+msgstr "Portal Startseite"
+
+msgid "Inbox"
+msgstr "Posteingang"
+
+msgid "Logout"
+msgstr "Logout"
+
+msgid "Personal agenda"
+msgstr "Mein Kalender"
+
+msgid "Reporting"
+msgstr "Meine Auswertung"
+
+msgid "Social network"
+msgstr "Soziales Netzwerk"
+
+msgid "Dashboard"
+msgstr "Kontroll-Anzeige"
+
+msgid "Administration"
+msgstr "Administration"

+ 1 - 11
src/Chamilo/CoreBundle/Resources/translations/messages.fr.po

@@ -23,14 +23,4 @@ msgid "Dashboard"
 msgstr "Panneau de contrôle"
 
 msgid "Administration"
-msgstr "Administration"
-
-
-
-
-
-
-
-
-
-
+msgstr "Administration"