Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#53435 closed task (blessed) (fixed) needs locale for pattern translation

Reported by: iandunn's profile iandunn Owned by: iandunn's profile iandunn
Milestone: 5.8 Priority: high
Severity: normal Version: 5.8
Component: Editor Keywords: has-patch
Focuses: Cc:


This ticket is to track merging the upstream issue #32754-gutenberg

#53246 moved Core's block patterns out of Core and into the Pattern Directory, which means they're no longer translated by Core. will handle translation, but needs to know the user's locale.

Knowing the WP version might also help with caching, and let the API avoid sending newer patterns to old WP versions which don't have the dependent blocks, etc.

We're past the feature freeze date, but this is a trivial change on the Core side, and very important for the pattern directory, so I've added it to the 5.8 milestone. I'm happy to consider other options if folks have concerns, though.

I'm planning to open a PR tonight or tomorrow.

Change History (7)

This ticket was mentioned in PR #1390 on WordPress/wordpress-develop by iandunn.

3 years ago

  • Keywords has-patch added

This information is needed by the API for translation and caching.

Trac ticket:

#2 @iandunn
3 years ago

  • Owner set to iandunn
  • Status changed from new to assigned

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.

3 years ago

TimothyBJacobs commented on PR #1390:

3 years ago

I agree with @ocean90 about the cache placement. Aside from that, code looks good to me.

#5 @iandunn
3 years ago

In 51206:

Block Editor: Send locale, version with remote pattern requests.

This information is needed by the API for translation and caching.

Props dd32, ryelle, tellyworth
See #53435

#6 @iandunn
3 years ago

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

In 51208:

Block Editor: Move caching to endpoint for unique responses.

Now that the pattern API request includes the locale and version, the cache key needs to contain a hash of the query args.

Props ocean90, dd32, timothyblynjacobs
Fixes #53435

Note: See TracTickets for help on using tickets.