Skip to:
Content

BuddyPress.org

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#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)

6951.patch (5.1 KB) - added by SergeyBiryukov 5 years ago.
6951.2.patch (5.6 KB) - added by mercime 5 years ago.
6951.3.patch (9.1 KB) - added by mercime 4 years ago.

Download all attachments as: .zip

Change History (22)

#1 @DJPaul
5 years ago

  • Keywords needs-patch good-first-bug added
  • Milestone changed from Awaiting Review to Future Release

Thanks for the feedback!

This ticket was mentioned in Slack in #buddypress by slaffik. View the logs.


5 years ago

@SergeyBiryukov
5 years ago

#3 @SergeyBiryukov
5 years ago

  • Keywords has-patch added; needs-patch removed

@mercime
5 years ago

#4 @mercime
5 years ago

6951.2.patch Adds one more item in Groups list table, "Groups List".

#5 follow-up: @mercime
4 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 @SergeyBiryukov
4 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: @slaFFik
4 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

Last edited 4 years ago by slaFFik (previous) (diff)

#8 in reply to: ↑ 7 @SergeyBiryukov
4 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.

#9 @SergeyBiryukov
4 years ago

Related WordPress core ticket: #WP29748

#10 @mercime
4 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-label values added in core files, so this is good to go.

Going to commit the patch and leave this ticket open for other patches.

Last edited 4 years ago by mercime (previous) (diff)

#11 @mercime
4 years ago

In 10739:

Add translator comments for the accessibility headings in BP admin pages.

Props SergeyBiryukov, slaFFik.
See #6951.

#12 @DJPaul
4 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.

#13 @mercime
4 years ago

In 10827:

Add translator comments for screen reader text in bp-legacy files.

See #6951.

#14 @mercime
4 years ago

In 10828:

Add translator comments for screen reader text in component files.

See #6951.

@mercime
4 years ago

#15 @mercime
4 years ago

  • Keywords has-patch added

A sweep of remaining translator comments for assistive text.

#16 @mercime
4 years ago

  • Owner set to mercime
  • Resolution set to fixed
  • Status changed from new to closed

In 10882:

Add translator comments for screen reader text in admin.

Fixes #6951.

#17 @mercime
4 years ago

  • Milestone changed from Future Release to 2.6

#18 @DJPaul
4 years ago

  • Component changed from Locale to I18N

This ticket was mentioned in Slack in #buddypress by slaffik. View the logs.


4 years ago

Note: See TracTickets for help on using tickets.