Skip to content

Commit

Permalink
Fixed Chinese locale code: CHS to Hans & CHT to Hant
Browse files Browse the repository at this point in the history
  • Loading branch information
MehdiK committed Jan 25, 2015
1 parent 8e4d8bd commit 9ed5071
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 20 deletions.
8 changes: 4 additions & 4 deletions src/Humanizer.Tests/Humanizer.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@
<Compile Include="Localisation\it\CollectionFormatterTests.cs" />
<Compile Include="Localisation\it\OrdinalizerTests.cs" />
<Compile Include="Localisation\it\NumberToWordsTests.cs" />
<Compile Include="Localisation\zh-CHS\DateHumanizeTests.cs" />
<Compile Include="Localisation\zh-CHS\TimeSpanHumanizeTests.cs" />
<Compile Include="Localisation\zh-CHT\DateHumanizeTests.cs" />
<Compile Include="Localisation\zh-CHT\TimeSpanHumanizeTests.cs" />
<Compile Include="Localisation\zh-Hans\DateHumanizeTests.cs" />
<Compile Include="Localisation\zh-Hans\TimeSpanHumanizeTests.cs" />
<Compile Include="Localisation\zh-Hant\DateHumanizeTests.cs" />
<Compile Include="Localisation\zh-Hant\TimeSpanHumanizeTests.cs" />
<Compile Include="Localisation\zh-CN\DateHumanizeTests.cs" />
<Compile Include="Localisation\zh-CN\TimeSpanHumanizeTests.cs" />
<Compile Include="ResourceKeyTests.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -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 天前")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 周")]
Expand Down
Original file line number Diff line number Diff line change
@@ -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 天前")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 周")]
Expand Down
4 changes: 2 additions & 2 deletions src/Humanizer/Configuration/FormatterRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 4 additions & 6 deletions src/Humanizer/Humanizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,11 @@
<None Include="Humanizer.snk" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.zh-CHT.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.zh-CHT.Designer.cs</LastGenOutput>
<EmbeddedResource Include="Properties\Resources.zh-Hant.resx">
<LastGenOutput>Resources.zh-Hant.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.zh-CHS.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.zh-CHS.Designer.cs</LastGenOutput>
<EmbeddedResource Include="Properties\Resources.zh-Hans.resx">
<LastGenOutput>Resources.zh-Hans.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.zh-CN.resx">
<Generator>ResXFileCodeGenerator</Generator>
Expand Down

0 comments on commit 9ed5071

Please sign in to comment.