Skip to content

Commit

Permalink
Refine English translation again and again (#7353)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnNiang authored Dec 12, 2024
1 parent 590238d commit c95d613
Show file tree
Hide file tree
Showing 24 changed files with 121 additions and 106 deletions.
10 changes: 5 additions & 5 deletions frontend/src/components/app-status/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="flex flex-wrap gap-4">
<el-tag effect="dark" type="success">{{ data.app }}</el-tag>
<Status :key="refresh" :status="data.status"></Status>
<el-tag>{{ $t('app.version') }}:{{ data.version }}</el-tag>
<el-tag>{{ $t('app.version') }}{{ $t('commons.colon') }}{{ data.version }}</el-tag>
</div>

<div class="mt-0.5">
Expand Down Expand Up @@ -217,13 +217,13 @@ const onOperate = async (operation: string) => {
const getTitle = (key: string) => {
switch (key) {
case 'openresty':
return i18n.global.t('website.website');
return i18n.global.t('website.website', 2);
case 'mysql':
return 'MySQL ' + i18n.global.t('menu.database');
return 'MySQL ' + i18n.global.t('menu.database').toLowerCase();
case 'postgresql':
return 'PostgreSQL ' + i18n.global.t('menu.database');
return 'PostgreSQL ' + i18n.global.t('menu.database').toLowerCase();
case 'redis':
return 'Redis ' + i18n.global.t('menu.database');
return 'Redis ' + i18n.global.t('menu.database').toLowerCase();
}
};
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/table-setting/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<el-popover placement="bottom-start" :width="240" trigger="click">
<el-popover placement="bottom-start" :width="260" trigger="click">
<template #reference>
<el-button round class="timer-button">{{ $t('commons.table.tableSetting') }}</el-button>
</template>
Expand Down
144 changes: 74 additions & 70 deletions frontend/src/lang/modules/en.ts

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion frontend/src/lang/modules/tw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ const message = {
container: '容',
cronjob: '計劃任務',
host: '主',
system: '系',
files: '文',
monitor: '監',
terminal: '終',
Expand Down Expand Up @@ -1064,6 +1065,7 @@ const message = {
noClam: '未檢測到 ClamAV 服務請參考官方文檔進行安裝!',
notStart: '當前未 ClamAV 服務請先開啟!',
removeRecord: '刪除報告文件',
noRecords: '點執行按鈕開始掃描掃描結果將會記錄在這裏。',
removeResultHelper: '刪除任務執行過程中生成的報告文件以清理存儲空間。',
removeInfected: '刪除病毒文件',
removeInfectedHelper: '刪除任務檢測到的病毒文件以確保伺服器的安全和正常運行。',
Expand Down Expand Up @@ -1967,7 +1969,7 @@ const message = {
disabled: '已停止',
startProxy: '開啟反向代理',
stopProxy: '關閉反向代理',
proxyFile: '源',
sourceFile: '源',
proxyHelper1: '訪問這個目錄時將會把目標URL的內容返回並顯示',
proxyPassHelper: '代理的站點必須為可正常訪問的URL',
proxyHostHelper: '將域名添加到請求頭傳遞到代理服務器',
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/lang/modules/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ const message = {
container: '容',
cronjob: '计划任务',
host: '主',
system: '系',
files: '文',
monitor: '监',
terminal: '终',
Expand Down Expand Up @@ -1065,6 +1066,7 @@ const message = {
noClam: '未检测到 ClamAV 服务请参考官方文档进行安装!',
notStart: '当前未开启 ClamAV 服务请先开启!',
removeRecord: '删除报告文件',
noRecords: '点执行按钮开始扫描扫描结果将会记录在这里。',
removeResultHelper: '删除任务执行过程中生成的报告文件以清理存储空间。',
removeInfected: '删除病毒文件',
removeInfectedHelper: '删除任务检测到的病毒文件以确保服务器的安全和正常运行。',
Expand Down Expand Up @@ -1967,7 +1969,7 @@ const message = {
disabled: '已停止',
startProxy: '开启反向代理',
stopProxy: '关闭反向代理',
proxyFile: '源',
sourceFile: '源',
proxyHelper1: '访问这个目录时将会把目标URL的内容返回并显示',
proxyPassHelper: '代理的站点必须为可正常访问的URL',
proxyHostHelper: '将域名添加到请求头传递到代理服务器',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routers/modules/host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const hostRouter = {
redirect: '/hosts/security',
meta: {
icon: 'p-host',
title: 'menu.host',
title: 'menu.system',
},
children: [
{
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/database/mysql/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
</el-card>

<div v-if="dbOptionsLocal.length === 0 && dbOptionsRemote.length === 0">
<LayoutContent :title="'MySQL ' + $t('menu.database')" :divider="true">
<LayoutContent :title="'MySQL ' + $t('menu.database').toLowerCase()" :divider="true">
<template #main>
<div class="app-warn">
<div class="flex flex-col gap-2 items-center justify-center w-full sm:flex-row">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/database/postgresql/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
</el-card>

<div v-if="dbOptionsLocal.length === 0 && dbOptionsRemote.length === 0">
<LayoutContent :title="'PostgreSQL ' + $t('menu.database')" :divider="true">
<LayoutContent :title="'PostgreSQL ' + $t('menu.database').toLowerCase()" :divider="true">
<template #main>
<div class="app-warn">
<div class="flex flex-col gap-2 items-center justify-center w-full sm:flex-row">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/database/postgresql/remote/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div v-loading="loading">
<LayoutContent>
<template #title>
<back-button name="PostgreSQL" :header="$t('database.remoteDB')" />
<back-button name="PostgreSQL" :header="$t('database.remoteDB', 2)" />
</template>
<template #toolbar>
<div class="flex justify-between gap-2 flex-wrap sm:flex-row">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/database/redis/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
</div>

<div v-if="dbOptionsLocal.length === 0 && dbOptionsRemote.length === 0">
<LayoutContent :title="'Redis ' + $t('menu.database')" :divider="true">
<LayoutContent :title="'Redis ' + $t('menu.database').toLowerCase()" :divider="true">
<template #main>
<div class="app-warn">
<div class="flex flex-col gap-2 items-center justify-center w-full sm:flex-row">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/database/redis/remote/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div v-loading="loading">
<LayoutContent>
<template #title>
<back-button name="Redis" :header="$t('database.remoteDB')" />
<back-button name="Redis" :header="$t('database.remoteDB', 2)" />
</template>
<template #toolbar>
<div class="flex justify-between gap-2 flex-wrap sm:flex-row">
Expand Down
14 changes: 10 additions & 4 deletions frontend/src/views/home/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -581,17 +581,23 @@ function loadUpTime(uptime: number) {
if (hours !== 0) {
return (
hours +
i18n.global.t('commons.units.hour') +
i18n.global.t('commons.units.hour', hours) +
' ' +
minutes +
i18n.global.t('commons.units.minute') +
i18n.global.t('commons.units.minute', minutes) +
' ' +
seconds +
i18n.global.t('commons.units.second')
i18n.global.t('commons.units.second', seconds)
);
}
if (minutes !== 0) {
return minutes + i18n.global.t('commons.units.minute') + ' ' + seconds + i18n.global.t('commons.units.second');
return (
minutes +
i18n.global.t('commons.units.minute', minutes) +
' ' +
seconds +
i18n.global.t('commons.units.second', seconds)
);
}
return seconds + i18n.global.t('commons.units.second');
}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/views/home/status/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
</template>
</el-popover>
<span class="input-help">
( {{ formatNumber(currentInfo.cpuUsed) }} / {{ currentInfo.cpuTotal }} ) {{ $t('commons.units.core') }}
( {{ formatNumber(currentInfo.cpuUsed) }} / {{ currentInfo.cpuTotal }} )
{{ $t('commons.units.core', currentInfo.cpuTotal) }}
</span>
</el-col>
<el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6" align="center">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/host/terminal/command/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
>
<template #header>
<DrawerHeader
:header="$t('commons.button.' + operate) + $t('terminal.quickCommand')"
:header="$t('commons.button.' + operate) + $t('terminal.quickCommand').toLowerCase()"
:back="handleClose"
/>
</template>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/toolbox/clam/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<template #toolbar v-if="clamStatus.isExist">
<div class="flex w-full flex-col gap-4 md:justify-between md:flex-row">
<div class="flex flex-wrap gap-4">
<el-button type="primary" :disabled="!clamStatus.isRunning" @click="onOpenDialog('add')">
<el-button type="primary" :disabled="!clamStatus.isRunning" @click="onOpenDialog('create')">
{{ $t('toolbox.clam.clamCreate') }}
</el-button>
<el-button
Expand Down Expand Up @@ -366,7 +366,7 @@ const buttons = [
},
},
{
label: i18n.global.t('cronjob.record'),
label: i18n.global.t('cronjob.viewRecords'),
click: (row: Toolbox.ClamInfo) => {
onOpenRecord(row);
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/toolbox/clam/record/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
</div>
<div class="app-warn" v-show="!hasRecords">
<div>
<span>{{ $t('cronjob.noRecord') }}</span>
<span>{{ $t('toolbox.clam.noRecords') }}</span>
<div>
<img src="@/assets/images/no_app.svg" />
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/toolbox/clam/status/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<el-tag round v-if="!data.isActive" type="info">
{{ $t('commons.status.stopped') }}
</el-tag>
<el-tag class="w-24">{{ $t('app.version') }}:{{ data.version }}</el-tag>
<el-tag class="w-24">{{ $t('app.version') }}{{ $t('commons.colon') }}{{ data.version }}</el-tag>
</div>
<div class="mt-0.5">
<el-button type="primary" v-if="!data.isActive" link @click="onOperate('ClamAV', 'start')">
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/views/toolbox/ftp/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
</el-card>
</div>
<div v-if="form.isExist">
<LayoutContent v-loading="loading" title="FTP">
<LayoutContent v-loading="loading" :title="$t('toolbox.ftp.ftp', 2)">
<template #toolbar>
<div class="flex justify-between gap-2 flex-wrap sm:flex-row">
<div class="flex flex-wrap gap-3">
<el-button type="primary" :disabled="!form.isActive" @click="onOpenDialog('add')">
{{ $t('commons.button.add') }} FTP
{{ $t('commons.button.add') }} {{ $t('toolbox.ftp.ftp') }}
</el-button>
<el-button @click="onSync()" :disabled="!form.isActive">
{{ $t('commons.button.sync') }}
Expand Down Expand Up @@ -327,7 +327,7 @@ const onDelete = async (row: Toolbox.FtpInfo | null) => {
title: i18n.global.t('commons.button.delete'),
names: names,
msg: i18n.global.t('commons.msg.operatorHelper', [
i18n.global.t('cronjob.cronTask'),
i18n.global.t('toolbox.ftp.ftp'),
i18n.global.t('commons.button.delete'),
]),
api: null,
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/views/toolbox/supervisor/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<el-card v-if="showStopped" class="mask-prompt">
<span>{{ $t('tool.supervisor.notStartWarn') }}</span>
</el-card>
<LayoutContent :title="$t('tool.supervisor.list')" v-loading="loading">
<LayoutContent :title="$t('tool.supervisor.list', 2)" v-loading="loading">
<template #app>
<SuperVisorStatus
@setting="setting"
Expand All @@ -14,7 +14,7 @@
</template>
<template v-if="showTable" #toolbar>
<el-button type="primary" @click="openCreate">
{{ $t('commons.button.create') + $t('tool.supervisor.list') }}
{{ $t('commons.button.create') + $t('tool.supervisor.list').toLowerCase() }}
</el-button>
</template>
<template #main v-if="showTable">
Expand Down Expand Up @@ -332,13 +332,13 @@ const buttons = [
},
},
{
label: i18n.global.t('website.proxyFile'),
label: i18n.global.t('website.sourceFile'),
click: function (row: HostTool.SupersivorProcess) {
getFile(row.name, 'config');
},
},
{
label: i18n.global.t('website.log'),
label: i18n.global.t('commons.button.log'),
click: function (row: HostTool.SupersivorProcess) {
getFile(row.name, 'out.log');
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/toolbox/supervisor/status/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="flex flex-wrap gap-4">
<el-tag effect="dark" type="success">{{ 'Supervisor' }}</el-tag>
<Status :key="data.status" :status="data.status"></Status>
<el-tag>{{ $t('app.version') }}:{{ data.version }}</el-tag>
<el-tag>{{ $t('app.version') }}{{ $t('commons.colon') }}{{ data.version }}</el-tag>
</div>
<div class="mt-0.5" v-if="!data.init">
<el-button type="primary" v-if="data.status != 'running'" link @click="onOperate('start')">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:before-close="handleClose"
>
<template #header>
<DrawerHeader :header="$t('website.proxyFile')" :back="handleClose" />
<DrawerHeader :header="$t('website.sourceFile')" :back="handleClose" />
</template>
<el-row v-loading="loading">
<el-col :span="22" :offset="1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const opRef = ref();
const buttons = [
{
label: i18n.global.t('website.proxyFile'),
label: i18n.global.t('website.sourceFile'),
click: function (row: Website.ProxyConfig) {
openEditFile(row);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:before-close="handleClose"
>
<template #header>
<DrawerHeader :header="$t('website.proxyFile')" :back="handleClose" />
<DrawerHeader :header="$t('website.sourceFile')" :back="handleClose" />
</template>
<el-row v-loading="loading">
<el-col :span="22" :offset="1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const opRef = ref();
const buttons = [
{
label: i18n.global.t('website.proxyFile'),
label: i18n.global.t('website.sourceFile'),
click: function (row: Website.RedirectConfig) {
openEditFile(row);
},
Expand Down

0 comments on commit c95d613

Please sign in to comment.