Skip to content
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

Add more irregular words #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add more irregular words #25

wants to merge 1 commit into from

Conversation

hkdobrev
Copy link
Contributor

Any help with the tests is appreciated!

@@ -39,6 +39,9 @@
->plural('/^(ox)$/i', '\1en')
->plural('/^(oxen)$/i', '\1')
->plural('/(quiz)$/i', '\1zes')
->plural('/^is$/', 'are')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is, was, has are verbs, not nouns. Please remove them.

Copy link
Contributor Author

@hkdobrev hkdobrev Aug 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@olvlvl I realise they are verbs, but they are quite useful when showing notifications in a website and you have a verb based on a subject which could be a number of items of 0, 1 or more than 1.

1 product was added to your cart

2 products were added to your cart

I'd use an inflector here on both product/products and was/were.

@olvlvl
Copy link
Member

olvlvl commented Aug 25, 2017

Thanks for your contribution! I left a comment, it should fix the issues. I'm in an hackathon until Saturday. If the problem persist I'll have a look next week.

@hkdobrev
Copy link
Contributor Author

hkdobrev commented Aug 31, 2017

@olvlvl I don't get why this

	->singular('/^are$/i`', 'is')
	->singular('/^were$/i`', 'was')
	->singular('/^have$/i`', 'has')

would break the tests as I have added ^ and $. Am I missing something? I suspect there could be a deeper issue behind this.

@olvlvl
Copy link
Member

olvlvl commented Aug 31, 2017

Please rebase.

@hkdobrev
Copy link
Contributor Author

hkdobrev commented Aug 31, 2017

Please rebase.

✅ Done.

->irregular('leaf', 'leaves')
->irregular('loaf', 'loaves')
->irregular('man', 'men')
->irregular('move', 'moves')
->irregular('nucleus', 'nuclei')
->irregular('octopus', 'octopuses')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants