You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jspwiki.apache.org by Roland Whitehead <ro...@quru.com> on 2009/04/17 10:14:40 UTC

Where are messages stored?

I have been asked to change the "G'day" in the user box to something  
less antipodean. I know that it is stored in fav.greet.anonymous,  
fav.greet.asserted and fav.greet.authenticated but where do I edit  
their values?

TIA

Roland
-- 
QURU Ltd, Somerset House, Strand, London, WC2R 1LA, United Kingdom

Re: Where are messages stored?

Posted by Harry Metske <ha...@gmail.com>.
you can file a JIRA issue for this at
https://issues.apache.org/jira/browse/JSPWIKI

Harry

2009/4/17 Mike Morris <mi...@gmail.com>

> Janne Jalkanen wrote:
>
>>
>> Yeah.. Been wondering if it would make sense to have a separate jar file
>> for the i18n files.
>>
>
> Even better IMHO would be to have them unpacked, since they also define
> some things that a customiser /might/ want to change -- icons, etc. It's not
> really "user" level stuff, but it certainly falls under the sphere of
> interest of a "site maintainer". But next best would certainly be a separate
> jar... :-)
>
> --
> mike morris :: mikro2nd (at) gmail (dot) com
>
> http://mikro2nd.net/
> http://mikro2nd.net/blog/planb/
> http://mikro2nd.net/blog/mike/
>
> This email is [X]bloggable [ ]ask-first [ ]private
>
>

Re: Where are messages stored?

Posted by Janne Jalkanen <ja...@ecyrd.com>.
Very good point; I had forgotten about the class resolution order.   
Yeah, I believe this would be a nice solution to all; no need to zip  
anything back together.

/Janne

On 18 Apr 2009, at 09:56, lgilardoni61@gmail.com wrote:

