WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 5 months ago

Last modified 4 months ago

#40244 closed enhancement (fixed)

Inconsistent casing in the list table select filters

Reported by: afercia Owned by: whyisjake
Milestone: 5.5 Priority: normal
Severity: normal Version: 5.4
Component: Administration Keywords: has-screenshots good-first-bug has-patch
Focuses: ui Cc:

Description

In the various admin screens with list tables (posts, pages, media, comments, users...) a toolbar on the top displays some <select> elements to filter the lists by different criteria.

The default option sometimes uses title casing, sometimes not. Using always the same casing would be an easy fix and a minor, but nice, UI enhancement.

Worth mentioning title casing is mainly an English thing. In many other languages just the first letter in a title or label is uppercase. This is a minor thing and probably can be handled by translations. However, while I'd generally agree to use title case for English titles and labels, I'm not sure it makes sense for the select options.

Some screenshots:

Posts screen: All dates and All Categories (see also Bulk Actions)

https://cldup.com/KXQKxL6CwG.png

Media Library screen: All media items and All dates

https://cldup.com/bYFVoEqabr.png

Comments screen: All comment types

https://cldup.com/cYY4EwHZjw.png

Users screen: Change role to...

https://cldup.com/CgiL5MCx8X.png

Haven't checked the network screens, there are probably some other cases around.

Given most of them don't use title casing, I'd propose to standardise on this.

Attachments (5)

40244.patch (3.5 KB) - added by bhargavbhandari90 4 years ago.
40244.2.patch (4.5 KB) - added by rcutmore 3 years ago.
Fix additional inconsistent casing and relocate patch to root directory
40244.3.patch (4.4 KB) - added by manojlovic 2 years ago.
40244.4.patch (4.6 KB) - added by lschuyler 9 months ago.
Refresh
40244.diff (26.8 KB) - added by whyisjake 5 months ago.

Download all attachments as: .zip

Change History (31)

#1 @welcher
4 years ago

  • Keywords needs-patch added

#2 @bhargavbhandari90
4 years ago

  • Keywords has-patch added; needs-patch removed

#3 @bhargavbhandari90
4 years ago

  • Version set to 4.7.4

#4 @bhargavbhandari90
4 years ago

May be there are more strings like this.

@rcutmore
3 years ago

Fix additional inconsistent casing and relocate patch to root directory

#5 @rcutmore
3 years ago

I added 40244.2.patch to fix a couple additional strings with inconsistent casing. These are on the grid view of the Media Library.

#6 @DrewAPicture
3 years ago

  • Owner set to bhargavbhandari90
  • Status changed from new to assigned

Assigning ownership to mark the good-first-bug as "claimed".

#7 @webzunft
3 years ago

I looked for more occurrences of similar strings using regex All [a-z] and didn’t find any that are relevant here. I also checked the code around the fixed strings and didn’t find similar texts that need adjustment of the casing.

#8 @SergeyBiryukov
3 years ago

  • Milestone changed from Awaiting Review to 5.0

@manojlovic
2 years ago

#9 @manojlovic
2 years ago

I updated patch and checked all lists, including Multisite screens.

#10 @jeremyfelt
2 years ago

Thank you for the patches @manojlovic, @rcutmore, and @bhargavbhandari90.

Re-reading the ticket description, I'm wondering if we should discuss the switch to title case vs sentence case a bit more. @afercia mentioned that "title casing is mainly an English thing". How much does this impact translations? It may make sense to use sentence casing for consistency.

#11 @pento
2 years ago

  • Milestone changed from 5.0 to 5.1

#12 @desrosj
23 months ago

  • Keywords needs-refresh added
  • Milestone changed from 5.1 to 5.2

This needs a decision based off the feedback in ticket:40244#comment:10. 40244.3.patch is also no longer applying to trunk.

#13 @desrosj
20 months ago

  • Milestone changed from 5.2 to Future Release

This still needs a refresh and further discussion.

@lschuyler
9 months ago

Refresh

#14 @lschuyler
9 months ago

  • Keywords needs-refresh removed

#15 @whyisjake
9 months ago

  • Keywords commit added
  • Milestone changed from Future Release to 5.5
  • Version changed from 4.7.4 to trunk

Thanks for the refresh @lschuyler!

Going to tag this for 5.5 since we are in a locked beta period for 5.4.

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


5 months ago

#17 follow-up: @desrosj
5 months ago

  • Keywords commit removed

I'd like to circle back to the question above asking for more information regarding sentence casing.

