[
https://issues.apache.org/jira/browse/JSPWIKI-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12562758#action_12562758
]
Janne Jalkanen commented on JSPWIKI-143:
----------------------------------------
The WikiEngine is not enough, you actually need the WikiContext, because that's
the only way you can figure out what the current user locale is.
Which makes things a bit complicated, as it's a real pain to carry the
WikiContext *everywhere* into any API that *might* have some user-level output.
One option, is of course, to make WikiContext a ThreadLocal, but that kinda
sounds to me like a global variable.
Putting message keys sounds like a better idea; then have a convenience method
in WikiException for getting the localized string. Actually, there's already a
Throwable.getLocalizedMessage()...
> Unlocalized messages in user management
> ---------------------------------------
>
> Key: JSPWIKI-143
> URL: https://issues.apache.org/jira/browse/JSPWIKI-143
> Project: JSPWiki
> Issue Type: Improvement
> Components: Localization
> Affects Versions: 2.6.0
> Reporter: Florian Holeczek
> Priority: Minor
>
> When trying to create a new user with an existing name, the page says: 'The
> login name 'flo' is already taken.'
> I guess it's an Exception from UserManager. It's the same problem with full
> name (a few lines down).
> Maybe there are the following mesages unlocalized, too:
> JDBCUserDatabase:
> throw new DuplicateUserException( "Cannot rename: the login name '" + newName
> + "' is already taken." );
> XMLUserDatabase:
> throw ( new DuplicateUserException( "Cannot rename: the login name '" +
> newName + "' is already taken." ) );
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.