Skip to content

feat(i18n): implement Thai localization and extract hardcoded strings#795

Closed
ArthitDev wants to merge 8 commits intodifferent-ai:devfrom
ArthitDev:feat/localization-thai
Closed

feat(i18n): implement Thai localization and extract hardcoded strings#795
ArthitDev wants to merge 8 commits intodifferent-ai:devfrom
ArthitDev:feat/localization-thai

Conversation

@ArthitDev
Copy link
Copy Markdown

  • Replaced hardcoded UI text and error messages with translation helpers in app.tsx, pages, and components.

  • Added new translation keys to English (en.ts) and Chinese (zh.ts) locales.

  • Introduced complete Thai translation dictionary in th.ts.

  • Setup i18n structure to support future localization updates.

Summary

Implemented comprehensive Thai (th) localization for the OpenWork UI. Extracted all hardcoded English strings from components and pages into translation
keys. Added complete Thai translation dictionary covering all UI elements, status messages, and user-facing text.

Why

To support Thai-speaking users and establish a scalable i18n foundation for future language additions.

Issue

  • Closes # (add issue number if applicable)

Scope

  • Thai localization (th.ts)
  • English locale updates (en.ts)
  • Component translation integration
  • Test script cross-platform fix (Windows)

Out of scope

  • RTL language support
  • Dynamic language switching without reload
  • Third-party service localization

Testing

Ran

  • pnpm build
  • pnpm --filter @different-ai/openwork-ui typecheck
  • node scripts/e2e.mjs --dir=.

Result

  • pass: All tests passed
  • Build successful with no i18n-related errors

CI status

  • pass: Build and typecheck passing
  • code-related failures: None
  • external/env/auth blockers: None

Manual verification

  1. Verified Thai translations display correctly in UI
  2. Tested e2e suite passes with opencode binary
  3. Confirmed no console errors from missing translation keys

Evidence

N/A (localization feature)

Risk

Low - additive changes only, no breaking changes to existing functionality.

Rollback

  • Revert commit e1da81c
  • Remove th.ts locale file
  • Restore hardcoded strings if needed

New files

  • packages/app/src/app/data/commands/browser-setup.th.md
  • packages/app/src/app/data/commands/give-me-a-soul.th.md
  • packages/app/src/i18n/locales/th.ts

- Replaced hardcoded UI text and error messages with translation helpers in app.tsx, pages, and components.

- Added new translation keys to English (en.ts) and Chinese (zh.ts) locales.

- Introduced complete Thai translation dictionary in th.ts.

- Setup i18n structure to support future localization updates.
- Replaced hardcoded UI text and error messages with translation helpers in app.tsx, pages, and components.

- Added new translation keys to English (en.ts) and Chinese (zh.ts) locales.

- Introduced complete Thai translation dictionary in th.ts.

- Setup i18n structure to support future localization updates.

## Summary
Implemented comprehensive Thai (th) localization for the OpenWork UI. Extracted all hardcoded English strings from components and pages into translation keys. Added complete Thai translation dictionary covering all UI elements, status messages, and user-facing text.

## Why
To support Thai-speaking users and establish a scalable i18n foundation for future language additions.

## Issue
- Closes # (add issue number if applicable)

## Scope
- Thai localization (th.ts)
- English locale updates (en.ts)
- Component translation integration
- Test script cross-platform fix (Windows)

## Out of scope
- RTL language support
- Dynamic language switching without reload
- Third-party service localization

## Testing
### Ran
- pnpm build
- pnpm --filter @different-ai/openwork-ui typecheck
- node scripts/e2e.mjs --dir=.

### Result
- pass: All tests passed
- Build successful with no i18n-related errors

## CI status
- pass: Build and typecheck passing
- code-related failures: None
- external/env/auth blockers: None

## Manual verification
1. Verified Thai translations display correctly in UI
2. Tested e2e suite passes with opencode binary
3. Confirmed no console errors from missing translation keys

## Evidence
N/A (localization feature)

## Risk
Low - additive changes only, no breaking changes to existing functionality.

## Rollback
- Revert commit e1da81c
- Remove th.ts locale file
- Restore hardcoded strings if needed
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 8, 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 Mar 18, 2026 7:10am
openwork-software Ready Ready Preview, Comment Mar 18, 2026 7:10am

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 8, 2026

@Arthit-EPIT is attempting to deploy a commit to the 0 Finance Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 8, 2026

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

Fix session loss during workspace switches and improve sidebar handling
@OmarMcAdam
Copy link
Copy Markdown
Collaborator

Conflicts, please resolve

Arthit-EPIT and others added 2 commits March 12, 2026 15:51
- Resolve all 8 file conflicts from localization-thai merge
- Keep dev changes: sandbox progress props, soul mode removal
- Adopt localization: tr() calls throughout, locale-aware templates
- Add Thai locale (th.ts), remove soul.tsx (deleted in dev)
- Fix TypeScript: add isRemoteWorkspace prop to ExtensionsView/McpView
@ArthitDev
Copy link
Copy Markdown
Author

Conflicts, please resolve

