Create a CI script to detect missing i18n keys across locales

Open Beginner friendly
#6 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Quiet
Tech stack
node.js, typescript
Domain
ci-cd, tooling

Research direction

Start by inspecting the locale files under packages/i18n/src/locales/, using en-US.ts as the reference, and check the repository's package.json scripts. Create the requested script to recursively report missing keys and run it with the check:i18n command. Done means missing keys are identified per locale and the command exits with code 1 when any are found.

Written by the indexing model from the issue text.

Description

good first issue help wanted

Currently there's no automated way to check if all locale files have the same keys. We'd like a script that runs in CI.

What to do:

  1. Create scripts/check-i18n-keys.mjs (the repo's scripts are zx-based .mjs files, see existing scripts/*.mjs)
  2. The script should:
    • Load all locale namespace files from packages/i18n/src/locales/<locale>/*.ts (each locale is a directory of namespace files like common.ts, agent.ts, ... — not a single file)
    • Recursively compare all object keys against en-US (the reference)
    • Report missing keys per locale
    • Exit with code 1 if any keys are missing
  3. Add it to package.json scripts: "check:i18n": "node scripts/check-i18n-keys.mjs"
  4. Optionally add to CI workflow

Skills needed: TypeScript/Node.js, basic object traversal

Estimated time: 2-3 hours

Dominant language
TypeScript
Stars
17
Forks
6
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nutstore/eo2weave

All issues in nutstore/eo2weave

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.