Problem/Motivation
Hello,
In certain configurations and for some site builders there may be a need to have a label for a field that differs when the field has more than one item. For example 'Topics' and 'Topic'. As field_label allows a site builder to change the label of a field at its discretion, it would be interesting to leverage this functionality and accommodate the case described above by including it in this module.
Proposed resolution
Add new settings and check field cardinality and field items count and replace custom label.
User interface changes
Add a new 'Plural label' field third party setting and 'Plural label enabled' toggler on Field Label Configuration form.
Data model changes
field.formatter.third_party.field_label and field_label.settings schema should be updated. Since new setting is set 'false' by default, current field configuration shouldn't be affected.
Cheers!
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3416747-3.patch | 6.74 KB | joao.ramos.costa |
Issue fork field_label-3416747
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
joao.ramos.costa commentedHeŕe is a patch from the current MR.
Comment #4
justcaldwellHello @joao.ramos.costa.
Wow, what a great idea -- thanks for the contribution! I'll try to get this reviewed in the next couple of days.
Thanks again.
Comment #5
joao.ramos.costa commentedHi @justcaldwell,
Thank you ! :)
Comment #7
justcaldwellGreat implementation. Merged with new release to follow shortly.
Thanks again for the contribution! 🙏
Comment #8
joao.ramos.costa commentedSuper! Thanks a lot!
João.