Skip to content

Commit

Permalink
API Deprecate old i18n template syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Jan 10, 2025
1 parent 10f239f commit 3f5b363
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/View/SSTemplateParser.peg
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,9 @@ class SSTemplateParser extends Parser implements TemplateParser
*/
function OldI18NTag_STR(&$res, $sub)
{
$res['php'] = '$val .= ' . $sub['php'] . ';';
$res['php'] = '$val .= ' . $sub['php'] . ';' . Deprecation::class
. '::notice(\'5.4.0\', \'The <% _t() %> template syntax is deprecated. Use <%t %> instead.\', '
. Deprecation::class . '::SCOPE_GLOBAL);';
}

/*!*
Expand Down
4 changes: 3 additions & 1 deletion src/View/SSTemplateParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -3748,7 +3748,9 @@ function match_OldI18NTag ($stack = array()) {

function OldI18NTag_STR(&$res, $sub)
{
$res['php'] = '$val .= ' . $sub['php'] . ';';
$res['php'] = '$val .= ' . $sub['php'] . ';' . Deprecation::class
. '::notice(\'5.4.0\', \'The <% _t() %> template syntax is deprecated. Use <%t %> instead.\', '
. Deprecation::class . '::SCOPE_GLOBAL);';
}

/* NamedArgument: Name:Word "=" Value:Argument */
Expand Down

0 comments on commit 3f5b363

Please sign in to comment.