X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=tools%2Flocale-builder%2FCultureInfoEntry.cs;h=fb9f642e2420449bbb9f702b218fbecfc3a41649;hb=a1e8d3de9a3794443d27f0989f43bb96b31faf76;hp=b6448e687aa92982462b16a955633ee48c1029c6;hpb=6b6435d1b3206b0162c37e5ecce8d9a699fe6467;p=mono.git diff --git a/tools/locale-builder/CultureInfoEntry.cs b/tools/locale-builder/CultureInfoEntry.cs index b6448e687aa..fb9f642e242 100644 --- a/tools/locale-builder/CultureInfoEntry.cs +++ b/tools/locale-builder/CultureInfoEntry.cs @@ -15,7 +15,13 @@ namespace Mono.Tools.LocaleBuilder { public class CultureInfoEntry : Entry { - public string Language; + public static CultureInfoEntry ShallowCopy (CultureInfoEntry e) + { + return (CultureInfoEntry) e.MemberwiseClone (); + } + + string language; + public string Territory; public string EnglishName; public string DisplayName; @@ -27,6 +33,7 @@ namespace Mono.Tools.LocaleBuilder { public string Lcid; public string ParentLcid; public string SpecificLcid; + public int RegionId = -1; public DateTimeFormatEntry DateTimeFormatEntry; public NumberFormatEntry NumberFormatEntry; public TextInfoEntry TextInfoEntry; @@ -43,11 +50,20 @@ namespace Mono.Tools.LocaleBuilder { NumberFormatEntry = new NumberFormatEntry (); } + public string Language { + get { + return language; + } + set { + language = (value == "zh") ? "zh-CHS" : value; + } + } + public string Name { get { if (Territory == null) return Language; - return Language + "-" + Territory; + return (Language.StartsWith ("zh") ? "zh" : Language) + "-" + Territory; } } @@ -61,16 +77,17 @@ namespace Mono.Tools.LocaleBuilder { public void AppendTableRow (StringBuilder builder) { builder.Append ("\t{"); - builder.AppendFormat ("{0}, {1}, {2}, " + - "{3}, {4}, {5}, " + - "{6}, {7}, {8}, " + - "{9}, {10}, " + - "{11}, " + - "{12}, {13}, {14}", - Lcid, ParentLcid, SpecificLcid, + builder.AppendFormat ("{0}, {1}, {2}, {3}," + + "{4}, {5}, {6}, " + + "{7}, {8}, {9}, " + + "{10}, {11}, {12}, " + + "{13}, " + + "{14}, {15}, {16}", + Lcid, ParentLcid, SpecificLcid, RegionId, EncodeStringIdx (Name), EncodeStringIdx (IcuName), EncodeStringIdx (EnglishName), EncodeStringIdx (DisplayName), EncodeStringIdx (NativeName), EncodeStringIdx (Win3Lang), EncodeStringIdx (ISO3Lang), EncodeStringIdx (ISO2Lang), + EncodeStringIdx (Territory), ValuesString (CalendarData), DateTimeFormatEntry == null ? -1 : DateTimeFormatEntry.Row, NumberFormatEntry == null ? -1 : NumberFormatEntry.Row,