Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine English translation #7353

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -1966,7 +1968,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 @@ -1966,7 +1968,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 @@ -226,7 +226,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>
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 @@ -186,7 +186,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>
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>
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
Loading