[wp-trac] [WordPress Trac] #38485: Some part of the UI can be in the wrong language (edge cases)
WordPress Trac
noreply at wordpress.org
Thu Nov 3 09:28:06 UTC 2016
#38485: Some part of the UI can be in the wrong language (edge cases)
-------------------------------------------------+-------------------------
Reporter: afercia | Owner: ocean90
Type: defect (bug) | Status: accepted
Priority: high | Milestone: 4.7
Component: I18N | Version: trunk
Severity: normal | Resolution:
Keywords: has-screenshots needs-patch has- | Focuses:
unit-tests |
-------------------------------------------------+-------------------------
Changes (by swissspidy):
* keywords: has-screenshots needs-patch needs-unit-tests => has-
screenshots needs-patch has-unit-tests
Comment:
[attachment:38485-load-textdomain.4.diff] adds a bunch of tests to ensure
these functions all use `get_user_locale()` in the admin.
Anyone getting translated strings via Ajax will get strings in the user's
locale when they are logged in (as `admin-ajax.php` is in the admin, after
all). Developers should use `switch_to_locale()` if that's not desired or
ideally leverage the REST API. We'll document this in the dev-note.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38485#comment:29>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list