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

2006/unicorn/src/org/w3c/unicorn/action LanguageAction.java,1.1,1.2

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Fri, 02 Oct 2009 16:59:57 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1MtlU5-0006cP-Hd@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/action
In directory hutz:/tmp/cvs-serv25411/src/org/w3c/unicorn/action

Modified Files:
	LanguageAction.java 
Log Message:
default language properties moved in a separate variable

Index: LanguageAction.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/LanguageAction.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- LanguageAction.java	2 Oct 2009 16:50:50 -0000	1.1
+++ LanguageAction.java	2 Oct 2009 16:59:55 -0000	1.2
@@ -26,6 +26,8 @@
 	private static final long serialVersionUID = 1L;
 	
 	private static TreeMap<String, Properties> languageProperties;
+	
+	private static Properties defaultProperties;
 
 	/**
 	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
@@ -54,10 +56,11 @@
 		
 		
 		
-		languages.put(defaultLang, languageProperties.get(defaultLang).getProperty("language"));
+		languages.put(defaultLang, defaultProperties.getProperty("language"));
 		velocityContext.put("languages", languages);
+		languageProperties.remove(defaultLang);
 		velocityContext.put("languageProps", languageProperties);
-		velocityContext.put("defaultProps", languageProperties.get(defaultLang));
+		velocityContext.put("defaultProps", defaultProperties);
 		
 		PrintWriter writer = resp.getWriter();
 		Templates.write("language.vm", velocityContext, writer);
@@ -85,4 +88,14 @@
 		LanguageAction.languageProperties = languageProperties;
 	}
 
+	public static Properties getDefaultProperties() {
+		return defaultProperties;
+	}
+
+	public static void setDefaultProperties(Properties defaultProperties) {
+		LanguageAction.defaultProperties = defaultProperties;
+	}
+	
+	
+
 }
Received on Friday, 2 October 2009 17:00:01 UTC

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