Skip to content

Commit c032bcf

Browse files
author
stephaneDecockLocastic
committed
Fix translation dir provider
1 parent 5281526 commit c032bcf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Provider/TranslationsProvider.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,10 @@ public function getTranslations(string $defaultLocaleCode, array $locales): arra
6767
$themes = $this->themesProvider->getAll();
6868
$translations = [];
6969
foreach ($themes as $theme) {
70-
$translationDirectory = $this->defaultTranslationDirectoryProvider->getDefaultDirectory();
71-
if (ThemesProviderInterface::NAME_DEFAULT !== $theme->getName()) {
72-
$translationDirectory .= '/translations/';
70+
if (!empty($theme->getPath())) {
71+
$translationDirectory = $theme->getPath() . '/translations/';
72+
} else {
73+
$translationDirectory = $this->defaultTranslationDirectoryProvider->getDefaultDirectory();
7374
}
7475
$themeTranslations = $this->getDirectoryTranslations($translationDirectory, $defaultLocaleCode, $locales);
7576
$themeTranslations = $this->removeEmptyKeys($themeTranslations);

0 commit comments

Comments
 (0)