[TYPO3-core] RFC #1333: (Mini)Feature: stdWrap.age should differenciate between singular/plural

Susanne Moog typo3 at susannemoog.de
Tue Oct 19 15:28:47 CEST 2010


Hey,

This is an SVN patch request.

Type:
feature

Bugtracker references:
http://bugs.typo3.org/view.php?id=1333

Branches:
trunk

Problem (from bug tracker):
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".

Solution:
The attached patch 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.

Notes / How to test:
Original patch from bug tracker was from Ernesto (in 2005), I only
adapted it.

You can test it by using the date field of the header content element
and setting the following TypoScript:
lib.stdheader.5.field = date
lib.stdheader.5.age = 1
lib.stdheader.5.strftime >


Best regards,

Susanne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1333_v2.diff
Type: text/x-patch
Size: 1579 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101019/a407157b/attachment.bin>


More information about the TYPO3-team-core mailing list