incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Janne Jalkanen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JSPWIKI-351) Incorrect bundles specified in JSPs
Date Wed, 20 Aug 2008 19:32:44 GMT

    [ https://issues.apache.org/jira/browse/JSPWIKI-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12624105#action_12624105
] 

Janne Jalkanen commented on JSPWIKI-351:
----------------------------------------

When I say "developer", I mean a person who takes the templates, does not really know anything
about JSPWiki, and is able to create new templates based on the existing template code.  Each
template should be a completely separate thing which could be packaged in a JAR file.

When you say "developer", you mean a jspwiki committer/contributor.

These are different goals.  What I am looking for is strong separation of core code and the
templates.  Collapsing all resources into a single file is not separation.

Separation of the core code and the templates unfortunately means that the separation line
is drawn in the middle of the View tier.  Stripes is obviously not designed for this kind
of use and we'll have to think how that is done.

A good example is that if you create a new template called "mytemplate", which holds its keys
on "mytemplate.resources", BUT you only copy a couple of files (say PageContent.jsp and SearchBox.jsp)
and rely on the default template to provide the rest, you would need to ship ALL keys in mytemplate.resources.
And then, when we update the default template, the mytemplate.resources does not contain these
keys, and things look broken.

This means that any external template would be tied to a particular minor revision of JSPWiki.

> 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.


Mime
View raw message