chore(i18n): CI guard blocks new raw JSX placeholder strings #924

Merged
reviewer merged 1 commit from dev/911 into main 2026-05-07 17:27:56 +00:00
Collaborator

Diff-based i18n-string-check (just recipe + CI job) flags any placeholder="human phrase" literal added vs origin/main in non-test .tsx files, blocking new un-migrated strings while leaving the existing pilot backlog untouched.

Exceptions (all-caps identifiers, e.g. hints, https:// URLs, (meta) syntax, test files) are codified in docs/i18n.md § CI — raw-string guard.

Test plan

  • just i18n-string-check passes on current tree (no new violations)
  • Adding placeholder="Search foo bar" to a .tsx file triggers the guard
  • placeholder="FORGEJO_TOKEN" / placeholder="e.g. abc" / placeholder="(none)" are not flagged

Closes #911

Diff-based `i18n-string-check` (`just` recipe + CI job) flags any `placeholder="human phrase"` literal added vs `origin/main` in non-test `.tsx` files, blocking new un-migrated strings while leaving the existing pilot backlog untouched. Exceptions (all-caps identifiers, `e.g.` hints, `https://` URLs, `(meta)` syntax, test files) are codified in `docs/i18n.md § CI — raw-string guard`. ## Test plan - `just i18n-string-check` passes on current tree (no new violations) - Adding `placeholder="Search foo bar"` to a `.tsx` file triggers the guard - `placeholder="FORGEJO_TOKEN"` / `placeholder="e.g. abc"` / `placeholder="(none)"` are not flagged Closes #911
dev self-assigned this 2026-05-07 17:25:13 +00:00
chore(i18n): CI raw-string guard blocks new JSX placeholder literals (#911)
All checks were successful
qa / sql-layer-check (pull_request) Successful in 12s
qa / i18n-string-check (pull_request) Successful in 13s
qa / dockerfile (pull_request) Successful in 16s
qa / db-schema (pull_request) Successful in 41s
qa / qa-1 (pull_request) Successful in 1m39s
qa / qa (pull_request) Successful in 0s
9723cb4569
- `just i18n-string-check`: diff-based grep that flags `placeholder="human phrase"` added since origin/main; skips test files and technical literals (all-caps, e.g., https://, meta-syntax)
- Added to `just qa` and as a dedicated `i18n-string-check` CI job in qa.yml
- `docs/i18n.md`: new § "CI — raw-string guard" documents how the check works, the allowed exceptions, and how to add new escape hatches

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dev requested review from reviewer 2026-05-07 17:26:57 +00:00
reviewer approved these changes 2026-05-07 17:27:47 +00:00
reviewer left a comment

Regex logic correct — [a-z]{3,} naturally gates ALL_CAPS, [[:space:]] requires multi-word, -v exclusions cover e.g./URL/meta-syntax. CI green.

Regex logic correct — `[a-z]{3,}` naturally gates ALL_CAPS, `[[:space:]]` requires multi-word, `-v` exclusions cover e.g./URL/meta-syntax. CI green.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks!924
No description provided.