Feature #42169

Use named indexes for placeholders in translation labels

Added by Thomas Hempel over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Should have
Category:
I18n
Start date:
2012-10-19
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Yes
Complexity:
easy

Description

Right now you can replace placedholders in translations like this:

<f:translate key="myKey" arguments="{0:'foo', 1:'bar'}" />

The key would look like this:

This is my awesome {0}Key that displays some {1}Value 

The result would be:

This is my awesome fooKey that displays some barValue.

So far so good. Now it would be better to actually give that placeholders a name because that makes it much easier to understand the translations.

Something like:

Template:
<f:translate key="myKey" arguments="{keyName:'foo', valueName:'bar'}" />

Translation:
This is my awesome {keyName}Key that displays some {valueName}Value 
#1

Updated by Thomas Hempel over 8 years ago

There is a review request available at

https://review.typo3.org/#/c/15809/

#2

Updated by Gerrit Code Review over 8 years ago

  • Status changed from New to Under Review

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

#3

Updated by Gerrit Code Review over 8 years ago

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

#4

Updated by Thomas Hempel over 8 years ago

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

Also available in: Atom PDF