mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-19 06:53:53 +01:00
LSlang :: generate_lang_file: fix handling smarty escape modifier
This commit is contained in:
parent
a6f07faca0
commit
4a3e4e3fbb
1 changed files with 2 additions and 1 deletions
|
@ -635,6 +635,7 @@ function cli_generate_lang_file($command_args) {
|
||||||
$count ++;
|
$count ++;
|
||||||
if (preg_match_all('/\{ *tr +msg=["\']([^\}]+)["\'] *\}/',$line,$matches)) {
|
if (preg_match_all('/\{ *tr +msg=["\']([^\}]+)["\'] *\}/',$line,$matches)) {
|
||||||
foreach($matches[1] as $t) {
|
foreach($matches[1] as $t) {
|
||||||
|
$t = preg_replace('/[\'"]\|escape\:.*$/', '', $t);
|
||||||
$LSlang_cli_logger -> debug(" - \"$t\" # Line $count");
|
$LSlang_cli_logger -> debug(" - \"$t\" # Line $count");
|
||||||
add($t, absolute2relative_path($file).":$count");
|
add($t, absolute2relative_path($file).":$count");
|
||||||
}
|
}
|
||||||
|
@ -871,7 +872,7 @@ function cli_generate_ldapsaisie_pot($command_args) {
|
||||||
// Initialize logger (if not already initialized by another CLI command)
|
// Initialize logger (if not already initialized by another CLI command)
|
||||||
if (!isset($LSlang_cli_logger))
|
if (!isset($LSlang_cli_logger))
|
||||||
$LSlang_cli_logger = LSlog :: get_logger('generate_ldapsaisie_pot');
|
$LSlang_cli_logger = LSlog :: get_logger('generate_ldapsaisie_pot');
|
||||||
|
|
||||||
// Clean php file in tmp directory
|
// Clean php file in tmp directory
|
||||||
if (is_dir(LS_TMP_DIR_PATH)) {
|
if (is_dir(LS_TMP_DIR_PATH)) {
|
||||||
foreach(listFiles(LS_TMP_DIR_PATH, '/\.php$/') as $file) {
|
foreach(listFiles(LS_TMP_DIR_PATH, '/\.php$/') as $file) {
|
||||||
|
|
Loading…
Reference in a new issue