Making WordPress.org

Opened 2 years ago

Closed 2 years ago

#6105 closed enhancement (fixed)

Meta: Forward locale via path to Openverse iframe

Reported by: sarayourfriend's profile sarayourfriend Owned by: sarayourfriend's profile sarayourfriend
Milestone: Priority: normal
Component: WordPress.org Site Keywords: has-patch
Cc:

Description

Openverse has switched from cookie-based locale forwarding to path-based. This allows the initial render of a non-default locale in the iframe to be correctly SSR'd and also eases testing.

We need to update the wporg-openverse theme to forward the locale via the iframe's path.

Change History (7)

This ticket was mentioned in PR #61 on WordPress/wordpress.org by sarayourfriend.


2 years ago
#1

  • Keywords has-patch added

https://meta.trac.wordpress.org/ticket/6105

Forwards the locale via the iframe's path rather than relying on a cookie.

To test, follow setup instructions in the README of the wporg-openverse theme, then visit the site locally. To test that the locales are working, replace the call to get_locale() with a wp_locale string (like pt_BR etc) to verify that it is working to forward the locale as expected (as far as I know there's no way to test this "for real" locally as subdomain locale choosing isn't supported in the local wp-env when I tried it).

sarayourfriend commented on PR #61:


2 years ago
#2

cc @WordPress/openverse-developers

sarayourfriend commented on PR #61:


2 years ago
#3

Before merging this it needs the new functionality to be put behind a theme setting.

sarayourfriend commented on PR #61:


2 years ago
#4

Okay this is ready for review now. @WordPress/openverse-developers please take a look at this, thanks!

obulat commented on PR #61:


2 years ago
#5

We can also remove step 3 from the README instructions, as the mu-plugin is already set up, at least it is for me?

sarayourfriend commented on PR #61:


2 years ago
#6

We can also remove step 3 from the README instructions, as the mu-plugin is already set up, at least it is for me?

That's just you :slightly_smiling_face: On a fresh clone they're set up by composer install.

#7 @dd32
2 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

I typo'd the commit.

[11590]

Openverse: Update the theme to use path-based localisation.

Props sarayourfriend.
Closes https://github.com/WordPress/wordpress.org/pull/61
Fixes #6195.
Note: See TracTickets for help on using tickets.