#47093 closed defect (bug) (fixed)
Recovery mode email is not translated
Reported by: | desrosj | Owned by: | desrosj |
---|---|---|---|
Milestone: | 5.2 | Priority: | normal |
Severity: | normal | Version: | 5.2 |
Component: | Site Health | Keywords: | servehappy has-patch commit dev-reviewed |
Focuses: | Cc: |
Description
Reported by @fierevere and @wolly in Slack.
When the recovery mode email is sent out, it is always in en_US
.
Attachments (2)
Change History (13)
This ticket was mentioned in Slack in #core by desrosj. View the logs.
5 years ago
#3
in reply to:
↑ 2
@
5 years ago
Replying to TimothyBlynJacobs:
I guess we'd need to check something like this? Not super familiar with the potential ramifications.
if ( ! isset( $GLOBALS['wp_locale'] ) ) { load_default_textdomain(); }
Looks good to me, let's do that.
Using
wp_load_translations_early
only works for me if I haveWPLANG
set inwp-config.php
.
Related: #30049
#4
@
5 years ago
with both patches applied, issue with mail text, mail subject and die messages are solved for me.
This ticket was mentioned in Slack in #core by chanthaboune. View the logs.
5 years ago
#6
@
5 years ago
I applied the two parches, and everything run as expected.
All the messages are in italian.
Email is in italian.
Thanx a loto
#8
@
5 years ago
The approach in 47093.2.diff looks reasonable to me 👍
This happens if the fatal error occurs before
load_default_textdomain()
is called.I was able to fix this by adding a call to
load_default_textdomain
at the top ofWP_Recovery_Mode_Email_Service::send_recovery_mode_email
. I guess we'd need to check something like this? Not super familiar with the potential ramifications.if ( ! isset( $GLOBALS['wp_locale'] ) ) { load_default_textdomain(); }
Using
wp_load_translations_early
only works for me if I haveWPLANG
set inwp-config.php
.