Feature #33959
Make quantity optional when using single numeric arguments in translations
Status: | Resolved | Start date: | 2012-02-15 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Karsten Dambekalns | % Done: | 100% |
|
Category: | I18n | |||
Target version: | TYPO3 Flow Base Distribution - 1.1 | |||
PHP Version: | Complexity: | |||
Has patch: | No |
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
[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
#1 Updated by Gerrit Code Review over 3 years 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
#2 Updated by Gerrit Code Review over 3 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9040
#3 Updated by Gerrit Code Review over 3 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9040
#4 Updated by Gerrit Code Review over 3 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9040
#5 Updated by Karsten Dambekalns over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset e7141cb693168c2785c0b7e075ead8c73b96194a.