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.
Before
Section titled “Before”- Pack C is merged (FE-M0-11 Done) and timeline row 27 is Done (D29).
- fe-pack-d.zip, sent in the FE chat on 2026-10-07, is in ~/Downloads.
- 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 · The translator moves into i18n/, its own folder (D29); then copy this step's files
Section titled “3 · The translator moves into i18n/, its own folder (D29); then copy this step's files”mkdir -p apps/web/i18ngit mv apps/web/lib/i18n/fill.ts apps/web/i18n/translate.tscp -R ~/opleet-v2/packs/fe-pack-d/FE-M0-12/. .4 · The catalog script, the tests in i18n/ and the catalog check in typecheck; then write the Indonesian catalog
Section titled “4 · The catalog script, the tests in i18n/ and the catalog check in typecheck; 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/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: ecbff7abc49e03d945be36d1dcddca04a0ad1de11ebff81188202537690565cc, then FE-M0-12 FE-M0-13 FE-M0-13-E1 FE-M0-13-E2 FE-M0-14 README.txt expected.
- Block 4: “Wrote i18n/messages.id.ts”, then “Keys: 57. With English: 57. Without: 0.”
- Block 5: “ℹ tests 26” and “ℹ pass 26”; typecheck prints the Keys line again and no errors; “No fixes applied.”
- 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.
git switch maingit branch -D web/languagesNothing has been pushed.
Not run yet.