doctrine / inflector

Doctrine Inflector is a small library that can perform string manipulations with regard to uppercase/lowercase and singular/plural forms of words.
https://www.doctrine-project.org/projects/inflector.html
MIT License
11.26k stars 137 forks source link

Correct pluralization of axis #241

Closed iurciuc closed 9 months ago

iurciuc commented 9 months ago

Issue: https://github.com/doctrine/inflector/issues/240

What Is the Plural of Axis?

malarzm commented 9 months ago

@iurciuc thanks for your PR! I'm afraid we have a hard nut to crack here as per the tests: axes was previously singularized to axe and after your change no longer is. I can't really see a way forward as fixing your bug means breaking something that worked before :/

malarzm commented 9 months ago

Theoretically we could fix axis -> axes and still have axes -> axe as the lib has no way of knowing what word it should singularize into. Thoughts?

iurciuc commented 9 months ago

In 99% of cases axes->axe will be what user expected! To be consistent(English in this case is not so consistent) we can build a feature to provide possibility to extend the logic of this lib by a config.

malarzm commented 9 months ago

I think config is an overkill in this case :) Let's proceed with fixing axis -> axes but keeping axes -> axe

iurciuc commented 9 months ago

Fixed

malarzm commented 9 months ago

Thanks @iurciuc!