[wp-trac] [WordPress Trac] #41305: Add lazily evaluated translations

WordPress Trac noreply at wordpress.org
Thu Mar 21 18:15:59 UTC 2019


#41305: Add lazily evaluated translations
-------------------------------------------------+-------------------------
 Reporter:  schlessera                           |       Owner:
                                                 |  timothyblynjacobs
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  5.3
Component:  I18N                                 |     Version:  4.8
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch early dev-feedback needs-  |     Focuses:  rest-api,
  testing                                        |  performance
-------------------------------------------------+-------------------------

Comment (by mnelson4):

 Oh, one alternative to adding `_l()`, `_le()`, `_l_esc_html()` etc would
 be to add an extra parameter onto existing translation functions that
 indicates to translate lazily (eg `__($text, $text_domain =‘’ , $lazy =
 false)`). No new translation functions, and we keep the number of them
 from growing exponentially.

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


More information about the wp-trac mailing list