[wp-trac] [WordPress Trac] #47691: Translator comments aren't picked up when started on second line of comment block

WordPress Trac noreply at wordpress.org
Fri Jul 12 13:26:36 UTC 2019


#47691: Translator comments aren't picked up when started on second line of comment
block
-----------------------------+-----------------------------
 Reporter:  garrett-eclipse  |      Owner:  (none)
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  I18N             |    Version:
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 Hello,

 I noticed this with #47689 that the `Noto Serif:400,400i,700,700i` strings
 translator comment wasn't being picked up.

 Initially I assumed it was because 'Translators:' prefix was capitalized.
 Doing a mass search though I found this not to be the case and instead the
 common denominator was the translator comments that started on the second
 line weren't being picked up, for example;
 {{{#!php
 <?php
 /*
  * Translators: Use this to specify the proper Google Font name and
 variants
  * to load that is supported by your language. Do not translate.
  * Set to 'off' to disable loading.
  */
 $font_family = _x( 'Noto Serif:400,400i,700,700i', 'Google Font Name and
 Variants' );
 }}}
 Example of missing translator comment -
 https://translate.wordpress.org/projects/wp/dev/en-
 ca/default/?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=6929622&filters%5Btranslation_id%5D=59173298

 I'm seeing this throughout core and the bundled themes but have a few
 quick questions before I supply a patch;
 - How are bundled themes patched? Can I just supply one large patch file
 for all instances across core and themes? Or do I need separate patches,
 what about tickets do I need 1 ticket per theme?
 - Is this better fixed by the parser to catch these instances?
 - While I'm at it should I standardize the 'translators:' prefix to be
 lowercase for consistency?

 Thank you

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47691>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list