33
2
mirror of https://github.com/joomla-extensions/jedchecker.git synced 2024-12-30 13:10:32 +00:00

consider incompatibility in language file format as error instead of warning

This commit is contained in:
Denis Ryabov 2024-01-08 13:54:26 +04:00
parent 797770507d
commit e0406d3be7
2 changed files with 2 additions and 2 deletions

View File

@ -149,7 +149,7 @@ COM_JEDCHECKER_LANG_VARIABLE_REF="A variable reference found in the translation
COM_JEDCHECKER_LANG_INCORRECT_ARGNUM="Probably you use incorrect placeholder format (e.g. '%1s' instead of '%1$s'), see <a href='https://www.php.net/manual/en/function.sprintf.php'>printf's argnum format specification</a> for details"
COM_JEDCHECKER_LANG_SPACES_AROUND="Spaces around the translation string are detected"
COM_JEDCHECKER_LANG_UNKNOWN_KEY_IN_CODE="Unknown language key '%s' found in the code."
COM_JEDCHECKER_LANG_JOOMLA501_BC="The behavior of the language file parser has changed in Joomla 4.4.1/5.0.1. In this update, unlike previous Joomla versions, dollar and backslash characters no longer need to be escaped. If you intend to support older Joomla versions, it is advisable to avoid using dollar and backslash in language strings."
COM_JEDCHECKER_LANG_JOOMLA501_BC="The behavior of the language file parser has changed in Joomla 4.4.1/5.0.1. In this update, unlike previous Joomla versions, dollar and backslash characters no longer need to be escaped. If you intend to support older Joomla versions, it is advisable to avoid using dollar and backslash characters in language strings."
COM_JEDCHECKER_LEVEL_ERROR="ERROR"
COM_JEDCHECKER_LEVEL_WARNING="WARNING"
COM_JEDCHECKER_LEVEL_COMPATIBILITY="COMPATIBILITY"

View File

@ -241,7 +241,7 @@ class JedcheckerRulesLanguage extends JEDcheckerRule
if (!preg_match('/^"((?>[^"\\\\]+|\\\\.)*)"\s*(;[^"]*)?$/', $value, $matches))
{
// The value doesn't match INI format
$this->report->addWarning($file, Text::_('COM_JEDCHECKER_LANG_TRANSLATION_ERROR'), $startLineno, $line);
$this->report->addError($file, Text::_('COM_JEDCHECKER_LANG_TRANSLATION_ERROR'), $startLineno, $line);
continue;
}