diff options
author | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-12-29 10:03:26 +0300 |
---|---|---|
committer | Matthieu Napoli <matthieu@mnapoli.fr> | 2015-01-05 05:24:45 +0300 |
commit | de06fd66ee7d01832ff08f13d58e21a9d7a510c7 (patch) | |
tree | 07421e1a36621c77a22d0254c2511b48d2cc0e4f /core/FrontController.php | |
parent | cb68ad1ede299ce826989858171456b82a6f7ee5 (diff) |
Refactored the way translations are loaded
Translations are now lazily loaded instead of being explicitely loaded by other components (e.g. the front controller, the plugin manager, etc...). Now other parties only configure "directories" where the translator can find translations. That makes the translator decoupled from the rest of Piwik.
Diffstat (limited to 'core/FrontController.php')
-rw-r--r-- | core/FrontController.php | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/core/FrontController.php b/core/FrontController.php index 8e7c91a0bc..89e91b943b 100644 --- a/core/FrontController.php +++ b/core/FrontController.php @@ -324,17 +324,13 @@ class FrontController extends Singleton $tmpPath . '/templates_c/', ); - Translate::loadEnglishTranslation(); - Filechecks::dieIfDirectoriesNotWritable($directoriesToCheck); $this->handleMaintenanceMode(); $this->handleProfiler(); $this->handleSSLRedirection(); - /** @var Translator $translator */ - $translator = StaticContainer::getContainer()->get('Piwik\Translation\Translator'); - $translator->loadPluginsTranslations('en'); + Plugin\Manager::getInstance()->loadPluginTranslations(); Plugin\Manager::getInstance()->loadActivatedPlugins(); if ($exceptionToThrow) { |