Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#49243 closed defect (bug) (fixed)

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

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

Description

See the attached patch.

Attachments (2)

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

Download all attachments as: .zip

Change History (8)

#1 @ramiy
7 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
7 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
7 years ago

  • Milestone Awaiting Review → 5.4

#5 @SergeyBiryukov
7 years ago

  • Resolution → fixed
  • Status assigned → 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
7 years ago

The context is a good addition!

Note: See TracTickets for help on using tickets.