In general, Core has been moving towards using sentence casing. This initiative has laregely stemmed from Gutenberg (which I believe should now be fully sentence cased), and has made its way into Core for consistency in a few locations. Here are some links for reference.

I thought that I had seen an issue that had a full breakdown of the benefits of sentence case vs. title case, but I can't seem to find what I remember. But #49616 has a good summary:

  • Sentence case improves readability by allowing users to see proper shapes of words without the breaking flow of Capital Letters (i.e. Title Case is harder to read quickly because of how we typically read using the shapes of words.)
  • Sentence case respects the difference between proper nouns and the other words. For example, “Upgrade to premium plan” vs. “Upgrade to Premium Plan” could have very different meanings.
  • i18n: some languages capitalize different things (e.g. all nouns are capitalized in German). Title case adds cognitive load when users have to figure out which words are nouns, for example.

At this point, regardless of personal preference, I think that there is too much momentum towards sentence case throughout Core to update the strings here to follow title casing. For the sake of consistency with other areas of the project that have already changed over fully, sentence casing should be used.

If there arguments against title casing that have not been considered, this would warrant larger discussion across all aspects of the project being initiated through a Make Core post detailing why sentence casing is the wrong choice.

#18 in reply to: ↑ 17 @SergeyBiryukov
5 months ago

  • Keywords needs-patch added; has-patch removed
  • Owner bhargavbhandari90 deleted

Replying to desrosj:

At this point, regardless of personal preference, I think that there is too much momentum towards sentence case throughout Core to update the strings here to follow title casing. For the sake of consistency with other areas of the project that have already changed over fully, sentence casing should be used.

Yes, there seems to be some confusion here, as the ticket suggests standardizing on sentence casing, but the patches use title casing instead. I agree standardizing on sentence casing makes the most sense at this point.

#19 @whyisjake
5 months ago

  • Owner set to whyisjake
  • Status changed from assigned to accepted

@whyisjake
5 months ago

#20 @whyisjake
5 months ago

Added a new diff from areas that I spotted. This could get complicated (there are :alot: of strings to update) real quick. Would love some feedback here.

#21 @davidbaumwald
5 months ago

  • Keywords has-patch added; needs-patch removed

@whyisjake Is this still on your list to review prior to Beta 1 for 5.5?

#22 @whyisjake
5 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 48352:

Administration: Move more table strings to sentence casing.

WordPress as a project has moved largely to sentence casing for UI elements in the admin. This commit moves several string$

  • Move to trash
  • Mark as spam
  • Permanently delete comment
  • Approve comment
  • In response to
  • Bulk actions
  • Not spam
  • Sumitted on
  • Delete permanently
  • Add media
  • Upload files
  • Upload images
  • Add media
  • Bulk select
  • Restore from trash
  • Search media
  • Attachment details
  • Create gallery
  • Edit gallery
  • Cancel gallery
  • Add to gallery
  • Image details
  • Replace image
  • Cancel edit
  • Edit image
  • Choose image
  • Select and crop
  • Skip cropping
  • Crop image
  • Audio details
  • Replace audio
  • Add audio source
  • Video details
  • Replace video
  • Add video source
  • Select poster image
  • Add subtitles
  • Create audio playlist
  • Edit audio playlist.
  • Cancel audio playlist
  • Create video playlist
  • Edit video playlist
  • Add to video playlist
  • Filter media

Fixes #40244.
Props afercia, bhargavbhandari90, rcutmore, webzunft, manojlovic, jeremyfelt, desrosj, lschuyler, SergeyBiryukov, whyisjake.

#23 @SergeyBiryukov
4 months ago

In 48594:

Administration: Capitalize Trash consistently in various messages.

When used as a noun referring to the "virtual" place, Trash should be capitalized.

Follow-up to [47233], [48352].

See #45317, #40244.

#24 @SergeyBiryukov
4 months ago

In 48595:

Administration: Use sentence case for "Mark as spam" bulk action links for sites and users, for consistency with comments.

Follow-up to [48352].

See #40244.

#25 follow-up: @ramiy
4 months ago

@SergeyBiryukov the last commit is good but it created two similar translation strings (Not Spam & Not spam) both with site context.

#26 in reply to: ↑ 25 @SergeyBiryukov
4 months ago

Replying to ramiy:

the last commit is good but it created two similar translation strings (Not Spam & Not spam) both with site context.

Goot catch, thanks! It looks like this also affects the same strings with the comment context.

Let's address these and other casing inconsistencies in #50747 and #50773.

Note: See TracTickets for help on using tickets.