Closed CdTgr closed 1 month ago
good catch, ies -> y is probably a safe assumption to make for most english words so can be easily added. the rest are a bit harder. maybe there's a library that handles converting between singulars and plurals?
Yes I too think so. A simple string replacement would not be sufficient for a language.
Probably inflection would do. The only down I see there is that this one has a lot of dependencies, but there might be something else with lesser dependencies.
It might also work, maybe with some tree shaking.
plurazile looks ideal, no dependencies, just a lot of custom rules. Maybe not as good as something like inflection but much more light weight. Thoughts?
Yes it looks so nice and small. But the downside I see in it is that the package was last updated 5years ago. Either there is nothing to update in between or might be stale. But the package itself looks solid, if there is something that's not covered in the package, it can always be replaced with another one.
But I still assume there might be some specific items missing from the package as I see its also using some kind of mapping.
agreed. There's some newer ones but theyre much less popular. Lets give this one a go, and can swap it out later if there's any major issues. Looking at the list of open issues and PRs, it looks like a lot of very niche edge cases, so sounds like the main ones are handled
Fix is live in v9.4.1 🚀
Thanks a lot for the quick fixes and the knowledgeable conversation ❤️
Relating to the issue 79 and the PR #82, the plurals for some of them are corrected, but not all plurals ends with
sses
.I got this issue when I was using the key
capabilities
where the types generated is ascapabilitie
but the actual singular iscapability
Also some of the other plurals are completely different as well.
eg: