Closed codingdna2 closed 4 years ago
A side note. I've included a reference to Humanizer.Core which includes only the English localization. I suppose it's enough for most scenarios. You can decide to include Humanizer package instead, which includes all the languages availables (but I've no idea if all of them implements pluralization).
Best Regards, D.
@ErikEJ Thanks for reviewing!
@codingdna2 Couple of questions / requests:
nameof
?aa593dc1
and select New Branch. Name the branch: @fix/data-annotation
. Select Checkout branch.@fix/pluralization
branch from aa593dc1
with commits 2fdb4f76 and 2006079a cherry-picked.ExpectedXXX
classes. Would you be able to add a unit test for the pluralization option?
- What happens if non-English language is specified but not supported by Humanizer.Core? Will it revert to strings instead of
nameof
?
Two questions here:
nameof
(no conflicts, no compiler error in sight), it'll still use nameof
.
- Would you be able to separate commits for this PR from your other PR? The easiest is to use Visual Studio.
I guess is not a problem. Be aware that I'll need to remove the usage of nameof
from ExpectedXXX
(leaving, if you merge both PRs, with non-runinng tests).
- Thanks for updating the
ExpectedXXX
classes.
You're welcome!
Would you be able to add a unit test for the pluralization option?
The unit tests are already running with pluralization by default (all the collections are plural). I see it requires quite a lot of effort to split them all to have both singular and plural tests. I need more time.
All in all, it would be easier if you can accept the first PR shortly (as is bugfix), so I can do a merge on the second PR with calm (as is enhancement). But I'll do what you prefer ;)
Regards, D.
I’ll be glad to merge #108 first. The problem is that you did not create a separate branch for the PR. In this case I advise you rename your fork, then refork my repo, so that your master branch matches mine.
For some guidance on creating a PR, please refer to the Contributing Guidelines.
Ahahah I didn't notice up now. I guess this is what happens when you work from home while looking at your 4 years old daughter (or late night while she's sleeping)... I'll fix everything asap.
@codingdna2 Did you rename your fork, then refork my repo? That should give you the cleanest starting point.
I've practiced and failed! I moved my modifications to @fix/pluralization but the merge complicated the squash... I guess I'm going to refork and move modifications manually.
@codingdna2 When you re-fork, remember to create a separate branch, according to the Contributing Guidelines.
Almost completed including the separated tests.
This PR includes previous modifications proposed in PR #108, adding a Pluralization service implemented with Humanizer package.