[TYPO3-mvc] Problem with translate in f:form.select option

Martin Kutschker masi-no at spam-typo3.org
Wed Jun 9 14:54:42 CEST 2010


Bastian Waidelich schrieb:
> Sebastian Fischer wrote:
> 
> Hi Sebastian,
> 
>> <f:form.select name="data[delivery]" options="{
>> pickup: '{f:translate(key: delivery_pickup)}',
>> depositing: '{f:translate(key: delivery_depositing)}',
>> shipment: '{f:translate(key: delivery_shipment)}'
>> }" value="pickup" />
> 
>> How could this be fixed? First solving answer wins a beer on the dev
>> days ;)
> 
> I'll take it:
> 
> <f:form.select name="data[delivery]" options="{pickup:
> '{f:translate(key: \'delivery_pickup\')}', depositing:
> '{f:translate(key: \'delivery_depositing\')}', shipment:
> '{f:translate(key: \'delivery_shipment\')}'}" value="pickup" />

We need some alternative quoting (or allow the quoting to be omitted if no white space occurs in the
argument). The backslashes make reading a view helper in short notation painful.

BTW, while it is unclean I think it should be possible to omit the parameter name for a view helper
in short notation when only one parameter is given (or define a fixed order as usual with functions).

eg
{f:translate(key: delivery_pickup)}
becomes
{f:translate(delivery_pickup)}

Masi


More information about the TYPO3-project-typo3v4mvc mailing list