Bug 3164 - Message tag should process default text in the body as if it were specified as a key value in the bundle file.
Summary: Message tag should process default text in the body as if it were specified a...
Alias: None
Product: Taglibs
Classification: Unclassified
Component: I18N Taglib (show other bugs)
Version: unspecified
Hardware: Macintosh All
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2001-08-19 12:54 UTC by ned
Modified: 2009-07-10 00:33 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
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 

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

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.