Closed (fixed)
Project:
Chaos Tool Suite (ctools)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Aug 2012 at 15:04 UTC
Updated:
27 Feb 2013 at 21:20 UTC
The use of format_plural() for showing a string as either singular or plural is wrong, as long as the strings don't contain any count. At the moment a block title is set as follows:
$block->title = format_plural(count($terms), 'Parent term', 'Parent terms');
Neither contain a count. Instead the translation should be:
$block->title = count($terms) == 1 ? t('Parent term') : t('Parent terms');
When using format_plural() will make the po files both contain a normal translation of 'Parent term' and a format_plural version, which as the documentation states is wrong: "Since t() is called by this function, make sure not to pass already-localized strings to it."
| Comment | File | Size | Author |
|---|---|---|---|
| ctools-format_plural_parent_terms.patch | 639 bytes | lund.mikkel |
Comments
Comment #1
merlinofchaos commentedSeems reasonable. Committed and pushed.