Make WordPress Core

Opened 14 months ago

Closed 9 months ago

Last modified 9 months ago

#40763 closed defect (bug) (fixed)

Use placeholders in translation strings

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


The attached patch replaces URLs and HTML tags in translation strings with %s placeholders to make it easier to translate the string.

Attachments (1)

40763.patch (9.5 KB) - added by ramiy 14 months ago.

Download all attachments as: .zip

Change History (13)

14 months ago

#1 @ramiy
14 months ago

  • Keywords has-patch added

#2 @ocean90
14 months ago

  • Milestone changed from Awaiting Review to Future Release
  • Type changed from defect (bug) to enhancement
  • Version trunk deleted

This ticket was mentioned in Slack in #core-i18n by ramiy. View the logs.

11 months ago

#4 @SergeyBiryukov
11 months ago

  • Milestone changed from Future Release to 4.9
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#5 @ramiy
10 months ago

  • Type changed from enhancement to defect (bug)

@ocean90 It's not an enhancement, it's a simple search&replace fixing translation strings. We have several tickets that do the same, they are all defined as defect/bug, let's be consistent.

#6 @johnbillion
10 months ago

  • Keywords needs-refresh added

I think we should take the opportunity to improve the phrasing of these instructions.

  • References to ctrl+A should be removed (re-phrase to simply say something along the lines of "select all")
  • The use of we and us is bizarre. Let's re-word the affected sentences to remove the need to reference the little people who live inside WordPress.

#7 @ramiy
10 months ago

  • Keywords needs-refresh removed

@johnbillion Good feedback but those text-changes can be done in separate tickets (use the Text Changes Component).

The scope of this ticket is moving HTML tags, URLs, and other variables outside of translations strings, replacing them with %s placeholders.

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.

9 months ago

#9 @jbpaul17
9 months ago

  • Milestone changed from 4.9 to 4.9.1

Per discussion in today's 4.9 bug scrub, we're punting this to 4.9.1.

#10 @SergeyBiryukov
9 months ago

  • Milestone changed from 4.9.1 to 4.9

#11 @SergeyBiryukov
9 months ago

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

In 41986:

I18N: Remove <code> and <kbd> tags from translatable strings on Settings screens.

Move URLs to separate strings.

Props ramiy.
Fixes #40763.

#12 @SergeyBiryukov
9 months ago

#42160 was marked as a duplicate.

Note: See TracTickets for help on using tickets.