Skip to content

[AMORO-4130][amoro-web] Replace hardcoded frontend texts with i18n translations#4133

Open
Bingtagui404 wants to merge 1 commit intoapache:masterfrom
Bingtagui404:fix/i18n-hardcoded-texts
Open

[AMORO-4130][amoro-web] Replace hardcoded frontend texts with i18n translations#4133
Bingtagui404 wants to merge 1 commit intoapache:masterfrom
Bingtagui404:fix/i18n-hardcoded-texts

Conversation

@Bingtagui404
Copy link
Contributor

Problem

The amoro-web frontend uses vue-i18n and shared helpers like usePlaceholder(), but several pages still contain hardcoded English labels, placeholders, and texts, making the UI inconsistent and harder to localize.

Fixes #4130

Reproduction

Switch the UI language to Chinese — hardcoded texts like "Optimizer group", "Action", "Type", "Status", "Catalog", "Database", "Table", "Charts", "All", "Endpoint", "Region", "Hadoop Username", "Kerberos Principal", "Access Key", "Secret Key", "success / total", and "size / count" remain in English.

Fix Scope

Replaced all hardcoded user-facing texts in the 5 files listed in #4130 with vue-i18n calls ($t / t), reusing existing translation keys where possible (e.g. optimizerGroup, type, status, catalog, database, table) and adding 11 new keys (action, all, charts, endpoint, region, hadoopUsername, kerberosPrincipal, accessKey, secretKey, successSlashTotal, sizeSlashCount) to both en.ts and zh.ts. 7 files changed, 46 insertions, 24 deletions.

Test Evidence

Static code review passed (reviewed twice — first round caught missing strings, second round confirmed all resolved). git diff --check HEAD~1 passed. No runtime test executed (frontend build environment not set up locally).

Known Limitations

Only covers the 5 Vue files explicitly listed in #4130. Other files in amoro-web may still contain hardcoded texts. No runtime language-switching verification was performed.

将 5 个 Vue 文件中的硬编码英文文本替换为 vue-i18n 调用,
并在 en.ts/zh.ts 中添加 11 个新翻译键。

涉及的硬编码文本包括:
- placeholder: Optimizer group, Action, Type, Status
- form label: Catalog, Database, Table, Type, Endpoint, Region,
  Hadoop Username, Kerberos Principal, Access Key, Secret Key
- 展示文本: Charts, All
- 列副标题: success / total, size / count
@github-actions github-actions bot added the module:ams-dashboard Ams dashboard module label Mar 18, 2026
@xxubai
Copy link
Contributor

xxubai commented Mar 18, 2026

Bump @zhangmo8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:ams-dashboard Ams dashboard module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement]: Replace hardcoded frontend texts with i18n translations

2 participants