Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#47159 closed defect (bug) (fixed)

Do not use placeholders for HTML tags in strings

Reported by: dimadin's profile dimadin Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.2.1 Priority: normal
Severity: normal Version: 5.2
Component: I18N Keywords: has-patch
Focuses: Cc:

Description

[45158] introduced string where placeholders are used instead of HTML tags. That practice is not used in WordPress core, and it's bad anyway.

Attached patch uses approach used in other strings where it puts link and additional link attributes behind placeholders.

Note that this text is used in Gutenberg (introduced in #14668), however because of the way links are formed in Gutenberg, same strings can't be used.

Attachments (1)

47159.diff (2.1 KB) - added by dimadin 5 years ago.

Download all attachments as: .zip

Change History (5)

@dimadin
5 years ago

#1 @SergeyBiryukov
5 years ago

  • Milestone changed from Awaiting Review to 5.2.1
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#2 @ramiy
5 years ago

Big like!

#3 @SergeyBiryukov
5 years ago

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

In 45334:

I18N: Avoid using placeholders for link start and end tags in alt text description strings added in [45158].

Use an established pattern of moving additional link attributes out of the translatable string.

Props dimadin.
Fixes #47159.

#4 @SergeyBiryukov
5 years ago

In 45335:

I18N: Avoid using placeholders for link start and end tags in alt text description strings added in [45158].

Use an established pattern of moving additional link attributes out of the translatable string.

Props dimadin.
Merges [45334] to the 5.2 branch.
Fixes #47159.

Note: See TracTickets for help on using tickets.