W3C home > Mailing lists > Public > www-validator-cvs@w3.org > September 2011

2002/css-validator/org/w3c/css/index TranslationTableGenerator.java,1.11,1.12

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Fri, 09 Sep 2011 12:16:43 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1R201B-0004vK-GH@lionel-hutz.w3.org>
Update of /sources/public/2002/css-validator/org/w3c/css/index
In directory hutz:/tmp/cvs-serv18813/index

Modified Files:
	TranslationTableGenerator.java 
Log Message:
code cleanup, removed dead code, starting reorg of azimuth (others to follow)

Index: TranslationTableGenerator.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/index/TranslationTableGenerator.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- TranslationTableGenerator.java	6 Sep 2011 14:40:30 -0000	1.11
+++ TranslationTableGenerator.java	9 Sep 2011 12:16:41 -0000	1.12
@@ -109,7 +109,14 @@
                     if (hy > 0) {
                         String m = name.substring(0, hy);
                         String s = name.substring(hy + 1);
-                        locale = new Locale(m, s, "");
+                        hy = s.indexOf("-");
+                        if (hy > 0) {
+                            String v = s.substring(hy + 1);
+                            s = s.substring(0, hy);
+                            locale = new Locale(m, s, v);
+                        } else {
+                            locale = new Locale(m, s, "");
+                        }
                     } else {
                         locale = new Locale(name);
                     }
@@ -128,7 +135,7 @@
             Set properties_keyset = ac_default.getMsg().properties.keySet();
             sorted_properties_keys = new Vector<String>(properties_keyset);
             Collections.sort(sorted_properties_keys, new AlphaComparator());
-            Iterator properties_iterator = sorted_properties_keys.iterator();
+            Iterator<String> properties_iterator = sorted_properties_keys.iterator();
             translations_table.append("<tbody>");
             int num_properties = 0;
             while (properties_iterator.hasNext()) {
Received on Friday, 9 September 2011 12:17:14 UTC

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