- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 06 Oct 2009 08:11:15 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn In directory hutz:/tmp/cvs-serv21132/src/org/w3c/unicorn Modified Files: Framework.java Log Message: languages properties are parsed as UCNProperties (allows nested properties) Index: Framework.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/Framework.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- Framework.java 5 Oct 2009 13:05:47 -0000 1.20 +++ Framework.java 6 Oct 2009 08:11:13 -0000 1.21 @@ -421,12 +421,13 @@ } File defaultLanguageFile = new File(Property.get("PATH_TO_LANGUAGE_FILES", "DEFAULT_LANGUAGE") + ".properties"); - Properties defaultProps = new Properties(); + UCNProperties defaultProps = new UCNProperties(); try { defaultProps = Language.load(defaultLanguageFile); logger.debug("> Found language (default): " + defaultProps.getProperty("lang") + " - " + defaultProps.getProperty("language")); LanguageAction.setDefaultProperties(defaultProps); + defaultProps.parse(); defaultProps.put("complete", "true"); languageProperties.put(Property.get("DEFAULT_LANGUAGE"), defaultProps); } catch (IllegalArgumentException e) { @@ -444,9 +445,10 @@ if (langFile.equals(defaultLanguageFile)) continue; try { - Properties props = Language.load(langFile); + UCNProperties props = Language.load(langFile); logger.debug("> Found language: " + props.getProperty("lang") + " - " + props.getProperty("language")); LanguageAction.addLanguageProperties(props); + props.parse(); Language.complete(props, defaultProps); languageProperties.put(props.getProperty("lang"), props); } catch (IllegalArgumentException e) { @@ -488,6 +490,7 @@ } context.put("esc", new EscapeTool()); context.put("math", new MathTool()); + context.put("ucn", new Language()); context.put("tasklist", mapOfTask); context.put("param_prefix", Property.get("UNICORN_PARAMETER_PREFIX")); context.put("languages", languages); @@ -524,6 +527,7 @@ if (addUnicornHome) properties.put("UNICORN_HOME", unicornHome.getPath()); properties.load(new FileInputStream(configFile)); + properties.parse(); unicornPropertiesFiles.put(fileName, properties); logger.debug("> " + fileName + ":" + properties); } @@ -541,4 +545,7 @@ public static Hashtable<String, Properties> getLanguageProperties() { return languageProperties; } + public static Task getDefaultTask() { + return mapOfTask.getDefaultTask(); + } }
Received on Tuesday, 6 October 2009 08:11:19 UTC