Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#57060 closed defect (bug) (fixed)

Always pass $locale to load_textdomain() if we know the locale

Reported by: ocean90's profile ocean90 Owned by: ocean90's profile ocean90
Milestone: 6.1.1 Priority: normal
Severity: normal Version: 6.1
Component: I18N Keywords: has-patch commit fixed-major
Focuses: performance Cc:

Description

In [53874] the optional $locale parameter was added to load_textdomain(). While most load_textdomain() calls in core were were updated, some were missed:

Change History (8)

This ticket was mentioned in PR #3601 on WordPress/wordpress-develop by @ocean90.


2 years ago
#1

  • Keywords has-patch added

#2 @desrosj
2 years ago

  • Keywords commit added

Looks good. Feel free to commit and backport.

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


2 years ago

#4 @ocean90
2 years ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 54795:

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.
Fixes #57060.

#5 @ocean90
2 years ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

#6 @ocean90
2 years ago

In 54796:

I18N: Revert [54795] from the 6.1 branch.

This will be added again once committed to trunk first.

See #57060.

#7 @ocean90
2 years ago

In 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.

#8 @ocean90
2 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 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.

Note: See TracTickets for help on using tickets.