Repository navigation
test(mobile): check every literal copy key exists in both locales - #157
Closed
santinofuentesAI wants to merge 1 commit into
Closed
santinofuentesAI wants to merge 1 commit into
santinofuentesAI wants to merge 1 commit into
Conversation
…joCodingLabs#29) Signed-off-by: Santino Fuentes <santinofuentesAI@users.noreply.github.com>
Contributor
|
Thanks, Santino, and sorry about this one. You opened it 20 minutes before #160, but it didn't show up in the open list when I merged the queue this afternoon, so #160, which adds the same check, landed first. Closing this as a duplicate. If yours checks something #160 doesn't, open a small follow-up with just that part and I'll merge it. 🦀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Closes #29
Adds
apps/mobile/src/copy-keys.ts(copyKeys(source)) usingKEY_PATTERNfrom@hermit/copy, plusapps/mobile/src/copy-keys.test.tsto verify that every literal copy key referenced inapps/mobile/srcandpackages/*/src(excluding*.test.ts/*.test.tsx) exists in bothpackages/copy/locales/en.jsonandes-419.json.${...}interpolations and non-key strings.HM-SET-08.tltle) inapps/mobile/src/app/about.tsx: the test failed naming the file, both locales, and the misspelled key, before reverting the typo.Vision fit
Serves Principle 5 ("Spanish and English, first-class") and Principle 7 ("Small, typed and tested"): prevents misspelled copy keys from throwing at runtime on any screen.
Non-negotiables
Checklist
acceptedproposal.pnpm check:privacy,pnpm typecheck,pnpm lint,pnpm testandnode scripts/guard/check.mjs --base origin/main --patterns scripts/guard/patterns.txt.packages/copy, in es-419 and en, with matching keys and placeholders, and no em or en dashes. (n/a: adds tests only; existing keys in code all resolve in both locales.)Model path
packages/model,agent,skillsoreval, the prompt, the router, tool descriptions, normalizers, examples or the model file.Screenshots
New dependencies and network calls
n/a
AI agents
copy-keys.tsandcopy-keys.test.ts, verified the failure check on a temporary typo, ran all five gates againstorigin/main(6f0d47e), and drafted this PR description.