diff options
author | Marek Safar <marek.safar@gmail.com> | 2015-06-16 18:50:49 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2015-06-16 18:56:40 +0300 |
commit | f6665e553b44de9bae3c0ab243f371905c4e908d (patch) | |
tree | 53e33d0b2bc6d7dcd10636dbe58529b2a423d5c9 /tools | |
parent | fe76409a90204f7a4cb605908cd3087e9c53670e (diff) |
[mono] Update swedish months and days to be always lower cased for some reason cldr have them wrong. Fixes #30851
Diffstat (limited to 'tools')
-rw-r--r-- | tools/locale-builder/Driver.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/locale-builder/Driver.cs b/tools/locale-builder/Driver.cs index 17d8a32c162..a8ec6d2f0e7 100644 --- a/tools/locale-builder/Driver.cs +++ b/tools/locale-builder/Driver.cs @@ -1000,6 +1000,12 @@ namespace Mono.Tools.LocaleBuilder nodes = node.SelectNodes ("months/monthContext[@type='stand-alone']/monthWidth[@type='wide']/month"); ProcessAllNodes (nodes, df.MonthNames, AddOrReplaceValue); + if (df.MonthNames != null) { + if (ci.Name == "sv" || ci.Name == "sv-SE") { + ToLower (df.MonthNames); + } + } + // Apply global rule first <alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='abbreviated']"/> if (ci.Name == "ja" || ci.Name == "ja-JP") { // Use common number style @@ -1010,6 +1016,12 @@ namespace Mono.Tools.LocaleBuilder ProcessAllNodes (nodes, df.AbbreviatedMonthNames, AddOrReplaceValue); } + if (df.AbbreviatedMonthNames != null) { + if (ci.Name == "sv" || ci.Name == "sv-SE") { + ToLower (df.AbbreviatedMonthNames); + } + } + nodes = node.SelectNodes ("months/monthContext[@type='format']/monthWidth[@type='wide']/month"); if (nodes != null) { ProcessAllNodes (nodes, df.MonthGenitiveNames, AddOrReplaceValue); @@ -1027,6 +1039,12 @@ namespace Mono.Tools.LocaleBuilder nodes = node.SelectNodes ("days/dayContext[@type='stand-alone']/dayWidth[@type='abbreviated']/day"); ProcessAllNodes (nodes, df.AbbreviatedDayNames, AddOrReplaceDayValue); + if (df.AbbreviatedDayNames != null) { + if (ci.Name == "sv" || ci.Name == "sv-SE") { + ToLower (df.AbbreviatedDayNames); + } + } + // TODO: This is not really ShortestDayNames as .NET uses it // Apply global rules first <alias source="locale" path="../../dayContext[@type='stand-alone']/dayWidth[@type='narrow']"/> nodes = node.SelectNodes ("days/dayContext[@type='format']/dayWidth[@type='narrow']/day"); @@ -1171,6 +1189,19 @@ namespace Mono.Tools.LocaleBuilder } } + static void ToLower (string[] values) + { + if (values == null) + return; + + for (int i = 0; i < values.Length; ++i) { + if (values [i] == null) + continue; + + values [i] = values [i].ToLower (); + } + } + string GetInfinitySymbol (CultureInfoEntry ci) { // TODO: Add more |