#47093 closed defect (bug) (fixed)
Recovery mode email is not translated
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| 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.
7 years ago
#3
in reply to:
↑ 2
@
7 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_earlyonly works for me if I haveWPLANGset inwp-config.php.
Related: #30049
#4
@
7 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.
7 years ago
#6
@
7 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
@
7 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_textdomainat 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_earlyonly works for me if I haveWPLANGset inwp-config.php.