[wp-trac] [WordPress Trac] #57060: Always pass $locale to load_textdomain() if we know the locale

WordPress Trac noreply at wordpress.org
Thu Nov 10 19:43:13 UTC 2022


#57060: Always pass $locale to load_textdomain() if we know the locale
------------------------------------------+--------------------------
 Reporter:  ocean90                       |       Owner:  ocean90
     Type:  defect (bug)                  |      Status:  closed
 Priority:  normal                        |   Milestone:  6.1.1
Component:  I18N                          |     Version:  6.1
 Severity:  normal                        |  Resolution:  fixed
 Keywords:  has-patch commit fixed-major  |     Focuses:  performance
------------------------------------------+--------------------------
Changes (by ocean90):

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


Comment:

 In [changeset:"54798" 54798]:
 {{{
 #!CommitTicketReference repository="" revision="54798"
 I18N: Always pass `$locale` to `load_textdomain()`.

 In [53874] the optional `$locale` parameter was added to
 `load_textdomain()`. While most `load_textdomain()` calls in core were
 were updated, some were missed. Passing the original locale avoids the
 need to call `determine_locale()` by `load_textdomain()` which is used as
 a fallback.

 Props ocean90, swissspidy, desrosj.
 Merges [54797] to the 6.1 branch.
 Fixes #57060.
 }}}

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


More information about the wp-trac mailing list