#36014 closed defect (bug) (fixed)
Move the aria-label text into a separate translation string
| Reported by: | ramiy | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.5 |
| Component: | I18N | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | accessibility |
Description
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 string:
<a href="%1$s" aria-label="%2$s">Logged in as %3$s</a>. <a href="%4$s">Log out?</a>
The text inside aria-label attribute was replaced with a %2$s placeholder.
This way the translation string is shorter and easier to translate.
BTW, in other string translations we do the same.
Attachments (2)
Change History (10)
#4
@
11 years ago
The new code:
sprintf( __( '<a href="%1$s" aria-label="%2$s">Logged in as %3$s</a>. <a href="%4$s">Log out?</a>' ), get_edit_user_link(), esc_attr( sprintf( __( 'Logged in as %s. Edit your profile.' ), $user_identity ) ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) )
This ticket was mentioned in Slack in #core-i18n by ramiy. View the logs.
11 years ago
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
The new code: