diff options
author | Marek Safar <marek.safar@gmail.com> | 2014-03-09 02:04:20 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2014-03-09 02:05:53 +0400 |
commit | 81573de69dc83dd878cbc956f2847903d2610c03 (patch) | |
tree | 18a32638cade19c0ea84f92bebd4a74b5463197c /tools | |
parent | 0d4949b842755248eb600d94d370a6e3c222017a (diff) |
[corlib] Add .net compatible separators for es culture
Diffstat (limited to 'tools')
-rw-r--r-- | tools/locale-builder/Driver.cs | 29 |
1 files changed, 24 insertions, 5 deletions
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; } } |