It's done, sir.
The issue has been fixed. The latest update also revealed a cross-env issue on Windows, so it should be fixed for Windows development environments as well. Thank you.

@johnnyshields
Copy link
Copy Markdown
Contributor

Please merge so I can update my Japanese PR for it as well 🙇‍♂️

@ArthitDev
Copy link
Copy Markdown
Author

Please merge so I can update my Japanese PR for it as well 🙇‍♂️

I was planning to merge it anyway, but since the current focus is on fixing the core features, the language part was skipped for now.

So I’ve been resolving the conflicts and notifying whenever they occur.

I’d still prefer adding proper language support. I’ve already refactored the hard-coded parts, so if we want to support more languages later, it should only require adding translations without touching the code.

That said, if the decision is to keep hard-coding after resolving conflicts, I respect the team's decision. Thanks.

@jcllobet
Copy link
Copy Markdown
Collaborator

jcllobet commented Mar 17, 2026

@johnnyshields merged yours last night 🇯🇵 🫡

@ArthitDev I missed this one. We're doing a significant change on the infra today but I'll look into this again tomorrow morning. The browser setup in thai is really cool! We've deprecated the soul part but we might get back into it in a week or two.

johnnyshields added a commit to johnnyshields/openwork that referenced this pull request Mar 17, 2026
- Convert 20 component files from hardcoded strings to t() calls
- Add parameterized t() function support for dynamic values
- Expand en.ts from ~838 to ~1720 translation keys
- Add Thai (th) locale with complete translations
- Update zh and vi translations to match all new keys
- Add Thai to language selector in i18n/index.ts

Resolves PR different-ai#795 conflicts against dev branch.

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

@jcllobet
The latest compatibility fix reverted some parts from dynamic translation back to hard-coded values.
In the recent changes I made for compatibility, this was necessary.
If you need a fully dynamic translation version across all areas, please refer to the translation branch in the repository. Thanks.

johnnyshields added a commit to johnnyshields/openwork that referenced this pull request Apr 4, 2026
- JA: add 704 missing keys (1542 total)
- ZH: add 771 missing keys (1549 total)
- TH: create full Thai locale (1542 keys, adapted from PR different-ai#795)
- pt-BR: add 704 missing keys (1543 total)
- VI: add 727 missing keys (1543 total)
- Register Thai locale in i18n/index.ts

All locales now have complete coverage of en.ts keys.

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

johnnyshields commented Apr 4, 2026

I've adapted this work in PR #1339, as the main branch has drifted significantly.

This PR (#795) can be closed.

johnnyshields added a commit to johnnyshields/openwork that referenced this pull request Apr 4, 2026
JA: fix 42 workspace/worker terms, 8 spacing issues, 19 ellipsis fixes
ZH: rebrand 50+ MCP→Apps strings, standardize 你/您, remove 6 stale keys
TH: translate 200+ untranslated strings, fix term consistency, port PR different-ai#795 hero text
pt-BR: fix gender agreement, align plural placeholders
VI: fix 70+ workspace/worker terminology, verify diacritics

All locales now have 1542 keys matching en.ts exactly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
jcllobet pushed a commit that referenced this pull request Apr 4, 2026
…cales (#1339)

* feat(i18n): complete translations for all 6 locales

- JA: add 704 missing keys (1542 total)
- ZH: add 771 missing keys (1549 total)
- TH: create full Thai locale (1542 keys, adapted from PR #795)
- pt-BR: add 704 missing keys (1543 total)
- VI: add 727 missing keys (1543 total)
- Register Thai locale in i18n/index.ts

All locales now have complete coverage of en.ts keys.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(i18n): review and polish all locale translations

JA: fix 42 workspace/worker terms, 8 spacing issues, 19 ellipsis fixes
ZH: rebrand 50+ MCP→Apps strings, standardize 你/您, remove 6 stale keys
TH: translate 200+ untranslated strings, fix term consistency, port PR #795 hero text
pt-BR: fix gender agreement, align plural placeholders
VI: fix 70+ workspace/worker terminology, verify diacritics

All locales now have 1542 keys matching en.ts exactly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(i18n): final holistic review pass — 8 precision fixes

JA: fix token label/hint to preserve collaborator/owner distinction
ZH: standardize sandbox terminology (沙盒→沙箱, 3 keys)
TH: fix den.signing_in to convey "finishing" not just "signing in"
pt-BR: fix matching context, curated qualifier, missing verb (3 keys)
VI: fix reload vs restart consistency in mcp.auth section

All locales verified: key parity, placeholders, term consistency,
tone, punctuation, and meaning preservation confirmed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(i18n/ja): use 済み for status labels, しました for toasts

Short status labels/badges use noun+済み (completed state):
- common.copied: コピー済み
- message_list.tool_updated_file: {file}を更新済み
- message_list.tool_updated_file_fallback: ファイル更新済み
- skills.install_complete: インストール済み

Toast/notification messages keep しました (past action).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

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

@jcllobet this PR can now be closed.

@jcllobet jcllobet closed this Apr 4, 2026
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.

5 participants