You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Jeromy Evans (JIRA)" <ji...@apache.org> on 2008/04/14 04:56:05 UTC

[jira] Resolved: (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:all-tabpanel ]

Jeromy Evans resolved WW-2539.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.1
         Assignee: Jeromy Evans

The closing I18n tag now throws an exception if it popped an unexpected object from the stack.

The opening tag creates a TextProvider and pushes it.  The closing tag must pop that same TextProvider otherwise:
 - the provider will continue to provide messages outside the tag; and/or
 - unexpected behaviour results as *something* was removed from the stack.

Stack manipulations within the i18n tag are permitted but the stack must be the same on the way in on the way out .

> @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
>            Assignee: Jeromy Evans
>             Fix For: 2.1.1
>
>
> 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.