You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@@ -379,9 +379,13 @@ namespace Mono.Tools.LocaleBuilder
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
var territories = entry.Attributes["territories"].Value.Split ();
|
||||
var territories = entry.Attributes["territories"].Value.Split (new [] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
foreach (var t in territories) {
|
||||
territory2dayofweek.Add (t, dow);
|
||||
var tr = t.Trim ();
|
||||
if (tr.Length == 0)
|
||||
continue;
|
||||
|
||||
territory2dayofweek.Add (tr, dow);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -619,27 +623,6 @@ namespace Mono.Tools.LocaleBuilder
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (nfe.CurrencyDecimalDigits == null) {
|
||||
var all_digits = new List<string> ();
|
||||
GetAllChildrenValues (ci, all_digits, l => l.NumberFormatEntry.CurrencyDecimalDigits);
|
||||
var children = all_digits.Where (l => l != null).Distinct ().ToList ();
|
||||
|
||||
if (children.Count == 1) {
|
||||
nfe.CurrencyDecimalDigits = children[0];
|
||||
} else if (children.Count == 0) {
|
||||
if (!ci.HasMissingLocale)
|
||||
Console.WriteLine ("No currency decimal digits data for `{0}'", ci.Name);
|
||||
|
||||
nfe.CurrencyDecimalDigits = "2";
|
||||
} else if (ci.IsNeutral) {
|
||||
nfe.CurrencyDecimalDigits = "2";
|
||||
} else {
|
||||
// .NET has weird concept of territory data available for neutral cultures (e.g. en, es, pt)
|
||||
// We have to manually disambiguate the correct entry (which is artofficial anyway)
|
||||
throw new ApplicationException (string.Format ("Ambiguous currency decimal digits data for `{0}'", ci.Name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (OutputCompare)
|
||||
@@ -1164,30 +1147,6 @@ namespace Mono.Tools.LocaleBuilder
|
||||
ni.PercentSymbol = el.InnerText;
|
||||
|
||||
}
|
||||
|
||||
string value = null;
|
||||
|
||||
// .net has incorrect separators for some countries and we want to be compatible
|
||||
switch (ci.Name) {
|
||||
case "es-ES":
|
||||
case "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.CurrencyGroupSeparator = value;
|
||||
}
|
||||
}
|
||||
|
||||
static void ToLower (string[] values)
|
||||
|
Reference in New Issue
Block a user