Problem/Motivation

The taxonomy terms used in the Recipe Category vocabulary are all singular:

The Recipe Category vocabulary page highlighting the singular terms

This is ok for tagging, but when that tag is used to generate a list page, the tag being singular is odd because we're listing things.

The main course listing page with singular title

If we updated the terms in this vocabulary to be plural - Main Courses, Desserts etc, it would still make sense from a tagging point of view, but the listing pages would make more sense.

Proposed resolution

Update all the terms in this vocabulary to be plural.

Remaining tasks

All the things.

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

Eli-T created an issue. See original summary.

lolcode’s picture

StatusFileSize
new9.49 KB

Attaching a basic patch that pluralises these terms.

#DrupalNorth2018

lolcode’s picture

Status: Active » Needs review
lolcode’s picture

Issue tags: +DrupalNorth2018
eli-t’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new136.01 KB

Patch reviewed manually and installed vi simplytest.me. Does exactly as suggested.

Pluralised taxonomy terms in the Recipe Category vocabulary

Therefore RTBC.

alexpott’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new169.13 KB

This feels like a very debatable thing in terms of how the taxonomy is used. Obviously it looks much better on the taxonomy page but on each recipe it is displayed like
Recipe type taxonomy on a recipe page
And here it is more like a facet or recipe type where having a plural doesn't really work.

eli-t’s picture

@alexpott can you expand on why you think the plural doesn't work on a recipe page? To me, Recipe category: Main course and Recipe category: Main courses are equally valid, and we had consensus on the weekly OOTB call for this change.

Categorising things with pluralised nouns is not in any way unusual - lions and tigers are often described as belonging to the group Big Cats, the classification of an Archaeopteryx is Animalia -> Chordata -> Dinosauria -> Theropoda -> Archaeopterygidae, all of which are plural terms (unless my Latin is letting me down which is totally possible).

alexpott’s picture

It's good to know you have consensus. My reasoning is based around http://accidental-taxonomist.blogspot.com/2012/07/deviating-from-taxonom... - specifically...

The standard is to use plural for terms that are countable nouns. The idea is is that when users select a term they will find multiple documents, records, or digital assets (in plural) indexed with or categorized by the term. Enterprise and ecommerce taxonomies, however, tend to be comprised of multiple taxonomy facets, whereby the user selects terms from a combination of facets. Taxonomy terms within facets then appear to user to be filters, scopes, aspects, or attributes, rather than simply a category of plural objects. For example, a document type facet might have terms in the singular describing the type of document: Article, Report, Form, Application, Interview, etc., all in the singular to answer the question “what kind of document.” The names of the facets themselves may also be in singular, rather than plural, so as to “limit by” a facet, such as: Document type, Location, Topic, Department, etc.

I feel recipe category is very similar to a document type facet. But I'm also happy to be overruled and a choice made by the team - had to ask the question though.

eli-t’s picture

@alexpott thanks for the source - I've asked Mark & Keith if they want to comment based on the new information, it may well be that in light of that we don't have consensus any more.

Of course if we decide to not pluralise the taxonomies, they are alternative solutions to solve the singular nature of the title on the term page, for example having a term field with the pluralised title, or prefix the page title with "Recipe Category: " etc.

jwlockhart’s picture

I am picking this up at #uoe-d8-contribution Edinburgh University Drupal 8 Contribution day 2018.

jwlockhart’s picture

Only issue was the patch file seems not to want to patch on my Mac (Formatting issues?), so I ended up formatting the patch file contents for Mac to work on my system. Then the patch worked fine. I can offer to upload a generated patch file for comparison.

No comment on the discussion regarding approach.

lolcode’s picture

I contributed the quick patch during a code sprint day and I very much see it as a short term fix. I think it would be fine to put in place for a couple of point releases until a better solution can be worked on. @jwlockhart It looks like the test bot was able to apply the patch?

volkswagenchick’s picture

Issue tags: +fldc19, +sfdug, +dcnj19

Tagging for upcoming contribution days.

brightbold’s picture

StatusFileSize
new9.49 KB

