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

better handling of multi-word idents #29

Merged
merged 4 commits into from
Aug 27, 2020

Conversation

pgier
Copy link
Contributor

@pgier pgier commented Nov 21, 2019

The tablize_test includes some examples of multi-word idents. In these situations, it seems better to pluralize only the last word vs. treating the whole phrase as a single word.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Found some fixes!

P.S. share your ideas, feedbacks or issues with us at https://github.com/fixmie/feedback (this message will be removed after the beta stage).

ident.go Outdated Show resolved Hide resolved
@pgier
Copy link
Contributor Author

pgier commented Nov 21, 2019

Another possible approach to this would be to just treat everything as a suffix rule instead of using the map of complete words. I'm happy to change this if that seems like a better approach.

Replace only the last part of an ident when pluralizing
@pgier
Copy link
Contributor Author

pgier commented Nov 22, 2019

hmm, I realized I probably need to make similar changes to singularize.go

@paganotoni paganotoni merged commit fbe6eff into gobuffalo:master Aug 27, 2020
@paganotoni
Copy link
Member

Thanks @pgier !

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.

2 participants