[wp-trac] [WordPress Trac] #38590: Don't use `get_available_languages()` in `_load_textdomain_just_in_time()`

WordPress Trac noreply at wordpress.org
Mon Nov 14 21:06:23 UTC 2016


#38590: Don't use `get_available_languages()` in `_load_textdomain_just_in_time()`
--------------------------+----------------------
 Reporter:  ocean90       |       Owner:  ocean90
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.7
Component:  I18N          |     Version:  4.6
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
--------------------------+----------------------
Changes (by ocean90):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"39230"]:
 {{{
 #!CommitTicketReference repository="" revision="39230"
 I18N: Don't use `get_available_languages()` in
 `_load_textdomain_just_in_time()`.

 `get_available_languages()` is only designed to work with translations for
 core. Using it for plugins/themes means unnecessary `strpos()` checks and
 incomplete results for plugins/themes whose names are beginning with
 `admin-` or `ms-`.

 Props swissspidy, ocean90.
 Fixes #38590.
 }}}

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


More information about the wp-trac mailing list