Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / tools / locale-builder / NumberFormatEntry.cs
index 68a3ca0a17cb700819914dec43c66c7f8b462345..d52a3ad4811f1bb232b559a26af5004ea9192fa1 100644 (file)
@@ -49,10 +49,12 @@ namespace Mono.Tools.LocaleBuilder
                public string NumberGroupSeparator = ",";
                public string[] NumberGroupSizes = new string[Constants.GROUP_SIZE];
                public string NumberNegativePattern;
+               /*
                public int PercentDecimalDigits;
                public string PercentDecimalSeparator = ",";
                public string PercentGroupSeparator = ",";
                public string[] PercentGroupSizes = new string[Constants.GROUP_SIZE];
+               */
                public string PercentNegativePattern;
                public string PercentPositivePattern;
                public string PercentSymbol = "%";
@@ -68,6 +70,9 @@ namespace Mono.Tools.LocaleBuilder
                {
                        get
                        {
+                               if (InfinitySymbol.StartsWith (PositiveSign))
+                                       return NegativeSign + InfinitySymbol.Substring (1, InfinitySymbol.Length - 1);
+       
                                return NegativeSign + InfinitySymbol;
                        }
                }
@@ -76,7 +81,7 @@ namespace Mono.Tools.LocaleBuilder
                {
                        get
                        {
-                               return InfinitySymbol == "Infinity" ? InfinitySymbol : PositiveSign + InfinitySymbol;
+                               return InfinitySymbol;
                        }
                }
 
@@ -86,8 +91,6 @@ namespace Mono.Tools.LocaleBuilder
 
                        builder.Append (EncodeStringIdx (CurrencyDecimalSeparator) + ", ");
                        builder.Append (EncodeStringIdx (CurrencyGroupSeparator) + ", ");
-                       builder.Append (EncodeStringIdx (PercentDecimalSeparator) + ", ");
-                       builder.Append (EncodeStringIdx (PercentGroupSeparator) + ", ");
                        builder.Append (EncodeStringIdx (NumberDecimalSeparator) + ", ");
                        builder.Append (EncodeStringIdx (NumberGroupSeparator) + ", ");
 
@@ -108,13 +111,10 @@ namespace Mono.Tools.LocaleBuilder
                        builder.Append (NumberNegativePattern + ", ");
 
                        builder.Append (CurrencyDecimalDigits + ", ");
-                       builder.Append (PercentDecimalDigits + ", ");
                        builder.Append (NumberDecimalDigits + ", ");
 
                        AppendGroupSizes (builder, CurrencyGroupSizes);
                        builder.Append (", ");
-                       AppendGroupSizes (builder, PercentGroupSizes);
-                       builder.Append (", ");
                        AppendGroupSizes (builder, NumberGroupSizes);
 
                        builder.Append ('}');