[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
Tue Sep 3 17:07:03 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:  closed
 Priority:  normal           |   Milestone:
Component:  I18N             |     Version:
 Severity:  normal           |  Resolution:  reported-upstream
 Keywords:                   |     Focuses:
-----------------------------+--------------------------------

Comment (by garrett-eclipse):

 Replying to [comment:6 SergeyBiryukov]:
 > Replying to [comment:5 garrett-eclipse]:
 > > *And does it matter the capitalization of the translator: prefix.
 Should that be made consistent across core or is it irrelevant.
 >
 > The capitalization doesn't matter, though it would probably make sense
 to be consistent in core :) Perhaps it's something WPCS could check.

 Thanks @SergeyBiryukov seems you caught the capitalization in
 [https://core.trac.wordpress.org/changeset/45932 changeset 46932]. Does it
 matter that some start on the first line of the comment right after /* and
 others start on the second line?

 I made a comment on WPCS github about checking capitalization here -
 https://github.com/WordPress/WordPress-Coding-
 Standards/issues/1760#issuecomment-527547958

 Replying to [comment:2 casiepa ]:
 > Whatever comes out of this, make sure to keep the documentation updated:
 >
 https://developer.wordpress.org/themes/functionality/internationalization/#descriptions
 @casiepa I don't have the ability to update this document, are you able to
 make two tweaks?
 1. Update 'It must start with the words `translators:` ' to be 'It must
 start with the word `translators:`, in all lowercase,  '
 2. Add a multi-line example something like;
 {{{#!php
 <?php
 /*
  * translators: Replace with a city related to your locale.
  * Test that it matches the expected location and has upcoming
  * events before including it. If no cities related to your
  * locale have events, then use a city related to your locale
  * that would be recognizable to most users. Use only the city
  * name itself, without any region or country. Use the endonym
  * (native locale name) instead of the English name if possible.
  */
 ?>
 <input id="community-events-location" class="regular-text" type="text"
 name="community-events-location" placeholder="<?php esc_attr_e(
 'Cincinnati' ); ?>" />
 }}}

 Thank you

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


More information about the wp-trac mailing list