You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Michael Kreis (JIRA)" <ji...@apache.org> on 2016/01/20 13:24:39 UTC

[jira] [Comment Edited] (SLING-5138) When using i18n option in data-sly-text translation is called twice

    [ https://issues.apache.org/jira/browse/SLING-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15108453#comment-15108453 ] 

Michael Kreis edited comment on SLING-5138 at 1/20/16 12:23 PM:
----------------------------------------------------------------

Also occurs when using i18n directly in an attribute, e.g.:
{code:html}
<input name="test" placeholder="${'test.key' @ i18n}" >
{code}

[~radu.cotescu]: Is someone looking at this issues?


was (Author: michael.kreis):
Also occurs when using i18n directly in an attribute, e.g.:
{code:html}
<input name="test" placeholder="${'test.key' @ i18n}" >
{code}

> When using i18n option in data-sly-text translation is called twice
> -------------------------------------------------------------------
>
>                 Key: SLING-5138
>                 URL: https://issues.apache.org/jira/browse/SLING-5138
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>            Reporter: Michael Kreis
>
> When using the i18n option in the data-sly-text attribute the I18nRuntimeExtension is called twice. 
> To reproduce use following snippet in a sightly template: 
> {code}<div data-sly-text="${'test.key' @ i18n}">test</div>{code}
> Generated java source shows: 
> {code}
> Object var_textcontent4 = renderContext.call("xss", renderContext.call("i18nTranslation", renderContext.call("i18nTranslation", "test.key", obj().with("i18n", null)), obj().with("context", "text").with("i18n", null)), "text");
> {code}
>     



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)