Make WordPress Core

Opened 3 weeks ago

Last modified 12 days ago

#57056 new enhancement

Pass $locale to override_load_textdomain filter

Reported by: ocean90's profile ocean90 Owned by:
Milestone: 6.2 Priority: normal
Severity: normal Version: 6.1
Component: I18N Keywords: good-first-bug has-patch needs-testing
Focuses: Cc:

Description

In [53874] the $locale parameter was added to load_textdomain() so it can be used to properly fill WP_Textdomain_Registry.
Since the $locale may not be the same value as determine_locale() returns (e.g. when filtered by plugin_locale in load_plugin_textdomain()) we should also pass the new parameter to the filter so custom file loading implementations are using the same locale as load_textdomain() got.

Change History (3)

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


3 weeks ago
#1

  • Keywords has-patch added; needs-patch removed

In [53874] the $locale parameter was added to load_textdomain() so it can be used to properly fill WP_Textdomain_Registry.

Since the $locale may not be the same value as determine_locale() returns (e.g. when filtered by plugin_locale in load_plugin_textdomain()) we should also pass the new parameter to the filter so custom file loading implementations are using the same locale as load_textdomain() got.

Trac ticket: https://core.trac.wordpress.org/ticket/57056

#2 @cadic
3 weeks ago

  • Keywords needs-testing added

Added a PR for this

#3 @JeffPaul
12 days ago

  • Milestone changed from Future Release to 6.2

Adding to 6.2 milestone as initial PR updated from some code review feedback, needs final testing before readying for commit.

Note: See TracTickets for help on using tickets.