Skip to:
Content

BuddyPress.org

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#6951 closed enhancement (fixed)

Add comments for translators in accessibility strings

Reported by: slaffik's profile slaFFik Owned by: mercime's profile 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 9 years ago.
6951.2.patch (5.6 KB) - added by mercime 9 years ago.
6951.3.patch (9.1 KB) - added by mercime 8 years ago.

Download all attachments as: .zip

Change History (22)

#1 @DJPaul
9 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.


9 years ago

@SergeyBiryukov
9 years ago

#3 @SergeyBiryukov
9 years ago

  • Keywords has-patch added; needs-patch removed

@mercime
9 years ago

#4 @mercime
9 years ago

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

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

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

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

#9 @SergeyBiryukov
8 years ago

Related WordPress core ticket: #WP29748

#10 @mercime
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.

Version 0, edited 8 years ago by mercime (next)

#11 @mercime
8 years ago

In 10739:

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

Props SergeyBiryukov, slaFFik.
See #6951.

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

#13 @mercime
8 years ago

In 10827:

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

See #6951.

#14 @mercime
8 years ago

In 10828:

Add translator comments for screen reader text in component files.

See #6951.

@mercime
8 years ago

#15 @mercime
8 years ago

  • Keywords has-patch added

A sweep of remaining translator comments for assistive text.

#16 @mercime
8 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
8 years ago

  • Milestone changed from Future Release to 2.6

#18 @DJPaul
8 years ago

  • Component changed from Locale to I18N

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


8 years ago

Note: See TracTickets for help on using tickets.