Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#49243 closed defect (bug) (fixed)

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

Reported by: ramiy's profile ramiy Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.4 Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-screenshots has-patch
Focuses: administration Cc:

Description

See the attached patch.

Attachments (2)

49243.png (6.7 KB) - added by ramiy 5 years ago.
49243.patch (1.1 KB) - added by ramiy 5 years ago.

Download all attachments as: .zip

Change History (8)

@ramiy
5 years ago

@ramiy
5 years ago

#1 @ramiy
5 years ago

  • Keywords has-screenshots has-patch added

This patch simplifies the translation string by removing the HTML tags from the string.

Original string:

  • <span>Active:</span> %s

New string:

  • Active:

#2 @ramiy
5 years ago

I should note that translation string with HTML tags are hard to translate in RTL languages like Hebrew. The best practice is to remove HTML where possible. We have dozens of patches where we did the same.

#4 @SergeyBiryukov
5 years ago

  • Milestone changed from Awaiting Review to 5.4

#5 @SergeyBiryukov
5 years ago

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

In 47090:

I18N: Remove unnecessary HTML from "Active:" strings in wp-admin/themes.php.

Follow-up to [45435].

Props ramiy.
Fixes #49243.

#6 @ramiy
5 years ago

The context is a good addition!

Note: See TracTickets for help on using tickets.