From entity.views.inc:

        // @todo: Support an entity info description key or such?

Also, there are needs for a multiple label, e.g. I think feeds already invents something like that. We should do it with the entity.module and push it for d8.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fago’s picture

adding tag

fago’s picture

Status: Active » Needs review
FileSize
2.86 KB

Patch adding those keys for d7 attached.

bojanz’s picture

I like both the patch and the idea.

fago’s picture

Status: Needs review » Needs work

ok, so I guess we should provide that values for all core-entities then.

klausi’s picture

Status: Needs work » Needs review
FileSize
3.79 KB

oh boy, this could become a real bike shedding issue. I find it hard to come up with proper core entity descriptions. But at least I tried ;-)

Not sure the descriptions are in the right place though.

fago’s picture

Status: Needs review » Needs work
+++ b/entity.module
@@ -1160,6 +1160,17 @@ function entity_entity_info_alter(&$entity_info) {
+  $entity_info['node']['description'] = t('Nodes represent the main site content items.');

sounds good to me.

+++ b/entity.module
@@ -1160,6 +1160,17 @@ function entity_entity_info_alter(&$entity_info) {
+  $entity_info['user']['description'] = t('User account.');

Views has:
Users who have created accounts on your site.

+++ b/entity.module
@@ -1160,6 +1160,17 @@ function entity_entity_info_alter(&$entity_info) {
+  $entity_info['file']['description'] = t('Uploaded file.');
+  if (module_exists('comment')) {

we should move this under the existing if clauses in _entity_info_add_metadata_callbacks() + improve that function name to fit.

+++ b/entity.module
@@ -1160,6 +1160,17 @@ function entity_entity_info_alter(&$entity_info) {
+    $entity_info['taxonomy_vocabulary']['plural label'] = t('Taxonomy vocabularies');

We are still missing plural labels for the other entity types?

+++ b/entity.module
@@ -1160,6 +1160,17 @@ function entity_entity_info_alter(&$entity_info) {
+    $entity_info['taxonomy_vocabulary']['description'] = t('Collection of terms on a certain topic.');

help has:
"To classify content, you define vocabularies that contain related terms, and then assign the vocabularies to content types."
So what about:
"Vocabularies contain related taxonomy terms, which are used for classifying content."

+++ b/entity.module
@@ -1160,6 +1160,17 @@ function entity_entity_info_alter(&$entity_info) {
+    $entity_info['taxonomy_term']['description'] = t('Single category in a vocabulary.');

Views has: "Taxonomy terms are attached to nodes."
ouch.
Taxonomy module has that help sentence:

Taxonomy is for categorizing content. Terms are grouped into vocabularies. For example, a vocabulary called "Fruit" would contain the terms "Apple" and "Banana".

So maybe, "Taxonomy terms are used for categorizing content."

klausi’s picture

Oh, I thought we don't need the plural forms for regular words, but of course they are needed for translations.

Fixed all your remarks.

klausi’s picture

Status: Needs work » Needs review
fago’s picture

Thanks, patch looks good. We just spotted in inconsistency inside core:

Taxonomy terms are used for categorizing content

Vocabularies contain related taxonomy terms, which are used for classifying content.

Classify or categorize? I'd vote for the former.

klausi’s picture

explaining things in other words might not be an inconsistency. Anyway, I don't care about that minor detail.

fago’s picture

Status: Needs review » Fixed

It's minor, still users might be confused by different wordings in different places in the UI (see node, content, post ..). So I've chosen "classifying" and committed it.

Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.