Skip to content

[READY] fix(i18n): Add more missed translations + fixes + cleanup#1381

Merged
src-opn merged 11 commits intodifferent-ai:devfrom
johnnyshields:more-translations-20260408
Apr 8, 2026
Merged

[READY] fix(i18n): Add more missed translations + fixes + cleanup#1381
src-opn merged 11 commits intodifferent-ai:devfrom
johnnyshields:more-translations-20260408

Conversation

@johnnyshields
Copy link
Copy Markdown
Contributor

@johnnyshields johnnyshields commented Apr 7, 2026

This PR does the following:

  • Adds ~600 translations missed in my previous PRs across all locales. Most of these already had t(...) in the source code, but were only in en.ts.
  • Removes ~360 dead/used keys from all locales (I triple-checked they aren't used)
  • Sorts the keys in all local files alphabetically, so that they are all now consistently ordered.
    • (Yes, I know the LOC changed due to sort is annoying but it's a one-time churn and things will be clean after it. I've verified that no keys were mangled in the process)
  • Adds scripts/i18n-audit.mjs which is useful to find missing keys, and well as having --prune and --sort options.
  • General code cleanups; removed currentLocale and useless helper functions.
  • Fix some broken translations that were introduced in commit 52f282b, probably in attempt to resolve conflicts some of my previous work (no big deal)

No EN text was changed, aside from a few bona-fide fixes.

After this is merged I will do one more PR where I clean-up pluralization support and I'll handle the Russian support PR.

By the way, please let me know you will accept a PR that uses i18next, that will make things easier than rolling our own I18n, but adds a bit of bloat.

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 7, 2026

@johnnyshields is attempting to deploy a commit to the Different AI Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 7, 2026

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

Project Deployment Actions Updated (UTC)
openwork-landing Ready Ready Preview, Comment, Open in v0 Apr 8, 2026 1:53am

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

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

@johnnyshields
Copy link
Copy Markdown
Contributor Author

@jcllobet ready for review.

Resolve en.ts conflict — take upstream's cleaned toolbar_ready_to_install
value (was a truncated JS template literal). Fix same in zh and pt-BR.
Sort all locales.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@johnnyshields
Copy link
Copy Markdown
Contributor Author

Conflicts resolved, please merge.

@johnnyshields johnnyshields changed the title Add more missed translations for all locales I18n: Add more missed translations + fixes + cleanup Apr 7, 2026
@johnnyshields johnnyshields changed the title I18n: Add more missed translations + fixes + cleanup [READY] I18n: Add more missed translations + fixes + cleanup Apr 7, 2026
@johnnyshields johnnyshields changed the title [READY] I18n: Add more missed translations + fixes + cleanup [READY] fix(i18n): Add more missed translations + fixes + cleanup Apr 7, 2026
Copy link
Copy Markdown
Collaborator

@src-opn src-opn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stick with consistent translation function please
seeing big mixture of t("context_panel.preserving_entry") vs translate("context_panel.preserving_entry")
and additional const translate = (key: string, params?: Record<string, string | number>) => t(key, undefined, params);

massive number of line changes in files that didnt need it. ensure new lines are inserted correctly and not unnecessarily re-writing whole files

need verification screenshots
last few i18n PRs had broken issues or missing translations (settings page etc)

Comment on lines -7 to -39
// ==================== Dashboard ====================
"dashboard.title": "Dashboard",
"dashboard.sessions": "Sessões",
"dashboard.commands": "Comandos",
"dashboard.skills": "Skills",
"dashboard.plugins": "Plugins",
"dashboard.mcps": "Apps",
"dashboard.settings": "Configurações",
"dashboard.home": "Home",
"dashboard.runs": "Execuções",
"dashboard.find_workspace": "Buscar workspace...",
"dashboard.workspaces": "Workspaces",
"dashboard.no_workspaces": "Nenhum workspace correspondente.",
"dashboard.new_workspace": "Novo Workspace...",
"dashboard.new_remote_workspace": "Adicionar Workspace Remoto...",
"dashboard.forget_workspace": "Esquecer workspace",
"dashboard.remote": "Remoto",
"dashboard.connection": "Conexão",
"dashboard.local_engine": "Engine Local",
"dashboard.client_mode": "Modo Cliente",
"dashboard.connected": "Conectado",
"dashboard.not_connected": "Não conectado",
"dashboard.stop_disconnect": "Parar e Desconectar",
"dashboard.disconnect": "Desconectar",
"dashboard.new_task": "Nova Tarefa",
"dashboard.new": "Novo",
"dashboard.busy": "Ocupado",
"dashboard.hero_title": "O que vamos fazer hoje?",
"dashboard.hero_description": "Descreva um resultado. O OpenWork vai executar e manter um histórico de auditoria.",
"dashboard.quick_start_commands": "Comandos de Início Rápido",
"dashboard.view_all": "Ver todos",
"dashboard.no_commands": "Nenhum comando ainda. Comandos iniciais aparecerão aqui.",
"dashboard.run_command": "Executar um comando salvo",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Copy Markdown
Contributor Author

@johnnyshields johnnyshields Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As explained in my original message above, I've run a one-time sort of the translation keys across all locales, which can be replicated by running scripts/i18n-audit.js --sort

Sorting helps reduce future conflicts/errors/confusion, by making the files canonical.

Comment on lines -6 to -36
// ==================== Dashboard ====================
"dashboard.title": "ダッシュボード",
"dashboard.sessions": "セッション",
"dashboard.commands": "コマンド",
"dashboard.skills": "スキル",
"dashboard.plugins": "プラグイン",
"dashboard.mcps": "アプリ",
"dashboard.settings": "設定",
"dashboard.home": "ホーム",
"dashboard.runs": "実行",
"dashboard.find_workspace": "ワークスペースを検索…",
"dashboard.workspaces": "ワークスペース",
"dashboard.no_workspaces": "一致するワークスペースがありません。",
"dashboard.new_workspace": "新しいワークスペース…",
"dashboard.new_remote_workspace": "リモートワークスペースを追加…",
"dashboard.forget_workspace": "ワークスペースを削除",
"dashboard.remote": "リモート",
"dashboard.connection": "接続",
"dashboard.local_engine": "ローカルエンジン",
"dashboard.client_mode": "クライアントモード",
"dashboard.connected": "接続済み",
"dashboard.not_connected": "未接続",
"dashboard.stop_disconnect": "停止して切断",
"dashboard.disconnect": "切断",
"dashboard.new_task": "新しいタスク",
"dashboard.new": "新規",
"dashboard.busy": "ビジー",
"dashboard.hero_title": "今日は何をしましょうか?",
"dashboard.hero_description": "何でも依頼してください。OpenWorkが実行し、すべて記録に残します。",
"dashboard.quick_start_commands": "クイックスタートコマンド",
"dashboard.view_all": "すべて表示",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Copy Markdown
Contributor Author

@johnnyshields johnnyshields Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above, it is because sort was applied.

@src-opn
Copy link
Copy Markdown
Collaborator

src-opn commented Apr 7, 2026

@johnnyshields appreciate your efforts here
we will be moving to react based code soon so things will change a lot
i18n is proving to be very buggy and we cant manually verify all these large PRs
we had an instance before that needed to be resolved - likely due to some rebasing

@johnnyshields
Copy link
Copy Markdown
Contributor Author

johnnyshields commented Apr 8, 2026

@src-opn I've run extensive checks on the translations in the app, both manual/visual and also with a new script I added node scripts/i18n-audit.mjs. You can also run this script after merging to verify nothing broke.

Re: translate vs t, the cleanest approach is to remove intermediate alias methods like translate and just use t from i18n module directly everywhere.

If you want this to be broken into a few smaller PRs I'm happy to do so, but also it is safe to merge as-is--this is what I've tested, and the i18n-audit.mjs script can help ensure that any conflicts in other PRs are fixed.

@johnnyshields
Copy link
Copy Markdown
Contributor Author

johnnyshields commented Apr 8, 2026

Only issues are related to {plural} placeholder which I will resolve in the next PR.

You can run this:   node scripts/i18n-audit.mjs

     ╔══════════════════════════════════════════════════╗
     ║              i18n Audit Report                   ║
     ╚══════════════════════════════════════════════════╝

     === Key counts ===
       en       2043 keys (source of truth)
       ja       2043 keys (100%)
       zh       2043 keys (100%)
       vi       2043 keys (100%)
       pt-BR    2043 keys (100%)
       th       2043 keys (100%)

     === Missing keys (in en.ts but not in locale) ===
       ja: ✓ no missing
       zh: ✓ no missing
       vi: ✓ no missing
       pt-BR: ✓ no missing
       th: ✓ no missing

     === Orphan keys (in locale but not in en.ts) ===
       ja: ✓ no orphans
       zh: ✓ no orphans
       vi: ✓ no orphans
       pt-BR: ✓ no orphans
       th: ✓ no orphans

     === Duplicate keys ===
       en: ✓ no duplicates
       ja: ✓ no duplicates
       zh: ✓ no duplicates
       vi: ✓ no duplicates
       pt-BR: ✓ no duplicates
       th: ✓ no duplicates

     === Unused keys (in en.ts but never referenced in repo) ===
       ✓ all keys referenced in source

     === Dangling t() calls (keys not in en.ts) ===
       ✓ all t() keys exist in en.ts

     === Placeholder integrity ===
       ✗ ja/den.status_loaded_orgs: missing placeholder {plural}
       ✗ zh/den.status_loaded_orgs: missing placeholder {plural}
       ✗ th/den.status_loaded_orgs: missing placeholder {plural}
       ✗ ja/den.status_loaded_templates: missing placeholder {plural}
       ✗ zh/den.status_loaded_templates: missing placeholder {plural}
       ✗ th/den.status_loaded_templates: missing placeholder {plural}
       ✗ ja/den.status_loaded_workers: missing placeholder {plural}
       ✗ zh/den.status_loaded_workers: missing placeholder {plural}
       ✗ th/den.status_loaded_workers: missing placeholder {plural}
       ✗ ja/message_list.subagent_message_count: missing placeholder {plural}
       ✗ zh/message_list.subagent_message_count: missing placeholder {plural}
       ✗ th/message_list.subagent_message_count: missing placeholder {plural}
       ✗ ja/onboarding.folders_allowed: missing placeholder {plural}
       ✗ zh/onboarding.folders_allowed: missing placeholder {plural}
       ✗ th/onboarding.folders_allowed: missing placeholder {plural}
       ✗ ja/session.show_earlier: missing placeholder {plural}
       ✗ zh/session.show_earlier: missing placeholder {plural}
       ✗ th/session.show_earlier: missing placeholder {plural}
       ✗ ja/status.providers_connected: missing placeholder {plural}
       ✗ zh/status.providers_connected: missing placeholder {plural}
       ✗ th/status.providers_connected: missing placeholder {plural}
       ✗ 21 placeholder issues

@johnnyshields johnnyshields force-pushed the more-translations-20260408 branch from b9ffdbd to 30d2e13 Compare April 8, 2026 01:53
@src-opn src-opn merged commit 46fa5a2 into different-ai:dev Apr 8, 2026
9 of 13 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.

2 participants