fix(dashboard): add missing onboarding.tiers step title (#4698) (#4755)

Co-authored-by: Diego Rodrigues de Sa e Souza <souzamiriamrodrigues790@gmail.com>
This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-06-23 07:46:31 -03:00
committed by GitHub
parent fb40d21276
commit 44f81eaa60
3 changed files with 36 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ _In development — bullets added per PR; finalized at release._
### 🔧 Bug Fixes
- **db-backups**: make the database-import size cap configurable via `OMNIROUTE_DB_IMPORT_MAX_MB` (default 100 MB, 4 GB ceiling) so backups larger than 100 MB can be restored; error message now points to the env var and to VACUUM (#4719).
- **Onboarding**: add the missing `onboarding.tiers` step-title translation so the setup wizard no longer crashes with `MISSING_MESSAGE: onboarding.tiers` (#4698).
---

View File

@@ -3816,6 +3816,7 @@
},
"onboarding": {
"welcome": "Welcome",
"tiers": "Tiers",
"security": "Security",
"test": "Test",
"ready": "Ready!",

View File

@@ -0,0 +1,34 @@
// #4698 — the onboarding wizard rendered each step title via t(stepId), but the "tiers"
// step had no matching onboarding.tiers key, so next-intl threw
// "MISSING_MESSAGE: onboarding.tiers (en)" and the wizard crashed. Guard that every step
// id used as a title resolves to a string in the source (en) catalog.
import test from "node:test";
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import { fileURLToPath } from "node:url";
// Mirrors STEP_IDS in src/app/(dashboard)/dashboard/onboarding/page.tsx and the
// title lookup `t(id === "done" ? "ready" : id)`.
const STEP_IDS = ["welcome", "tiers", "security", "provider", "test", "done"];
const titleKeyFor = (id: string) => (id === "done" ? "ready" : id);
const enPath = fileURLToPath(
new URL("../../src/i18n/messages/en.json", import.meta.url)
);
const en = JSON.parse(readFileSync(enPath, "utf8"));
test("every onboarding step has a string title key in en.json (#4698)", () => {
const onboarding = en.onboarding ?? {};
for (const id of STEP_IDS) {
const key = titleKeyFor(id);
assert.equal(
typeof onboarding[key],
"string",
`onboarding.${key} (for step "${id}") must be a string title`
);
}
});
test("onboarding.tiers specifically exists (regression guard #4698)", () => {
assert.equal(typeof en.onboarding?.tiers, "string");
});