I think the reason lolcode's patch in #2 doesn't apply is because since they created it, a typo in "mozzarella" was fixed, so the patch with the old spelling no longer applied. I created a new patch and that ended up being the only difference between the two! So here is what essentially amounts to a reroll.

jcloys’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new253.94 KB

Confirmed the patch applies and the taxonomy terms are plural per the attached screenshot.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 14: 2991577-pluralise-taxomony-terms-14.patch, failed testing. View results

pawandubey’s picture

@BrightBold

I just took the latest code (8.7.x) and found there is change in the second line in receipes.csv file:

Vegan chocolate and nut brownies,vegan-chocolate-nut-brownies.jpg,"A stack of chocolate and pecan brownies, sprinkled with pecan crumbs and crushed walnut, fresh out of the oven","Scrumptious vegan chocolate brownies that are rich, fudgy, and nutty. These delights have a surprise hint of coconut making them the perfect indulgence. Serve warm with a little vanilla dairy-free ice cream!",Umami,Snack,20,20,40,medium,"6 tbsp sunflower oil, 80g vegan dark chocolate, 170g plain flour, 80g coconut flour, 1 tsp baking powder, 9 tsp cocoa powder, 100g caster sugar, 3 tbsp of maple syrup, 1/4 tsp sea salt, 1 tsp vanilla extract, 230ml unsweetened organic soya milk, 100g pecan nuts, 80g walnut halves",vegan-chocolate-nut-brownies.html,12,"Baking,Chocolate,Vegan,Dairy-free",recipes/vegan-chocolate-and-nut-brownies

Can you please verify at your end on this? And if changes are there then please share the latest patch accordingly.

brightbold’s picture

StatusFileSize
new10.18 KB

Try this. (Quickly! Before someone changes recipes.csv again!)

brightbold’s picture

Status: Needs work » Needs review
pawandubey’s picture

@BrightBold

I am on it. :)

pawandubey’s picture

@BrightBold

I have verified this patch#18 and its working fine.
RTBC +1

brightbold’s picture

Status: Needs review » Reviewed & tested by the community

Thanks! (took the liberty of updating the status since it seems like you meant to.)

eli-t’s picture

Status: Reviewed & tested by the community » Needs review

Thanks everyone for getting this back up to spec.

I'm not sure we've come to a consensus on the comment on #8 as to whether this is a beneficial change? Putting back to needs review for now.

brightbold’s picture

