[wp-trac] [WordPress Trac] #43985: Privacy: The user request email should be sent in the user language
WordPress Trac
noreply at wordpress.org
Tue May 15 12:52:50 UTC 2018
#43985: Privacy: The user request email should be sent in the user language
-------------------------------------------------+-------------------------
Reporter: Chouby | Owner: desrosj
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 4.9.6
Component: Mail | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch gdpr needs-testing needs- | Focuses:
unit-tests | administration
-------------------------------------------------+-------------------------
Comment (by birgire):
[attachment:43985.4.3.diff] is a skeleton for the `wp_send_user_request()`
unit tests.
The {{{test_function_should_send_user_request_email_in_user_language()}}}
still fails, because there are no `es_ES` translations for e.g. the
`[%1$s] Confirm Action: %2$s` string in
`/tests/phpunit/data/language/es_ES.mo`.
I guess there are few ways to handle that in the test, like adding it to
the `es_ES.mo`/`es_ES.po` test files or use a `gettext` filter that checks
the user locale before overriding. I also tried to filter the subject with
an existing `es_ES` string, but that didn't work for the translated
string.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43985#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list