-
1. Re: Seam looses internationalization capabilities
gebuh Jun 9, 2012 2:04 PM (in response to gadeyne.bram)have you tried using the english locale? Does it do the same thing?
-
2. Re: Seam looses internationalization capabilities
gadeyne.bram Jun 1, 2012 2:54 AM (in response to gebuh)When it happens again I'll change the browsers locale to english en let you know if it found the english version.
-
3. Re: Seam looses internationalization capabilities
gadeyne.bram Jun 1, 2012 11:27 AM (in response to gebuh)It just happened again. If I change the locale to english the problem persists.
-
4. Re: Seam looses internationalization capabilities
gadeyne.bram Jul 31, 2012 8:37 AM (in response to gadeyne.bram)I still have this problem. What seam component should be responsible for this internationalisation? Maybe I could put a logger on it using a Debug, Fine of Finest log level?
Any ideas?
-
5. Re: Seam looses internationalization capabilities
gebuh Aug 1, 2012 10:29 AM (in response to gadeyne.bram)Bram, can you duplicate this? If so what do you do to make it happen? I don't have any concrete ideas on what could be causing the problem, but I'm wondering is it related to your server load.
-
6. Re: Seam looses internationalization capabilities
gadeyne.bram Aug 1, 2012 1:21 PM (in response to gebuh)Hi Beth,
We'll I'm not sure. I don't think server load could be the problem. Mostly there are only 6 concurrent users.
Could some external program cause this?
Our application is opened from another application that opens a IE browser as a tab in the program. I think its IE version 7. The problem never occured when I open it directly from IE or some other browsers. But when it is opened from this external program this somethimes hapens. I can however not reproduce it because I never know when it is goiing to hapen.
I also know that this external program adds GET parameters to the URL. I don't think this would cause sutch a problem?
Kind regards Bram
-
7. Re: Seam looses internationalization capabilities
gadeyne.bram Aug 23, 2012 4:17 AM (in response to gadeyne.bram)I'm still fasing this issue. Would anyone know how I could debug this? Maybe alter a logging setting or something? Does seam use an external package for the internationalisation? The logging for the org.jboss.seam package does not mention anything about internationalisation.
-
8. Re: Seam looses internationalization capabilities
manarh Aug 23, 2012 6:17 AM (in response to gadeyne.bram)Hey Bram,
why don't you use configuration in components.xml?
For instance like this:
<international:locale-config default-locale="fr_CA" supported-locales="en fr_CA fr_FR"/>
-
9. Re: Seam looses internationalization capabilities
gadeyne.bram Aug 24, 2012 5:19 AM (in response to gadeyne.bram)It seems like I have used jdk6 dependencies where seam 2.2 only supports jdk5.
I've received some feedback on the IRC channel. I'll try these things
-Change jdk6 dependencies back to jdk5
-Change the web_app version van 3.0 to 2.5
-Move back from AS 6 to AS 5
I've also added a messages.properties file next to messages_nl and messages_en as a default properties file.
-
10. Re: Seam looses internationalization capabilities
mkouba Aug 27, 2012 7:06 AM (in response to gadeyne.bram)Hi Bram,
if you get the keys instead of the values it means that there is no value for the given key and locale. In Seam2/JSF app the current locale is derived from JSF calculated value (HTTP Accept-Language header + supported locales...) and from cookie with name "org.jboss.seam.core.Locale" if it exists - see SeamViewHandler#calculateLocale() and LocaleSelector. So maybe the cookie send along with the request is a problem...
There's not much logging in Seam i18n components however you can replace the original components and add your own logging.
I would try something like this...
@Scope(ScopeType.STATELESS) @BypassInterceptors @Name("org.jboss.seam.international.messagesFactory") @Install(precedence = DEPLOYMENT) public class CustomMessages { protected Map createMap() { return new AbstractMap() { ... @Override public String get(Object key) { if (key instanceof String) { String resourceKey = (String) key; String resource; try { resource = bundle.getString(resourceKey); } catch (MissingResourceException mre) { // Log missing resource logger.warn("Missing resource with key: "+mre.getKey+", locale: "+org.jboss.seam.core.Locale.instance());
return resourceKey; } return (resource == null) ? resourceKey : resource; } else { return null; } } ... } } -
11. Re: Seam looses internationalization capabilities
gadeyne.bram Aug 28, 2012 8:16 AM (in response to mkouba)Hi Martin,
Thanks for this solution. I'll give it a try. The translations do work and are available but at some point they just disapear. It's like some process just stops.
-
12. Re: Seam looses internationalization capabilities
gadeyne.bram Aug 28, 2012 8:18 AM (in response to gadeyne.bram)I've tried
-pulling down the jdk version from 6 to 5
-using AS5 server in stead of AS6.
-downgrading the web_app and ejb versions to support jdk5.
This morning however the same issue occured on this new setting. Again without any notice in the log files.
-
13. Re: Seam looses internationalization capabilities
gadeyne.bram Aug 29, 2012 2:58 AM (in response to gadeyne.bram)Like Martin suggested I've added logging to a CustomMessages component. My CustomMessages extends the org.jboss.seam.international.Messages class.
I've writen override methods for createMap and getMessages.
Here I've added logging that checks the requested Locale and counts the messages in the Map generated by org.jboss.seam.international.Messages.
When this problem occurs the count is only 72 while otherwise there are 497 entry's in the map.
I've notices that the org.jboss.seam.international.Messages class uses the SeamResourceBundle class
Those are probably 16 messages from org.hibernate.validator.DefaulValidatorMessages and 56 messages from javax.faces.messages.properties.
Any ideas on what could go wrong?
-
14. Re: Seam looses internationalization capabilities
mkouba Aug 29, 2012 5:56 AM (in response to gadeyne.bram)And I suppose the requested locale is correct, is it? Messages use SeamResourceBundle and in the end java.util.ResourceBundle is used (see ResourceLoader#loadBundle()). Maybe there is some classloading issue. What is the structure of your deployment? (EAR, WAR, etc.)