Opened 9 years ago
Closed 9 years ago
#36410 closed defect (bug) (fixed)
Misleading translators comment and bad string
Reported by: | dimadin | Owned by: | ocean90 |
---|---|---|---|
Milestone: | 4.5 | Priority: | low |
Severity: | normal | Version: | 4.6 |
Component: | I18N | Keywords: | has-patch commit |
Focuses: | accessibility | Cc: |
Description
There is a string "View %1$s version %2$s details" that is used multiple times for aria-label attribute and where first placeholder is plugin/theme name and second is its version. This is fine.
There is also a string "View %1$s version %2$s details." (note dot at the end) that is used on Updates screen in table for plugins updates and visible to all users (easily reproducible by decreasing version of any plugin).
While this string has same translator comment as previous ("1: Plugin name 2: Plugin version"), it is not the same nor this comment is true. First placeholder is actually a tag for screen readers and is not visible, so HTML it produces is
View <span class="screen-reader-text">Akismet</span> version 3.1.10 details.
while user sees
View version 3.1.10 details.
Problem with this is that translator doesn't know that this is screen reader tag, and even if it does know, it can be hard to translate when you have limited option (tag is in placeholder, not in string). I and at least French translator had wrong assumption what is output.
I added three patches with different methods of how could this be solved (I would personally go with third; I don't see need for plugin name here), but if any output should look like this, second option with tag in a string is better, which is a point of whole ticket.
Introduced in [35866].
Attachments (5)
Change History (13)
#2
@
9 years ago
@ocean90 @petya Do you think this is something that should be changed, and if so, should it happen during RC?
#3
@
9 years ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 4.5
- Owner set to afercia
- Priority changed from normal to low
- Status changed from new to reviewing
36410.4.patch uses an existing aria label View %1$s version %2$s details
and removes the screen reader text to restore View version %s details.
. It was previously View version %1$s details.
but GlotPress will match it a fuzzy.
@afercia Can you please verify 36410.4.patch?
#4
@
9 years ago
- Keywords commit added
@ocean90 looks good to me. An aria-label
is even better in this case.
#5
@
9 years ago
- Owner changed from afercia to ocean90
- Status changed from reviewing to accepted
Thanks @afercia!
Now that I've looked again,
esc_attr()
is not actually needed here.