FWIW (I didn't comment on this before I created the patch because I felt like you were talking to other OOTB leaders), but to me this change makes sense. My interpretation of the source that alexpott posted was that it is logical to use a singular term if you're providing the site visitor with multiple search facets, so they might want to say "find me things that are both an appetizer and egg-based." But for our current implementation, that's not what we're doing; we're saying "here is a collection of appetizers" and therefore the plural makes more sense for our use case.

Also, if we ever were to offer a complex search, I don't think it's illogical to think of it as "find me things that fall into the category of appetizers and also contain eggs," (where egg would presumably be in a different facet containing ingredients). I'm not a professional taxonomist (nor do I play one on TV), but to this taxonomy layperson. the plural makes more sense for our current need and isn't any less logical for potential future needs.

volkswagenchick’s picture

Issue tags: -dcnj19 +midcamp2019

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

kjay’s picture

I also think for our use case of the recipe category, pluralisation helps make more sense of the term links and titles. My vote goes with continuing the pluralisation of terms in this vocab.

morrisona’s picture

StatusFileSize
new9.8 KB

I rerolled the patch manually with the help of @cosmicdreams.

cosmicdreams’s picture

StatusFileSize
new6.75 KB

Recent patch only had 2 flaws. Fixed with this.

The last submitted patch, 28: 2991577-28.patch, failed testing. View results

brightbold’s picture

Rerolled for 8.8.x. The patch in 29 might apply to 8.7.

Big thanks to whomever refactored the taxonomy terms out into their own csv file — that made rerolling this patch much easier!

brightbold’s picture

@web-developer-1993 — Thanks for rerolling the patch! I was in a rush yesterday and didn't take the time to explain why the reroll I submitted was so different, but I thought it deserved an explanation.

When this issue was originally created, the names of the taxonomy terms were included in the recipes.csv file. So the change to plural needed to be made there, as it was in your patch. But as part of the work to make Umami translatable into other languages, recently the taxonomy terms were separated into their own recipe_category.csv file, and the recipes.csv file was changed to include the term IDs that pointed to those terms instead of using the category name. (Looks like this change happened in #3028627: Restructure Umami's default content files so more than one language can be included.) So that's why your manual reroll didn't work, because unbeknownst to you those terms were no longer present in the file. Usually a reroll on an issue like this would be more straightforward — I was initially pretty confused when I realized the categories had completely disappeared from recipes.csv!

Thanks again for contributing to this issue. I hope you had fun sprinting at DrupalCon.

pawandubey’s picture

Status: Needs review » Reviewed & tested by the community

@BrightBold
Thanks for the detailed explanation on this.

I have verified and tested the patch#31 related to taxonomy terms and its working fine. Moving this to RTBC.

shaal’s picture

Status: Reviewed & tested by the community » Needs work
Related issues: +#3048699: Taxonomies are only displayed in English

This is great, thank you!
Thanks to this patch I was able to discover a bug in Umami 8.7 -
#3048699: Taxonomies are only displayed in English

To get this patch ready we need the same tags pluralized in Spanish as well.
English CSV file - works well!
core/profiles/demo_umami/modules/demo_umami_content/default_content/languages/en/taxonomy_term/recipe_category.csv

Spanish CSV file - needs work (the only difference in the file's path is es instead of en
core/profiles/demo_umami/modules/demo_umami_content/default_content/languages/es/taxonomy_term/recipe_category.csv

In order to test this issue you would have to apply this patch first #3048699: Taxonomies are only displayed in English (unless it's already committed to core)

brightbold’s picture

Good catch, Schaal. I totally forgot about the Spanish translation.

My Spanish is meh so can someone more fluent confirm that these plurals are correct and make sense in context (per the earlier discussion that the plural of breakfast in this case would be breakfast)?

  • Acompañamientos
  • Postres
  • Platos principales
  • Tentempi‌és
  • Entrantes
brightbold’s picture

Deleted duplicate comment, sorry

Swapnil_Kotwal’s picture

Assigned: Unassigned » Swapnil_Kotwal
Swapnil_Kotwal’s picture

Assigned: Swapnil_Kotwal » Unassigned
volkswagenchick’s picture

Issue tags: +drupalnorth2019

Tagging for DrupalNorth 2019

cristiroma’s picture

Status: Needs work » Needs review
StatusFileSize
new1.33 KB
new427 bytes

Confirmed with Spanish speaking guys the translations and they pass. Attaching a patch including these as well.

eli-t’s picture

Status: Needs review » Needs work

The patch in #40 is missing the pluralisation of the Spanish Plato principal => Platos principales

cristiroma’s picture

Status: Needs work » Needs review
StatusFileSize
new1.35 KB
new600 bytes

Thank you for your review @Eli_T. I have updated the patch accordingly.

eli-t’s picture

Status: Needs review » Reviewed & tested by the community

I have tested the patch on #42.

I've compared the tags on /es/admin/structure/taxonomy/manage/recipe_category/overview and /en/admin/structure/taxonomy/manage/recipe_category/overview and confirmed they are all pluralised.

As a OOTB maintainer has indicated they are happy with this direction, and it has been correctly implemented, I am marking this RTBC.

alexpott’s picture

Version: 8.8.x-dev » 8.7.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 41957b6030 to 8.8.x and f10c52b708 to 8.7.x. Thanks!

  • alexpott committed 48df34d on 8.8.x
    Issue #2991577 by BrightBold, cristiroma, lolcode, morrisona,...

  • alexpott committed f10c52b on 8.7.x
    Issue #2991577 by BrightBold, cristiroma, lolcode, morrisona,...

Status: Fixed » Closed (fixed)

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