Opened 10 years ago
Closed 10 years ago
#35729 closed defect (bug) (fixed)
Avoid using HTML tags in translation strings (wp-includes/comment-template.php)
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 4.5 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | I18N | Keywords: | has-patch |
| Focuses: | Cc: |
Description
See the attached patch.
Attachments (2)
Change History (6)
#2
@
10 years ago
Ok, It's done!
Old string:
<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>
New strings:
Logged in as %s. Edit your profile.Logged in as %sLog out?
No HTML tags, much easier to translate.
Note: See
TracTickets for help on using
tickets.
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:
Logged in as %s. Edit your profile.Logged in as %s.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:
<a href="%1$s" aria-label="Logged in as %2$s. Edit your profile.">Logged in as %2$s</a>.Log out?