Project

General

Profile

Actions

Feature #14894

closed

stdWrap.age should differenciate between singular/plural

Added by Ernesto Baschny over 18 years ago. Updated almost 13 years ago.

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

0%

Estimated time:
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)


Files

class.tslib_content.php-calcAge.patch (1.22 KB) class.tslib_content.php-calcAge.patch Administrator Admin, 2005-08-02 13:39
1333_v2.diff (1.54 KB) 1333_v2.diff Administrator Admin, 2010-10-19 15:24
Actions #1

Updated by Susanne Moog over 13 years ago

Committed to trunk rev 9278.

Actions #2

Updated by Ernesto Baschny over 13 years ago

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

Actions #3

Updated by Susanne Moog almost 13 years ago

  • Target version deleted (4.5.0)
Actions

Also available in: Atom PDF