Optimising the checking and loading of module translations

parent 4e321fc4
......@@ -281,10 +281,6 @@ class CoreServiceProvider extends ServiceProvider
*/
private function moduleHasCentralisedTranslations(Module $module)
{
if (! array_has($this->app['modules']->enabled(), 'Translation')) {
return false;
}
return is_dir($this->getCentralisedTranslationPath($module));
}
......@@ -295,7 +291,9 @@ class CoreServiceProvider extends ServiceProvider
*/
private function getCentralisedTranslationPath(Module $module)
{
return $this->app['modules']->find('Translation')->getPath() . "/Resources/lang/{$module->getLowerName()}";
$path = config('modules.paths.modules'). '/Translation';
return $path . "/Resources/lang/{$module->getLowerName()}";
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment