Bug #49545

Non-plural translations are not found if arguments are used

Added by Adrian Föder about 2 years ago. Updated about 2 years ago.

Status:Closed Start date:2013-07-01
Priority:Should have Due date:
Assigned To:- % Done:

0%

Category:I18n
Target version:-
PHP Version: Complexity:
Has patch:No Affected Flow version:Git master

Description

A simple translation which is not meant for handling plurals is not correctly resolved when used with arguements, for example,

<f:translate id="someId" arguments="{0: 2500}" />

does not resolve correctly. The error appears in \TYPO3\Flow\I18n\Translator::translateById where the $pluralForm equals to 'other' as soon as arguments are set (that's the distant observation so far, have to dig deeper).


Related issues

duplicates TYPO3.Flow - Bug #45062: TranslateViewHelper fails if an array with a single numbe... Resolved 2013-02-01

History

#1 Updated by Adrian Föder about 2 years ago

the actual reason is, that \TYPO3\Flow\I18n\Translator::getPluralForm per convention takes arguments' first item, if it's the only one and numeric, as quantity. So the above mentioned example is such a case where this problem occurs.

What could we do here?

#2 Updated by Adrian Föder about 2 years ago

  • Status changed from Accepted to Needs Feedback
  • Assigned To deleted (Adrian Föder)

#3 Updated by Alexander Berl about 2 years ago

See duplicated bug #45062, the fix is already accepted and only needs to get merged.

#4 Updated by Adrian Föder about 2 years ago

  • Status changed from Needs Feedback to Closed

closed as being duplicate of #49545
Thanks Alex for the notice!

#5 Updated by Bastian Waidelich about 2 years ago

Adrian Föder wrote:

closed as being duplicate of #49545

duplicate of -> #45062 ;)

Also available in: Atom PDF