[claw-cvs] r21 - trunk/main/claw-core/generators

achiumenti at common-lisp.net achiumenti at common-lisp.net
Tue Mar 25 15:42:38 UTC 2008


Author: achiumenti
Date: Tue Mar 25 10:42:37 2008
New Revision: 21

Modified:
   trunk/main/claw-core/generators/GenerateLocales.java
Log:
continuning on l13n

Modified: trunk/main/claw-core/generators/GenerateLocales.java
==============================================================================
--- trunk/main/claw-core/generators/GenerateLocales.java	(original)
+++ trunk/main/claw-core/generators/GenerateLocales.java	Tue Mar 25 10:42:37 2008
@@ -108,8 +108,8 @@
                         "\" *locales*)" +
                         "\n      (list ");
                 sw.append("\n        :NUMBER-FORMAT " +
-                        "(list :GROUPING-SEPARATOR #\\" + dfs.getGroupingSeparator() +
-                        " :DECIMAL-SEPARATOR #\\" + dfs.getDecimalSeparator() +
+                        "(list :GROUPING-SEPARATOR " + encodeLispChar(dfs.getGroupingSeparator()) +
+                        " :DECIMAL-SEPARATOR " + encodeLispChar(dfs.getDecimalSeparator()) +
                         " \"" + dfs.getInternationalCurrencySymbol() + "\"" + ")");
 
                 sw.append("\n        :DATE-FORMAT (list");
@@ -133,6 +133,15 @@
         System.out.println(fileName + " successfully generated.");
     }
 
+    private String encodeLispChar(char ch) {
+        switch (ch) {
+            case ' ': return "#\\SPACE";
+            case 0: return "nil";
+            default: return "#\\" + ch;
+        }
+                
+                
+    }
     /**
      * @param args the command line arguments
      */



More information about the Claw-cvs mailing list