[wp-meta] [Making WordPress.org] #3071: Highlight non-breaking-space as hints for Translation Editors

Making WordPress.org noreply at wordpress.org
Fri Aug 25 13:10:35 UTC 2017


#3071: Highlight non-breaking-space as hints for Translation Editors
--------------------------------------+----------------------
 Reporter:  audrasjb                  |       Owner:
     Type:  enhancement               |      Status:  closed
 Priority:  normal                    |   Milestone:
Component:  Translate Site & Plugins  |  Resolution:  invalid
 Keywords:                            |
--------------------------------------+----------------------

Comment (by audrasjb):

 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);
         }
 });
 }}}

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/3071#comment:4>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list