Fix #2131 missing translations

This commit is contained in:
Kijin Sung 2023-06-22 21:55:25 +09:00
parent f6b81231a6
commit b6e1a4589a
2 changed files with 2 additions and 2 deletions

View file

@ -1049,7 +1049,7 @@ class TemplateHandler
{
if (preg_match('/^\$[\\\\\w\[\]\'":>-]+$/i', $str))
{
$str = "$str ?? ''";
$str = preg_match('/^\$lang->/', $str) ? $str : "$str ?? ''";
}
switch($escape_option)

View file

@ -211,7 +211,7 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
// issue 512 - ignores <marquee>
array(
'<div class="topimgContex"><marquee direction="up" scrollamount="1" height="130" loop="infinity" behavior="lscro">{$lang->sl_show_topimgtext}</marquee></div>',
'?><div class="topimgContex"><marquee direction="up" scrollamount="1" height="130" loop="infinity" behavior="lscro"><?php echo $lang->sl_show_topimgtext ?? \'\' ?></marquee></div>'
'?><div class="topimgContex"><marquee direction="up" scrollamount="1" height="130" loop="infinity" behavior="lscro"><?php echo $lang->sl_show_topimgtext ?></marquee></div>'
),
// issue 584
array(