[
https://issues.apache.org/jira/browse/JSPWIKI-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659676#action_12659676
]
Andrew Jaquith commented on JSPWIKI-351:
----------------------------------------
Now that I've done a few ActionBeans now in the 3.0 branch, I thought it would
be good to revisit this issue.
My tentative recommendation is that we use read localized message strings from
the same place for all Stripes-related validation methods (that is, methods
that have either @Validate or @ValidationMethod annotations). Practically
speaking, inside of ValidationMethod methods, you'd add error messages by
creating LocalizableErrors, which get their localized messages from wherever we
tell Stripes to look.
So far, I've configured the Stripes web.xml configuration parameter to use the
template default* bundle, just because it was easiest. But we could easily
switch it to use CoreResources, and I think that is probably the right approach
because it would be template-independent. However, we'd need to do some work to
move some of the simple field name stuff into CoreResources as a result.
If we agree, I'll make this change and commit it in the near future.
> 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: 3.0
>
> 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.