Repository navigation
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Resolve the Blueprint installation language packages/playground/blueprints/src/lib/types.ts, packages/playground/blueprints/src/lib/v1/compile.ts, packages/playground/blueprints/src/lib/resolve-runtime-configuration.ts, packages/playground/blueprints/src/tests/installation-language.spec.ts, packages/docs/site/docs/blueprints/03-data-format.md |
The compiler captures the language from the first executable setSiteLanguage step and exposes it through runtime configuration. Tests cover step ordering and bundle declarations. Documentation describes how step position affects installation. |
Pass the language to WordPress boot packages/playground/client/src/blueprints-v1-handler.ts, packages/playground/client/src/blueprints-v1-handler.spec.ts, packages/playground/cli/src/blueprints-v1/*, packages/playground/remote/src/lib/blueprints-worker.ts, packages/playground/remote/src/lib/playground-worker-endpoint.ts |
Client, CLI, and remote worker boot paths pass installationLanguage to WordPress. The CLI uses the release archive for localized installations. The remote worker can skip the database included in a tar.zst bundle. |
Prepare and install WordPress in the selected language packages/playground/wordpress/src/installation-language.ts, packages/playground/wordpress/src/boot.ts, packages/playground/wordpress/src/index.ts, packages/playground/wordpress/src/test/installation-language*.spec.ts |
WordPress resolves the requested locale, loads available core translations, and passes the selected language and localized title to the installer when available. Boot can skip a bundled database. Tests cover locale selection, localized starter content, and preservation of existing site content. |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Feature
Sequence Diagram(s)
sequenceDiagram
participant BlueprintCompiler
participant RuntimeConfigurationResolver
participant BlueprintsV1Handler
participant bootWordPress
participant prepareLocalizedInstallation
participant TranslationCatalog
participant WordPressInstaller
BlueprintCompiler->>RuntimeConfigurationResolver: provide compiled installationLanguage
RuntimeConfigurationResolver->>BlueprintsV1Handler: provide runtime installationLanguage
BlueprintsV1Handler->>bootWordPress: pass installationLanguage
bootWordPress->>prepareLocalizedInstallation: prepare locale for a fresh install
prepareLocalizedInstallation->>TranslationCatalog: fetch locale metadata and translation archive
prepareLocalizedInstallation->>WordPressInstaller: return selected language and localized title
WordPressInstaller->>bootWordPress: install WordPress with prepared values
Possibly related PRs
- WordPress/wordpress-playground#4505: Implements the normal
language: "browser"resolution for thesetSiteLanguagestep that this PR also uses to select a pre-install language.
Suggested labels: [Type] Documentation, [Package][@wp-playground] Blueprints, [Aspect] Browser
Suggested reviewers: adamziel
Merge Risk: 
Minimal · up to 44057
-
The localized installation change is mergeable after normal checks; no concrete unresolved defect is established by the supplied evidence.
Pre-merge checks: 
5
-
Full details: Title check
-
Explanation
The title "[Blueprints] Localize starter content using an initial setSiteLanguage step" matches the main change. The PR adds an initial setSiteLanguage step that sets the language for a fresh WordPress install, which localizes the starter post, page, comment, and category content. The title names the feature, the blueprint area, and the mechanism. It does not cover the CLI cache bypass, the database skip during bundle extraction, or the browser-language selection, but it does not need to.
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 15 files. (1 skipped: 1 unsupported.)
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
An initial
setSiteLanguagestep now determines the language used to install a fresh WordPress site, so its starter post, page, comment, and category are created in that language. Localized installations use WordPress’s translated “My Site” title. Blueprint v1 preparses only the first executable step, ignoring comments and disabled entries; the step still executes normally afterward to translate installed plugins and themes. Later language steps retain their normal ordering. The v1 schema andsetSiteLanguageimplementation are unchanged.Standard Playground bundles already contain an English database, so localized fresh installs omit that factory database during extraction and install from scratch. Existing mounted databases and custom site archives are preserved. CLI localized installs bypass the cache of previously installed sites while retaining release-download caching. This PR starts from trunk and complements #4505 without overlapping files: explicit locales work independently, while
"browser"requires #4505 for the subsequent normal step execution. The legacy PHP boot path is unchanged.Validation:
Summary by CodeRabbit