2006/unicorn/src/org/w3c/unicorn/util LocalizedString.java,1.1.2.1,1.1.2.2

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

Modified Files:
      Tag: dev2
	LocalizedString.java 
Log Message:
local variable DEFAULT_LANGUAGE is not used anymore. Property.get("DEFAULT_LANGUAGE") is used instead

Index: LocalizedString.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/util/Attic/LocalizedString.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- LocalizedString.java	11 Aug 2009 16:05:35 -0000	1.1.2.1
+++ LocalizedString.java	18 Aug 2009 11:53:55 -0000	1.1.2.2
@@ -21,7 +21,7 @@
 
 	private static final Log logger = LogFactory.getLog(LocalizedString.class);
 
-	public static String DEFAULT_LANGUAGE = "en";
+	private static String DEFAULT_LANGUAGE = "en";
 
 	private Map<String, String> mapOfString = null;
 
@@ -72,10 +72,8 @@
 	 */
 	public String addLocalization(final String sLocale, final String sMessage) {
 		LocalizedString.logger.trace("addLocalization");
-		if (LocalizedString.logger.isDebugEnabled()) {
-			LocalizedString.logger.debug("Locale : " + sLocale + ".");
-			LocalizedString.logger.debug("Message : " + sMessage + ".");
-		}
+		LocalizedString.logger.debug("Locale : " + sLocale + ".");
+		LocalizedString.logger.debug("Message : " + sMessage + ".");
 		return this.mapOfString.put(sLocale, sMessage);
 	}
 
@@ -93,7 +91,7 @@
 		if (null != sMessage) {
 			return sMessage;
 		}
-		return this.mapOfString.get(LocalizedString.DEFAULT_LANGUAGE);
+		return this.mapOfString.get(Property.get("DEFAULT_LANGUAGE"));
 	}
 
 	/**
@@ -111,7 +109,7 @@
 	 */
 	@Override
 	public String toString() {
-		String res = this.mapOfString.get(LocalizedString.DEFAULT_LANGUAGE);
+		String res = this.mapOfString.get(Property.get("DEFAULT_LANGUAGE"));
 		if (res == null) {
 			for (String s : this.mapOfString.values()) {
 				return s;

Received on Tuesday, 18 August 2009 11:54:06 UTC