Make WordPress Core

Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#41645 closed defect (bug) (fixed)

i18n: Avoid using HTML tags in translation strings (wp-activate.php)

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

Description

The old translation string:

Your site at <a href="%1$s">%2$s</a> is active. You may now log in to your site using your chosen username of &#8220;%3$s&#8221;. Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.

Is using <a href="%1$s">%2$s</a>. This can be replaced with a simple %1$s moving the HTML tags out of the string. Making is much easier for translation, Especially in RTL languages like Hebrew where bi-directional languages are difficult to handle.

Attachments (2)

41645.png (49.3 KB) - added by ramiy 8 years ago.
41645.patch (1.4 KB) - added by ramiy 8 years ago.

Download all attachments as: .zip

Change History (11)

@ramiy
8 years ago

@ramiy
8 years ago

#1 @ramiy
8 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
8 years ago

  • Component changed from Text Changes to I18N
  • Focuses multisite added
  • Milestone changed from Awaiting Review to 4.9
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#3 @ramiy
7 years ago

  • Summary changed from Simplify translation string (in wp-activate.php file) to i18n: Avoid using HTML tags in translation strings (wp-activate.php)

#4 @ramiy
7 years ago

Old string:

  • Your site at <a href="%1$s">%2$s</a> is active. You may now log in to your site using your chosen username of &#8220;%3$s&#8221;. Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.

New string:

  • 'Your site at %1$s is active. You may now log in to your site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.

#5 @ramiy
7 years ago

Related: #41694

This ticket was mentioned in Slack in #core-multisite by jeremyfelt. View the logs.


7 years ago

#7 @SergeyBiryukov
7 years ago

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

In 41579:

I18N: Remove HTML tags from translatable strings in wp-activate.php.

Props ramiy.
Fixes #41645.

#8 @ocean90
7 years ago

In 42844:

Multisite: Use a numbered placeholder in sprintf() for the site URL.

Fixes missing site domain in the link and a PHP warning.

Props Thomas Vitale, conner_bw.
See #41645.
Fixes #43568.

#9 @ocean90
7 years ago

In 42845:

Multisite: Use a numbered placeholder in sprintf() for the site URL.

Fixes missing site domain in the link and a PHP warning.

Merge of [42844] to the 4.9 branch.

Props Thomas Vitale, conner_bw.
See #41645, #43568.

Note: See TracTickets for help on using tickets.