Skip to content

test(copy,site): keep locale copy free of small slips (#226) - #249

Merged
juancguerrerodev merged 8 commits into
DojoCodingLabs:mainfrom
saurabhbhoir456:test/copy-hygiene-226
Dec 6, 2026
Merged

juancguerrerodev merged 8 commits into
DojoCodingLabs:mainfrom
saurabhbhoir456:test/copy-hygiene-226

Conversation

@saurabhbhoir456

@saurabhbhoir456 saurabhbhoir456 commented Dec 6, 2026 •

Copy link
Copy Markdown
Contributor

Closes #226

Small slips in copy are easy to make and hard to see in review: a double space, a space at the end of a string, three
dots instead of the ellipsis character the rest of the copy uses, or a Spanish question with no opening mark.

What this PR does

  • Adds a describe("copy hygiene") block to packages/copy/test/copy.test.ts with one small check per slip, each first
    tested on made-up strings: no two spaces in a row; no space, tab or line break at the start or end of a value; no
    ... (the copy uses the one-character ellipsis everywhere today); and, in es-419.json only, the number of opening
    question marks equals the number of closing ones, and likewise for exclamations. The same four checks then run over
    every value in packages/copy/locales/en.json and es-419.json, naming the key in each failure.
  • Adds the same four checks to apps/site/test/locales.test.ts for the website's locale files, as a small copy of the
    checks there (the site does not depend on @hermit/copy).

Line breaks inside a value are fine; only the start and the end are checked. The placeholders are not text, so a value
like {count} {unit} is fine.

Verification note

The double space check was proven on a real file: adding a double space to common.retry in packages/copy/locales/en.json
made the test fail naming that key, and the change was undone. No locale file changes in this pull request, because no
check found a real slip in any of the four files.

On my Windows checkout the full site suite also shows one pre-existing failure in test/badges.test.ts (a badge SVG
hash), reproduced on the clean tree without this change; the locale tests themselves pass.

How to check

pnpm --filter @hermit/copy test
pnpm --filter @hermit/site test
pnpm --filter @hermit/copy typecheck
pnpm --filter @hermit/site typecheck

Pull request template

What and why

Closes #226.

Adds copy hygiene checks over both locale sets: double spaces, edge whitespace, three dots, and Spanish opening marks.

Vision fit

Principle 5, Spanish and English first-class: both locales are held to the same small slips by test.

Non-negotiables

  • This keeps every non-negotiable in AGENTS.md as it is.
  • Or it changes one, and this is the accepted RFC: n/a

Checklist

  • It closes one issue, linked above, or it's a small fix (a typo, a broken link, a wrong comment). A feature has an accepted proposal.
  • I wrote the failing test first. It fails without this change and passes with it. Checks were tested on made-up strings first, and a double space added to a real locale value failed naming its key, then was undone.
  • These pass: pnpm check:privacy, pnpm typecheck, pnpm lint, pnpm test and node scripts/guard/check.mjs --patterns scripts/guard/patterns.txt. Gate note: privacy and guard pass on this checkout today; the rest was run per package as listed under AI agents, not as one root gate on this Windows machine, where unrelated pre-existing failures appear in the site badges, the devices table and mobile source scans.
  • No new network call, telemetry, analytics, ads or crash reporting. (A new request in an app adapter is explained below, with its host, skill and risk.)
  • No new dependency, or the reason for each one is below.
  • Every UI string is in packages/copy, in es-419 and en, with matching keys and placeholders, and no em or en dashes.
  • Tests, fixtures and screenshots use made-up data only.

Model path

  • This doesn't touch the model path: packages/model, agent, skills or eval, the prompt, the router, tool descriptions, normalizers, examples or the model file.
  • It does. The eval numbers from before and after are below, run as docs/evals.md says. No held-out case was tuned on.

Screenshots

  • No UI change.
  • UI change. Each changed screen is below, in both themes and both languages, with made-up data.

New dependencies and network calls

None. No new dependency and no new network call.

AI agents

  • No AI agent wrote any part of this.
  • An AI agent helped. Which one, and what it did: Tinsel Alpha, an AI coding agent running in OpenCode, drafted the change and this description and ran the checks below, in a session directed by the author, who reviewed each step's report before it was pushed.
  • I read and ran everything in this pull request, and I can explain it.

What was run: pnpm --filter @hermit/copy test (29/29); site locales test (13/13); copy and site typecheck; eslint on the changed tests.

@juancguerrerodev

Copy link
Copy Markdown
Contributor

Ready to merge once the pull request template is filled in, including the "I read and ran everything" box (details on #234). 🦀

@juancguerrerodev
juancguerrerodev merged commit 2dc1e3a into DojoCodingLabs:main Dec 6, 2026
4 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.

Copy: test for stray spaces, three dots and a missing ¿ or ¡

3 participants