- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 08 Oct 2009 11:14:45 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/action In directory hutz:/tmp/cvs-serv2413/src/org/w3c/unicorn/action Modified Files: Action.java Log Message: fixed NPE in case the requested language code is valid be not installed on the system Index: Action.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/Action.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- Action.java 6 Oct 2009 10:06:13 -0000 1.17 +++ Action.java 8 Oct 2009 11:14:43 -0000 1.18 @@ -75,9 +75,12 @@ if (langParameter != null && !Framework.getLanguageProperties().containsKey(langParameter)) { if (Language.isISOLanguageCode(langParameter)) { Locale locale = Language.getLocale(langParameter); - if (locale == null) + if (locale == null) { logger.warn("Missing locale: " + langParameter + ". This locale should be installed on the system in order to translate Unicorn in this language."); - messages.add(new Message(Message.INFO, "$message_unavailable_requested_language", null, locale.getDisplayLanguage(locale))); + messages.add(new Message(Message.INFO, "$message_unavailable_requested_language", null, "locale not installed")); + } + else + messages.add(new Message(Message.INFO, "$message_unavailable_requested_language", null, locale.getDisplayLanguage(locale))); } else { messages.add(new Message(Message.INFO, "$message_invalid_requested_language", null, langParameter)); }
Received on Thursday, 8 October 2009 11:14:47 UTC