Skip to content

better handling of multi-word idents#29

Merged
paganotoni merged 4 commits into
gobuffalo:masterfrom
pgier:multiword-idents
Aug 27, 2020
Merged

better handling of multi-word idents#29
paganotoni merged 4 commits into
gobuffalo:masterfrom
pgier:multiword-idents

Conversation

@pgier

@pgier pgier commented Nov 21, 2019

Copy link
Copy Markdown
Contributor

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.

@ghost ghost left a comment

Copy link
Copy Markdown

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).

Comment thread ident.go Outdated
@pgier

pgier commented Nov 21, 2019

Copy link
Copy Markdown
Contributor Author

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

pgier commented Nov 22, 2019

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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