diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2005-05-19 07:16:47 +0400 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2005-05-19 07:16:47 +0400 |
commit | f154f191fc84410356ff4972ba82d9746258c4d7 (patch) | |
tree | 6fa0c9e78d967646e44f996f986d8b61754f3340 /tools | |
parent | 5c5cfd1c163e9e45014ca5c8ba77e1ff0588b4a1 (diff) |
2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
* Driver.cs, CultureInfoEntry.cs : Use hacky shallow copy to clone
zh-CHS into zh-CHT.
* culture-info-table.h : updated (real hacky solution for zh-CHT).
svn path=/trunk/mono/; revision=44727
Diffstat (limited to 'tools')
-rw-r--r-- | tools/locale-builder/ChangeLog | 5 | ||||
-rw-r--r-- | tools/locale-builder/CultureInfoEntry.cs | 5 | ||||
-rw-r--r-- | tools/locale-builder/Driver.cs | 29 |
3 files changed, 29 insertions, 10 deletions
diff --git a/tools/locale-builder/ChangeLog b/tools/locale-builder/ChangeLog index 8134d681df9..f322ce7ddbe 100644 --- a/tools/locale-builder/ChangeLog +++ b/tools/locale-builder/ChangeLog @@ -1,3 +1,8 @@ +2005-05-19 Atsushi Enomoto <atsushi@ximian.com> + + * Driver.cs, CultureInfoEntry.cs : Use hacky shallow copy to clone + zh-CHS into zh-CHT. + 2005-05-18 Atsushi Enomoto <atsushi@ximian.com> * Driver.cs : quick workaround for zh-CHT related breakage. diff --git a/tools/locale-builder/CultureInfoEntry.cs b/tools/locale-builder/CultureInfoEntry.cs index dc29a5e1f68..00b84fdb80c 100644 --- a/tools/locale-builder/CultureInfoEntry.cs +++ b/tools/locale-builder/CultureInfoEntry.cs @@ -15,6 +15,11 @@ namespace Mono.Tools.LocaleBuilder { public class CultureInfoEntry : Entry { + public static CultureInfoEntry ShallowCopy (CultureInfoEntry e) + { + return (CultureInfoEntry) e.MemberwiseClone (); + } + string language; public string Territory; diff --git a/tools/locale-builder/Driver.cs b/tools/locale-builder/Driver.cs index eb2cc47ee7e..20af6039b88 100644 --- a/tools/locale-builder/Driver.cs +++ b/tools/locale-builder/Driver.cs @@ -89,6 +89,25 @@ namespace Mono.Tools.LocaleBuilder { } } + /* FIXME: This is hacky. + * Since there is only langs/zh.xml while there are + * two "zh" languages (CHS and CHT), there should be + * different language profiles and we are not likely + * to add lang/* files. So here I just clone zh-CHS + * as zh-CHT + */ + foreach (CultureInfoEntry e in cultures) { + if (e.Name == "zh-CHS") { + CultureInfoEntry t = + CultureInfoEntry.ShallowCopy (e); + t.Language = "zh-CHT"; + LookupLcids (t, true); + cultures.Add (t); + break; + } + } + + /** * Dump each table individually. Using StringBuilders * because it is easier to debug, should switch to just @@ -243,16 +262,6 @@ namespace Mono.Tools.LocaleBuilder { private void ParseLocale (string locale) { - #region Workaround - // FIXME: We should enable zh-TW and zh-HK when - // zh-CHT got working. - switch (locale) { - case "zh_TW": - case "zh_HK": - return; - } - #endregion - CultureInfoEntry ci; ci = LookupCulture (locale); |