- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 07 Oct 2009 12:49:32 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/util In directory hutz:/tmp/cvs-serv29843/src/org/w3c/unicorn/util Modified Files: Language.java Log Message: improved performance if a string does not contain any dynamic parameters (ex: "%1") Index: Language.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/util/Language.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Language.java 6 Oct 2009 10:02:46 -0000 1.8 +++ Language.java 7 Oct 2009 12:49:30 -0000 1.9 @@ -101,6 +101,13 @@ return messageKey; String message = Framework.getLanguageProperties().get(lang).getProperty(messageKey.replace("$", "")); + + if (message == null) + return messageKey; + + if (!message.contains("%")) + return message; + String result = message; int i = 1; if (args == null)
Received on Wednesday, 7 October 2009 12:49:36 UTC