[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:38:34 UTC 2022


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

Comment (by ocean90):

 In [changeset:"54797" 54797]:
 {{{
 #!CommitTicketReference repository="" revision="54797"
 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.
 See #57060.
 }}}

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


More information about the wp-trac mailing list