From 90bb753bf3b0d30035071b88321de5edac3c2ed1 Mon Sep 17 00:00:00 2001 From: MehdiK Date: Mon, 26 Jan 2015 09:44:52 +1000 Subject: [PATCH 1/2] Fixed Chinese locale code: CHS to Hans & CHT to Hant --- release_notes.md | 1 + src/Humanizer.Tests/Humanizer.Tests.csproj | 8 ++++---- .../{zh-CHS => zh-Hans}/DateHumanizeTests.cs | 4 ++-- .../{zh-CHS => zh-Hans}/TimeSpanHumanizeTests.cs | 4 ++-- .../{zh-CHT => zh-Hant}/DateHumanizeTests.cs | 4 ++-- .../{zh-CHT => zh-Hant}/TimeSpanHumanizeTests.cs | 4 ++-- src/Humanizer/Configuration/FormatterRegistry.cs | 4 ++-- src/Humanizer/Humanizer.csproj | 10 ++++------ .../{Resources.zh-CHS.resx => Resources.zh-Hans.resx} | 0 .../{Resources.zh-CHT.resx => Resources.zh-Hant.resx} | 0 10 files changed, 19 insertions(+), 20 deletions(-) rename src/Humanizer.Tests/Localisation/{zh-CHS => zh-Hans}/DateHumanizeTests.cs (96%) rename src/Humanizer.Tests/Localisation/{zh-CHS => zh-Hans}/TimeSpanHumanizeTests.cs (94%) rename src/Humanizer.Tests/Localisation/{zh-CHT => zh-Hant}/DateHumanizeTests.cs (96%) rename src/Humanizer.Tests/Localisation/{zh-CHT => zh-Hant}/TimeSpanHumanizeTests.cs (94%) rename src/Humanizer/Properties/{Resources.zh-CHS.resx => Resources.zh-Hans.resx} (100%) rename src/Humanizer/Properties/{Resources.zh-CHT.resx => Resources.zh-Hant.resx} (100%) diff --git a/release_notes.md b/release_notes.md index 7883f0a91..87cf9d0e0 100644 --- a/release_notes.md +++ b/release_notes.md @@ -1,4 +1,5 @@ ###In Development + - [#374](https://github.com/MehdiK/Humanizer/pull/374): Fixed Chinese locale code: CHS to Hans & CHT to Hant - [#366](https://github.com/MehdiK/Humanizer/pull/366): Removed UnitPreposition to avoid warnings in Win 8.1 apps - [#365](https://github.com/MehdiK/Humanizer/pull/365): Added ByteSizeExtensions method for long inputs - [#364](https://github.com/MehdiK/Humanizer/pull/364): Added "campuses" as plural of "campus" diff --git a/src/Humanizer.Tests/Humanizer.Tests.csproj b/src/Humanizer.Tests/Humanizer.Tests.csproj index 2284164ab..c712a21ac 100644 --- a/src/Humanizer.Tests/Humanizer.Tests.csproj +++ b/src/Humanizer.Tests/Humanizer.Tests.csproj @@ -154,10 +154,10 @@ - - - - + + + + diff --git a/src/Humanizer.Tests/Localisation/zh-CHS/DateHumanizeTests.cs b/src/Humanizer.Tests/Localisation/zh-Hans/DateHumanizeTests.cs similarity index 96% rename from src/Humanizer.Tests/Localisation/zh-CHS/DateHumanizeTests.cs rename to src/Humanizer.Tests/Localisation/zh-Hans/DateHumanizeTests.cs index 5128f65a7..da0236bf1 100644 --- a/src/Humanizer.Tests/Localisation/zh-CHS/DateHumanizeTests.cs +++ b/src/Humanizer.Tests/Localisation/zh-Hans/DateHumanizeTests.cs @@ -1,11 +1,11 @@ using Humanizer.Localisation; using Xunit.Extensions; -namespace Humanizer.Tests.Localisation.zhCHS +namespace Humanizer.Tests.Localisation.zhHans { public class DateHumanizeTests : AmbientCulture { - public DateHumanizeTests() : base("zh-CHS") { } + public DateHumanizeTests() : base("zh-Hans") { } [Theory] [InlineData(2, "2 天前")] diff --git a/src/Humanizer.Tests/Localisation/zh-CHS/TimeSpanHumanizeTests.cs b/src/Humanizer.Tests/Localisation/zh-Hans/TimeSpanHumanizeTests.cs similarity index 94% rename from src/Humanizer.Tests/Localisation/zh-CHS/TimeSpanHumanizeTests.cs rename to src/Humanizer.Tests/Localisation/zh-Hans/TimeSpanHumanizeTests.cs index 24f05c307..0d94ae71b 100644 --- a/src/Humanizer.Tests/Localisation/zh-CHS/TimeSpanHumanizeTests.cs +++ b/src/Humanizer.Tests/Localisation/zh-Hans/TimeSpanHumanizeTests.cs @@ -2,11 +2,11 @@ using Xunit; using Xunit.Extensions; -namespace Humanizer.Tests.Localisation.zhCHS +namespace Humanizer.Tests.Localisation.zhHans { public class TimeSpanHumanizeTests : AmbientCulture { - public TimeSpanHumanizeTests() : base("zh-CHS") { } + public TimeSpanHumanizeTests() : base("zh-Hans") { } [Theory] [InlineData(7, "1 周")] diff --git a/src/Humanizer.Tests/Localisation/zh-CHT/DateHumanizeTests.cs b/src/Humanizer.Tests/Localisation/zh-Hant/DateHumanizeTests.cs similarity index 96% rename from src/Humanizer.Tests/Localisation/zh-CHT/DateHumanizeTests.cs rename to src/Humanizer.Tests/Localisation/zh-Hant/DateHumanizeTests.cs index 655c90bcb..99ecb5ca5 100644 --- a/src/Humanizer.Tests/Localisation/zh-CHT/DateHumanizeTests.cs +++ b/src/Humanizer.Tests/Localisation/zh-Hant/DateHumanizeTests.cs @@ -1,11 +1,11 @@ using Humanizer.Localisation; using Xunit.Extensions; -namespace Humanizer.Tests.Localisation.zhCHT +namespace Humanizer.Tests.Localisation.zhHant { public class DateHumanizeTests : AmbientCulture { - public DateHumanizeTests() : base("zh-CHT") { } + public DateHumanizeTests() : base("zh-Hant") { } [Theory] [InlineData(2, "2 天前")] diff --git a/src/Humanizer.Tests/Localisation/zh-CHT/TimeSpanHumanizeTests.cs b/src/Humanizer.Tests/Localisation/zh-Hant/TimeSpanHumanizeTests.cs similarity index 94% rename from src/Humanizer.Tests/Localisation/zh-CHT/TimeSpanHumanizeTests.cs rename to src/Humanizer.Tests/Localisation/zh-Hant/TimeSpanHumanizeTests.cs index 42df0b32d..459c5e158 100644 --- a/src/Humanizer.Tests/Localisation/zh-CHT/TimeSpanHumanizeTests.cs +++ b/src/Humanizer.Tests/Localisation/zh-Hant/TimeSpanHumanizeTests.cs @@ -2,11 +2,11 @@ using Xunit; using Xunit.Extensions; -namespace Humanizer.Tests.Localisation.zhCHT +namespace Humanizer.Tests.Localisation.zhHant { public class TimeSpanHumanizeTests : AmbientCulture { - public TimeSpanHumanizeTests() : base("zh-CHT") { } + public TimeSpanHumanizeTests() : base("zh-Hant") { } [Theory] [InlineData(7, "1 周")] diff --git a/src/Humanizer/Configuration/FormatterRegistry.cs b/src/Humanizer/Configuration/FormatterRegistry.cs index b2392dca1..59f296d81 100644 --- a/src/Humanizer/Configuration/FormatterRegistry.cs +++ b/src/Humanizer/Configuration/FormatterRegistry.cs @@ -42,8 +42,8 @@ public FormatterRegistry() : base(new DefaultFormatter("en-US")) RegisterDefaultFormatter("uz-Latn-UZ"); RegisterDefaultFormatter("uz-Cyrl-UZ"); RegisterDefaultFormatter("zh-CN"); - RegisterDefaultFormatter("zh-CHS"); - RegisterDefaultFormatter("zh-CHT"); + RegisterDefaultFormatter("zh-Hans"); + RegisterDefaultFormatter("zh-Hant"); } private void RegisterDefaultFormatter(string localeCode) diff --git a/src/Humanizer/Humanizer.csproj b/src/Humanizer/Humanizer.csproj index 048cef089..46e7911ee 100644 --- a/src/Humanizer/Humanizer.csproj +++ b/src/Humanizer/Humanizer.csproj @@ -182,13 +182,11 @@ - - ResXFileCodeGenerator - Resources.zh-CHT.Designer.cs + + Resources.zh-Hant.Designer.cs - - ResXFileCodeGenerator - Resources.zh-CHS.Designer.cs + + Resources.zh-Hans.Designer.cs ResXFileCodeGenerator diff --git a/src/Humanizer/Properties/Resources.zh-CHS.resx b/src/Humanizer/Properties/Resources.zh-Hans.resx similarity index 100% rename from src/Humanizer/Properties/Resources.zh-CHS.resx rename to src/Humanizer/Properties/Resources.zh-Hans.resx diff --git a/src/Humanizer/Properties/Resources.zh-CHT.resx b/src/Humanizer/Properties/Resources.zh-Hant.resx similarity index 100% rename from src/Humanizer/Properties/Resources.zh-CHT.resx rename to src/Humanizer/Properties/Resources.zh-Hant.resx From 4bb0477465dbbe39041ae980777b69ab8ff05580 Mon Sep 17 00:00:00 2001 From: MehdiK Date: Mon, 26 Jan 2015 10:10:49 +1000 Subject: [PATCH 2/2] Removed the resx references --- src/Humanizer/Humanizer.csproj | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/Humanizer/Humanizer.csproj b/src/Humanizer/Humanizer.csproj index 46e7911ee..680d88bbd 100644 --- a/src/Humanizer/Humanizer.csproj +++ b/src/Humanizer/Humanizer.csproj @@ -182,16 +182,9 @@ - - Resources.zh-Hant.Designer.cs - - - Resources.zh-Hans.Designer.cs - - - ResXFileCodeGenerator - Resources.zh-CN.Designer.cs - + + + @@ -233,11 +226,11 @@ - - \ No newline at end of file +