Making WordPress.org

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#3071 closed enhancement (invalid)

Highlight non-breaking-space as hints for Translation Editors

Reported by: audrasjb's profile audrasjb Owned by:
Milestone: Priority: normal
Component: Translate Site & Plugins Keywords:
Cc:

Description

We French translators have an issue with the non-breaking-space character which we use regularly in punctuation.

When the character is not produced with   HTML entity, but with ALT+255 or ALT+SPACE (which I guess is better), Translation Editors can not see it on Translate and thus can not check its presence (it must replace normal spaces in special case for punctuation) during validation process.

I started to work on a JS script for browser's console to highlight these characters but I wonder if this should not be integrated on translate.wp.org.

If this is seems legit to polyglots, I will be happy to work on it :)

Attachments (1)

Capture d’écran 2017-08-25 à 14.10.31.png (29.4 KB) - added by audrasjb 7 years ago.
My current idea to highlight non-breaking-space

Download all attachments as: .zip

Change History (5)

@audrasjb
7 years ago

My current idea to highlight non-breaking-space

#1 @SergeyBiryukov
7 years ago

  • Milestone Plugin Directory v3.0 deleted

This ticket was mentioned in Slack in #glotpress by audrasjb. View the logs.


7 years ago

#3 @ocean90
7 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Please report this as a feature request to GlotPress directly: https://github.com/glotpress/glotpress-wp

https://github.com/GlotPress/GlotPress-WP/issues/166 is a related issue for this.

#4 @audrasjb
7 years ago

Hello,
Ok, thanks.
For history, there is the patch I worked on:

jQuery('tr.preview > td.translation.foreign-text').each(function(){
	var translation_item = jQuery(this).text();
	if ( translation_item.indexOf(' ') > -1 ) {
		var translation_highlighted = '';
		for (var i = 0; i < translation_item.length; i++) {
			if (translation_item[i] == ' ') {
				translation_highlighted += '<span style="background-color:yellow"> </span>';
			} else {
				translation_highlighted += translation_item[i];
			}
		}
		jQuery(this).html(translation_highlighted);
	}
});
Note: See TracTickets for help on using tickets.