> Janne, I agree with you. Moreover given that (at least in tomcat  
> 5.5, but i believe in general) class loading order is
>
>   * //WEB-INF/classes/ of your web application first
>   * //WEB-INF/lib/*.jar/ of your web application later
>
> so, if someone needs to modify a localized version for any reason,  
> he/she can simply extract the relevant file from the bundle and  
> leave it directly into classes.
> If a new version come, it has simply to be checked variations  
> against modified version; or drop it to see 'default' behaviour. And  
> the 'normal' user would had to
> do nothing.
>
> Luca
>
>
> Janne Jalkanen ha scritto:
>>>
>>> I agree with Harry. My only difficulty was finding out what was  
>>> needed. Why not have the templates directory in /WEB-INF/classes  
>>> by default on install but have all the values commented out. Then,  
>>> should anyone want to make changes, they simply have to find the  
>>> right one, uncomment the line, edit it and they are away! Leave  
>>> the default values in JSPWiki.jar.
>>
>> A good reason to keep them out of /classes/ is the difficulty of  
>> upgrading. For example, we might reshuffle keys from one property  
>> file to another (we've done this) or introduce new property files.  
>> This would make upgrades yet a bit more difficult, since these  
>> would become yet another configuration file to be merged.  In  
>> addition, they would be the burden of *everyone*, even those who do  
>> not wish to change any localization.
>>
>> It's better to have few bigger files than a lot of small files when  
>> upgrading...
>>
>> So in short, I'm worried about the overall maintenance overhead  
>> this would cause people, which might not be worth the while  
>> considering how rarely people need to change them.
>>
>> /Janne
>


Re: Where are messages stored?

Posted by "lgilardoni61@gmail.com" <lg...@gmail.com>.
Janne, I agree with you. Moreover given that (at least in tomcat 5.5, 
but i believe in general) class loading order is

    * //WEB-INF/classes/ of your web application first
    * //WEB-INF/lib/*.jar/ of your web application later

so, if someone needs to modify a localized version for any reason, 
he/she can simply extract the relevant file from the bundle and leave it 
directly into classes.
If a new version come, it has simply to be checked variations against 
modified version; or drop it to see 'default' behaviour. And the 
'normal' user would had to
do nothing.

Luca


Janne Jalkanen ha scritto:
>>
>> I agree with Harry. My only difficulty was finding out what was 
>> needed. Why not have the templates directory in /WEB-INF/classes by 
>> default on install but have all the values commented out. Then, 
>> should anyone want to make changes, they simply have to find the 
>> right one, uncomment the line, edit it and they are away! Leave the 
>> default values in JSPWiki.jar.
>
> A good reason to keep them out of /classes/ is the difficulty of 
> upgrading. For example, we might reshuffle keys from one property file 
> to another (we've done this) or introduce new property files. This 
> would make upgrades yet a bit more difficult, since these would become 
> yet another configuration file to be merged.  In addition, they would 
> be the burden of *everyone*, even those who do not wish to change any 
> localization.
>
> It's better to have few bigger files than a lot of small files when 
> upgrading...
>
> So in short, I'm worried about the overall maintenance overhead this 
> would cause people, which might not be worth the while considering how 
> rarely people need to change them.
>
> /Janne


Re: Where are messages stored?

Posted by Andrew Jaquith <an...@gmail.com>.
Yes, but remember that BundleMigrator is your friend. :)

Point taken though.

On Fri, Apr 17, 2009 at 3:35 PM, Janne Jalkanen
<ja...@ecyrd.com> wrote:
>>
>> I agree with Harry. My only difficulty was finding out what was needed.
>> Why not have the templates directory in /WEB-INF/classes by default on
>> install but have all the values commented out. Then, should anyone want to
>> make changes, they simply have to find the right one, uncomment the line,
>> edit it and they are away! Leave the default values in JSPWiki.jar.
>
> A good reason to keep them out of /classes/ is the difficulty of upgrading.
> For example, we might reshuffle keys from one property file to another
> (we've done this) or introduce new property files. This would make upgrades
> yet a bit more difficult, since these would become yet another configuration
> file to be merged.  In addition, they would be the burden of *everyone*,
> even those who do not wish to change any localization.
>
> It's better to have few bigger files than a lot of small files when
> upgrading...
>
> So in short, I'm worried about the overall maintenance overhead this would
> cause people, which might not be worth the while considering how rarely
> people need to change them.
>
> /Janne

Re: Where are messages stored?

Posted by Janne Jalkanen <ja...@ecyrd.com>.
>
> I agree with Harry. My only difficulty was finding out what was  
> needed. Why not have the templates directory in /WEB-INF/classes by  
> default on install but have all the values commented out. Then,  
> should anyone want to make changes, they simply have to find the  
> right one, uncomment the line, edit it and they are away! Leave the  
> default values in JSPWiki.jar.

A good reason to keep them out of /classes/ is the difficulty of  
upgrading. For example, we might reshuffle keys from one property file  
to another (we've done this) or introduce new property files. This  
would make upgrades yet a bit more difficult, since these would become  
yet another configuration file to be merged.  In addition, they would  
be the burden of *everyone*, even those who do not wish to change any  
localization.

It's better to have few bigger files than a lot of small files when  
upgrading...

So in short, I'm worried about the overall maintenance overhead this  
would cause people, which might not be worth the while considering how  
rarely people need to change them.

/Janne

Re: Where are messages stored?

Posted by Roland Whitehead <ro...@quru.com>.
On 17 Apr 2009, at 19:19, Harry Metske wrote:

> why would you want to enable/disable localizations ?
> having the i18n files plain in WEB-INF/classes is much easier if you  
> want to
> customize them, just edit them (no unjarring/jarring)

I agree with Harry. My only difficulty was finding out what was  
needed. Why not have the templates directory in /WEB-INF/classes by  
default on install but have all the values commented out. Then, should  
anyone want to make changes, they simply have to find the right one,  
uncomment the line, edit it and they are away! Leave the default  
values in JSPWiki.jar.


Roland
-- 
QURU Ltd, Somerset House, Strand, London, WC2R 1LA, UK


Re: Where are messages stored?

Posted by Harry Metske <ha...@gmail.com>.
why would you want to enable/disable localizations ?
having the i18n files plain in WEB-INF/classes is much easier if you want to
customize them, just edit them (no unjarring/jarring)

Harry

2009/4/17 Janne Jalkanen <ja...@ecyrd.com>

>
>>> Yeah.. Been wondering if it would make sense to have a separate jar file
>>> for the i18n files.
>>>
>>
>> Even better IMHO would be to have them unpacked, since they also define
>> some things that a customiser /might/ want to change -- icons, etc. It's not
>> really "user" level stuff, but it certainly falls under the sphere of
>> interest of a "site maintainer". But next best would certainly be a separate
>> jar... :-)
>>
>
>
> Dealing with multiple files is always a pain - a separate JAR file for each
> language sounds a bit better to me. That way you can enable/disable
> localizations simply by adding/removing JAR files.
>
> /Janne

Re: Where are messages stored?

Posted by Janne Jalkanen <ja...@ecyrd.com>.
>>
>> Yeah.. Been wondering if it would make sense to have a separate jar  
>> file for the i18n files.
>
> Even better IMHO would be to have them unpacked, since they also  
> define some things that a customiser /might/ want to change --  
> icons, etc. It's not really "user" level stuff, but it certainly  
> falls under the sphere of interest of a "site maintainer". But next  
> best would certainly be a separate jar... :-)


Dealing with multiple files is always a pain - a separate JAR file for  
each language sounds a bit better to me. That way you can enable/ 
disable localizations simply by adding/removing JAR files.

/Janne

Re: Where are messages stored?

Posted by Mike Morris <mi...@gmail.com>.
Janne Jalkanen wrote:
> 
> Yeah.. Been wondering if it would make sense to have a separate jar file 
> for the i18n files.

Even better IMHO would be to have them unpacked, since they also define 
some things that a customiser /might/ want to change -- icons, etc. It's 
not really "user" level stuff, but it certainly falls under the sphere 
of interest of a "site maintainer". But next best would certainly be a 
separate jar... :-)

