Skip to content

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Add i18n Support for Initialization Page and Fix Plugin Loading Text

Summary

This PR implements i18n improvements for the LangBot web frontend as requested in issue #1423:

  1. Added language selector to initialization page - Following the login page pattern, added a language selector in the top-right corner of the register/initialization page
  2. Fixed hardcoded loading text in plugin configuration dialog - Replaced hardcoded "加载中..." with proper i18n translation t('plugins.loading')

Changes Made

Translation Files

  • Added register section to both zh-Hans.ts and en-US.ts with translations for:
    • Page title, description, form labels, button text, and toast messages

Register Page (/register)

  • Added i18n imports and language selector component (copied from login page)
  • Implemented language detection and switching functionality
  • Replaced all hardcoded Chinese texts with translation calls
  • Updated form schema to use translation function for validation messages

Plugin Configuration Dialog

  • Fixed hardcoded "加载中..." text in PluginForm.tsx to use t('plugins.loading')

Testing

Tested locally - Both features working correctly:

  • Language selector appears in top-right corner of initialization page
  • Language switching works between Chinese and English
  • All texts update appropriately when switching languages
  • Plugin loading text now uses proper i18n translation
  • Linting passes with no errors

Screenshots

Register page in English
Register page in Chinese

Link to Devin run

https://app.devin.ai/sessions/0557deaf0a1a487aae662e2d178dbd04

Requested by

Rock Chin ([email protected])

… text

- Add language selector to register/initialization page with Chinese and English options
- Add register section translations to both zh-Hans.ts and en-US.ts
- Replace hardcoded Chinese texts in register page with i18n translation calls
- Fix hardcoded '加载中...' text in plugin configuration dialog to use t('plugins.loading')
- Follow existing login page pattern for language selector implementation
- Maintain consistent UI/UX design with proper language switching functionality

Co-Authored-By: Junyan Qin <Chin>, 秦骏言 in Chinese, you can call me my english name Rock Chin. <[email protected]>
Copy link
Contributor 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 and CI monitoring

@RockChinQ RockChinQ merged commit e6bc009 into master Jun 6, 2025
1 check passed
@RockChinQ RockChinQ deleted the devin/1749206791-i18n-improvements branch June 6, 2025 13:29
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