[
https://issues.apache.org/jira/browse/JSPWIKI-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12624156#action_12624156
]
Janne Jalkanen commented on JSPWIKI-351:
----------------------------------------
We do strive for backwards compatibility on the jspwiki.properties level, so I
don't think that is a valid argument, and we certainly don't change it very
lightly. I actually think that we should even try and get rid of even this
dependency in 3.0 and make it more robust (I have some ideas about that).
Yes, they are the source. But that does not mean that we need to make their
life even more difficult than what it is now. Stripes is going to allow us to
make cleaner templates, so we can grab the opportunity and make our templating
system even better, not worse. Hacking is not good, if you need to do it every
single time you upgrade just to keep up...
@Validate is meant for the simple cases. We can easily default this to a
particular resourcebundle, and, should we need something more complex, we can
use a @ValidateMethod. In addition, we can pretty easily add a new argument to
@Validate, e.g. "resourceBundle" with just the name.
Our message keys are not stable. Many bugs and almost all new features will
introduce change or introduce new keys. CoreResources seems to have changed on
the average every two weeks for the past year or so.
(I do totally agree on splitting the resourcebundles to separate JAR files
though; the build process is nearly there but not quite.)
> 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.