fix(preview): translate the sandbox boot phase labels - #6442
Merged
Conversation
The four provision/cloning/install/dev pill headlines in BootingVisual were hardcoded English strings shown to every user regardless of locale. Route them through t() with new sandbox.bootingVisual.phase* keys, mirrored in pt-br.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The four boot-phase pill headlines in
BootingVisual(apps/web/src/components/sandbox/preview/booting-visual.tsx) — "Reserving sandbox", "Cloning your repo", "Installing packages", "Starting your preview" — were hardcoded English strings rendered to every user while a sandbox boots, regardless of locale, violating the repo's i18n rule (all user-facing copy inapps/web/srcmust go throught()).A pt-br user watching their sandbox boot sees English text mixed into an otherwise-localized preview panel; this makes the boot sequence consistent with the rest of the app's i18n coverage.
What changed:
sandbox.bootingVisual.phaseProvision/phaseCloning/phaseInstall/phaseDevkeys toi18n/en/sandbox.tsand their pt-br mirrors (phaseDevreuses the existingsandbox.preview.startingPreviewwording: "Starting your preview"/"Iniciando seu preview").booting-visual.tsx'sPHASE_LABELSconstant is now aphaseLabels(t)function computed fromuseT(), matching the pattern already used elsewhere in this directory (e.g.path-param-picker-chip.tsx'skindLabels).No behavior change beyond the string source — same four labels, same phase-to-label mapping, just localized.
To confirm:
bunx tsc --noEmitin apps/web (green — TranslationKey compile-check covers the pt-br mirror),bunx oxlinton the three touched files (0 warnings/errors),bun run fmt(no changes). No unit test exists for this presentational component and none is warranted here.Summary by cubic
Localizes the sandbox boot-phase labels in
BootingVisualby replacing hardcoded English strings with i18n keys, so users see phase labels in their locale. Previously all users saw English; now labels resolve viat()withenandpt-brcoverage; no visual or logic changes beyond localization.sandbox.bootingVisual.phaseProvision/phaseCloning/phaseInstall/phaseDevinenandpt-br(phaseDev keeps the existing “Starting your preview” wording).PHASE_LABELSconstant with aphaseLabels(t)mapper and passes labels intopillHeadline; integratesuseT().Written for commit a9f41ea. Summary will update on new commits.