Skip to content

Add missing i18n translations for all UI components (en, zh, ja)#1

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1780102680-add-missing-translations
Open

Add missing i18n translations for all UI components (en, zh, ja)#1
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1780102680-add-missing-translations

Conversation

@devin-ai-integration

Copy link
Copy Markdown

Summary

Scanned all UI elements in src/components/ and src/utils/i18n.ts for hardcoded strings missing translations. Added 58 new translation keys across all three languages and updated components to use t() from react-i18next.

Changes:

  • Added 58 new translation keys to en.json, zh.json, ja.json (all now have 209 identical keys)
  • Updated 8 component files to replace hardcoded strings with t() calls:
    • ExportView.tsx, PreprocessView.tsx, ReviewView.tsx
    • GlobalFallbacks.tsx, Lightbox.tsx, AppLayout.tsx, AppModals.tsx, App.tsx
  • Added Japanese language selector button to the settings modal
  • Updated theme button labels (Light/Dark) to use translation keys
  • Added 'ja' to the Language type in types.ts and utils/i18n.ts
  • Added full Japanese translation set to the legacy i18n.ts translations object

Review & Testing Checklist for Human

  • Switch language to Japanese in Settings and verify all UI text renders correctly (no missing keys shown as raw strings)
  • Switch language to Chinese and verify the same
  • Test the Export workflow view — all labels should be translated
  • Test the Review workflow view — stats labels and issue descriptions should be translated
  • Trigger an error boundary (e.g. via React DevTools) to verify GlobalFallbacks shows translated error messages

Notes

  • Language names in the settings selector are intentionally left as native script (English, 中文, 日本語) since users identify their language by its native name
  • The export key already existed in locale files; the ExportModal's export button now uses t('export') instead of hardcoded text
  • Lint passes cleanly with --max-warnings 0

Link to Devin session: https://app.devin.ai/sessions/93cd6aba7ab649338ca11bf995c46b92
Requested by: @Tera-Dark

- Add 58 new translation keys to all locale files (en.json, zh.json, ja.json)
- Update ExportView, PreprocessView, ReviewView, GlobalFallbacks, Lightbox,
  AppLayout, AppModals to use t() for all hardcoded strings
- Add Japanese language button to settings modal
- Update theme button labels to use translations
- Add Japanese (ja) to Language type and AppSettings type
- Add all new keys to legacy i18n.ts with full Japanese translations
- All three locale files now have 209 identical keys

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

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