Skip to content

fix(i18n): catch keys read through a copyFor() key list - #393

Merged
jouwdan merged 1 commit into
mainfrom
claude/missing-i18n-strings-e5xeph
Sep 20, 2026
Merged

jouwdan merged 1 commit into
mainfrom
claude/missing-i18n-strings-e5xeph

Conversation

@jouwdan

@jouwdan jouwdan commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

Every theme's copy.ts batches its SlotCopy through a local copyFor(t,
keys) helper that calls t.t(key) in a loop. Because the key reaches the
translator through a variable, not a string literal, i18n-check's CALL
regex never saw it, so a key listed there with no matching catalog entry
passed silently — the exact shape of the "raw key leaks in the UI" report,
even though every current copyFor() list in the repo does resolve.

Scan the array literal passed to copyFor(t, [...]) directly and fail the
same way the existing literal-call check does.

Every theme's copy.ts batches its SlotCopy through a local copyFor(t,
keys) helper that calls t.t(key) in a loop. Because the key reaches the
translator through a variable, not a string literal, i18n-check's CALL
regex never saw it, so a key listed there with no matching catalog entry
passed silently — the exact shape of the "raw key leaks in the UI" report,
even though every current copyFor() list in the repo does resolve.

Scan the array literal passed to copyFor(t, [...]) directly and fail the
same way the existing literal-call check does.
@jouwdan
jouwdan merged commit ec07f59 into main Sep 20, 2026
16 checks passed
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.

2 participants