[corlib] Add .net compatible separators for es culture
[mono.git] / tools / locale-builder / Driver.cs
index 661298d5eb8d8b16e97e5f7acef309e83345cf78..8162cc6d99aeb1ba6a6a20d17aa8679fca153d6c 100644 (file)
@@ -1134,12 +1134,31 @@ namespace Mono.Tools.LocaleBuilder
                                if (el != null)
                                        ni.PercentSymbol = el.InnerText;
 
-                               el = node.SelectSingleNode ("group");
-                               if (el != null) {
-                                       ni.NumberGroupSeparator =
-                                       ni.PercentGroupSeparator =
-                                       ni.CurrencyGroupSeparator = el.InnerText;
+                       }
+
+                       string value = null;
+
+                       // .net has incorrect separators for some countries and we want to be compatible
+                       switch (ci.Name) {
+                       case "es-ES":
+                               // es-ES does not have group separator but .net has '.'
+                               value = ".";
+                               break;
+                       default:
+                               if (node != null) {
+                                       el = node.SelectSingleNode ("group");
+                                       if (el != null) {
+                                               value = el.InnerText;
+                                       }
                                }
+
+                               break;
+                       }
+                                       
+                       if (value != null) {
+                               ni.NumberGroupSeparator =
+                               ni.PercentGroupSeparator =
+                               ni.CurrencyGroupSeparator = value;
                        }
                }