Skip to content

Commit

Permalink
[Improvement] Improve language key name and fix typo (#3255)
Browse files Browse the repository at this point in the history
* [Improvement] Improve language key name and fix typo

* [AMORO-3139] Improve list content of optimizing page
  • Loading branch information
chouchouji authored Oct 18, 2024
1 parent 97e4caf commit 0a793da
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 38 deletions.
2 changes: 1 addition & 1 deletion amoro-web/src/hooks/usePlaceholder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function usePlaceholder() {
const catalogPh = computed(() => t('catalog')).value
const dbNamePh = computed(() => t('databaseName')).value
const tableNamePh = computed(() => t('tableName')).value
const optimizerGroupPh = computed(() => t('optimzerGroup')).value
const optimizerGroupPh = computed(() => t('optimizerGroup')).value
const resourceGroupPh = computed(() => t('resourceGroup')).value
const parallelismPh = computed(() => t('parallelism')).value
const usernamePh = computed(() => t('username')).value
Expand Down
21 changes: 9 additions & 12 deletions amoro-web/src/language/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export default {
optimizing: 'Optimizing',
terminal: 'Terminal',
settings: 'Settings',
optimizergroup: 'Optimizer Groups',
systemSetting: 'System Settings',
containerSetting: 'Container Settings',
backHome: 'Back to Home',
Expand Down Expand Up @@ -108,7 +107,6 @@ export default {
container: 'Container',
status: 'Status',
optimizingStatus: 'Optimizing Status',
optimzerGroup: 'Optimizer Group',
allGroups: 'All Groups',
retry: 'Retry',
costTime: 'Cost Time',
Expand All @@ -125,10 +123,10 @@ export default {
optimizerGroups: 'Optimizer Groups',
resourceAllocation: 'Resource Allocation',
resourceGroup: 'Resource Group',
releaseOptModalTitle: 'Release this optimizer',
cancelOptimizingProcessOptModalTitle: 'Cancel the optimizing process of this table',
welecomeTip: 'Welcome to Amoro!',
signin: 'Sign in',
releaseOptModalTitle: 'Release this optimizer?',
cancelOptimizingProcessOptModalTitle: 'Cancel the optimizing process of this table?',
welcomeTip: 'Welcome to Amoro!',
signIn: 'Sign in',
username: 'Username',
password: 'Password',
pause: 'Pause',
Expand All @@ -153,7 +151,7 @@ export default {
upgrading: 'Upgrading',
upgradeHiveTable: 'Upgrade Hive Table',
ok: 'Ok',
partitonField: 'Partiton Field',
partitionField: 'Partition Field',
otherProperties: 'Other Properties',
errorMessage: 'Error Message',
copySuccess: 'Copy Success',
Expand Down Expand Up @@ -182,21 +180,20 @@ export default {
save: 'Save',
remove: 'Remove',
edit: 'Edit',
deleteCatalogModalTitle: 'Remove this catalog',
deleteCatalogModalTitle: 'Remove this catalog?',
cannotDeleteModalTitle: 'Can\'t remove this catalog.',
cannotDeleteModalContent: 'This catalog has been used.',
success: 'Success',
optimzeGroup: 'Optimize Group',
propertiesMemory: 'properties.{type}.memory',
leavePageModalTitle: 'Leave this page',
leavePageModalTitle: 'Leave this page?',
leavePageModalContent: 'Changes you made may not be saved.',
leave: 'Leave',
search: 'Search',
reset: 'Reset',
invalidInput: 'Invalid input',
createOptimizer: 'Create Optimizer',
addgroup: 'Add Group',
editgroup: 'Edit Group',
addGroup: 'Add Group',
editGroup: 'Edit Group',
cannotDeleteGroupModalTitle: 'Can\'t remove this group.',
cannotDeleteGroupModalContent: 'This group has been used.',
deleteGroupModalTitle: 'Remove this group',
Expand Down
21 changes: 9 additions & 12 deletions amoro-web/src/language/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
*/

export default {
last1h: '最近 1小时',
last12h: '最近 12小时',
last24h: '最近 24小时',
last7day: '最近 7天',
last1h: '最近 1 小时',
last12h: '最近 12 小时',
last24h: '最近 24 小时',
last7day: '最近 7 天',
healthScore: '健康度',
overview: '总览',
top10Tables: '表 TOP 10',
Expand All @@ -31,7 +31,6 @@ export default {
optimizing: '优化',
terminal: '终端',
settings: '设置',
optimizergroup: '优化器组',
systemSetting: '系统设置',
containerSetting: '容器设置',
backHome: '返回首页',
Expand Down Expand Up @@ -108,7 +107,6 @@ export default {
container: '容器',
status: '状态',
optimizingStatus: '优化状态',
optimzerGroup: '优化器组',
allGroups: '全部优化器',
retry: '重试',
costTime: '花费时长',
Expand All @@ -127,8 +125,8 @@ export default {
resourceGroup: '资源组',
releaseOptModalTitle: '释放此优化器?',
cancelOptimizingProcessOptModalTitle: '取消该表的优化过程?',
welecomeTip: '欢迎访问 Amoro!',
signin: '登入',
welcomeTip: '欢迎访问 Amoro!',
signIn: '登入',
username: '用户名',
password: '密码',
pause: '暂停',
Expand All @@ -153,7 +151,7 @@ export default {
upgrading: '升级中',
upgradeHiveTable: '升级 Hive 表',
ok: '确定',
partitonField: '分区字段',
partitionField: '分区字段',
otherProperties: '其他属性',
errorMessage: '错误信息',
copySuccess: '复制成功',
Expand Down Expand Up @@ -186,7 +184,6 @@ export default {
cannotDeleteModalTitle: '不能移除这个目录',
cannotDeleteModalContent: '这个目录已被使用',
success: '成功',
optimzeGroup: '优化组',
propertiesMemory: 'properties.{type}.memory',
leavePageModalTitle: '离开当前页面?',
leavePageModalContent: '您所做的更改可能无法保存。',
Expand All @@ -195,8 +192,8 @@ export default {
reset: '重置',
invalidInput: '非法输入',
createOptimizer: '创建优化器',
addgroup: '添加组',
editgroup: '编辑组',
addGroup: '添加组',
editGroup: '编辑组',
cannotDeleteGroupModalTitle: '不能移除这个组',
cannotDeleteGroupModalContent: '这个组已被使用',
deleteGroupModalTitle: '移除这个组',
Expand Down
2 changes: 1 addition & 1 deletion amoro-web/src/utils/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const DEFAULT_CONFIG = {
timeout: 45000,
headers: {
'Content-Type': 'application/json',
'X-Request-Source' : 'Web'
'X-Request-Source': 'Web',
},
}

Expand Down
2 changes: 1 addition & 1 deletion amoro-web/src/views/catalogs/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ async function getOptimizerGroupList() {
okText: t('goToButtonText'),
onOk: async () => {
try {
router.push({ path: '/optimizing', query: { tab: 'optimizergroup' } })
router.push({ path: '/optimizing', query: { tab: 'optimizerGroups' } })
}
catch (error) {
console.error('Navigation error:', error)
Expand Down
2 changes: 1 addition & 1 deletion amoro-web/src/views/hive-details/upgrade.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ onMounted(() => {
<schema-field ref="schemaFieldRef" :loading="loading" :fields="field" />
</a-form-item>
<a-form-item
:label="$t('partitonField')"
:label="$t('partitionField')"
name="partitonField"
>
<partition-field :loading="loading" :partition-fields="partitionFields" />
Expand Down
3 changes: 1 addition & 2 deletions amoro-web/src/views/login/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,11 @@ export default defineComponent({
html-type="submit"
class="login-form-button"
>
{{ $t("signin") }}
{{ $t("signIn") }}
</a-button>
</a-form-item>
</a-form>
</div>
<!-- <p class="desc">{{$t('welecomeTip')}}</p> -->
</div>
</template>

Expand Down
2 changes: 1 addition & 1 deletion amoro-web/src/views/resource/components/GroupModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ onMounted(() => {
<template>
<AModal
:open="true"
:title="edit ? $t('editgroup') : $t('addgroup')"
:title="edit ? $t('editGroup') : $t('addGroup')"
:confirm-loading="confirmLoading"
:closable="false"
class="group-modal"
Expand Down
14 changes: 7 additions & 7 deletions amoro-web/src/views/resource/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ export default defineComponent({
const router = useRouter()
const route = useRoute()
const tabConfig: ILableAndValue[] = shallowReactive([
{ label: t('optimizergroup'), value: 'optimizergroup' },
{ label: t('optimizerGroups'), value: 'optimizerGroups' },
{ label: t('optimizers'), value: 'optimizers' },
])
const placeholder = reactive(usePlaceholder())
const pagination = reactive(usePagination())
const state = reactive({
activeTab: 'optimizergroup' as string,
activeTab: 'optimizerGroups' as string,
showGroupModal: false as boolean,
groupEdit: false,
groupEditRecord: {
Expand Down Expand Up @@ -159,16 +159,16 @@ export default defineComponent({
<List type="optimizers" />
</a-tab-pane>
<a-tab-pane
key="optimizergroup"
:tab="t('optimizergroup')"
:class="[activeTab === 'optimizergroup' ? 'active' : '']"
key="optimizerGroups"
:tab="t('optimizerGroups')"
:class="[activeTab === 'optimizerGroups' ? 'active' : '']"
>
<a-button type="primary" class="g-mb-16" @click="editGroup(null)">
{{ t("addgroup") }}
{{ t("addGroup") }}
</a-button>
<List
:key="groupKeyCount"
type="optimizergroup"
type="optimizerGroups"
@edit-group="editGroup"
/>
</a-tab-pane>
Expand Down

0 comments on commit 0a793da

Please sign in to comment.