Details
-
Improvement
-
Resolution: Fixed
-
Major
-
17.10.8
-
None
-
Unit
-
Unknown
-
Description
XWIKI-24290 added the possibility to pass directly a script variable to a translation macro, which makes a lot easier to use user input safely:
{{velocity}}
#set ($txparameters = [$userinput, 42])
{{translation key="some.translation" scriptParameters="txparameters"/}}
{{/velocity}}
But it's a very common use case and a Velocity helper could help make these calls more readable and mitigate the risk of using the same variable for two different calls:
{{velocity}}
#wikiTranslation('some.translation', [$userinput, 42])
{{/velocity}}