Skip to content

Commit

Permalink
fix: update i18n (#8)
Browse files Browse the repository at this point in the history
* Revert "ci: Github workflow arm64 for frontend"

This reverts commit 4c3729d.

* fix: update i18n
  • Loading branch information
wushuangs authored Jul 3, 2024
1 parent ecb01a2 commit 32e28a0
Show file tree
Hide file tree
Showing 16 changed files with 61 additions and 75 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ jobs:
push: true
tags: beclab/devbox:${{ steps.get-latest-tag.outputs.tag }}
file: Dockerfile
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64
4 changes: 1 addition & 3 deletions packages/web/src/components/ConfigComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@
color="negative"
size="16px"
/>
<span class="q-ml-sm">{{
t(`enums.CONFIG_TAB.${menu.name}`)
}}</span>
<span class="q-ml-sm">{{ t(`enums.${menu.name}`) }}</span>
</div>
</q-tab>
</q-tabs>
Expand Down
8 changes: 4 additions & 4 deletions packages/web/src/components/EditComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,25 +134,25 @@ const fileInfo = reactive({
const fileMenu = ref([
{
label: t(`enums.OPERATE_ACTION.${OPERATE_ACTION.ADD_FOLDER}`),
label: t(`enums.${OPERATE_ACTION.ADD_FOLDER}`),
name: OPERATE_ACTION.ADD_FOLDER,
icon: 'sym_r_create_new_folder'
},
{
label: t(`enums.OPERATE_ACTION.${OPERATE_ACTION.ADD_FILE}`),
label: t(`enums.${OPERATE_ACTION.ADD_FILE}`),
name: OPERATE_ACTION.ADD_FILE,
icon: 'sym_r_note_add'
}
]);
const oprateMenu = ref([
{
label: t(`enums.OPERATE_ACTION.${OPERATE_ACTION.RENAME}`),
label: t(`enums.${OPERATE_ACTION.RENAME}`),
name: OPERATE_ACTION.RENAME,
icon: 'sym_r_edit_square'
},
{
label: t(`enums.OPERATE_ACTION.${OPERATE_ACTION.DELETE}`),
label: t(`enums.${OPERATE_ACTION.DELETE}`),
name: OPERATE_ACTION.DELETE,
icon: 'sym_r_delete'
}
Expand Down
4 changes: 2 additions & 2 deletions packages/web/src/components/config/EntrancesComponent.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="column">
<div class="text-h6 text-ink-1">{{ t('enums.CONFIG_TAB.DETAILS') }}</div>
<div class="text-h6 text-ink-1">{{ t('enums.DETAILS') }}</div>

<div class="form-item row">
<div class="form-item-key text-subtitle2 text-ink-1">
Expand Down Expand Up @@ -235,7 +235,7 @@
flat
no-caps
color="teal-pressed"
:label="t('config.btn.addClients')"
:label="t('config.addClients')"
dropdown-icon="sym_r_keyboard_arrow_down"
>
<q-list flat>
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/components/config/MetadataComponent.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="column">
<div class="text-h6 text-ink-1">{{ t('enums.CONFIG_TAB.METADATA') }}</div>
<div class="text-h6 text-ink-1">{{ t('enums.METADATA') }}</div>

<div class="form-item row">
<div class="form-item-key text-subtitle2 text-ink-1">
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/components/config/OptionsComponent.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="column">
<div class="text-h6 text-ink-1">{{ t('enums.CONFIG_TAB.OPTIONS') }}</div>
<div class="text-h6 text-ink-1">{{ t('enums.OPTIONS') }}</div>

<div class="form-item row">
<div class="form-item-key text-subtitle2 text-ink-1">
Expand Down
4 changes: 2 additions & 2 deletions packages/web/src/components/config/PermissionComponent.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="column">
<div class="text-h6 text-ink-1">
{{ t('enums.CONFIG_TAB.PERMISSIONS') }}
{{ t('enums.PERMISSIONS') }}
</div>

<div class="form-item row">
Expand Down Expand Up @@ -31,7 +31,7 @@
flat
no-caps
color="teal-8"
:label="t('config.btn.add')"
:label="t('config.add')"
@click="addProvider"
/>
</div>
Expand Down
8 changes: 4 additions & 4 deletions packages/web/src/components/config/SpecComponent.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="column">
<div class="text-h6 text-ink-1">{{ t('enums.CONFIG_TAB.SPACE') }}</div>
<div class="text-h6 text-ink-1">{{ t('enums.SPACE') }}</div>

<div class="form-item row">
<div class="form-item-key text-subtitle2 text-ink-1">
Expand All @@ -18,7 +18,7 @@
no-caps
@click="addEntrance"
color="teal-pressed"
:label="t('config.btn.addEntrance')"
:label="t('config.addEntrance')"
/>
</div>

Expand Down Expand Up @@ -67,7 +67,7 @@
flat
no-caps
color="teal-pressed"
:label="t('config.btn.add')"
:label="t('config.add')"
dropdown-icon="sym_r_keyboard_arrow_down"
>
<q-list>
Expand Down Expand Up @@ -118,7 +118,7 @@
flat
no-caps
color="teal-pressed"
:label="t('config.btn.addDependencies')"
:label="t('config.addDependencies')"
@click="addDependency"
/>
</div>
Expand Down
4 changes: 1 addition & 3 deletions packages/web/src/components/dialog/DialogDependency.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
<q-card class="card-continer" flat>
<terminus-dialog-bar
:label="
mode === 'create'
? t('dialog.title.addEntrance')
: t('dialog.title.editEntrance')
mode === 'create' ? t('dialog.addEntrance') : t('dialog.editEntrance')
"
icon=""
titAlign="text-left"
Expand Down
4 changes: 2 additions & 2 deletions packages/web/src/components/dialog/DialogEditClient.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ const updateSupportClient = (value) => {
const title = computed(() => {
if (props.mode === 'create') {
return t('dialog.title.addClient', { type: selfSupportData.value.label });
return t('dialog.addClient', { type: selfSupportData.value.label });
} else {
return t('dialog.title.editClient', { type: selfSupportData.value.label });
return t('dialog.editClient', { type: selfSupportData.value.label });
}
});
Expand Down
4 changes: 2 additions & 2 deletions packages/web/src/components/dialog/DialogEditProvider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ const selfSupportData = ref(JSON.parse(JSON.stringify(props.data)));
const title = computed(() => {
if (props.mode === 'create') {
return t('dialog.title.addRequiredData');
return t('dialog.addRequiredData');
} else {
return t('dialog.title.editRequiredData');
return t('dialog.editRequiredData');
}
});
Expand Down
4 changes: 2 additions & 2 deletions packages/web/src/components/dialog/DialogEditReference.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ const updateSupportClient = (value) => {
const title = computed(() => {
if (props.mode === 'create') {
return t('dialog.title.addClientReference');
return t('dialog.addClientReference');
} else {
return t('dialog.title.editClientReference');
return t('dialog.editClientReference');
}
});
Expand Down
4 changes: 2 additions & 2 deletions packages/web/src/components/dialog/DialogEntrance.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<terminus-dialog-bar
:label="
mode === 'create'
? t('dialog.title.addEntrance')
: t('dialog.title.editEntrance')
? t('dialog.addEntrance')
: t('dialog.editEntrance')
"
icon=""
titAlign="text-left"
Expand Down
4 changes: 2 additions & 2 deletions packages/web/src/components/dialog/DialogPolicies.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<terminus-dialog-bar
:label="
mode === 'create'
? t('dialog.title.addSubPolicies')
: t('dialog.title.editSubPolicies')
? t('dialog.addSubPolicies')
: t('dialog.editSubPolicies')
"
icon=""
titAlign="text-left"
Expand Down
70 changes: 30 additions & 40 deletions packages/web/src/i18n/en-US/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,18 @@ export default {
dialog_create_title: 'Name',
dialog_title_bind: 'Bind a dev container',
dialog: {
title: {
addEntrance: 'Add Entrance',
editEntrance: 'Edit Entrance',
addSubPolicies: 'Add Sub Policies',
editSubPolicies: 'Edit Sub Policies',
addClientReference: 'Add Client Reference',
editClientReference: 'Edit Client Reference',
addRequiredData: 'Add Required Data',
editRequiredData: 'Edit Required Data',
addClient: 'Add {type} Client',
editClient: 'Edit {type} Client',
addMiddle: 'Add {type}',
editMiddle: 'Edit {type}'
}
addEntrance: 'Add Entrance',
editEntrance: 'Edit Entrance',
addSubPolicies: 'Add Sub Policies',
editSubPolicies: 'Edit Sub Policies',
addClientReference: 'Add Client Reference',
editClientReference: 'Edit Client Reference',
addRequiredData: 'Add Required Data',
editRequiredData: 'Edit Required Data',
addClient: 'Add {type} Client',
editClient: 'Edit {type} Client',
addMiddle: 'Add {type}',
editMiddle: 'Edit {type}'
},

containers_env: 'Env',
Expand Down Expand Up @@ -303,34 +301,26 @@ export default {
config_permissions_operations_rules: 'Please enter key input the operations.',

config: {
btn: {
addClients: 'Add Clients',
addEntrance: 'Add Entrance',
add: 'Add',
addDependencies: 'Add Dependencies'
}
addClients: 'Add Clients',
addEntrance: 'Add Entrance',
add: 'Add',
addDependencies: 'Add Dependencies'
},

enums: {
OPERATE_ACTION: {
ADD_FOLDER: 'Add Folder',
ADD_FILE: 'Add File',
RENAME: 'Rename',
DELETE: 'Delete'
},
CONFIG_TAB: {
METADATA: 'Metadata',
DETAILS: 'Details',
SPACE: 'Specs',
PERMISSIONS: 'Permissions',
OPTIONS: 'Options'
},
MENU_LABEL: {
DevBox: 'DevBox',
Home: 'Home',
Containers: 'Containers',
Help: 'Help',
Applications: 'Applications'
}
ADD_FOLDER: 'Add Folder',
ADD_FILE: 'Add File',
RENAME: 'Rename',
DELETE: 'Delete',
METADATA: 'Metadata',
DETAILS: 'Details',
SPACE: 'Specs',
PERMISSIONS: 'Permissions',
OPTIONS: 'Options',
DevBox: 'DevBox',
Home: 'Home',
Containers: 'Containers',
Help: 'Help',
Applications: 'Applications'
}
};
8 changes: 4 additions & 4 deletions packages/web/src/stores/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ export const useMenuStore = defineStore('menu', {
return {
homeMenu: [
{
label: i18n.global.t(`enums.MENU_LABEL.${MenuLabel.DEVBOX}`),
label: i18n.global.t(`enums.${MenuLabel.DEVBOX}`),
key: MenuLabel.DEVBOX,
icon: '',
children: [
{
label: i18n.global.t(`enums.MENU_LABEL.${MenuLabel.HOME}`),
label: i18n.global.t(`enums.${MenuLabel.HOME}`),
key: MenuLabel.HOME,
icon: 'sym_r_home'
},
{
label: i18n.global.t(`enums.MENU_LABEL.${MenuLabel.CONTAINERS}`),
label: i18n.global.t(`enums.${MenuLabel.CONTAINERS}`),
key: MenuLabel.CONTAINERS,
icon: 'sym_r_deployed_code'
}
Expand All @@ -50,7 +50,7 @@ export const useMenuStore = defineStore('menu', {
],
applicationMenu: [
{
label: i18n.global.t(`enums.MENU_LABEL.${MenuLabel.APPLICATIONS}`),
label: i18n.global.t(`enums.${MenuLabel.APPLICATIONS}`),
key: MenuLabel.APPLICATIONS,
icon: '',
children: []
Expand Down

0 comments on commit 32e28a0

Please sign in to comment.