Skip to content

fix(i18n): make english source-first across the app#1403

Draft
jcllobet wants to merge 5 commits intodevfrom
task/i18n-source-search
Draft

fix(i18n): make english source-first across the app#1403
jcllobet wants to merge 5 commits intodevfrom
task/i18n-source-search

Conversation

@jcllobet
Copy link
Copy Markdown
Collaborator

@jcllobet jcllobet commented Apr 8, 2026

Summary

  • add a backward-compatible td(key, english, localeOrParams?, params?) helper so visible English copy lives at the callsite while locale keys stay stable
  • migrate static app i18n callsites to source-first defaults, including shared/common labels, so grep-by-English now points back to the real source files
  • add --source-first, --extract-source-first, and pnpm i18n:sync-en so en.ts is verified against and synced from source-first defaults
  • keep one explicit dynamic fallback in apps/app/src/app/app.tsx for unknown future busy-status keys; all static callsites now carry inline English defaults

Testing

  • pnpm install
  • pnpm test:i18n:find
  • pnpm test:i18n:source-first
  • node scripts/i18n-audit.mjs --source-first
  • pnpm i18n:sync-en
  • pnpm i18n:find -- "OpenWork server URL"
  • pnpm i18n:find -- "Add Remote Workspace"
  • node scripts/i18n-audit.mjs --duplicates
  • pnpm --filter @openwork/app typecheck
  • pnpm build:ui

Result

  • scripts/i18n-audit.mjs --source-first now reports 1296 source-first defaults in sync with en.ts
  • static app i18n callsites now require inline English defaults, so the codebase stays searchable while preserving localization

Notes

  • common/shared strings are still translated; common.* remains a namespace for shared UI copy, not an escape hatch from localization
  • I did not run Docker/Chrome MCP because this is an i18n/source-ownership refactor rather than a new end-user flow

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-app Ready Ready Preview, Comment Apr 8, 2026 10:45pm
openwork-den Ready Ready Preview, Comment Apr 8, 2026 10:45pm
openwork-den-worker-proxy Ready Ready Preview, Comment Apr 8, 2026 10:45pm
openwork-landing Ready Ready Preview, Comment, Open in v0 Apr 8, 2026 10:45pm
openwork-share Ready Ready Preview, Comment Apr 8, 2026 10:45pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

The following comment was made by an LLM, it may be inaccurate:

@jcllobet
Copy link
Copy Markdown
Collaborator Author

do not merge, @johnnyshields has a better take on it

@jcllobet jcllobet marked this pull request as draft April 10, 2026 06:39
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.

1 participant