[ http://issues.apache.org/jira/browse/FOR-937?page=all ]
Sjur N. Moshagen updated FOR-937: --------------------------------- Attachment: dispatcher-menutabs-i18n-patch.txt dataModel-tabs.xmap Attachment to make Dispatcher correctly localize menus and tabs. Because of the way I18nTransformation works, I had to move the tabs part to a separate sitemap*). It is mounted by the tabs matching. As far as I can see after initial testing, there are no negative side effects, and Dispatcher now translates all menus and tabs properly. *) I tried keeping the processing within the existing sitemap, but since the menus and the tabs have different translation files, and thus different IDs, only one of them could be the *default* translation cataloge. This meant that I had to specify the catalogue on each i18n element/attribute when using the non-standard catalogue (I chose tabs for this, since it generally has far fewer elements than the menus). I managed to get this to work, by giving the ID as a parameter to the i18n markup transformer for tabs. So it worked - in principle. Since all strings of tabs are kept as attributes, the i18n markup means adding the catalogue ID in front of the original text, such that a tab named 'Project' would become 'tabs:Project'. This is also in principle fine, since it only happens when i18n is turned on in forrest.properties. The bad thing is that I18nTransformer *does NOT remove* this ID prefix on attributes when a translation is not found. Thus, all tabs NOT being translated (because they are named the same in all languages, or because the translation isn't ready, or for some other reason) would be rendered in the final HTML with a string 'tabs:' in front of them. That is just unacceptable. I guess the standard, non-dispatcher processing of tabs (and menus) is done in separate sitemaps for exactly the same reason. > Menus and Tabs not localized in Dispatcher > ------------------------------------------ > > Key: FOR-937 > URL: http://issues.apache.org/jira/browse/FOR-937 > Project: Forrest > Issue Type: Bug > Components: Dispatcher (aka views), Internationalisation (i18n) > Affects Versions: 0.8-dev > Reporter: Sjur N. Moshagen > Attachments: dataModel-tabs.xmap, dispatcher-menutabs-i18n-patch.txt > > > When running Forrest using the Dispatcher, menus and tabs are not localized > although they are when running without Dispatcher. This is caused by a > missing configuration of the I18nTransformer in the relevant Dispatcher > sitemap. > Patch follows. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira