Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix modules translations files in theme erased by modules translations that are in modules folder #14609

Merged
merged 3 commits into from Sep 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions classes/Translate.php
Expand Up @@ -198,13 +198,13 @@ public static function getModuleTranslation(

if (!isset($translationsMerged[$name][$iso])) {
$filesByPriority = array(
// Translations in theme
_PS_THEME_DIR_ . 'modules/' . $name . '/translations/' . $iso . '.php',
_PS_THEME_DIR_ . 'modules/' . $name . '/' . $iso . '.php',
// PrestaShop 1.5 translations
_PS_MODULE_DIR_ . $name . '/translations/' . $iso . '.php',
// PrestaShop 1.4 translations
_PS_MODULE_DIR_ . $name . '/' . $iso . '.php',
// Translations in theme
_PS_THEME_DIR_ . 'modules/' . $name . '/translations/' . $iso . '.php',
_PS_THEME_DIR_ . 'modules/' . $name . '/' . $iso . '.php',
);
foreach ($filesByPriority as $file) {
if (file_exists($file)) {
Expand Down