Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#43370 closed enhancement (fixed)

Consider to make the `Format` taxonomy name plural

Reported by: afercia's profile afercia Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.1 Priority: normal
Severity: normal Version: 3.1
Component: Taxonomy Keywords: has-patch needs-testing has-screenshots commit
Focuses: Cc:


When taxonomies register their labels, the name is usually plural and the singular_name is singular. The name default is 'Tags' / 'Categories', while the singular_name default is 'Tag' / 'Category'.

Additional taxonomies register their own labels, for example:
'Navigation Menus' / 'Navigation Menu'
'Link Categories' / 'Link Categoriy'

Plugins often follow the same pattern, for example:
'Project Types' / 'Project Type'
'Project Tags' / 'Project Tag'

Instead, the post_format taxonomy uses a singular form for both the name and singular_name:
'Format' / 'Format'

Seems it works this way since the introduction of these labels in [17261]. Reading the original ticket #16172 seems to me Formats was avoided to not introduce a new string during the "strings-freeze" release period, and it was decided to keep it singular "for now".

While ti's a minor issue, sometimes there's the need to have a proper plural name for Formats, for example when listing programmatically the registered taxonomies.

I'd propose to change the name to a plural form Formats. /cc @SergeyBiryukov

Attachments (2)

43370.diff (454 bytes) - added by danieltj 6 years ago.
Updated the format name
43370.2.diff (529 bytes) - added by afercia 6 years ago.

Download all attachments as: .zip

Change History (11)

6 years ago

Updated the format name

#1 @danieltj
6 years ago

  • Keywords has-patch needs-testing added
  • Severity changed from normal to minor

Added a patch to add an s to the string in 43370.diff.

#2 @joostdevalk
6 years ago

+1 on fixing this.

This ticket was mentioned in Slack in #core by afercia. View the logs.

6 years ago

#4 @afercia
6 years ago

Note: patches should be generated from the trunk version. The wp-includes/taxonomy.php file used to generate the attached patch has different spacing compared to the one on trunk, I guess it has been generated from the stable version.

6 years ago

#5 @afercia
6 years ago

  • Keywords has-screenshots added
  • Severity changed from minor to normal
  • Type changed from defect (bug) to enhancement

Refreshed patch.

To my knowledge, the taxonomy name is meant to be used for displaying purposes. A couple places in core that would be "affected" are the Menus screen and the Customizer:

#6 @danieltj
6 years ago

Yes, sorry the patch was generated from the stable version (4.9.4) rather than trunk, apologises. In favour of this changing though for English reasons and consistencies as well. Looks good to me anyway.

#7 @ocean90
6 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 5.0

#8 @SergeyBiryukov
6 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 42755:

Taxonomy: Make the "Format" taxonomy name plural, for consistency with other taxonomies.

Props afercia, danieltj.
Fixes #43370.

#9 @johnbillion
6 years ago

  • Milestone changed from 5.0 to 5.1
Note: See TracTickets for help on using tickets.