2006/unicorn/src/org/w3c/unicorn Framework.java,1.31,1.32

Update of /sources/public/2006/unicorn/src/org/w3c/unicorn
In directory hutz:/tmp/cvs-serv16521/src/org/w3c/unicorn

Modified Files:
	Framework.java 
Log Message:
added tasklist metadata properties to the translation form

Index: Framework.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/Framework.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- Framework.java	5 Mar 2010 09:48:31 -0000	1.31
+++ Framework.java	5 Mar 2010 13:48:42 -0000	1.32
@@ -107,6 +107,7 @@
 		mapOfObserver = new LinkedHashMap<String, Observer>();
 		responseImpl = new LinkedHashMap<String, Class<Response>>();
 		LanguageAction.setLanguageProperties(new TreeMap<String, Properties>());
+		LanguageAction.setMetadataProperties(new TreeMap<String, Properties>());
 	}
 	
 	/**
@@ -364,6 +365,7 @@
 		try{
 			UCNProperties defaultProps = Language.load(defaultTaskFile);
 			logger.debug("> Found default tasks metadata file: " + defaultTaskFile.getPath());
+			LanguageAction.setDefaultMetadatas(defaultProps);
 			for (String taskKey : mapOfTask.keySet()) {
 				Task task = mapOfTask.get(taskKey);
 				if (defaultProps.containsKey(taskKey)) 
@@ -415,6 +417,7 @@
 			try {
 				UCNProperties props = Language.load(taskFile);
 				logger.debug("> Found tasks metadata file: " + taskFile.getPath());
+				LanguageAction.addMetadatasProperties(lang, props);
 				
 				for (String taskKey : mapOfTask.keySet()) {
 					Task task = mapOfTask.get(taskKey);
@@ -491,6 +494,12 @@
 				Language.complete(props, defaultProps);
 				props.parse();
 				languageProperties.put(props.getProperty("lang"), props);
+				if (!LanguageAction.getMetadataProperties().containsKey(props.getProperty("lang"))) {
+					UCNProperties metaProps = new UCNProperties();
+					metaProps.put("lang", props.getProperty("lang"));
+					metaProps.put("language", props.getProperty("language"));
+					LanguageAction.getMetadataProperties().put(props.getProperty("lang"), metaProps);
+				}
 			} catch (IllegalArgumentException e) {
 				logger.warn(e.getMessage());
 			} catch (FileNotFoundException e) {

Received on Friday, 5 March 2010 13:48:46 UTC