Skip to content

Commit

Permalink
Match multiline translation expressions in modules
Browse files Browse the repository at this point in the history
  • Loading branch information
unlocomqx authored and PierreRambaud committed Jul 24, 2019
1 parent edc5c1a commit fce8673
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/admin/AdminTranslationsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,7 @@ protected function userParseFile($content, $type_translation, $type_file = false
case 'modules':
// Parsing modules file
if ($type_file == 'php') {
$regex = '/->l\(\s*(\')' . _PS_TRANS_PATTERN_ . '\'(\s*,\s*?\'(.+)\')?(\s*,\s*?(.+))?\s*\)/U';
$regex = '/->l\(\s*(\')' . _PS_TRANS_PATTERN_ . '\'(\s*,\s*?\'(.+)\')?(\s*,\s*?(.+))?\s*\)/Ums';
} else {
// In tpl file look for something that should contain mod='module_name' according to the documentation
$regex = '/\{l\s*s=([\'\"])' . _PS_TRANS_PATTERN_ . '\1.*\s+mod=\'' . $module_name . '\'.*\}/U';
Expand Down

0 comments on commit fce8673

Please sign in to comment.