Bug 3164

Summary: Message tag should process default text in the body as if it were specified as a key value in the bundle file.
Product: Taglibs Reporter: ned
Component: I18N TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED WONTFIX    
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: All   

Description ned 2001-08-19 12:54:35 UTC
For internationalizing web pages, it would be preferable to process the default 
text in the message tag body to expand and appropriately format all message 
arguments.  This would enable round-trip testing during development by the web 
page developer without having to introduce them to message bundles.  (Of 
course, they would still have to learn the i18n tags and the message argument 
formatting syntax.)  This also ensures that a default "locale" is always 
present so long as default text is provided.  Message bundles may then be 
reserved for specific localizations.

Also, there should be a way to suppress the exception thrown when a bundle file 
is not found.  When the message tag default text is adequate for the "default" 
locale during development and, possibly, during initial launch, a redundant or 
empty bundle file should not be required.

The current work-around is to type something like the following into the web 
page:

<% Double D = new Double( 123456789.987654321 ); %>
<i18n:message key="number">
  <i18n:messageArg value="<%= D %>" />
  Number = <i18n:formatNumber value="<%= D %>" pattern="#,###.###" />
</i18n:message>

Then the bundle file must exist and either not define a "number" key or contain:

number=Number = {0,number,#,###.###}

If nothing else, this just complicates the extraction of message tag default 
text to generate a bundle file.
Comment 1 Henri Yandell 2009-07-10 00:33:13 UTC
JSTL replaced the i18n taglib, so this won't be worked on.