You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Dave Newton (JIRA)" <ji...@apache.org> on 2008/03/09 22:19:07 UTC

[jira] Issue Comment Edited: (WW-2539) @s.i18n kills the Action's I18n keys

    [ https://issues.apache.org/struts/browse/WW-2539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43486#action_43486 ] 

newton_dave edited comment on WW-2539 at 3/9/08 2:17 PM:
---------------------------------------------------------

I still can't dupe this; here's the exact FTL I'm using:

{code:lhtml}
<html>
  <body>
    testKey: <@s.text name="testKey"/>
    <br/>
    from test: <@s.i18n name="s2.i18n.TestMessages"><@s.text name="from.test"/></...@s.i18n>
    <br/>
    testKey: <@s.text name="testKey"/>
    </div>
    
    <hr/>
    
    <div>
      testKey: <@s.text name="testKey"/>
      <br/>
      <@s.form action="sanity" theme="css_xhtml">
        <@s.i18n name="s2.i18n.TestMessages">
        <@s.select
          id="bla"
          label="%{getText('from.test')}"
          list="%{{'item 1', 'item 2'}}"
          name="anyName" />	
        </...@s.i18n>
      </...@s.form>
      <br/>
      testKey: <@s.text name="testKey"/>
    </div>
  </body>
</html>
{code}

I also tried w/o the s.select getting the label via the getText call, just in case, but that didn't change anything.

I tried this both with S2.0.11 and the current trunk (which will be S2.1.1).

Could you try my FTL? I get the appropriate text for all the s.text tags and for the label for the s.select tag.

Thanks :)

      was (Author: newton_dave):
    I still can't dupe this; here's the exact FTL I'm using:

{code:lang=html}
<html>
  <body>
    testKey: <@s.text name="testKey"/>
    <br/>
    from test: <@s.i18n name="s2.i18n.TestMessages"><@s.text name="from.test"/></...@s.i18n>
    <br/>
    testKey: <@s.text name="testKey"/>
    </div>
    
    <hr/>
    
    <div>
      testKey: <@s.text name="testKey"/>
      <br/>
      <@s.form action="sanity" theme="css_xhtml">
        <@s.i18n name="s2.i18n.TestMessages">
        <@s.select
          id="bla"
          label="%{getText('from.test')}"
          list="%{{'item 1', 'item 2'}}"
          name="anyName" />	
        </...@s.i18n>
      </...@s.form>
      <br/>
      testKey: <@s.text name="testKey"/>
    </div>
  </body>
</html>
{code}

I also tried w/o the s.select getting the label via the getText call, just in case, but that didn't change anything.

I tried this both with S2.0.11 and the current trunk (which will be S2.1.1).

Could you try my FTL? I get the appropriate text for all the s.text tags and for the label for the s.select tag.

Thanks :)
  
> @s.i18n kills the Action's I18n keys
> ------------------------------------
>
>                 Key: WW-2539
>                 URL: https://issues.apache.org/struts/browse/WW-2539
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.1.1
>            Reporter: Sami Dalouche
>
> Let's say the current action's properties file (not the global messages.properties one) contains :
> MyAction.properties:
> myKey = "text"
> And the view of the actions contains :
> <@s.text name="myKey" /> <#-- This will work -->
> <@s.i18n name="my.package.MyMessages">
>  <@s.text name="whatever.key" />
> </...@s.i18n>
> <@s.text name="myKey" /> <#-- This won't work -->
> => What happens is that before @s.i18n pushes the properties, everything works as expected, but after the end of the tag, 
> the action i18n keys are not resolvable anymore.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.