Skip to content

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.

  • 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”
Terminal window
shasum -a 256 ~/Downloads/fe-pack-d.zip
unzip -q -o ~/Downloads/fe-pack-d.zip -d ~/opleet-v2/packs
ls ~/opleet-v2/packs/fe-pack-d
Terminal window
git switch main && git pull
git switch -c web/languages

3 · 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”
Terminal window
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/. .

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”
Terminal window
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 i18n
Terminal window
pnpm --filter web test
pnpm --filter web typecheck
pnpm lint
Terminal window
git add -A apps/web
git commit -m "feat(web): the Indonesian and English catalog"
  • 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.
Terminal window
grep -c '^ "' apps/web/i18n/messages.id.ts
git status --short

Expect: 57, then nothing from git status.

  • “… 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.
Terminal window
git switch main
git branch -D web/languages

Nothing has been pushed.

Not run yet.