Hi Martin/Greg

I am currently dealing with a similar (or same) issue. E.g. the PageMVCHandler has a similar setting (private String i18nBasename = MessagesManager.DEFAULT_BASENAME;). But since PageMVCHandler is an abstract class and I have to "extend" it anyway, my workaround is to overwrite the "setter" method.

The challenge is that for development purposes I have different projects running in the same context, which have different language base files. So I am thinking of a "smart" way to configure/identify the correct message basename for each project. There are several options, even one moving the language specific files into the repository. Currently I started looking at a "module configuration" for the base name and a filter to set the base name as an attribute. However I do not really like to fummel around on every request just to add a basename which will most likely be already there...

Once I get more time I will dig into this issue. But of course I gladly share ideas and concepts and work out a solution.

Cheers
Giancarlo

On Jan 7, 2009, at 10:45 AM, Grégory Joseph wrote:


Hey Martin,

I allowed myself to set you as the reporter on MAGNOLIA-2488 - please let us know if the fix solves your issue !

Cheers,

-greg

On Nov 26, 2008, at 9:36 AM, Martin Algesten wrote:



Hi,

I mailed on the user list about my <fmt:message> tags getting shafted when introducing Magnolia in my already existing webapp. I want to work out a fix, but thought it best to discuss it first.

The problem is MessagesManager.init() row 150:

context.setAttribute(Config.FMT_LOCALIZATION_CONTEXT, MessagesManager.DEFAULT_BASENAME);

This sets the basename to 'info.magnolia.module.admininterface.messages' for the whole webapp, not just Magnolia (magnolia-core having a reference to admininterface is perhaps untidy in itself).

This could be solved using the same principles as <fmt:bundle> <fmt:setBundle>. Basically rather than setting the basename for the whole webapp, we can set the basename for the page being rendered. Looking at the pages we have statements like:

${this.messages.get("central.bugFeatureRequest")}

The solution I would try to work out would make sure this.messages is set appropriately just when rendering the admin interface pages, rather than being something default for the webapp and then remove the context.setAttribute(). Sounds reasonable?

Martin


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------




----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to