Skip to content

test(mobile): verify literal copy keys exist in both locales (#29) - #160

Merged
juancguerrerodev merged 3 commits into
DojoCodingLabs:mainfrom
Mugunth007:test/29-copy-keys-exist
Nov 28, 2026
Merged

juancguerrerodev merged 3 commits into
DojoCodingLabs:mainfrom
Mugunth007:test/29-copy-keys-exist

Conversation

@Mugunth007

Copy link
Copy Markdown
Contributor

Closes #29

  • Add apps/mobile/src/copy-keys.ts exporting extractCopyKeys(source) using KEY_PATTERN from @hermit/copy to extract copy keys written as whole string literals ("...", '...', or `...` without ${).
  • Add apps/mobile/src/copy-keys.test.ts with unit tests for extractCopyKeys and a workspace scan checking every literal copy key in apps/mobile/src and packages/*/src against both en.json and es-419.json.

Verified with node --test --experimental-strip-types src/copy-keys.test.ts (2/2 passing) and pnpm --filter @hermit/mobile typecheck.

@juancguerrerodev
juancguerrerodev merged commit 10c5ff3 into DojoCodingLabs:main Nov 28, 2026
4 checks passed
@juancguerrerodev

Copy link
Copy Markdown
Contributor

Both merged (#159 and this one), thanks! The scan now reaches nested routes, and a missing copy key fails a test instead of reaching a screen. One thing for next time: tick "I read and ran everything in this pull request, and I can explain it" in the template. 🦀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a test that every copy key in code exists in both locales

3 participants