Skip to content

Nothing tests the translation reviewer, and it passed wording the walkthrough found #990

Open

Description

@richshaw

Needs your OK: this adds an eval for the translation reviewer, run by hand when its prompt or model changes, and four checks to its prompt. Swap pipeline:proposed for pipeline:ready to have it built.

What happens

  • Every translation is reviewed by a different model, in context, with .claude/skills/translate/references/review.md (docs/translating.md, "How translations are made and checked"). That review ran on every Swedish batch.
  • The UX walkthrough of the stack then found wording the review had passed:
    • "Farozon" (Danger zone)
    • "Inget tak" (No limit)
    • "Ändrar" on the Build tab's "Editing" badge, read as the verb "changes"
    • "Länken kan ha skadats på vägen" (mangled in transit)
    • "Dina sidor" ("your pages", which can be read as your public pages)
    • "Byt till Svenska för din öppna anmälningslista", which the owner read as the product name translated
    • pass, a work shift, as the word for every slot (Swedish calls every slot a "pass", a work shift, which reads oddly for a potluck #988)
  • They fall into four kinds the prompt doesn't ask about:
    1. The English is itself jargon or an idiom, so a faithful copy passes "Meaning".
    2. A short string's role is unclear (badge, heading, button), so a noun or verb reading slips through.
    3. A glossary word fits one kind of signup but not others.
    4. A phrase collides with the product name or another glossary word.
  • Nothing measures the reviewer, so a change to its prompt or model can't be judged.

Fix, in outline

  • Four checks in review.md, one for each kind above, written as questions like the existing eight. Don't quote the walkthrough's strings in the prompt: the eval below uses them.
  • An eval set, evals/translation-review/sv.json:
    • about 10 known-bad messages from the list above, each with the English, the translation, where it shows, and the kind of flag expected;
    • about 10 known-good messages from the settled review (Signups can't be in Swedish yet #639's "Settled" section), each expecting no flag.
  • pnpm eval:translation-review sends each case through review.md with the same LLM_* settings as pnpm eval:magic-compose. It reads the reviewer's rows (<key> | … | <kind> | …, the format review.md asks for), and prints how many bad cases were flagged and how many good ones were flagged wrongly, per model. Reuse scripts/lib/eval-harness.ts where it fits.
  • A line in the translate skill and docs/translating.md: run the eval whenever review.md or the reviewer model changes, and put the result in the PR.

Watch for

  • Teaching to the test. The prompt gets general questions; the eval keeps the actual strings.
  • It needs a model key, so it doesn't run in CI, the same as Magic Compose's evals.
  • Run it on more than one model. Earlier Magic Compose evals showed one cheap model can hide a prompt's effect.

Choices this makes

  • Pass bar. Default: at least 8 of the 10 bad cases flagged, and at most 2 of the 10 good ones.
  • Default reviewer model. Default: unchanged. The eval's first run tells you whether to change it.

Order

After #637, because review.md and the guide land there.

Done when

  • review.md has the four checks.
  • The eval set and pnpm eval:translation-review exist, with a unit test for parsing the reviewer's rows.
  • One run's results are in the PR: the old prompt against the new, on at least two models.
  • The skill and guide say when to run it.
  • pnpm lint && pnpm typecheck && pnpm knip && pnpm test pass.

From the UX walkthrough of the localization stack, merged locally at 33c8c0d. The wording findings were posted on #976, #977, #981, #982, #931 and #933. Part of #994: the owner asked for translation quality checks that are part of everyday work.


Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpipeline:proposed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions