Feature #33959

Make quantity optional when using single numeric arguments in translations

Added by Karsten Dambekalns over 1 year ago. Updated about 1 year ago.

Status:Resolved Start date:2012-02-15
Priority:Should have Due date:
Assignee:Karsten Dambekalns % Done:

100%

Category:I18n
Target version:TYPO3 Flow Base Distribution - 1.1
PHP Version: Complexity:
Has patch:No
Votes: 0

Description

When using plural forms, the quantity to be used for finding the correct plural form has to be given explicitly. This is cumbersome when using a single numeric argument, as it means to pass the same value twice. Here is an example:

<f:translate arguments="{0: post.numberOfComments}" quantity="{post.numberOfComments}">

It would be nice if for single numeric arguments the quantity could be determined automatically:

<f:translate arguments="{0: post.numberOfComments}">

Associated revisions

Revision e7141cb6
Added by Karsten Dambekalns about 1 year ago

[FEATURE] Makes quantity optional in translation methods

When using plural forms, the quantity to be used for finding
the correct plural form had to be given explicitly. This was
cumbersome when using a single numeric argument, as it meant
to pass the same value twice.

With this change the quantity is determined automatically if
a single numeric argument is given to translateById() or
translateByOriginalLabel() in Translator.

Also fixes a few I18n unit tests along the way.

Change-Id: I1a2c505a8bc4a5c61d1e2a46704231a12b763839
Resolves: #33959
Releases: 1.1

History

Updated by Gerrit Code Review over 1 year ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9040

Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9040

Updated by Gerrit Code Review about 1 year ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9040

Updated by Gerrit Code Review about 1 year ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9040

Updated by Karsten Dambekalns about 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF