Opened 11 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: | ramiy | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.5 |
| Component: | I18N | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
See the attached patch.
Attachments (2)
Change History (6)
#2
@
11 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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?