[wp-trac] [WordPress Trac] #51871: Site Health actions that use the REST API receive an untranslated response

WordPress Trac noreply at wordpress.org
Fri Nov 27 00:43:04 UTC 2020


#51871: Site Health actions that use the REST API receive an untranslated response
--------------------------+--------------------------------
 Reporter:  oglekler      |       Owner:  TimothyBlynJacobs
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  5.6
Component:  Site Health   |     Version:  5.6
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  rest-api
--------------------------+--------------------------------

Comment (by Clorith):

 I don't think that's the issue here, a quick dump of the locale inside the
 function shows the correct one is recognized, even when using `apiRequest`
 (if you change the site language for example, not just profile language),
 it still returns English text even if `get_locale()` shows `nb_NO` in my
 test case.

 It's the same behavior for both `apiRequest` and `apiFetch` (that said, it
 should certainly use `apiFetch` instead, to honor the users profile option
 at least).

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51871#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list