Feature #14894

stdWrap.age should differenciate between singular/plural

Added by Ernesto Baschny over 14 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Content Rendering
Target version:
-
Start date:
2005-08-02
Due date:
% Done:

0%

PHP Version:
4
Tags:
Complexity:
Sprint Focus:

Description

The .age stdWrap parameter currently only allows us to specify " min| hrs| days| yrs", which will also show plural text if we have a quantity of "1". The attached patch (for typo3/sysext/cms/tslib/class.tslib_content.php) changes the possible value of the .age setting to allow 8 values:

" min| hrs| days| yrs| min| hour| day| year"

The second set is the singular variant. So we can have outputs like "1 hour" and "1 year". It remains backwards compatible, in that older TYPO3 (with newer TypoScript) will still show the "good-old" plural variants.

In a remote future this text should become language-dependent, so that we have different outputs depending on the language of the site. This should also be prepared for situations where not always is the "1" unit singular and all others plural. There are languages where there are other rules for plurals (see gettext, PO-setting "Plural-Forms").
(issue imported from #M1333)

class.tslib_content.php-calcAge.patch View (1.22 KB) Administrator Admin, 2005-08-02 13:39

1333_v2.diff View (1.54 KB) Administrator Admin, 2010-10-19 15:24

History

#1 Updated by Susanne Moog about 9 years ago

Committed to trunk rev 9278.

#2 Updated by Ernesto Baschny about 9 years ago

Amazing.. 5 years later => solved! thanks Susanne ;)

#3 Updated by Susanne Moog over 8 years ago

  • Target version deleted (4.5.0)

Also available in: Atom PDF