You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The singular form of "invoices" is "invoice". Similar words are "voices" -> "voice" and "choices" -> "choice". Flect.Singularize() does not return the correct singular form of these words. As a side note, flect.Pluralize() does return the proper plural form of the singular form of these words.
Thanks for reporting this! Indeed, this is a bug and should be fixed as soon as possible.
I took a look at the code shortly and I think we need to fix the logic. We currently use a single table for both s-to-p and p-to-s, but they are not always reversible. I will check again soon.
Description
Description
The singular form of "invoices" is "invoice". Similar words are "voices" -> "voice" and "choices" -> "choice". Flect.Singularize() does not return the correct singular form of these words. As a side note, flect.Pluralize() does return the proper plural form of the singular form of these words.
Expected Behavior
flect.Singularize("invoices") == "invoice"
flect.Singularize("voices") == "voice"
flect.Singularize("choices") == "choice"
Actual Behavior
flect.Singularize("invoices") == "invoex"
flect.Singularize("voices") == "voex"
flect.Singularize("choices") == "choex"
To Reproduce
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: