- From: Mercurial notifier <nobody@w3.org>
- Date: Fri, 27 Mar 2015 11:01:25 +0000
- To: Unicorn Updates <www-validator-cvs@w3.org>
changeset: 1744:b75428b32d78 tag: tip user: Jean-Guilhem Rouel <jean-gui@w3.org> date: Fri Mar 27 12:01:12 2015 +0100 files: src/org/w3c/unicorn/action/Action.java description: remove warning if translation incomplete or unavailable diff -r f5547924f714 -r b75428b32d78 src/org/w3c/unicorn/action/Action.java --- a/src/org/w3c/unicorn/action/Action.java Fri Mar 27 11:53:51 2015 +0100 +++ b/src/org/w3c/unicorn/action/Action.java Fri Mar 27 12:01:12 2015 +0100 @@ -70,7 +70,9 @@ parameterLocale = Language.getAvailableLocale(langParameter); matchedLocale = Language.getUILocale(langParameter); if (messages != null && parameterLocale != matchedLocale) { - messages.add(new Message(Message.INFO, "$message_unavailable_requested_language", null, parameterLocale.getDisplayName(parameterLocale), "?" + Property.get("UNICORN_PARAMETER_PREFIX") + "lang=" + parameterLocale.getName())); + if ("true".equals(Property.get("ENABLE_TRANSLATION_CONTRIBS"))) { + messages.add(new Message(Message.INFO, "$message_unavailable_requested_language", null, parameterLocale.getDisplayName(parameterLocale), "?" + Property.get("UNICORN_PARAMETER_PREFIX") + "lang=" + parameterLocale.getName())); + } return matchedLocale; } } else { @@ -82,14 +84,16 @@ } if (messages != null && browserLocale != matchedLocale) { - messages.add(new Message(Message.INFO, "$message_unavailable_language", null, browserLocale.getDisplayName(browserLocale), "?" + Property.get("UNICORN_PARAMETER_PREFIX") + "lang=" + browserLocale.getName())); - return matchedLocale; + if ("true".equals(Property.get("ENABLE_TRANSLATION_CONTRIBS"))) { + messages.add(new Message(Message.INFO, "$message_unavailable_language", null, browserLocale.getDisplayName(browserLocale), "?" + Property.get("UNICORN_PARAMETER_PREFIX") + "lang=" + browserLocale.getName())); + } + return matchedLocale; } } - if (messages != null && !Language.isComplete(matchedLocale)) + if ("true".equals(Property.get("ENABLE_TRANSLATION_CONTRIBS")) && messages != null && !Language.isComplete(matchedLocale)) { messages.add(new Message(Message.INFO, "$message_incomplete_language", null, "", "?" + Property.get("UNICORN_PARAMETER_PREFIX") + "lang=" + matchedLocale.getName())); - + } return matchedLocale; }
Received on Friday, 27 March 2015 11:01:27 UTC