Skip to content

Conversation

@Gaubee
Copy link
Contributor

@Gaubee Gaubee commented Dec 19, 2025

问题

Transfer 页面的翻译显示原始键名(如 transfer.quickTransfer)而非翻译文本。

根本原因

transaction.json 文件中存在重复的 transfer 键:

  • 第 2 行:"transfer": { ... } 对象(包含 TransferTab 所需的所有嵌套翻译)
  • 第 200+ 行:"transfer": "轉賬" 字符串

在 JSON 中,后面的键会覆盖前面的,所以字符串覆盖了整个对象,导致所有 transfer.* 翻译失效。

修复

将字符串键从 "transfer" 重命名为 "transferAction",避免与对象键冲突。

影响的文件

  • src/i18n/locales/en/transaction.json
  • src/i18n/locales/zh-CN/transaction.json
  • src/i18n/locales/zh-TW/transaction.json
  • src/i18n/locales/ar/transaction.json

测试

  • TypeScript 类型检查通过

…nsaction.json

The transaction.json files had duplicate 'transfer' keys:
- Line 2: 'transfer' object with nested translations for TransferTab
- Line 200+: 'transfer' string for action label

In JSON, later keys override earlier ones, so the string was overriding
the object, causing all transfer.* translations to fail.

Renamed the string key to 'transferAction' to resolve the conflict.
@Gaubee Gaubee merged commit 9ead51e into main Dec 19, 2025
6 checks passed
@Gaubee Gaubee deleted the fix/transaction-json-duplicate-keys 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