[wp-meta] [Making WordPress.org] #4871: Translate platform fails to import Translators' comments that don't start in first line of comments

Making WordPress.org noreply at wordpress.org
Sat Nov 23 22:30:18 UTC 2019


#4871: Translate platform fails to import Translators' comments that don't start
in first line of comments
--------------------------------------+--------------------
 Reporter:  tobifjellner              |      Owner:  (none)
     Type:  defect                    |     Status:  new
 Priority:  high                      |  Milestone:
Component:  Translate Site & Plugins  |   Keywords:
--------------------------------------+--------------------
 For many places in core, the string extraction procedure fails to extract
 the comments to translators, if the comment doesn't start in the first
 comment line.
 Here's one example of a comment that now doesn't get imported to
 translate.wordpress.org:

 https://build.trac.wordpress.org/browser/trunk/wp-includes/comment-
 template.php?marks=902-910#L902

 {{{
                         /*
                          * translators: If comment number in your language
 requires declension,
                          * translate this to 'on'. Do not translate into
 your own language.
                          */
                         if ( 'on' === _x( 'off', 'Comment number
 declension: on or off' ) ) {
                                 $text = preg_replace( '#<span class
 ="screen-reader-text">.+?</span>#', '', $more );
                                 $text = preg_replace( '/&.+?;/', '', $text
 ); // Kill entities
                                 $text = trim( strip_tags( $text ), '% ' );
 }}}

 One way to correct this could be to change all these occurrences in the
 core code, but a cleaner solution would be to fix the string import
 functions.

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/4871>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list