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

Timespan fixes for Romanian (ref. #632) #637

Merged
merged 4 commits into from
Nov 3, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public void Milliseconds(int millisSeconds, string expected)
}

[Theory]
[InlineData(0, "0 secunde")]
[InlineData(1, "1 secundă")]
[InlineData(14, "14 secunde")]
[InlineData(21, "21 de secunde")]
Expand Down Expand Up @@ -103,5 +104,13 @@ public void Years(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: Humanizer.Localisation.TimeUnit.Year));
}

[Fact, CustomDescription("The name of this test is confusing because has no sense. Instead should be read as an interval with duration zero and not the absence of time.")]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Related #161.

public void NoTime()
{
// Usage in Romanian: "Timp execuție: 0 secunde."
// Should be equivalent with TimeSpan.FromSeconds(0).Humanize()
Assert.Equal("0 secunde", TimeSpan.Zero.Humanize());
}
}
}
2 changes: 1 addition & 1 deletion src/Humanizer/Properties/Resources.ro.resx
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
<value>1 săptămână</value>
</data>
<data name="TimeSpanHumanize_Zero" xml:space="preserve">
<value>niciun timp</value>
<value>0 secunde</value>
</data>
<data name="TimeSpanHumanize_MultipleMonths" xml:space="preserve">
<value>{0}{1} luni</value>
Expand Down