[
https://issues.apache.org/jira/browse/JSPWIKI-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12624158#action_12624158
]
Janne Jalkanen commented on JSPWIKI-351:
----------------------------------------
I've always found most PHP app template hacks to be distasteful, to be frank.
If you change something, trying to get it to work with the next version is a
bit of a problem.
Since we already consider Wiki.jsp et al to be a part of the controller
framework, that code will move to ActionBeans. And that means that the code in
the View tier is already in the templates/xxx files. Which is also where the
resources are (default.properties).
The problem is that our controller will return information visible to the user
(e.g. exceptions and errors). And this makes them partly Controllers and
partly View. Which in turn means that you need to split the bundles somewhere.
At the moment the choice is that "if it's under templates, it's a part of the
template resource bundle. If it's not in the templates, it's in the core
resources." It's fairly clear, I think.
> Incorrect bundles specified in JSPs
> -----------------------------------
>
> Key: JSPWIKI-351
> URL: https://issues.apache.org/jira/browse/JSPWIKI-351
> Project: JSPWiki
> Issue Type: Bug
> Components: Default template
> Affects Versions: 2.8
> Environment: All
> Reporter: Andrew Jaquith
> Fix For: 2.8
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> i18n strings are improperly stored in CoreResources_*.properties, when they
> should have been specified in templates/default_*.properties. The comments at
> the top of CoreResources specifies that messages are for "JSPWiki internal
> code, the so-called core code." But these JSPs all look up and use message
> strings from CoreResources:
> * Comment.jsp
> * Install.jsp
> * LostPassword.jsp
> * NewGroup.jsp
> * Rename.jsp
> Example:
> // Weepy tears and hankies all 'round.
> if( wikiSession.isAuthenticated() )
> {
> response.sendError( HttpServletResponse.SC_FORBIDDEN,
> rb.getString("login.error.noaccess") );
> return;
> }
> This is clearly a template/JSP-level error message, NOT an internal error.
> And similar kinds of code are sprinked all over the other JSPs.
> I recommend we consolidate default.properties and CoreResources.properties.
> The easiest way would simply be to concatenate the files. Then, in
> WikiContext.getBundle(), any requests for "CoreResources" could be simply
> diverted to default.properties.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.