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

Hebrew support #148

Closed
wants to merge 9 commits into from
Closed

Hebrew support #148

wants to merge 9 commits into from

Conversation

hmemcpy
Copy link
Contributor

@hmemcpy hmemcpy commented Apr 9, 2014

This PR adds support for humanizing Dates and TimeSpans into Hebrew. Based on the Arabic resource.

[InlineData(-11, "לפני 11 יום")]
public void DaysAgo(int days, string expected)
{
Assert.Equal(expected, DateTime.UtcNow.AddDays(days).Humanize());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SomeDate.Humanize is very hard to assert on as CPU ticks over during assertion and tests fail randomly. Please use the new DateHumanize.Verify method instead. You can see that used in other localisation tests.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe #156 would help here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I just took the Arabic tests and simply changed the strings, but I see your point. Using DateHumanize.Verify should then be used everywhere.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is almost used everywhere - a few classes still use the old Assert.Equal way. I think your code might have been based on the old Arabic tests as they were updated a few days ago.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bah, I must have missed it. Thanks, I'll fix it!

@MehdiK
Copy link
Member

MehdiK commented Apr 10, 2014

Thanks for the great contribution mate. I've commented on a few things I'd appreciate you could fix.

Also please add your PR to the release_notes file on the root.

@hmemcpy
Copy link
Contributor Author

hmemcpy commented Apr 10, 2014

Thanks for the notes, I'll fix all those things you mentioned!

@hmemcpy
Copy link
Contributor Author

hmemcpy commented Apr 12, 2014

Made more changes, fixing all your remarks!
ToWords to follow, thanks to changes by @hazzik et al

src/TestResults/*
# Roslyn's metadata directory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hahaha! Cool :)

@MehdiK
Copy link
Member

MehdiK commented Apr 12, 2014

Thanks for the effort. This is merged now. Please implement FromNow when you can.

For ToWords please refer to Russian ToWords. There is a fair bit of goodness in there you can use for ToWords (and your Formatter).

@MehdiK MehdiK closed this Apr 12, 2014
@hmemcpy hmemcpy deleted the hebrew branch April 12, 2014 13:35
@MehdiK
Copy link
Member

MehdiK commented Apr 12, 2014

This is now published to NuGet as v1.21.1. Thanks.

@hmemcpy
Copy link
Contributor Author

hmemcpy commented Apr 12, 2014

Woot! Awesome
:)

On Sat, Apr 12, 2014 at 5:48 PM, Mehdi Khalili notifications@github.comwrote:

This is now published to NuGet as v1.21.1. Thanks.


Reply to this email directly or view it on GitHubhttps://github.com//pull/148#issuecomment-40282150
.

Igal Tabachnik | Software Developer and Consultant |
CodeValuehttp://codevalue.net/| +972-54-4766343 |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants