[corlib] Add .net compatible separators for es culture
authorMarek Safar <marek.safar@gmail.com>
Sat, 8 Mar 2014 22:04:20 +0000 (23:04 +0100)
committerMarek Safar <marek.safar@gmail.com>
Sat, 8 Mar 2014 22:05:53 +0000 (23:05 +0100)
mono/metadata/culture-info-tables.h
tools/locale-builder/Driver.cs

index 967b1ec542093a1ed0c5290cafc29e03945497c1..b8a12b00157382544a6dc3c1a8f938f9f928e5dd 100644 (file)
@@ -495,7 +495,7 @@ static const NumberFormatEntry number_format_entries [] = {
        {754, 36825, 754, 36825, 754, 36825, 37031, 36905, 37778, 36911, 36915, 36877, 2541, 36925, 0, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
        {36825, 754, 36825, 754, 36825, 754, 36927, 36905, 36907, 36911, 36982, 36993, 2541, 36925, 9, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
        {754, 36825, 754, 36825, 754, 36825, 37031, 36905, 36907, 36911, 36915, 36877, 2541, 36925, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
-       {36825, 754, 36825, 36896, 36825, 36896, 36927, 36905, 36907, 36911, 37033, 37043, 2541, 36925, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+       {36825, 754, 36825, 754, 36825, 754, 36927, 36905, 36907, 36911, 37033, 37043, 2541, 36925, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
        {36825, 36896, 36825, 36896, 36825, 36896, 37031, 36905, 36907, 36911, 37061, 37069, 2541, 36925, 15, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
        {36825, 36896, 36825, 36896, 36825, 36896, 36927, 36905, 37306, 36911, 36915, 36877, 2541, 36925, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
        {754, 36825, 36825, 754, 36825, 754, 37845, 36843, 36846, 36861, 36864, 36877, 36886, 36891, 3, 0, 0, 0, 3, 3, 2, 2, {3, -1}, {3, -1}, {3, -1}},
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;
                        }
                }