Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#47238 closed defect (bug) (fixed)

i18n: Avoid using HTML tags in translation strings (wp-admin/plugins.php)

Reported by: ramiy's profile ramiy Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: Plugins Keywords: has-screenshots has-patch 2nd-opinion
Focuses: administration Cc:

Description

See the attached patch.

Attachments (2)

47238.png (72.9 KB) - added by ramiy 5 years ago.
47238.patch (695 bytes) - added by ramiy 5 years ago.

Download all attachments as: .zip

Change History (7)

@ramiy
5 years ago

@ramiy
5 years ago

#1 @ramiy
5 years ago

  • Keywords has-screenshots has-patch added

#2 @desrosj
5 years ago

  • Milestone changed from Awaiting Review to 5.3

#3 follow-up: @SergeyBiryukov
5 years ago

  • Keywords 2nd-opinion added

The current string is consistent with the other plugin action messages:

  • The selected plugin(s) have been <strong>deleted</strong>.
  • Plugin <strong>activated</strong>.
  • Selected plugins <strong>activated</strong>.
  • Plugin <strong>deactivated</strong>.
  • Selected plugins <strong>deactivated</strong>.

However, similar theme action messages don't have the markup:

  • Settings saved and theme activated.
  • New theme activated.
  • Theme deleted.

These are some of the oldest strings in WordPress (Plugin <strong>activated</strong> was introduced in [1071]; New theme activated was introduced in [1655]), and it looks like they have always been like this.

For consistency, we should probably remove the markup from all these plugin messages, unless someone can think of a good reason to keep it.

Last edited 5 years ago by SergeyBiryukov (previous) (diff)

#4 in reply to: ↑ 3 @ramiy
5 years ago

For consistency, we should probably remove the markup from all these plugin messages, unless someone can think of a good reason to keep it.

No reason to keep the markup.

If you will check the other action messages you will find the same result (user screen / terms screen / post screen / settings screen / etc.). We rarely emphasis the action. I guess you can find few more strings emphasizing the action, but they are the exception, and we should change them too.

#5 @SergeyBiryukov
5 years ago

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

In 45432:

I18N: Remove unnecessary markup from plugin action messages, for consistency with the rest of the admin.

Props ramiy.
Fixes #47238.

Note: See TracTickets for help on using tickets.