31
2
mirror of https://github.com/joomla-extensions/jedchecker.git synced 2024-05-31 20:50:48 +00:00

Merge pull request #249 from dryabov/patch-92

consider incompatibility in language file format as error instead of …
This commit is contained in:
Denis Ryabov 2024-01-08 12:55:26 +03:00 committed by GitHub
commit 0f5cd37e67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}