dev@glassfish.java.net

Re: Message ids for strings in resource bundles

From: Yamini K B <Yamini.Kb_at_Sun.COM>
Date: Tue, 22 Jun 2010 10:25:31 +0530

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