Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#50740 closed defect (bug) (fixed)

i18n: Merge similar translation strings in privacy request statuses

Reported by: ramiy Owned by: whyisjake
Priority: normal Milestone: 5.5
Component: I18N Version:
Severity: normal Keywords: has-screenshots has-patch
Cc: Focuses: administration

Description

The wp-includes/post.php file has a create_initial_post_types() function that registers initial post types & statuses.

When registering Privacy Statuses (Pending, Confirmed, Failed, Completed), translation string use _x() context function.

Below we have the _wp_privacy_statuses() function that returns privacy statuses. This function uses regular __() function without any context.

The same 4 strings have 8 translation strings in the translate system bloating the total number of translation strings.

We can merge those translation strings by using context functions inside _wp_privacy_statuses().

See the screenshot from the translation system and the attached patch.

Attachments (6)

50740a.png​ (8.3 KB ) - added by ramiy 6 years ago.
50740b.png​ (7.9 KB ) - added by ramiy 6 years ago.
50740c.png​ (7.2 KB ) - added by ramiy 6 years ago.
50740d.png​ (8.4 KB ) - added by ramiy 6 years ago.
50740.patch​ (1009 bytes ) - added by ramiy 6 years ago.
50740.1.diff​ (1020 bytes ) - added by audrasjb 6 years ago.
New patch, generated against trunk/wordpress-develop and not the standalone installation

Download all attachments as: .zip

Change History (12)

@ramiy
6 years ago

@ramiy
6 years ago

@ramiy
6 years ago

@ramiy
6 years ago

@ramiy
6 years ago

#1 @ramiy
6 years ago

  • Keywords has-screenshots has-patch added

#2 @ramiy
6 years ago

  • Summary i18n: Merge similar translation strings in core post api → i18n: Merge similar translation strings in privacy request statuses

@audrasjb
6 years ago

New patch, generated against trunk/wordpress-develop and not the standalone installation

#3 @audrasjb
6 years ago

  • Owner changed from whyisjake to audrasjb
  • Status assigned → accepted

#4 @audrasjb
6 years ago

  • Owner changed from audrasjb to whyisjake
  • Status accepted → assigned

#5 @SergeyBiryukov
6 years ago

  • Milestone Awaiting Review → 5.5

#6 @SergeyBiryukov
6 years ago

  • Resolution → fixed
  • Status assigned → closed

In 48578:

I18N: Add context to privacy request status strings.

These strings already have a context in create_initial_post_types(), and should use the same context in _wp_privacy_statuses().

Props ramiy, audrasjb.
Fixes #50740.

Note: See TracTickets for help on using tickets.