I was just translating content_types.inc strings and found this rather "interesting" use of format_plural(). Using this function to translate 'is'/'are', 'node'/'nodes', and 'it'/'they' serves no purpose for translators. It does not allow for translation of these strings to quite a few languages, which have different rules for wording and placement then English, and it litters the string space with these single word translations without no use.
Remember that only complete strings can be format_plural()-ed, single words are a big no-no. Here is a patch to fix this. Since this string needs one more replacement, I needed to code strtr() into the patch, since there is no other API function to this. But this was simple enough, so I set it to RTBC.
Comment | File | Size | Author |
---|---|---|---|
#1 | Drupal.fix.misuse.of.format_plural.is.system.module.patch.txt | 1008 bytes | Gábor Hojtsy |
Drupal.fix.content_types.t.problem.patch.txt | 1.45 KB | Gábor Hojtsy |
Comments
Comment #1
Gábor HojtsyHere is another patch which fixes a very similar error in system.module, so I renamed the issue to be more general. Misuse of format_plural() like this means no good for translators. Let me know if you are interested in a combined patch.
Comment #2
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #3
(not verified) CreditAttribution: commented