-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 label_singular
to collection config
#1086
Conversation
Deploy preview for netlify-cms-www ready! Built with commit d7ca84a |
Deploy preview for cms-demo ready! Built with commit d7ca84a |
Deploy preview for netlify-cms-www ready! Built with commit c13a2ce |
Deploy preview for cms-demo ready! Built with commit c13a2ce |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is perfect, thanks @peduarte. Totally agree with the logic behind "label_singular" rather than "plural".
@erquhart that's cool thank you! I see this PR is now conflicting with master, I can resolve these. Would you like me to rebase master into this branch too (as per contributing docs)? |
Just fixed actually - merged a newer PR by mistake earlier and broke a bunch. |
@erquhart well thank you! 🙏 |
@peduarte Thank you for including the matching docs update!! 😉
|
@verythorough So I assume it was originally thought of as an override for automatic pluralization, whereas this would be strictly manual? |
@tech4him1 that's correct. The goal of this implementation is to be strictly manual, as it's been discovered that trying to intelligently pluralize/singularize words doesn't work. |
Hey there 👋 is there an "ETA" for this? Thanks! 👍 |
I see no blockers, and it looks like @erquhart approved, so I think we're good to go. Thanks for the nudge, and for the contribution! I'm looking forward to making use of this. |
Hello 👋
This PR adds
label_singular
to collection config.Fixes #684
- Summary
This field will be used in the UI in places where a singular label makes more sense. For example:
If you have a "Posts" collection, the "add collection" button in the UI will show as "New Post" rather than "New Posts".
I went with
label_singular
because I foresee majority of Collection names being in plural. Therefore, I think by default the label should respect the collection name.However I'm happy to change it to
label_plural
if needed.- Test plan
There doesn't seem to be tests for certain fields in the config, such as
label
, perhaps because these are optional fields. For this reason I have not written any tests.- Description for the changelog
Add
label_singular
to collection config