Add new internationalisation check for \' within translatable strings
Posted September 21st, 2008 by douggreen
in
6.x-1.x-dev, Review/Rules, feature request, normal, active
Hi,
Coding standards recommend use of single quotes instead of double quotes. This means you often end up with lines of code like:
$string = t('It doesn\'t match.');
As you can see, the developer used single quotes, but then had to escape an apostrophe that occurred within the string being translated. This makes it difficult for translators and instead the single quotes should be changed to double quotes so the apostrophe doesn't need to be escaped, i.e.
$string = t("It doesn't match.");
We should add a check to coder for this.
Cheers,
Stella