Opened 9 years ago
Closed 9 years ago
#36013 closed defect (bug) (fixed)
Avoid using HTML tags in translation strings (wp-admin/includes/dashboard.php)
Reported by: | ramiy | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | I18N | Keywords: | has-patch commit |
Focuses: | administration | Cc: |
Description
Old string:
<span>%1$s, %2$s</span> <a href="%3$s" aria-label="%5$s">%4$s</a>
New string:
<span>%1$s, %2$s</span> %3$s
I replaced <a href="%3$s" aria-label="%5$s">%4$s</a>
with %3$s
, moving the HTML out from the translation string.
(See the attached patch)
Attachments (5)
Change History (12)
#3
follow-up:
↓ 4
@
9 years ago
Nice, but this way the translator can't present the post title before the date&time.
#4
in reply to:
↑ 3
@
9 years ago
Replying to ramiy:
Nice, but this way the translator can't present the post title before the date&time.
@ocean90, could you take a look if any locales currently do that? It's separated visually, so I don't think there are any (checked he_IL too to make sure it's not an RTL issue).
#5
@
9 years ago
@SergeyBiryukov,
You can commit your patch,
The span
added display: inline-block;
and min-width: 150px;
.
The date is always before the post title.
@ramiy I think we can move
<span>
tags out of the string too, see 36013.2.patch.