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

2006/unicorn/src/org/w3c/unicorn Framework.java,1.1.2.11,1.1.2.12

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 19 Aug 2009 08:14:15 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1MdgJD-0006ce-MV@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn
In directory hutz:/tmp/cvs-serv25234/src/org/w3c/unicorn

Modified Files:
      Tag: dev2
	Framework.java 
Log Message:
worked on the new interface

Index: Framework.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/Attic/Framework.java,v
retrieving revision 1.1.2.11
retrieving revision 1.1.2.12
diff -u -d -r1.1.2.11 -r1.1.2.12
--- Framework.java	18 Aug 2009 12:47:34 -0000	1.1.2.11
+++ Framework.java	19 Aug 2009 08:14:13 -0000	1.1.2.12
@@ -95,6 +95,7 @@
 	private static Hashtable<String, Properties> unicornPropertiesFiles;
 	private static Hashtable<String, VelocityContext> languageContexts;
 	private static Hashtable<String, Properties> languageProperties;
+	private static Hashtable<String, String> languages;
 	private static VelocityEngine velocityEngine;
 	private static Hashtable<String, Template> velocityTemplates;
 	private static String[] configFiles = {
@@ -110,6 +111,7 @@
 		unicornPropertiesFiles = new Hashtable<String, Properties>();
 		languageContexts = new Hashtable<String, VelocityContext>();
 		languageProperties = new Hashtable<String, Properties>();
+		languages = new Hashtable<String, String>();
 		velocityTemplates = new Hashtable<String, Template>();
 		mapOfObserver = new LinkedHashMap<String, Observer>();
 		mapOfReponseParser = new LinkedHashMap<String, ResponseParser>();
@@ -491,6 +493,9 @@
 			logger.debug(s);
 			logger.info("OK - " + languageProperties.size() + " language(s) successfully loaded.");
 		}
+		for (String key : languageProperties.keySet()) {
+			languages.put(key, languageProperties.get(key).getProperty("language"));
+		}
 		
 		// Creating velocity contexts
 		logger.debug("-------------------------------------------------------");
@@ -503,6 +508,7 @@
 		    }
 			context.put("tasklist", mapOfTask);
 			context.put("param_prefix", Property.get("UNICORN_PARAMETER_PREFIX"));
+			context.put("languages", languages);
 			languageContexts.put(locale, context);
 		}
 		logger.debug("> "+languageContexts.size()+" velocity context(s) created");
Received on Wednesday, 19 August 2009 08:14:28 UTC

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