#62496 closed enhancement (fixed)
Automatic Plugin Update Notifications Don't Use Admin Locale
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.8 | Priority: | normal |
Severity: | normal | Version: | 6.7 |
Component: | I18N | Keywords: | has-patch has-dev-note |
Focuses: | Cc: |
Description
The recently implemented feature in WordPress to "Switch locale to admin locale when sending admin notifications" does not apply to automatic plugin update notifications.
Instead of using the admin locale, these notifications continue to be sent in the default site locale.
Change History (13)
#1
@
4 months ago
- Milestone changed from Awaiting Review to 6.8
- Owner set to swissspidy
- Status changed from new to reviewing
- Type changed from defect (bug) to enhancement
This ticket was mentioned in PR #7886 on WordPress/wordpress-develop by @swissspidy.
4 months ago
#2
- Keywords has-patch added
I18N: Switch locale to admin locale when sending auto update emails. If sending an auto update email to the site administrator's email address, look up if a user with the same email exists and switch to that user's locale. If not, explicitly switches to the site locale. This is a follow-up to [59128] where this was previously added for other types of emails. Props benniledl, swissspidy. Fixes #62496.
Trac ticket: https://core.trac.wordpress.org/ticket/62496
@swissspidy commented on PR #7886:
4 months ago
#4
#6
@
4 months ago
- Resolution fixed deleted
- Status changed from closed to reopened
Test Report
Description
This report validates whether the indicated patch does not work as expected.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/7886
Environment
- WordPress: 6.8-alpha-59467
- PHP: 8.2.26
- Server: Apache
- Database: mysqli (Server: 8.0.40 / Client: mysqlnd 8.2.26)
- Browser: Firefox 132.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.0
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
- WordPress Beta Tester 3.6.1
- WP Crontrol 1.17.1
- Site Language: EN
- Admin Language: DE
Actual Results
- Issue was not resolved with patch
Steps
- Update to the latest Bleeding Edge/Nightly via Beta Tester
- Activate automatic plugin updates for all plugins
- Manually write an old version number into the main plugin file of the plugins to simulate an update needed
- Run
wp cron event run wp_version_check
to trigger automatic updates
Results: Plugin update E-Mail was sent in english rather than german
This ticket was mentioned in PR #7931 on WordPress/wordpress-develop by @swissspidy.
4 months ago
#7
I18N: Load admin translation during auto update. As a follow-up to [59460], make sure that admin strings are loaded when switching locales for auto update notifications, as those strings are in a separate translation file. Props benniledl, swissspidy. Fixes #62496.
https://core.trac.wordpress.org/ticket/62496
Trac ticket:
#8
@
4 months ago
Oh, good catch!
At first I thought something something in the commit was wrong, but turns out the notification email strings are in the admin translation file, but load_default_textdomain()
only loads those when in the admin (which isn't the case for a cron-triggered auto update)
https://github.com/WordPress/wordpress-develop/pull/7931 should fix this.
#9
@
4 months ago
Thanks for the fix! I tried to implement this myself at first but couldn’t get it to work. When your fix came in and I saw that my attempted changes were essentially the same, I thought I needed to test.
@benniledl commented on PR #7931:
4 months ago
#10
## Test Report
### Description
This report validates whether the indicated patch works as expected.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/7931
### Environment
- WordPress: 6.8-alpha-59475 + manually changed /wp-includes/l10n.php with the change in this patch
- PHP: 8.2.26
- Server: Apache
- Database: mysqli (Server: 8.0.40 / Client: mysqlnd 8.2.26)
- Browser: Firefox 133.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.0
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
- WordPress Beta Tester 3.6.1
- WP Crontrol 1.17.1
- WP Fastest Cache 1.3.2
### Actual Results
- ✅ Issue resolved with patch.
@swissspidy commented on PR #7931:
4 months ago
#12
#13
@
44 hours ago
- Keywords has-dev-note added; needs-dev-note removed
Note that the dev note has been published as Internationalization improvements in 6.8.
We might have simply missed this instance