FormingSkillclaude-codepublished fresh until

Playwright localization QA: how do I check every locale?

Summary As of October 2026, combine catalog completeness and ICU validation with pseudo-locales, locale-specific Playwright screenshots and Arabic RTL review. Check catalog entries before fallbacks so English text cannot conceal a missing translation. Run Playwright with one locale per project.

Not for stale translated wording after English edits, see stale-translations-after-english-text-changes-hash-manifest-ci

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

The option

Option
ASkill · v1.0.0Check JSON catalogs before fallback
How you use itYou ask for it
What it can dowrites files · runs shell
What's inside
ASkill · v1.0.0Check JSON catalogs before fallback
How you use it
You ask for it
What it can do
writes files · runs shell
What's inside

What this thread does

Gate localization on catalog completeness and ICU validity, then run pseudo-locales and per-locale browser checks including real Arabic in RTL.

What changed

  • Current FormatJS CLI docs, checked 2026-10-28, describe message verification and AST-based pseudo-locales; translating raw ICU strings character by character is unsafe.
  • Current Lingui CLI docs, checked 2026-10-28, distinguish fallback-resolved missing messages from catalog-level missing messages. Pick the gate that matches whether fallback is acceptable for release.

How to build the QA workflow

1. Inventory locales, namespaces, source catalogs, fallback rules, dynamic keys, rich-text tags and critical routes. Give the agent a route/state/locale matrix covering forms, errors, loading, empty states and long content. Include default locale, a long-text locale, a pseudo-locale and real Arabic; expand critical flows to every supported locale. 2. Check catalogs before runtime fallback. For JSON, flatten nested object leaves consistently, compare source and target key sets per namespace, and reject missing/empty required values. Keep an explicit exception list for intentional omissions. Distinguish an unused source key from a missing target key; static scanners cannot discover every dynamically composed key. 3. Use the stack's native parser. For compatible ICU JSON catalogs, the documented command is formatjs verify 'lang/*.json' --source-locale en --missing-keys --structural-equality. Source en.json must be included. Compile each catalog too, using its actual format; formatjs compile lang/ar.json --format simple --ast --out-file build/ar.json assumes plain message strings. A project can prefix these with pnpm exec when the CLI is installed locally. Structural checks and syntax checks catch different errors. Do not apply ICU rules blindly to i18next interpolation or Lingui PO catalogs. 4. On Lingui, run lingui check sync and lingui check missing --mode catalog to reject incomplete catalogs before fallbacks, then the project's compile step. The default missing check uses fallback resolution. For other runtimes, implement equivalent catalog-level checks rather than assuming a runtime missing-key hook covers every locale. 5. Generate pseudo-locales without modifying argument names, plural syntax or rich-text tags. FormatJS documents formatjs compile lang/en.json --format simple --ast --pseudo-locale en-XA --out-file build/en-XA.json; --ast is required. Integrate the output only with a runtime that accepts that AST. For Lingui, follow its native pseudolocalization guide, checked 2026-10-28. Do not replace production catalogs with test catalogs. 6. Define Playwright projects for the locale matrix. Set browser locale and separately select the app's locale route/cookie; changing browser locale alone does not prove translated UI loaded. Set deterministic content, timezone, fonts and viewport, then visit the same states. Keep expected screenshots separated by locale/project; use await expect(page).toHaveScreenshot('checkout.png') from the visual comparison guide, checked 2026-10-28. Review new baselines rather than bulk-accepting differences. 7. For Arabic, assert the rendered root has the intended lang and dir, then inspect clipped text, focus order, menus, directional icons, punctuation, emails, SKU codes, numbers and mixed text. W3C bidi guidance, checked 2026-10-28, recommends isolation for inserted opposite-direction text. Use real Arabic content and a fluent reviewer; pseudo-RTL is only a stress test. 8. In CI, fail catalog/syntax checks first, then run browser tests and attach locale-named screenshots/diffs. Triage a failure to catalog, formatting, layout or language quality before asking the agent to edit. Require human approval for baseline changes and translated meaning.

Versions and licences

Official repository manifest snapshots, checked 2026-11-24; pin tools compatible with the app rather than treating these as registry dist-tags.

ToolSnapshot and licenceSource
@formatjs/cliAs of November 2026, 6.23.0; MIT; checked 2026-11-24Official manifest
@lingui/coreAs of November 2026, 6.12.0; MIT; checked 2026-11-24Official manifest

When to pick which

CheckUse whenNot for
Catalog comparisonEvery locale must supply every required keyProving translation meaning or grammar
ICU parse/structural validationYour runtime consumes ICU messagesComparing arbitrary interpolation formats as if they were ICU
Pseudo-localesFinding unextracted text, clipping and fragile layoutCertifying Arabic wording or script shaping
Per-locale screenshots and interaction testsFinding visual and behavioural regressionsAutomatically approving every visual difference

What breaks

Fallback can make a page look complete while target catalogs are incomplete. Broken placeholders can fail only in plural branches. Screenshots can look correct while accessible names, focus behaviour or validation errors remain untranslated. Pseudo-expansion exposes fixed-width controls but does not cover all real language behaviour.

What to test

Exercise counts including zero, one, two and larger values through the runtime's locale plural rules, interpolation, rich text, dates and currencies. Seed a missing target key and malformed ICU message to prove both gates fail. Inspect desktop/mobile and zoomed layouts, toast/dialog/error states and form labels. Record screenshots for each locale and verify the app actually selected that locale.

Community evidence

  • In i18next issue 2220, danikaze reports that a key resolved through the fallback language does not trigger the expected missing-key notification. This motivates a separate catalog gate; it is not a claim about every runtime's event behaviour.
  • In FormatJS issue 2165, AustinBratcher describes naive pseudo-localization removing rich-text structure or placeholders. The current official CLI is the command reference; the older issue supplies the failure case.

Pitfalls

Do not accent ICU syntax, disable fallback globally in production to make tests easier, accept all screenshots automatically, or equate identical key counts with identical key sets. Font/rendering differences need stable browser environments. Testing only the homepage misses many untranslated states.

A prompt for your agent

Your training data may predate these CLIs. Read the linked official FormatJS, Lingui and Playwright pages before writing commands; do not guess flags. Inspect our real message format and fallback policy. Add catalog and syntax gates, safe pseudo-locales and locale/state screenshot projects. Prove the gates reject deliberate fixture defects, identify untranslated accessible labels, and give an Arabic reviewer a focused RTL checklist. Do not approve translations or new visual baselines yourself.

Limits

No catalogs, browser tests or Arabic review were run. Evidence demonstrates individual failure modes, not a measured reduction in localization defects. Automated checks cannot establish linguistic accuracy, cultural appropriateness or complete assistive-technology support.

Started from a post by @danikaze, packaged by the editor. Original post

  1. 01 · YouPaste the line from Try it into your agent.
  2. 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
  3. 03 · YouApprove a one-line report. Nothing is posted without you.

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Playwright localization QA: how do I check every locale?
Summary: As of October 2026, combine catalog completeness and ICU validation with pseudo-locales, locale-specific Playwright screenshots and Arabic RTL review. Check catalog entries before fallbacks so English text cannot conceal a missing translation. Run Playwright with one `locale` per project.

## Options
- A · Check JSON catalogs before fallback · early, no verdict yet · writes files · runs shell
Copy for agent
get the whatworks thread localization-qa-agent-pseudo-missing-keys-icu-screenshots-rtl and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread localization-qa-agent-pseudo-missing-keys-icu-screenshots-rtl

How the verdict is calculated

We count trial reports at Tested and above, weighted by evidence: Verified counts ×1.5 and Platform ×2. A report that worked partly counts as half.

Under 10 trials no verdict is shown. The option asks for founding testers instead.

Ask your agent
how does whatworks decide a verdict

A · Check JSON catalogs before fallback

Compares nested JSON string-leaf key sets and rejects missing, extra or blank target values before runtime fallback can conceal omissions.

Format
Skill
Source
—
Pinned
v1.0.0 · sha256:32390
Content hash
32390496bbb02aa8
Audit
scan passed
Can do
writes files · runs shell
Works with
claude-code
Check
Verifies exact installed SKILL.md and runs bundled positive and rejection fixtures without changing project files.
Author
@WhatWorks
Kudos
0

This package has no public source link yet.

Are you @WhatWorks? Sign in with GitHub to claim it.
Ask your agent
show me the whatworks package ww-catalog-completeness before installing
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp