Conversation
Co-authored-by: OpenClaw AI Team <openclaw@clawith.ai> Signed-off-by: OpenClaw AI Team <openclaw@clawith.ai> - 补充 en.json 缺失的翻译键 (agent.status.*, agent.aware.*, agent.openclaw.* 等) - 补充 zh.json 缺失的翻译键 (agent.workspace.newFile) - 将 AgentDetail.tsx 中的硬编码字符串迁移到翻译文件 - 统一使用 t() 函数,移除手动语言判断
There was a problem hiding this comment.
Pull request overview
This PR improves frontend internationalization by adding missing translation keys (en/zh) and migrating several hardcoded / language-branching strings in AgentDetail to use t() consistently.
Changes:
- Migrated multiple UI strings in
AgentDetail.tsxfromi18n.language?.startsWith('zh') ? ... : ...tot('...'). - Added new i18n keys for agent status metrics/tooltips, Aware pagination controls, OpenClaw connection labels, approvals, trigger limits, and welcome message settings.
- Added missing workspace key
agent.workspace.newFiletozh.json(and corresponding key exists inen.json).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| frontend/src/pages/AgentDetail.tsx | Replaces several hardcoded / language-conditional strings with t() lookups. |
| frontend/src/i18n/zh.json | Adds new translation keys for AgentDetail UI (but currently introduces a duplicate key issue). |
| frontend/src/i18n/en.json | Adds new translation keys for AgentDetail UI (but currently introduces a duplicate key issue). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| "creating": "创建中" | ||
| }, | ||
| "status": { |
| </div> | ||
| <div style={{ display: 'flex', justifyContent: 'space-between', fontSize: '13px' }}> | ||
| <span style={{ color: 'var(--text-tertiary)' }}>Created</span> | ||
| <span style={{ color: 'var(--text-tertiary)' }}>{t('common.createdBy', 'Created')}</span> |
| "error": "Error" | ||
| }, | ||
| "status": { |
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
Thanks for the PR! The direction of removing hardcoded Chinese/English strings and migrating to However, Could you please rebase your branch onto the latest |
Co-authored-by: NangenX OpenClaw AI Team
Signed-off-by: NangenX OpenClaw AI Team
Summary
Checklist