Add independent i18n support for PlatformDashboard page / 为 PlatformDashboard 页面添加独立的国际化支持#523
Add independent i18n support for PlatformDashboard page / 为 PlatformDashboard 页面添加独立的国际化支持#523liaozip wants to merge 1 commit intodataelement:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c8827efad3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| @@ -0,0 +1,706 @@ | |||
| import React, { useState, useEffect, useCallback } from 'react'; | |||
There was a problem hiding this comment.
Place i18n dashboard in the compiled frontend path
This commit adds a new PlatformDashboard component at the repository root, but the app still renders frontend/src/pages/PlatformDashboard.tsx (imported from frontend/src/pages/AdminCompanies.tsx) and the frontend TypeScript config only includes src (frontend/tsconfig.json). As a result, none of the new translation logic is actually bundled or executed, so the intended i18n behavior for the dashboard is not delivered.
Useful? React with 👍 / 👎.
描述 / Description
中文
为 PlatformDashboard 页面添加独立的中英文双语国际化支持,不依赖项目主 i18n 翻译文件,同时保持与项目语言切换机制的完美同步。
English
Add independent bilingual (English/Chinese) internationalization support for the PlatformDashboard page, without relying on the project's main i18n translation files, while maintaining perfect synchronization with the project's language switching mechanism.
变更内容 / Changes
react-i18next'suseTranslationhookTRANSLATIONSobject{retainedInfo})replaceAll技术实现 / Technical Implementation
核心方案
翻译系统结构
修改文件 / Modified Files
frontend/src/pages/PlatformDashboard.tsx- 完整的页面级国际化实现测试建议 / Testing Suggestions
语言切换测试
页面功能测试
动态内容测试
兼容性 / Compatibility