Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Napoli <matthieu@mnapoli.fr>2014-12-29 10:03:26 +0300
committerMatthieu Napoli <matthieu@mnapoli.fr>2015-01-05 05:24:45 +0300
commitde06fd66ee7d01832ff08f13d58e21a9d7a510c7 (patch)
tree07421e1a36621c77a22d0254c2511b48d2cc0e4f /core/FrontController.php
parentcb68ad1ede299ce826989858171456b82a6f7ee5 (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.php6
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) {