You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@amoro.apache.org by cz...@apache.org on 2026/03/19 05:23:33 UTC
(amoro) branch master updated: [AMORO-4130][amoro-web] Replace hardcoded frontend texts with i18n translations (#4133)
This is an automated email from the ASF dual-hosted git repository.
czy006 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/amoro.git
The following commit(s) were added to refs/heads/master by this push:
new cc0394994 [AMORO-4130][amoro-web] Replace hardcoded frontend texts with i18n translations (#4133)
cc0394994 is described below
commit cc03949943e6d0292f9813e2ebf0bd6e6c7d7b20
Author: Baixiaochun <ba...@gmail.com>
AuthorDate: Thu Mar 19 13:23:30 2026 +0800
[AMORO-4130][amoro-web] Replace hardcoded frontend texts with i18n translations (#4133)
替换 amoro-web 前端硬编码文本为 i18n 翻译
将 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
Co-authored-by: Bingtagui404 <18...@users.noreply.github.com>
---
amoro-web/src/language/en.ts | 11 +++++++++++
amoro-web/src/language/zh.ts | 11 +++++++++++
amoro-web/src/views/catalogs/Detail.vue | 18 +++++++++---------
amoro-web/src/views/optimize/components/List.vue | 4 ++--
amoro-web/src/views/tables/components/Optimizing.vue | 16 ++++++++--------
amoro-web/src/views/tables/components/Snapshots.vue | 4 ++--
amoro-web/src/views/tables/create.vue | 6 +++---
7 files changed, 46 insertions(+), 24 deletions(-)
diff --git a/amoro-web/src/language/en.ts b/amoro-web/src/language/en.ts
index 82733b47a..d28c05cfd 100644
--- a/amoro-web/src/language/en.ts
+++ b/amoro-web/src/language/en.ts
@@ -230,6 +230,17 @@ export default {
smallFileScore: 'Small Files Score',
equalityDeleteScore: 'Eq Delete Score',
positionalDeleteScore: 'Pos Delete Score',
+ action: 'Action',
+ all: 'All',
+ charts: 'Charts',
+ endpoint: 'Endpoint',
+ region: 'Region',
+ hadoopUsername: 'Hadoop Username',
+ kerberosPrincipal: 'Kerberos Principal',
+ accessKey: 'Access Key',
+ secretKey: 'Secret Key',
+ successSlashTotal: 'success / total',
+ sizeSlashCount: 'size / count',
subModule: 'SubModule',
healthScoreDescription: 'Evaluating the health status of a table (up to 100 points), and is calculated as follows',
smallFileScoreDescription: 'Evaluating the average data file size of the table (up to 40 points), with larger values indicating that the file is closer to the target size',
diff --git a/amoro-web/src/language/zh.ts b/amoro-web/src/language/zh.ts
index c74df6e34..33087d9b1 100644
--- a/amoro-web/src/language/zh.ts
+++ b/amoro-web/src/language/zh.ts
@@ -230,6 +230,17 @@ export default {
smallFileScore: '小文件分数',
equalityDeleteScore: 'eq-delete分数',
positionalDeleteScore: 'pos-delete分数',
+ action: '操作',
+ all: '全部',
+ charts: '图表',
+ endpoint: '端点',
+ region: '区域',
+ hadoopUsername: 'Hadoop 用户名',
+ kerberosPrincipal: 'Kerberos 主体',
+ accessKey: '访问密钥',
+ secretKey: '密钥',
+ successSlashTotal: '成功 / 总计',
+ sizeSlashCount: '大小 / 数量',
subModule: '子模块',
healthScoreDescription: '评估表的健康状态(最高100分),计算方式如下',
smallFileScoreDescription: '评估表的平均数据文件大小(最高40分),值越大表示文件越接近目标大小',
diff --git a/amoro-web/src/views/catalogs/Detail.vue b/amoro-web/src/views/catalogs/Detail.vue
index 12a523658..3eb09815a 100644
--- a/amoro-web/src/views/catalogs/Detail.vue
+++ b/amoro-web/src/views/catalogs/Detail.vue
@@ -644,7 +644,7 @@ onMounted(() => {
{{ $t('storageConfigName') }}
</p>
</a-form-item>
- <a-form-item label="Type" :name="['storageConfig', 'storage.type']" :rules="[{ required: isEdit }]">
+ <a-form-item :label="$t('type')" :name="['storageConfig', 'storage.type']" :rules="[{ required: isEdit }]">
<a-select
v-if="isEdit" v-model:value="formState.storageConfig['storage.type']"
:placeholder="placeholder.selectPh" :options="storageTypeOptions"
@@ -652,21 +652,21 @@ onMounted(() => {
<span v-else class="config-value">{{ formState.storageConfig['storage.type'] }}</span>
</a-form-item>
<a-form-item
- v-if="formState.storageConfig['storage.type'] === 'S3'" label="Endpoint"
+ v-if="formState.storageConfig['storage.type'] === 'S3'" :label="$t('endpoint')"
:name="['storageConfig', 'storage.s3.endpoint']" :rules="[{ required: false }]"
>
<a-input v-if="isEdit" v-model:value="formState.storageConfig['storage.s3.endpoint']" />
<span v-else class="config-value">{{ formState.storageConfig['storage.s3.endpoint'] }}</span>
</a-form-item>
<a-form-item
- v-if="formState.storageConfig['storage.type'] === 'S3'" label="Region"
+ v-if="formState.storageConfig['storage.type'] === 'S3'" :label="$t('region')"
:name="['storageConfig', 'storage.s3.region']" :rules="[{ required: false }]"
>
<a-input v-if="isEdit" v-model:value="formState.storageConfig['storage.s3.region']" />
<span v-else class="config-value">{{ formState.storageConfig['storage.s3.region'] }}</span>
</a-form-item>
<a-form-item
- v-if="formState.storageConfig['storage.type'] === 'OSS'" label="Endpoint"
+ v-if="formState.storageConfig['storage.type'] === 'OSS'" :label="$t('endpoint')"
:name="['storageConfig', 'storage.oss.endpoint']" :rules="[{ required: false }]"
>
<a-input v-if="isEdit" v-model:value="formState.storageConfig['storage.oss.endpoint']" />
@@ -700,7 +700,7 @@ onMounted(() => {
{{ $t('authenticationConfig') }}
</p>
</a-form-item>
- <a-form-item label="Type" :name="['authConfig', 'auth.type']" :rules="[{ required: isEdit && !isAuthDisabled }]">
+ <a-form-item :label="$t('type')" :name="['authConfig', 'auth.type']" :rules="[{ required: isEdit && !isAuthDisabled }]">
<a-select
v-if="isEdit" v-model:value="formState.authConfig['auth.type']"
:placeholder="placeholder.selectPh" :options="authTypeOptions" :disabled="isAuthDisabled"
@@ -708,14 +708,14 @@ onMounted(() => {
<span v-else class="config-value">{{ formState.authConfig['auth.type'] }}</span>
</a-form-item>
<a-form-item
- v-if="formState.authConfig['auth.type'] === 'SIMPLE'" label="Hadoop Username"
+ v-if="formState.authConfig['auth.type'] === 'SIMPLE'" :label="$t('hadoopUsername')"
:name="['authConfig', 'auth.simple.hadoop_username']" :rules="[{ required: isEdit && !isAuthDisabled }]"
>
<a-input v-if="isEdit" v-model:value="formState.authConfig['auth.simple.hadoop_username']" :disabled="isAuthDisabled" />
<span v-else class="config-value">{{ formState.authConfig['auth.simple.hadoop_username'] }}</span>
</a-form-item>
<a-form-item
- v-if="formState.authConfig['auth.type'] === 'KERBEROS'" label="Kerberos Principal"
+ v-if="formState.authConfig['auth.type'] === 'KERBEROS'" :label="$t('kerberosPrincipal')"
:name="['authConfig', 'auth.kerberos.principal']" :rules="[{ required: isEdit && !isAuthDisabled }]"
>
<a-input v-if="isEdit" v-model:value="formState.authConfig['auth.kerberos.principal']" :disabled="isAuthDisabled" />
@@ -746,14 +746,14 @@ onMounted(() => {
</a-form-item>
</div>
<a-form-item
- v-if="formState.authConfig['auth.type'] === 'AK/SK'" label="Access Key"
+ v-if="formState.authConfig['auth.type'] === 'AK/SK'" :label="$t('accessKey')"
:name="['authConfig', 'auth.ak_sk.access_key']" :rules="[{ required: isEdit && !isAuthDisabled }]"
>
<a-input v-if="isEdit" v-model:value="formState.authConfig['auth.ak_sk.access_key']" :disabled="isAuthDisabled" />
<span v-else class="config-value">{{ formState.authConfig['auth.ak_sk.access_key'] }}</span>
</a-form-item>
<a-form-item
- v-if="formState.authConfig['auth.type'] === 'AK/SK'" label="Secret Key"
+ v-if="formState.authConfig['auth.type'] === 'AK/SK'" :label="$t('secretKey')"
:name="['authConfig', 'auth.ak_sk.secret_key']" :rules="[{ required: isEdit && !isAuthDisabled }]"
>
<a-input v-if="isEdit" v-model:value="formState.authConfig['auth.ak_sk.secret_key']" :disabled="isAuthDisabled" />
diff --git a/amoro-web/src/views/optimize/components/List.vue b/amoro-web/src/views/optimize/components/List.vue
index 8f2f332a4..35d38ed22 100644
--- a/amoro-web/src/views/optimize/components/List.vue
+++ b/amoro-web/src/views/optimize/components/List.vue
@@ -180,7 +180,7 @@ onMounted(async () => {
<div class="list-wrap">
<a-space class="filter-form">
<a-select
- v-model:value="optimizerGroup" allow-clear placeholder="Optimizer group" :options="optimizerGroupList"
+ v-model:value="optimizerGroup" allow-clear :placeholder="t('optimizerGroup')" :options="optimizerGroupList"
style="min-width: 150px;"
/>
@@ -195,7 +195,7 @@ onMounted(async () => {
/>
<a-select
- v-model:value="actions" allow-clear placeholder="Action" :options="actionOptions" mode="multiple"
+ v-model:value="actions" allow-clear :placeholder="t('action')" :options="actionOptions" mode="multiple"
style="min-width: 150px;"
/>
diff --git a/amoro-web/src/views/tables/components/Optimizing.vue b/amoro-web/src/views/tables/components/Optimizing.vue
index ebeccc05d..c56398c7b 100644
--- a/amoro-web/src/views/tables/components/Optimizing.vue
+++ b/amoro-web/src/views/tables/components/Optimizing.vue
@@ -240,11 +240,11 @@ onMounted(() => {
<template v-if="!hasBreadcrumb">
<a-space class="filter-form">
<a-select
- v-model:value="actionType" allow-clear placeholder="Type" :options="actionTypeList"
+ v-model:value="actionType" allow-clear :placeholder="t('type')" :options="actionTypeList"
style="min-width: 150px;" @change="refresh"
/>
<a-select
- v-model:value="statusType" allow-clear placeholder="Status" :options="statusTypeList"
+ v-model:value="statusType" allow-clear :placeholder="t('status')" :options="statusTypeList"
style="min-width: 150px;" @change="refresh"
/>
</a-space>
@@ -258,7 +258,7 @@ onMounted(() => {
{{ column.title }}
</div>
<div class="">
- success / total
+ {{ t('successSlashTotal') }}
</div>
</template>
<template v-if="column.dataIndex === 'inputFiles'">
@@ -266,7 +266,7 @@ onMounted(() => {
{{ column.title }}
</div>
<div class="">
- size / count
+ {{ t('sizeSlashCount') }}
</div>
</template>
<template v-if="column.dataIndex === 'outputFiles'">
@@ -274,7 +274,7 @@ onMounted(() => {
{{ column.title }}
</div>
<div class="">
- size / count
+ {{ t('sizeSlashCount') }}
</div>
</template>
</template>
@@ -322,7 +322,7 @@ onMounted(() => {
<a-col :span="18">
<a-breadcrumb separator=">">
<a-breadcrumb-item class="text-active" @click="toggleBreadcrumb">
- All
+ {{ t('all') }}
</a-breadcrumb-item>
<a-breadcrumb-item>{{ `${$t('processId')} ${processId}` }}</a-breadcrumb-item>
</a-breadcrumb>
@@ -346,7 +346,7 @@ onMounted(() => {
{{ column.title }}
</div>
<div class="">
- size / count
+ {{ t('sizeSlashCount') }}
</div>
</template>
<template v-if="column.dataIndex === 'outputFilesDesc'">
@@ -354,7 +354,7 @@ onMounted(() => {
{{ column.title }}
</div>
<div class="">
- size / count
+ {{ t('sizeSlashCount') }}
</div>
</template>
</template>
diff --git a/amoro-web/src/views/tables/components/Snapshots.vue b/amoro-web/src/views/tables/components/Snapshots.vue
index f67286766..e40c2e890 100644
--- a/amoro-web/src/views/tables/components/Snapshots.vue
+++ b/amoro-web/src/views/tables/components/Snapshots.vue
@@ -210,7 +210,7 @@ onMounted(() => {
>
<template #extra>
<div class="snapshots-charts-header" @click="toggleCharts">
- <span class="snapshots-charts-title">Charts</span>
+ <span class="snapshots-charts-title">{{ $t('charts') }}</span>
<span class="snapshots-charts-icon">
<CaretRightOutlined v-if="!showCharts" />
<CaretDownOutlined v-else />
@@ -260,7 +260,7 @@ onMounted(() => {
<template v-else>
<a-breadcrumb separator=">">
<a-breadcrumb-item class="text-active" @click="toggleBreadcrumb">
- All
+ {{ $t('all') }}
</a-breadcrumb-item>
<a-breadcrumb-item>{{ `${$t('snapshotId')} ${snapshotId}` }}</a-breadcrumb-item>
</a-breadcrumb>
diff --git a/amoro-web/src/views/tables/create.vue b/amoro-web/src/views/tables/create.vue
index bf5f87d67..5ad6a7014 100644
--- a/amoro-web/src/views/tables/create.vue
+++ b/amoro-web/src/views/tables/create.vue
@@ -73,7 +73,7 @@ function goBack() {
{{ $t('basicInformation') }}
</p>
<a-form ref="formRef" :model="formState" class="label-120">
- <a-form-item name="catalog" label="Catalog" :rules="[{ required: true, message: `${placeholder.selectClPh}` }]">
+ <a-form-item name="catalog" :label="$t('catalog')" :rules="[{ required: true, message: `${placeholder.selectClPh}` }]">
<a-select
v-model:value="formState.catalog"
:options="catalogOptions"
@@ -82,7 +82,7 @@ function goBack() {
@change="changeCatalog"
/>
</a-form-item>
- <a-form-item name="database" label="Database" :rules="[{ required: true, message: `${placeholder.selectDBPh}` }]">
+ <a-form-item name="database" :label="$t('database')" :rules="[{ required: true, message: `${placeholder.selectDBPh}` }]">
<a-select
v-model:value="formState.database"
:options="databaseOptions"
@@ -91,7 +91,7 @@ function goBack() {
@change="changeDatabase"
/>
</a-form-item>
- <a-form-item name="tableName" label="Table" :rules="[{ required: true, message: `${placeholder.inputTNPh}` }]">
+ <a-form-item name="tableName" :label="$t('table')" :rules="[{ required: true, message: `${placeholder.inputTNPh}` }]">
<a-input v-model:value="formState.tableName" :placeholder="placeholder.inputTNPh" />
</a-form-item>
</a-form>