CivicActions is reviewing and upgrading multiple modules for use on client sites. Part of this work is a coding standards review. Attached you will find a patch based on a review with the coder module and a careful examination of the code.

It is important that this is fixed because the presence of a leading or trailing space makes it very difficult for translators and some editing tools. It often means that the extra spaces are dropped and so the translated text may never be displayed. The extra space should be moved outside the t() function call.

Thanks!

CommentFileSizeAuthor
#3 pathauto.patch772 byteswmostrey
#1 pathauto.patch772 byteswmostrey
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wmostrey’s picture

FileSize
772 bytes
stella’s picture

Status: Needs review » Needs work

This one needs work:

-    $description .= format_plural(count($return), 'Problem token: ', 'Problem tokens: ');
...
+    $description .= format_plural(count($return), 'Problem token:', 'Problem tokens:' .' ');

The space moved should be moved outside the call to format_plural().

wmostrey’s picture

Status: Needs work » Needs review
FileSize
772 bytes

You are correct, thanks for the review Stella. Here is the correct version.

Freso’s picture

Status: Needs review » Closed (duplicate)

If you want this to get in, you should provide a fix for all the affected translations as well, as 6.x-1.x has been in string freeze for quite some time. The issue has been fixed for 6.x-2.x with #256340: String clean up, and I think your best bet would be to backport that patch to 6.x-1.x (or simply go ahead and use (a snapshot of) 6.x-2.x).