dev@glassfish.java.net

Re: Message ids for strings in resource bundles

From: Chris Kasso <chris.kasso_at_oracle.com>
Date: Wed, 23 Jun 2010 11:05:18 -0700

There appears to have been an effort to associate message ID's to error
messages. These are documented in a few places:

http://wiki.glassfish.java.net/Wiki.jsp?page=GlassFishV3ErrorMessageReference

http://docs.sun.com/app/docs/doc/820-7700/gjkaj?a=view

I think the practice should continue and folks should try to provide a
solution to be included in the docs where practical as well.

What's not clear to me is who is responsible for the message ID
namespace (each module?) and what process is used to communicate new
messages and solutions to the doc folks.

Chris

Yamini K B wrote:
>
>> I don't know the exact use of those strings, but I do know that e.g.
>> in CMP we had partial strings that were inserted/appended to the
>> message with ID. In those cases only 1 id would be useful.
> Message ids are mainly for identifying messages in non-English
> locales. In v2, we followed a standard pattern, like CLIxxx for cli
> messages, CORExxx for core messages, SECxxx for security messages...
>
> I don't know if messages are localized at all in v3.
>
> -Yamini
>>
>> My $.02.
>> -marina
>>
>> Yamini K B wrote:
>>> Hi,
>>>
>>> I see that we don't follow any pattern for message strings in
>>> LocalStrings.properties. For ex, see these strings:
>>>
>>> UsingDefaultPort=Using default port {1} for {0}.
>>> MutuallyExclusiveOption=CLI169 Options {0} and {1} are mutually
>>> exclusive. You must specify one or the other but not both.
>>> PortPrivilege=On Unix platforms, port numbers below 1024 may require
>>> special privileges.
>>> PasswordMissing=Value for {0} was not specified.
>>> PasswordLimit=CLI128 Value for {0} must have 8 or more characters.
>>>
>>> Shouldn't we be using message ids for all the messages?
>>>
>>> I'm writing these dev tests where I want to parse the command
>>> output/error for negative test cases. If message ids are used, it
>>> won't break the test if the message string changed tomorrow.
>>>
>>> Any comments?
>>>
>>> Thanks,
>>> -Yamini
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net For
>>> additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>