-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
Supports common verbs? #98
Comments
Possibly related to #25. It's a tricky problem and I thought about it before, but I couldn't think of much reason to have this automated. I would have thought it'd be easier to use an i18n library that switches on numbers, or some other templated approach. Can you share more about how you'd like to see a library automatically work with verbs? |
Just ran into a similar case, first tried to see if by any chance it was handled already, but perhaps something naive would suffice for many cases: const inverse = n => (n - 1) ? 1 : 2
let count = 5
const msg = pluralize('record', count, true) ' ' pluralize('exist', inverse(count)) |
I'm just facing a situation where I use pluralize to pluralize a noun (membership/memberships) but then the following word is a verb (is/are) and I will have to modify it by hands.
What about supporting common verbs like
to be
to have
to do
?Could look like
?
Maybe add the extra function in the package?
pluralize_verb
? or an argument to specify it's a verb?The text was updated successfully, but these errors were encountered: