Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295094

Entity type labels lack plurality, cannot generate UI text based on label if plural is needed

$
0
0

Problem/Motivation

There are a couple of places within modules where you want to provide generic labels for an entity type:

  • If you want to add a single entry
  • If you want to list multiple entries
  • IF you want to list a known quantity of entries

While one label might work in english, it certainly doesn't work in other languages.

Proposed resolution

Add an explicit singular, plural and count label to entity types

Remaining tasks

User interface changes

API changes

3 new methods on EntityTypeInterface:

  • getSingularLabel()
  • getPluralLabel()
  • getCountLabel()

Data model changes


Viewing all articles
Browse latest Browse all 295094

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>