Closed (fixed)
Project:
Coder
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
4 Dec 2008 at 07:36 UTC
Updated:
3 Sep 2012 at 00:58 UTC
Guys,
the check that detects if the translation ends with period when the original strings have is inverted. Also, it doesnt consider Unicode strings, which might lead to wrong checks.
The fix to be placed on coder_i18n.inc, around line 127, replace:
// Check the translation trailing periods.
if (substr($msgid, -1, 1) == '.' && !substr($msgstr, -1, 1) != '.') {
$rule = array(
'#warning' => 'The translation text should end in a period when the same original text also ends in a period.',
);
_coder_error($results, $rule, $severity_name, $lineno, $msgstr);
}
to
// Check the translation trailing periods.
if (drupal_substr($msgid, -1, 1) == '.' && drupal_substr($msgstr, -1, 1) != '.') {
$rule = array(
'#warning' => 'The translation text should end in a period when the same original text also ends in a period.',
);
_coder_error($results, $rule, $severity_name, $lineno, $msgstr);
}
regards,
massa
Comments
Comment #1
douggreen commentedComment #2
douggreen commentedThanks. I apologize that no one looked at this earlier, but as this is a 4 year old ticket, it looks like the fix has already been applied.