Obtain module path from module manifest (#9720)

This commit is contained in:
Christian Bünte 2022-01-16 23:44:14 +01:00 committed by GitHub
parent e40a95af27
commit c6ee8c0b34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -372,7 +372,8 @@ class i18nTextCollector
// For each module do a simple merge of the default yml with these strings // For each module do a simple merge of the default yml with these strings
foreach ($entitiesByModule as $module => $messages) { foreach ($entitiesByModule as $module => $messages) {
// Load existing localisations // Load existing localisations
$masterFile = "{$this->basePath}/vendor/{$module}/lang/{$this->defaultLocale}.yml"; $masterFile = ModuleLoader::inst()->getManifest()->getModule($module)->getPath() .
DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR . $this->defaultLocale . '.yml';
$existingMessages = $this->getReader()->read($this->defaultLocale, $masterFile); $existingMessages = $this->getReader()->read($this->defaultLocale, $masterFile);
// Merge // Merge