Issue 201: English resources bundle messages are not available in JMesa
Status:  Fixed
Owner: ----
Closed:  Jul 2009
Reported by vbere...@gmail.com, Jun 23, 2009
What steps will reproduce the problem?
1. Have your JVM with default locale set to French for example (something
different than english US/EN)
2. Create a TableFacade and force WebContext Locale to Locale.US
3. Render the table, the messages are in french

What is the expected output? What do you see instead?
The messages in the table are expected to be in english US, not in french.

What version of the product are you using? On what operating system?
2.4.2 and 2.4.3. On Linux/Windows


Please provide any additional information below.
There is no resourcesBundle for en_US and en_EN.
If you look at
http://java.sun.com/j2se/1.4.2/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String,%20java.util.Locale),
the default Locale is used before the resourceBundle with no Locale. So in
this case, if the default is French, and the webContext's Locale is US, it
will always get the French one because it doesn't find the US one.

To Fix this issue :
Create a 
org/jmesa/core/message/resource/jmesaResourceBundle_en_US.properties
and
org/jmesa/core/message/resource/jmesaResourceBundle_en_EN.properties


Jun 23, 2009
Project Member #1 jeff.johnston.mn@gmail.com
Good point! I will be sure to do this. What is the en_EN? I think we would just need
en_US.

If you want I could even do this and make a build for you. If that sounds good just
email me at jeff.johnston.mn@gmail.com.
Jun 24, 2009
#2 vbere...@gmail.com
Hi,
en_EN is english for England whereas en_US is english for US.
The better solution is to create a
org/jmesa/core/message/resource/jmesaResourceBundle_en.properties if there is no
differences between english and american.
No need for a special release thanks :)
I've added the file to my application classpath and it is working fine for now.
Thanks.

Jul 3, 2009
Project Member #3 jeff.johnston.mn@gmail.com
I have the changes applied to the trunk!
Status: Fixed
Sep 3, 2009
#4 todd.m.o...@gmail.com
Hi,

Have tested 2.4.4 and this problem still occurs if the WebContext's locale is some
other English locale other than en_US (e.g. "en_AU", or even generic "en"). I would
agree with @vberetti's suggestion of renaming the file to just
jmesaResourceBundle_en.properties, as this will be matched by all English locales:
en, en_US, en_AU, etc.

Also, a technique that I've used in the past is to put the default messages in the
base file NAME.properties, and then create an empty file NAME_en.properties (well,
empty except for a comment explaining why it is empty!). Because the messages are not
found in NAME_en.properties, they will be taken from the base file instead, thus
avoiding redundancy.