Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#57060 closed defect (bug) (fixed)

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

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

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.


4 years ago
#1

  • Keywords has-patch added

#2 @desrosj
4 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.


4 years ago

#4 @ocean90
4 years ago

  • Owner set to ocean90
  • Resolutionfixed
  • Status newclosed

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
4 years ago

  • Keywords fixed-major added
  • Resolution fixed
  • Status closedreopened

#6 @ocean90
4 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
4 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
4 years ago

  • Resolutionfixed
  • Status reopenedclosed

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.