[wp-trac] [WordPress Trac] #35729: Avoid using HTML tags in translation strings (wp-includes/comment-template.php)

WordPress Trac noreply at wordpress.org
Thu Feb 4 20:05:27 UTC 2016


#35729: Avoid using HTML tags in translation strings (wp-includes/comment-
template.php)
--------------------------+------------------------------
 Reporter:  ramiy         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  I18N          |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------
Changes (by ramiy):

 * keywords:   => has-patch


Comment:

 This is a bit tricky.

 The original translation string is: `<a href="%1$s" aria-label="Logged in
 as %2$s. Edit your profile.">Logged in as %2$s</a>. <a href="%3$s">Log
 out?</a>`

 ----

 The ticket goal to to create three separate translation strings without
 the HTML tags:

 1. `Logged in as %s. Edit your profile.`

 2. `Logged in as %s.`

 3. `Log out?`

 ----

 The initial patch is splitting the long string only into two translation
 strings, and removes the HTML `<a>` tag only from the second string.

 The two new strings are:

 1. `<a href="%1$s" aria-label="Logged in as %2$s. Edit your
 profile.">Logged in as %2$s</a>.`

 2. `Log out?`

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35729#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list