Closed bgrgicak closed 6 days ago
This PR created a dependency between the Blueprints package and the WordPress builds package. @bgrgicak let's pull the WordPress version details from api.wordpress.org/core/version-check/1.7?channel=beta instead of using the version of the latest minified web build the web as a proxy for the latest WordPress version.
The resolveWPRelease CLI function might be ripe for reuse in the Blueprints library. That's one less Playground CLI-specific code path.
This PR enables using
setSiteLanguage
with beta and nightly WordPress versions:Before this PR, the above Blueprint would fetch translations from
https://downloads.wordpress.org/translation/core/6.7-RC2/es_ES.zip
and fail after a 404 API response from the WordPress.org translations API. The6.7-RC2
version string in the URL came directly from WordPress's version.php.The WordPress translations API only offers translations for full, official WordPress releases (e.g.
6.6
,6.6.1
) plus RC translations for each major WordPress version (e.g.6.6-RC
,6.7-RC
). Note that beta and RC versions use the same translations bundle. Also, there is no translation bundle for the development versions so the best we can do is download the latest RC translations.This PR transforms the raw version string, such as
6.7-RC2
or6.8-alpha-59341
, into one recognized by the API, such as6.7-RC
or6.8-RC
. As a result, the above Blueprint now fetches the translations fromhttps://downloads.wordpress.org/translation/core/6.7-RC/es_ES.zip
.Testing Instructions (or ideally a Blueprint)
Manual testing instructions