-- 
mike morris :: mikro2nd (at) gmail (dot) com

http://mikro2nd.net/
http://mikro2nd.net/blog/planb/
http://mikro2nd.net/blog/mike/

This email is [X]bloggable [ ]ask-first [ ]private


Re: Where are messages stored?

Posted by Janne Jalkanen <ja...@ecyrd.com>.
Yeah.. Been wondering if it would make sense to have a separate jar  
file for the i18n files.

And ain't nothing wrong with being from down under (but that's just my  
personal opinion) ;-)

/Janne

On 17 Apr 2009, at 17:07, Harry Metske wrote:

> The i18n files are not meant to be customized by people using  
> JSPWiki, it is
> a mechanism to facilitate multiple languages, and not to (on site)  
> customize
> all message strings, but you can do it of course.
> So the procedure you describe is basically correct, I can't think of  
> an
> easier way.
>
> /Harry
>
> 2009/4/17 Roland Whitehead <ro...@quru.com>
>
>> OK, delve a little deeper before asking and you might fix it  
>> yourself.
>>
>> Perhaps someone can say if this method is wrong but it works for  
>> me. Please
>> note that this is using Tomcat. Apparently (so my application  
>> server expert
>> tells me) this might not work in JBoss or Glassfish.
>>
>> In WEB-INF/classes create a directory called "templates"
>>
>> Copy JSPWiki.jar from WEB-INF/lib and from it extract copies of
>> /templates/default.properties and /templates/default_en.properties  
>> (assuming
>> that you are only changing the English version - use the appropriate
>> language for your situation) and put them in your new
>> WEB-INF/classes/templates directory. Edit those files with your  
>> favourite
>> text editor and finally restart JSPWiki.
>>
>> I used JarInspector on OS X to extract the files from JSPWiki.jar  
>> but you
>> could have just used zip. I did it all using root (sudo'd)  
>> permissions but
>> that probably wasn't necessary.
>>
>> Can't find much on JSPWiki.org re Internationalisation or  
>> customising these
>> values. If I should add this, perhaps someone could let me know.
>>
>>
>> Roland
>> --
>> QURU Ltd, Somerset House, Strand, London, WC2R 1LA, United Kingdom
>>
>> On 17 Apr 2009, at 09:14, I wrote:
>>
>> I have been asked to change the "G'day" in the user box to  
>> something less
>>> antipodean. I know that it is stored in fav.greet.anonymous,
>>> fav.greet.asserted and fav.greet.authenticated but where do I edit  
>>> their
>>> values?
>>>
>>> TIA
>>>
>>> Roland
>>> --
>>> QURU Ltd, Somerset House, Strand, London, WC2R 1LA, United Kingdom
>>>
>>


Re: Where are messages stored?

Posted by Harry Metske <ha...@gmail.com>.
The i18n files are not meant to be customized by people using JSPWiki, it is
a mechanism to facilitate multiple languages, and not to (on site) customize
all message strings, but you can do it of course.
So the procedure you describe is basically correct, I can't think of an
easier way.

/Harry

2009/4/17 Roland Whitehead <ro...@quru.com>

> OK, delve a little deeper before asking and you might fix it yourself.
>
> Perhaps someone can say if this method is wrong but it works for me. Please
> note that this is using Tomcat. Apparently (so my application server expert
> tells me) this might not work in JBoss or Glassfish.
>
> In WEB-INF/classes create a directory called "templates"
>
> Copy JSPWiki.jar from WEB-INF/lib and from it extract copies of
> /templates/default.properties and /templates/default_en.properties (assuming
> that you are only changing the English version - use the appropriate
> language for your situation) and put them in your new
> WEB-INF/classes/templates directory. Edit those files with your favourite
> text editor and finally restart JSPWiki.
>
> I used JarInspector on OS X to extract the files from JSPWiki.jar but you
> could have just used zip. I did it all using root (sudo'd) permissions but
> that probably wasn't necessary.
>
> Can't find much on JSPWiki.org re Internationalisation or customising these
> values. If I should add this, perhaps someone could let me know.
>
>
> Roland
> --
> QURU Ltd, Somerset House, Strand, London, WC2R 1LA, United Kingdom
>
> On 17 Apr 2009, at 09:14, I wrote:
>
>  I have been asked to change the "G'day" in the user box to something less
>> antipodean. I know that it is stored in fav.greet.anonymous,
>> fav.greet.asserted and fav.greet.authenticated but where do I edit their
>> values?
>>
>> TIA
>>
>> Roland
>> --
>> QURU Ltd, Somerset House, Strand, London, WC2R 1LA, United Kingdom
>>
>

Re: Where are messages stored?

Posted by Roland Whitehead <ro...@quru.com>.
OK, delve a little deeper before asking and you might fix it yourself.

Perhaps someone can say if this method is wrong but it works for me.  
Please note that this is using Tomcat. Apparently (so my application  
server expert tells me) this might not work in JBoss or Glassfish.

In WEB-INF/classes create a directory called "templates"

Copy JSPWiki.jar from WEB-INF/lib and from it extract copies of / 
templates/default.properties and /templates/default_en.properties  
(assuming that you are only changing the English version - use the  
appropriate language for your situation) and put them in your new WEB- 
INF/classes/templates directory. Edit those files with your favourite  
text editor and finally restart JSPWiki.

I used JarInspector on OS X to extract the files from JSPWiki.jar but  
you could have just used zip. I did it all using root (sudo'd)  
permissions but that probably wasn't necessary.

Can't find much on JSPWiki.org re Internationalisation or customising  
these values. If I should add this, perhaps someone could let me know.


Roland
-- 
QURU Ltd, Somerset House, Strand, London, WC2R 1LA, United Kingdom

On 17 Apr 2009, at 09:14, I wrote:

> I have been asked to change the "G'day" in the user box to something  
> less antipodean. I know that it is stored in fav.greet.anonymous,  
> fav.greet.asserted and fav.greet.authenticated but where do I edit  
> their values?
>
> TIA
>
> Roland
> -- 
> QURU Ltd, Somerset House, Strand, London, WC2R 1LA, United Kingdom