|
From: Tony F. <ton...@ya...> - 2003-03-15 07:00:07
|
One of the signatures of the overloads to the MessageSource interface will look like this:
String getMessage(String code, Locale locale, Object args[], String defaultMessage);
Currently the code I have will substitute the args parameter into the message it finds from the associated MessageSource class's resolve function. What it does not do, is substitute in the args into the defaultMessage param. So the caller of this method must "fill in all the args" when they create the value to place within the defaultMessage. Is this the behavior you'd like?
My opinion is to have the method internally fill in the arg values for the user the same way. (Also makes it easier for the developer to just copy and paste what they've put into the file that is storing the messages if they wish to pass it as a defaultMessage.)
|