Re: using Resource Bundles for message strings

2008-03-05 Thread B.J. Reed
ok. We'll use simple phrases as keys for the properties strings. I haven't been clear about what the numbering scheme is for. My concern isn't for collisions in the code, it's really for collisions and ease of finding info when a user asks "I'm getting message xxx, what do I need to do about

Re: using Resource Bundles for message strings

2008-03-03 Thread Alan D. Cabrera
Jarek's statements reflect my own sentiments as well. To address your concern about key collisions, I don't think that it will happen if modules get their own resource file. It was never a problem for me. Regards, Alan On Feb 27, 2008, at 7:57 AM, B.J. Reed wrote: Thanks, each plugin/mo

Re: using Resource Bundles for message strings

2008-03-03 Thread Alan D. Cabrera
On Feb 26, 2008, at 7:30 AM, B.J. Reed wrote: I have written a patch to get Geronimo messages from a common set of resource bundles. Included in the patch is the GeronimoMessageBundle.java, GeronimoMessageBundleTest.java, and the start of the geronimo-messages.properties file. Neat! 2

Re: using Resource Bundles for message strings

2008-02-27 Thread B.J. Reed
Thanks, each plugin/module will have its own resource file in the plugin/module jar now. The MessageFormat and varargs were very helpful. The code is much simpler now. For the message keys, I'm just looking for some way to have a unique naming scheme and the group id/module/abbreviations sh

Re: using Resource Bundles for message strings

2008-02-26 Thread Jarek Gawor
Some thoughts: 1) Each module or plugin should have its own resource file. 2) Messages should be formatted using java.text.MessageFormat. The substitution arguments should be arbitrary objects (not just strings) and should be passed using varargs. 3) As soon as we encode the module or group id i

Re: using Resource Bundles for message strings

2008-02-26 Thread B.J. Reed
I will implement both suggestions for the message key naming convention: Dan's idea to move the I/E/W to the end to make it stand out more and Donald's use the groupid + abbreviated class name for the prefix. I'll also use Dan's suggestion to remove the key from the message in the .properties

Re: using Resource Bundles for message strings

2008-02-26 Thread Donald Woods
Wasn't clear, but are you proposing a properties files per module? If not, then placing all of the possible strings in one common file will become a nightmare to maintain and breaks from our plugin architecture. As far as the message prefix, how about using an abbreviated maven artifact group

Re: using Resource Bundles for message strings

2008-02-26 Thread Dan Becker
Hey B.J., I think this is a great beginning, and it will go a long way to creating a robust and internationalized server. I can provide a couple of answers/comments to your questions. B.J. Reed wrote: Questions/Answers 2) Is there a numbering standard for the key? The standard that I have