WordPress.org

Make WordPress Core

Opened 2 months ago

Closed 2 months ago

Last modified 2 months ago

#47159 closed defect (bug) (fixed)

Do not use placeholders for HTML tags in strings

Reported by: dimadin Owned by: 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 2 months ago.

Download all attachments as: .zip

Change History (5)

@dimadin
2 months ago

#1 @SergeyBiryukov
2 months ago

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

#2 @ramiy
2 months ago

Big like!

#3 @SergeyBiryukov
2 months 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
2 months 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.