Closed GoogleCodeExporter closed 8 years ago
A workaround was to copy messages_en_US.properties to messages_en_GB.properties
Original comment by chsnow...@gmail.com
on 2 Oct 2010 at 7:00
Yes, you would need a relevant en_GB properties file if you want to
legitimately use that locale. Regardless, I will look into preventing the
exception.
Original comment by tlees...@gmail.com
on 2 Oct 2010 at 7:19
Chris,
I just tried to reproduce the exception you included in the issue and I wasn't
able to. Please tell me the steps you used as well as whether or not this was
on the local jetty/development server or GAE itself? In my development
environment it seems to be correctly defaulting to en_US when en_GB is not
found.
- Taylor
Original comment by tlees...@gmail.com
on 2 Oct 2010 at 8:09
Chris,
Just saw this piece of the exception: "WARNING: ResourceBundle [messages] not
found for MessageSource: Can't find bundle for base name messages, locale
en_us". Do you still have the en_US properties file as well? en_US is set as
the default in the Spring configuration so it needs to be there or the default
needs to be changed.
Thank you,
Taylor
Original comment by tlees...@gmail.com
on 2 Oct 2010 at 8:11
1) git clone git://github.com/tleese22/google-app-engine-jappstart.git
2) cd google-app-engine-jappstart/
3) mvn gae:unpack
4) mvn clean compile -P local
5) mvn clean gae:run -P local
6) Navigate to: http://localhost:8080/register/create
7) Enter a new Account
Browser displays:
=====
Account created successfully!
Please check your e-mail to activate your account.
=====
My locale:
$ locale
LANG=en_GB.utf8
LC_CTYPE="en_GB.utf8"
LC_NUMERIC="en_GB.utf8"
LC_TIME="en_GB.utf8"
LC_COLLATE="en_GB.utf8"
LC_MONETARY="en_GB.utf8"
LC_MESSAGES="en_GB.utf8"
LC_PAPER="en_GB.utf8"
LC_NAME="en_GB.utf8"
LC_ADDRESS="en_GB.utf8"
LC_TELEPHONE="en_GB.utf8"
LC_MEASUREMENT="en_GB.utf8"
LC_IDENTIFICATION="en_GB.utf8"
LC_ALL=
Original comment by chsnow...@gmail.com
on 5 Oct 2010 at 2:19
So you never actually do a http://localhost:808/anyurl?locale=en_GB to change
the locale? The issue isn't making too much sense to me since I can't reproduce
it and in theory since the default locale configured in Spring is en_US (see
dispatcher-servlet.xml) it should just default to the US English verbiage. I
tried changing the locale via ?locale=en_GB and it defaulted to the en_US text
w/o needing an en_GB properties file.
This part of the exception is also confusing:
org.springframework.context.NoSuchMessageException: No message found under code
'mail.subject' for locale 'en_us'.
...since it would seem to imply that there is no en_US properties file.
Original comment by tlees...@gmail.com
on 5 Oct 2010 at 3:38
Hi Taylor, no I didn't change the locale in the URL.
I have just tried copying the en_US file to en_us:
cp src/main/resources/messages_en_US.properties
src/main/resources/messages_en_us.properties
Having both en_US and en_us files has fixed the problem for me.
I will try and change the system locale later if you still want me to.
Original comment by chsnow...@gmail.com
on 5 Oct 2010 at 6:27
Interesting, doesn't sound like it's the system locale then. Linux does have
case sensitive file names. I suspect that is the problem since I've been
testing on Windows. I will make an update to change the properties files to
lowercase.
Original comment by tlees...@gmail.com
on 5 Oct 2010 at 7:13
Original comment by tlees...@gmail.com
on 5 Oct 2010 at 7:18
Just discovered that lowercase properties files won't work on App Engine. It is
looking for en_US specifically. Which flavor of Linux are you using? I don't
understand why your locale is defaulted to en_us instead of en_US.
Original comment by tlees...@gmail.com
on 5 Oct 2010 at 7:46
I also don't understand how you are about to get through the create account
page with only en_US.properties and why it only fails when sending the e-mail.
Original comment by tlees...@gmail.com
on 5 Oct 2010 at 7:48
I'm running:
Ubuntu 10.04.1 LTS - x86_64 GNU/Linux
Original comment by chsnow...@gmail.com
on 5 Oct 2010 at 5:50
If you can find a fix a patch would be appreciated. It will probably be a while
before I have a chance to setup an Ubuntu image w/ en_GB as the locale and see
if I can reproduce it.
Original comment by tlees...@gmail.com
on 5 Oct 2010 at 5:55
I was able to reproduce this on Ubuntu 10.04.1 LTS - x86_64 with en_GB as the
default system locale. Switching the system locale to en_US fixes the problem.
However, this shouldn't be necessary. The problem is that when the locale is
en_GB it looks for en_us.properties rather than en_US.properties.
Original comment by tlees...@gmail.com
on 7 Oct 2010 at 7:02
Original comment by tlees...@gmail.com
on 8 Oct 2010 at 1:57
Original comment by tlees...@gmail.com
on 25 Oct 2010 at 2:22
Fixed via
https://github.com/tleese22/google-app-engine-jappstart/commit/9960090f07fe43270
de00f185e742ff4e8a66362
Chris - Please confirm.
Original comment by tlees...@gmail.com
on 3 Nov 2010 at 7:25
Original issue reported on code.google.com by
chsnow...@gmail.com
on 2 Oct 2010 at 6:56