[wp-trac] [WordPress Trac] #54586: Avoid translating empty plugin headers

WordPress Trac noreply at wordpress.org
Mon Dec 6 10:49:06 UTC 2021


#54586: Avoid translating empty plugin headers
--------------------------+-----------------------------
 Reporter:  Chouby        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  I18N          |    Version:  3.4
 Severity:  trivial       |   Keywords:  has-patch
  Focuses:                |
--------------------------+-----------------------------
 WPCS recommends not to translate empty strings. On the other hand, plugin
 headers may not all be filled, but since #19597,
 `_get_plugin_data_markup_translate()` translates them all whether they are
 empty or not.

 I propose to check that the string is not empty before attempting to
 translate it.

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


More information about the wp-trac mailing list