WordPress.org

Make WordPress Core

Opened 3 weeks ago

Closed 3 weeks ago

#54712 closed defect (bug) (fixed)

Users: Use the "Posts" post type general name contextualized string in user’s posts count column label

Reported by: audrasjb Owned by: audrasjb
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: Users Keywords: has-patch commit
Focuses: Cc:

Description

Since some locales may differentiate "Posts" generic post type name (works for both posts, pages, and custom post types) and "Posts" when speaking about blogposts, it would be nice to contextualize the use of the "Posts" string in the Users Screen.

Indeed, it only lists Posts (the post type) and not Pages or any other post type.

For example, in French, we have the following translation rules:

  • "Pages" => "Pages"
  • "Posts" => "Articles"
  • "Posts" (generic name for posts, whatever post type it is) => "Publications"
  • "Custom post type" => "Type de publication personnalisé"

My proposal would be to use the following string so it doesn't add any new string to manage for translators.

_x( 'Posts', 'post type general name' ), which is the string used for the "Posts" post type registration.

It would be a really transparent change for everyone.

Please props @jdy68 for the initial report on the French community slack team.

Change History (6)

This ticket was mentioned in PR #2099 on WordPress/wordpress-develop by audrasjb.


3 weeks ago

  • Keywords has-patch added; needs-patch removed

#2 @audrasjb
3 weeks ago

  • Keywords 2nd-opinion added
  • Milestone changed from Awaiting Review to 5.9

Since this patch is only switching an already translated string to another so it won’t introduce any new string after soft string freeze, I’m pinging @SergeyBiryukov (as I18n component maintainer and experienced committer) for 5.9 consideration.
Thanks for your 2nd opinion on this :-)

It’s perfectly ok to move this to 6.0, but it would solve an annoying bug happening on some locales (wrong Posts count because it's not ALL Posts, but only the "Posts" post type), for free 😊

#3 @SergeyBiryukov
3 weeks ago

  • Keywords commit added; 2nd-opinion removed

Looks good to me :)

#4 @audrasjb
3 weeks ago

Super, I'm going to commit it now then. Thanks!

#5 @audrasjb
3 weeks ago

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

#6 @audrasjb
3 weeks ago

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

In 52426:

Users: Use the "Posts" post type general name to contextualize the string used in Users posts count column label.

Since some locales may differentiate "Posts" generic post type name (works for both posts, pages, and custom post types) and "Posts" when speaking about blogposts, this change aims to contextualize the use of the "Posts" string in the "Users" admin screen. This change reuses the string used for the "Posts" post type registration, to avoid introducing any new string to translate.

Props audrasjb, jdy68, SergeyBiryukov.
Fixes #54712.

Note: See TracTickets for help on using tickets.