FE-M0-12 · The catalog: Indonesian from every t() call, English beside it
ID FE-M0-12 · Level L0 · Run order row 28
i18n/, behind the @i18n alias, holds the translator, the Indonesian catalog the script collects from every t() call, and the English file; typecheck fails when the catalog is out of date or a strict prefix lacks English (D29); committed on the branch web/languages. The zip holds the whole new version of every file the step adds or changes, so each can be read before it is copied. Before copying, the step checks that the files it replaces are exactly the ones it was written for, so pack C's Tailwind layout (D35) or a later change is never overwritten by mistake.
Before
Section titled “Before”- Pack C is merged (FE-M0-11 Done), with Tailwind and the token theme (FE-M0-15, D35), and timeline row 27 is Done (D29).
- fe-pack-d.zip, rebuilt on 2026-10-16 for D30 and D35 and sent in the FE chat, is in ~/Downloads. The zip of 2026-10-07 (SHA-256 ecbff7ab…) and the first rebuild of 2026-10-16 (ebc56b5f…) are withdrawn: the first would undo pack C's layout, and the second's patches could fail without stopping the step.
- You are in ~/opleet-v2/opleet and git status --short prints nothing.
1 · Check the zip, then unzip it next to the repository
Section titled “1 · Check the zip, then unzip it next to the repository”shasum -a 256 ~/Downloads/fe-pack-d.zipunzip -q -o ~/Downloads/fe-pack-d.zip -d ~/opleet-v2/packsls ~/opleet-v2/packs/fe-pack-d2 · A branch for pack D
Section titled “2 · A branch for pack D”git switch main && git pullgit switch -c web/languages3 · Check the files this step replaces; then the translator moves into i18n/, its own folder (D29), and this step's files are copied
Section titled “3 · Check the files this step replaces; then the translator moves into i18n/, its own folder (D29), and this step's files are copied”The lines end in &&, so the block stops at the first command that fails, and nothing after it runs.
shasum -a 256 -c ~/opleet-v2/packs/fe-pack-d/FE-M0-12/BASE.sha256 && mkdir -p apps/web/i18n && git mv apps/web/lib/i18n/fill.ts apps/web/i18n/translate.ts && cp -R ~/opleet-v2/packs/fe-pack-d/FE-M0-12/apps . && git status --short4 · The catalog script, the tests in i18n/ and, in typecheck, the catalog check and the token check (the CTO's answer 4 on #17); then write the Indonesian catalog
Section titled “4 · The catalog script, the tests in i18n/ and, in typecheck, the catalog check and the token check (the CTO's answer 4 on #17); then write the Indonesian catalog”pnpm --dir apps/web pkg set scripts.i18n="node scripts/i18n.mjs" scripts.test="node --test 'lib/**/*.test.ts' 'i18n/**/*.test.ts'" scripts.typecheck="node scripts/tokens.mjs --check && node scripts/i18n.mjs --check && next typegen && tsc --noEmit"pnpm --filter web i18n5 · Test, typecheck and lint
Section titled “5 · Test, typecheck and lint”pnpm --filter web testpnpm --filter web typecheckpnpm lint6 · Commit
Section titled “6 · Commit”git add -A apps/webgit commit -m "feat(web): the Indonesian and English catalog"Expect
Section titled “Expect”- Block 1: 22f9b5f98c549488fabd0e4a74642cc7219b9eb1548611e99a4dbcab09325aa4, then FE-M0-12 FE-M0-13 FE-M0-14 FE-M0-16 README.txt.
- Block 4: “Wrote i18n/messages.id.ts”, then “Keys: 57. With English: 57. Without: 0.”
- Block 5: “ℹ tests 26” and “ℹ pass 26”; typecheck prints “design/opleet/tokens.css and theme.css are up to date”, then the Keys line again, and no errors; “No fixes applied.”
- Block 3: seven lines ending in “: OK”, then git status prints M for apps/web/app/design-preview/page.tsx, biome.json, lib/i18n/client.ts, lib/i18n/server.ts, lib/nav.ts and tsconfig.json; RM for lib/i18n/fill.ts → i18n/translate.ts; ?? for i18n/locales.ts, messages.en.ts, names.ts, strict.json, translate.test.ts and scripts/i18n.mjs.
- Block 6: the commit line with 16 files changed.
grep -c '^ "' apps/web/i18n/messages.id.tsgit status --shortExpect: 57, then nothing from git status.
If it fails
Section titled “If it fails”- “… has two defaults”: two t() calls use one key with different Indonesian. Paste the line.
- typecheck says i18n/messages.id.ts is out of date: block 4's second command didn't run. Run it, then block 5 again.
- “… has no English, and … is strict”: paste the line.
- Block 3 prints “FAILED” for a file and stops: your copy of that file is not the one this step was written for (main has changed it, or it was edited by hand). Nothing was copied. Paste the FAILED lines and stop; FE rebuilds the step. If you fixed files by hand on an earlier try, start again from main: run FE-M0-12's Undo, then FE-M0-12 from block 2.
git switch maingit branch -D web/languagesNothing has been pushed.
Not run yet.