Skip to content

Conversation

@Gaubee
Copy link
Contributor

@Gaubee Gaubee commented Dec 19, 2025

问题

Transfer 和 Home Tab 页面的 i18n 翻译显示原始键名而非翻译文本。

原因

当使用 useTranslation(['transaction', 'common']) 时,第一个命名空间成为默认命名空间,导致 t('a11y.xxx')transaction 中查找而非 common

修复

  • TransferTab.tsx: t("a11y.tabTransfer")t("common:a11y.tabTransfer")
  • HomeTab.tsx:
    • t("a11y.chainSelector")t("common:a11y.chainSelector")
    • t("a11y.scan")t("common:a11y.scan")

文档更新

更新 AGENTS.md 和 CLAUDE.md,添加更清晰的 git worktree + PR 工作流程说明:

  • 完整的 7 步工作流程示例
  • 使用 gh CLI 创建和合并 PR 的命令
  • 注意事项说明

测试

  • TypeScript 类型检查通过
  • 单元测试通过

- Fix TransferTab and HomeTab i18n translations showing raw keys
- When using useTranslation(['transaction', 'common']), the first namespace
  becomes default, so a11y.* keys need explicit common: prefix
- Update AGENTS.md and CLAUDE.md with clearer git worktree + PR workflow
@Gaubee Gaubee merged commit c009ed9 into main Dec 19, 2025
6 checks passed
@Gaubee Gaubee deleted the fix/i18n-namespace-prefix-v2 branch January 4, 2026 07:23
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.

2 participants