mraible wrote:
I tried [EMAIL PROTECTED] value="text('key')"/] and that doesn't seem to work
either. I don't have a struts.xml or struts.properties in my project. I
tried putting the i18n bundle in all packages using it at the Action level
(ActionName.properties), but that didn't work either. Creating a
src/main/resources/struts.properties with the following in it is the only
thing that seems to work.

struts.custom.i18n.resources=messages

And then putting my keys in src/main/resources/messages.properties.

AFAICT, i18n bundles at the action/package level seems to be completely
broken in 2.1.1.

Matt


Sorry Matt, I can't replicate this issue.

I created a freemarker decorator that uses @s.text and it was able to find:
- resources in the global resource bundle (specified via struts.custom.i18n.resources) - resources in the named resource bundle when contained within an @s.i18n tag
- resources in the actionName.properties resource bundle
- resources in the package.properties resource bundle

I used each technique one at at a time, inside and outside a decorator and in both FTL and JSP. My test action extended ActionSupport for the TextProvider.
However, I'm am still convinced there's a problem. A possible scenario:
- getText matches the first TextProvider found in the value stack. Not the first TextProvider providing the requested key. - some operations can push another TextProvider onto the stack (in front of the action). The i18n tag does this. - there are cases where the alternate TextProvider is not popped off the stack (see https://issues.apache.org/struts/browse/WW-2539)

I've started cleaning up the implementation to isolate it. See my post in struts-dev.

regards,
Jeromy Evans

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to