Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Chinese locale code: CHS to Hans & CHT to Hant #374

Merged
merged 2 commits into from
Jan 26, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions release_notes.md
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
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
19 changes: 5 additions & 14 deletions src/Humanizer/Humanizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -182,18 +182,9 @@
<None Include="Humanizer.snk" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.zh-CHT.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.zh-CHT.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.zh-CHS.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.zh-CHS.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.zh-CN.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.zh-CN.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.zh-Hant.resx" />
<EmbeddedResource Include="Properties\Resources.zh-Hans.resx" />
<EmbeddedResource Include="Properties\Resources.zh-CN.resx" />
<EmbeddedResource Include="Properties\Resources.bn-BD.resx" />
<EmbeddedResource Include="Properties\Resources.nb.resx" />
<EmbeddedResource Include="Properties\Resources.uz-Cyrl-UZ.resx" />
Expand Down Expand Up @@ -235,11 +226,11 @@
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>