W3C home > Mailing lists > Public > www-validator-cvs@w3.org > October 2009

2006/unicorn/src/org/w3c/unicorn/action LanguageAction.java,1.4,1.5

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 06 Oct 2009 16:33:02 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1MvCyE-0003c3-Uw@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/action
In directory hutz:/tmp/cvs-serv13866/src/org/w3c/unicorn/action

Modified Files:
	LanguageAction.java 
Log Message:
if ucn_lang is present, uses language.form.vm

Index: LanguageAction.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/LanguageAction.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- LanguageAction.java	6 Oct 2009 08:16:02 -0000	1.4
+++ LanguageAction.java	6 Oct 2009 16:33:00 -0000	1.5
@@ -61,7 +61,13 @@
 		velocityContext.put("defaultProps", defaultProperties);
 		
 		PrintWriter writer = resp.getWriter();
-		Templates.write("language.vm", velocityContext, writer);
+		String langParameter = req.getParameter(Property.get("UNICORN_PARAMETER_PREFIX") + "lang");
+		if (langParameter == null)
+			Templates.write("language.vm", velocityContext, writer);
+		else {
+			velocityContext.put("prop", languageProperties.get(langParameter));
+			Templates.write("language.form.vm", velocityContext, writer);
+		}
 		writer.close();
 	}
 
Received on Tuesday, 6 October 2009 16:33:06 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:39 UTC