Open jeryj opened 4 years ago
This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.
Steps to reproduce
You will need to have
WP_DEBUG
set tofalse
or not be present at all to reproduce.What I expected
SPT should respect the site language settings and immediately show the templates in the site settings language.
What happened instead
SPT template cache does not get cleared when switching the site language, resulting in templates showing in the previously selected language.
Screenshot / Video
Change your site language
When changing the site language setting to Spanish, it should look like this:
Instead, it remains on the previous language:
Context / Source
if
statement toif (true) {
: https://github.com/Automattic/wp-calypso/blob/master/apps/full-site-editing/full-site-editing-plugin/starter-page-templates/class-starter-page-templates.php#L211get_locale()
to$this->get_iso_639_locale()
to line-up with what is used in the template fetch, but it gave inconsistent results. Sometimes it would clear the template cache, and other times it would get set incorrectly and not be able to clear: https://github.com/Automattic/wp-calypso/blob/master/apps/full-site-editing/full-site-editing-plugin/starter-page-templates/class-starter-page-templates.php#L39