#6951 closed enhancement (fixed)
Add comments for translators in accessibility strings
Reported by: | slaFFik | Owned by: | mercime |
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | I18N | Keywords: | has-patch |
Cc: | mercime |
Description
Example:
<h2 class="screen-reader-text"><?php _e( 'Filter activities list', 'buddypress' ); ?></h2>
Would be nice for translators to see here https://monosnap.com/file/wbnTBoykt2PYsYUg8Y9ZlqogezYD14, that such strings are related to accessibility.
Attachments (3)
Change History (22)
#1
@
9 years ago
- Keywords needs-patch good-first-bug added
- Milestone changed from Awaiting Review to Future Release
This ticket was mentioned in Slack in #buddypress by slaffik. View the logs.
9 years ago
#5
follow-up:
↓ 6
@
9 years ago
@slaFFik and @SergeyBiryukov Cheers. I'm curious though why there's a need to add translator comments for simple two/three word accessibility strings in BuddyPress when the same is not needed in WordPress as seen throughout core source code for similar simple strings? Did you create a ticket in core for this as well? This is simply for my own edification. Thanks.
#6
in reply to:
↑ 5
@
8 years ago
Replying to mercime:
I'm curious though why there's a need to add translator comments for simple two/three word accessibility strings in BuddyPress when the same is not needed in WordPress as seen throughout core source code for similar simple strings?
Right, I don't think there's a precedent for similar comments in WordPress core. Generally we add comments for strings with placeholders:
/* translators: %s: Name of current post */ sprintf( __( 'Continue reading %s' ), '<span class="screen-reader-text">' . get_the_title() . '</span>' )
or strings that have a special meaning:
/* translators: If there are characters in your language that are not supported * by Open Sans, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Open Sans font: on or off' ) ) { ... }
For accessibility strings, the context usually seems obvious, and there's a source code reference for more details.
So I'd like to know @slaFFik's reasoning as well :) Would you translate it differently with such a comment?
#7
follow-up:
↓ 8
@
8 years ago
English words/phrases are shorter, than Russian. And there are lots of places in BP, where short English (that is the language of development) word looks ok, taking small amount of space, and appropriate Russian translation is way longer and looks uglier. In such places it's very important in ru_RU to get the shortest form possible, yet not losing the meaning - and it takes time and several variants to choose from.
And for accessibility text the short translation is not that important, and translation can be done quicker and easier - with a longer version of Russian text.
So, yes, I would translate such text a little bit different, with less efforts and time spent.
Regarding source code reference - it's just insanely slow. Waiting when trac with appropriate file and line will load sometimes takes forever. Glotpress itself is slow too, but not THAT slow as https://plugins.trac.wordpress.org/browser/buddypress/
I've just tested to a open a reference to a random string from Glotpress/BuddyPress - it took 25 seconds => http://take.ms/6lLpT
#8
in reply to:
↑ 7
@
8 years ago
Replying to slaFFik:
And for accessibility text the short translation is not that important, and translation can be done quicker and easier - with a longer version of Russian text.
Thanks for the clarification, makes perfect sense to me now.
#10
@
8 years ago
- Milestone changed from Future Release to 2.6
@slaFFik I'm adding my thanks for clarifying the situation. @SergeyBiryukov thank you for the link to the ticket. I just noticed recently that there were accessibility text translator comments for the aria-labels added in core files, so this is good to go.
Going to commit the patch and leave this ticket open for other patches.
#12
@
8 years ago
- Keywords good-first-bug has-patch removed
- Milestone changed from 2.6 to Future Release
This is kind of an on-going thing, I'm going to move it out for 2.6 unless more patches appear.
#15
@
8 years ago
- Keywords has-patch added
A sweep of remaining translator comments for assistive text.
#16
@
8 years ago
- Owner set to mercime
- Resolution set to fixed
- Status changed from new to closed
In 10882:
Thanks for the feedback!