Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2014-03-09 02:04:20 +0400
committerMarek Safar <marek.safar@gmail.com>2014-03-09 02:05:53 +0400
commit81573de69dc83dd878cbc956f2847903d2610c03 (patch)
tree18a32638cade19c0ea84f92bebd4a74b5463197c
parent0d4949b842755248eb600d94d370a6e3c222017a (diff)
[corlib] Add .net compatible separators for es culture
-rw-r--r--mono/metadata/culture-info-tables.h2
-rw-r--r--tools/locale-builder/Driver.cs29
2 files changed, 25 insertions, 6 deletions
diff --git a/mono/metadata/culture-info-tables.h b/mono/metadata/culture-info-tables.h
index 967b1ec5420..b8a12b00157 100644
--- a/mono/metadata/culture-info-tables.h
+++ b/mono/metadata/culture-info-tables.h
@@ -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}},
diff --git a/tools/locale-builder/Driver.cs b/tools/locale-builder/Driver.cs
index 661298d5eb8..8162cc6d99a 100644
--- a/tools/locale-builder/Driver.cs
+++ b/tools/locale-builder/Driver.cs
@@ -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;
}
}