Skip to content

Refine English translation for v2 #9016

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

Merged
merged 1 commit into from
Jun 11, 2025
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
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"vue-clipboard3": "^2.0.0",
"vue-codemirror": "^6.1.1",
"vue-demi": "^0.14.6",
"vue-i18n": "^9.13.1",
"vue-i18n": "^10.0.5",
"vue-router": "^4.3.3",
"vue-virtual-scroller": "^2.0.0-beta.8"
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/group/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<DrawerPro v-model="open" :header="$t('commons.table.group')" @close="handleClose" size="large">
<DrawerPro v-model="open" :header="$t('commons.table.manageGroup')" @close="handleClose" size="large">
<template #content>
<ComplexTable :data="data" @search="search()">
<template #toolbar>
Expand Down
27 changes: 23 additions & 4 deletions frontend/src/components/v-charts/components/Line.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import * as echarts from 'echarts';
import { GlobalStore } from '@/store';
import { computeSizeFromKBs, computeSizeFromKB, computeSizeFromMB } from '@/utils/util';
import { storeToRefs } from 'pinia';
import i18n from '@/lang';
const globalStore = GlobalStore();
const { isDarkTheme } = storeToRefs(globalStore);

Expand Down Expand Up @@ -153,17 +154,35 @@ function initChart() {
switch (props.option.formatStr) {
case 'KB/s':
for (const item of datas) {
res += item.marker + ' ' + item.seriesName + ':' + computeSizeFromKBs(item.data) + '<br/>';
res +=
item.marker +
' ' +
item.seriesName +
i18n.global.t('commons.colon') +
computeSizeFromKBs(item.data) +
'<br/>';
}
break;
case 'KB':
for (const item of datas) {
res += item.marker + ' ' + item.seriesName + ':' + computeSizeFromKB(item.data) + '<br/>';
res +=
item.marker +
' ' +
item.seriesName +
i18n.global.t('commons.colon') +
computeSizeFromKB(item.data) +
'<br/>';
}
break;
case 'MB':
for (const item of datas) {
res += item.marker + ' ' + item.seriesName + ':' + computeSizeFromMB(item.data) + '<br/>';
res +=
item.marker +
' ' +
item.seriesName +
i18n.global.t('commons.colon') +
computeSizeFromMB(item.data) +
'<br/>';
}
break;
default:
Expand All @@ -172,7 +191,7 @@ function initChart() {
item.marker +
' ' +
item.seriesName +
':' +
i18n.global.t('commons.colon') +
item.data +
props.option.formatStr +
'<br/>';
Expand Down
1,591 changes: 790 additions & 801 deletions frontend/src/lang/modules/en.ts

Large diffs are not rendered by default.

19 changes: 15 additions & 4 deletions frontend/src/lang/modules/zh-Hant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ const message = {
commons: {
true: '是',
false: '否',
example: ':',
example: '例如:',
fit2cloud: '飞致云',
lingxia: '凌霞',
colon: ': ',
colon: ':',
button: {
run: '執行',
prev: '上一步',
Expand Down Expand Up @@ -446,7 +446,7 @@ const message = {
loadBackup: '導入備份',
remoteAccess: '遠程訪問',
remoteHelper: '多個 ip 以逗號分隔,例:172.16.10.111,172.16.10.112',
remoteConnHelper: 'root 帳號遠程連接 mysql 有安全風險,開啟需謹慎!',
remoteConnHelper: 'root 帳號遠程連接 MySQL 有安全風險,開啟需謹慎!',
changePassword: '改密',
changeConnHelper: '此操作將修改當前資料庫 {0},是否繼續?',
changePasswordHelper: '當前數據庫已經關聯應用,修改密碼將同步修改應用中數據庫密碼,修改後重啟生效。',
Expand All @@ -464,6 +464,7 @@ const message = {
passwordHelper: '無法獲取密碼,請修改',
remote: '遠程',
remoteDB: '遠程服務器',
manageRemoteDB: '管理遠程服務器',
createRemoteDB: '添加遠程服務器',
unBindRemoteDB: '解綁遠程服務器',
unBindForce: '強制解綁',
Expand Down Expand Up @@ -940,6 +941,7 @@ const message = {
taskType: '任務類型',
nextTime: '近 5 次執行',
record: '報告',
viewRecords: '查看報告',
shell: 'Shell 腳本',
log: '備份日誌',
logHelper: '備份系統日誌',
Expand Down Expand Up @@ -1203,6 +1205,7 @@ const message = {
'ClamAV 的最低建議配置為:3 GiB 以上的 RAM,2.0 GHz 以上的單核 CPU,以及至少 5 GiB 的可用硬盤空間。',
notStart: '當前未 ClamAV 服務,請先開啟!',
removeRecord: '刪除報告文件',
noRecords: '點擊“執行”按鈕開始掃描,掃描結果將會記錄在這裏。',
removeResultHelper: '刪除任務執行過程中生成的報告文件,以清理存儲空間。',
removeInfected: '刪除病毒文件',
removeInfectedHelper: '刪除任務檢測到的病毒文件,以確保伺服器的安全和正常運行。',
Expand Down Expand Up @@ -1278,9 +1281,12 @@ const message = {
dir: '文件夾',
upload: '上傳',
download: '下載',
uploadFile: '@:file.upload@:file.file',
uploadDirectory: '@:file.upload@:file.dir',
fileName: '文件名',
search: '在當前目錄下查找',
mode: '權限',
editPermissions: '編輯@:file.mode',
owner: '所有者',
file: '文件',
remoteFile: '遠程下載',
Expand Down Expand Up @@ -1651,6 +1657,7 @@ const message = {
deleteHelper: '將刪除該快照的所有備份文件,包括第三方備份賬號中的文件。',
status: '快照狀態',
ignoreRule: '排除規則',
editIgnoreRule: '@:commons.button.edit@:setting.ignoreRule',
ignoreHelper: '快照時將使用該規則對 1Panel 數據目錄進行壓縮備份,請謹慎修改。',
ignoreHelper1: '一行一個,例: \n*.log\n/opt/1panel/cache',
panelInfo: '寫入 1Panel 基礎信息',
Expand Down Expand Up @@ -2171,7 +2178,7 @@ const message = {
disabled: '已停止',
startProxy: '開啟反向代理',
stopProxy: '關閉反向代理',
proxyFile: '源文',
sourceFile: '源文',
proxyHelper1: '訪問這個目錄時將會把目標URL的內容返回並顯示',
proxyPassHelper: '代理的站點,必須為可正常訪問的URL',
proxyHostHelper: '將域名添加到請求頭傳遞到代理服務器',
Expand Down Expand Up @@ -2478,8 +2485,11 @@ const message = {
addressHelper2: '多個 IP 或 IP 段 請用 "," 隔開:172.16.10.11,172.16.0.0/24',
allIP: '所有 IP',
portRule: '端口規則',
createPortRule: '@:commons.button.create@:firewall.portRule',
forwardRule: '端口轉發',
createForwardRule: '@:commons.button.create@:firewall.forwardRule',
ipRule: 'IP 規則',
createIpRule: '@:commons.button.create @:firewall.ipRule',
userAgent: 'User-Agent 過濾',
sourcePort: '來源端口',
targetIP: '目標 IP',
Expand Down Expand Up @@ -2587,6 +2597,7 @@ const message = {
laddr: '本地地址/端口',
raddr: '远程地址/端口',
stopProcess: '結束',
viewDetails: '查看詳情',
stopProcessWarn: '是否確定結束此進程 (PID:{0})?',
processName: '進程名稱',
},
Expand Down
19 changes: 14 additions & 5 deletions frontend/src/lang/modules/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const message = {
example: '例:',
fit2cloud: '飞致云',
lingxia: '凌霞',
colon: ': ',
colon: ':',
button: {
run: '运行',
prev: '上一步',
Expand Down Expand Up @@ -444,7 +444,7 @@ const message = {
loadBackup: '导入备份',
remoteAccess: '远程访问',
remoteHelper: '多个 ip 以逗号分隔,例:172.16.10.111,172.16.10.112',
remoteConnHelper: 'root 帐号远程连接 mysql 有安全风险,开启需谨慎!',
remoteConnHelper: 'root 帐号远程连接 MySQL 有安全风险,开启需谨慎!',
changePassword: '改密',
changeConnHelper: '此操作将修改当前数据库 {0},是否继续?',
changePasswordHelper: '当前数据库已经关联应用,修改密码将同步修改应用中数据库密码,修改后重启生效。',
Expand All @@ -462,6 +462,7 @@ const message = {
passwordHelper: '无法获取密码,请修改',
remote: '远程',
remoteDB: '远程服务器',
manageRemoteDB: '管理远程服务器',
createRemoteDB: '添加远程服务器',
unBindRemoteDB: '解绑远程服务器',
unBindForce: '强制解绑',
Expand Down Expand Up @@ -938,6 +939,7 @@ const message = {
taskType: '任务类型',
nextTime: '近 5 次执行',
record: '报告',
viewRecords: '查看报告',
shell: 'Shell 脚本',
log: '备份日志',
logHelper: '备份系统日志',
Expand Down Expand Up @@ -1201,6 +1203,7 @@ const message = {
'ClamAV 的最低建议配置为:3 GiB 以上的 RAM,2.0 GHz 以上的单核 CPU,以及至少 5 GiB 的可用硬盘空间',
notStart: '当前未开启 ClamAV 服务,请先开启!',
removeRecord: '删除报告文件',
noRecords: '点击“执行”按钮开始扫描,扫描结果将会记录在这里。',
removeResultHelper: '删除任务执行过程中生成的报告文件,以清理存储空间。',
removeInfected: '删除病毒文件',
removeInfectedHelper: '删除任务检测到的病毒文件,以确保服务器的安全和正常运行。',
Expand Down Expand Up @@ -1277,6 +1280,7 @@ const message = {
fileName: '文件名',
search: '在当前目录下查找',
mode: '权限',
editPermissions: '编辑@:file.mode',
owner: '所有者',
file: '文件',
remoteFile: '远程下载',
Expand Down Expand Up @@ -1642,6 +1646,7 @@ const message = {
reRollback: '回滚快照失败',
deleteHelper: '将删除该快照的所有备份文件,包括第三方备份账号中的文件。',
ignoreRule: '排除规则',
editIgnoreRule: '@:commons.button.edit@:setting.ignoreRule',
ignoreHelper: '快照时将使用该规则对 1Panel 数据目录进行压缩备份,请谨慎修改。',
ignoreHelper1: '一行一个,例: \n*.log\n/opt/1panel/cache',
status: '快照状态',
Expand Down Expand Up @@ -2008,7 +2013,7 @@ const message = {
deleteApp: '删除应用',
deleteBackup: '删除备份',
domain: '域名',
domainHelper: '一行一个域名,支持*和IP地址,支持域名:端口',
domainHelper: '一行一个域名支持*和IP地址,支持"域名:端口"',
addDomain: '新增域名',
domainConfig: '域名设置',
defaultDoc: '默认文档',
Expand Down Expand Up @@ -2129,7 +2134,7 @@ const message = {
websiteDeploymentHelper: '使用从 1Panel 部署的应用创建网站',
websiteStatictHelper: '在主机上创建网站目录',
websiteProxyHelper:
'代理已有服务,例如本机已安装使用 8080 端口的 halo 服务,那么代理地址为 http://127.0.0.1:8080',
'代理已有服务例如本机已安装使用 8080 端口的 halo 服务,那么代理地址为 http://127.0.0.1:8080',
restoreHelper: '确认使用此备份恢复?',
wafValueHelper: '值',
runtimeProxyHelper: '使用从 1Panel 创建的运行环境',
Expand Down Expand Up @@ -2161,7 +2166,7 @@ const message = {
disabled: '已停止',
startProxy: '开启反向代理',
stopProxy: '关闭反向代理',
proxyFile: '源文',
sourceFile: '源文',
proxyHelper1: '访问这个目录时将会把目标URL的内容返回并显示',
proxyPassHelper: '代理的站点,必须为可正常访问的URL',
proxyHostHelper: '将域名添加到请求头传递到代理服务器',
Expand Down Expand Up @@ -2468,8 +2473,11 @@ const message = {
addressHelper2: '多个 IP 或 IP 段 请用 "," 隔开:172.16.10.11,172.16.0.0/24',
allIP: '所有 IP',
portRule: '端口规则',
createPortRule: '@:commons.button.create@:firewall.portRule',
forwardRule: '端口转发',
createForwardRule: '@:commons.button.create@:firewall.forwardRule',
ipRule: 'IP 规则',
createIpRule: '@:commons.button.create @:firewall.ipRule',
userAgent: 'User-Agent 过滤',
destination: '目的地',
sourcePort: '源端口',
Expand Down Expand Up @@ -2578,6 +2586,7 @@ const message = {
laddr: '本地地址/端口',
raddr: '远程地址/端口',
stopProcess: '结束',
viewDetails: '查看详情',
stopProcessWarn: '是否确定结束此进程 (PID:{0})?',
processName: '进程名称',
},
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/layout/components/Sidebar/components/SubItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<el-icon>
<SvgIcon :iconName="(subItem.meta?.icon as string)" />
</el-icon>
<span>{{ $t(subItem.meta?.title as string) }}</span>
<span>{{ $t(subItem.meta?.title as string, 2) }}</span>
</template>
<SubItem :menuList="subItem.children" />
</el-sub-menu>
Expand All @@ -15,7 +15,7 @@
<SvgIcon :iconName="(subItem.meta?.icon as string)" />
</el-icon>
<template #title>
<span>{{ $t(subItem.meta?.title as string) }}</span>
<span>{{ $t(subItem.meta?.title as string, 2) }}</span>
</template>
</el-menu-item>

Expand All @@ -24,8 +24,8 @@
<SvgIcon :iconName="(subItem.meta?.icon as string)" />
</el-icon>
<template #title>
<span v-if="subItem.meta?.icon">{{ $t(subItem.meta?.title as string) }}</span>
<span v-else style="margin-left: 10px">{{ $t(subItem.meta?.title as string) }}</span>
<span v-if="subItem.meta?.icon">{{ $t(subItem.meta?.title as string, 2) }}</span>
<span v-else style="margin-left: 10px">{{ $t(subItem.meta?.title as string, 2) }}</span>
</template>
</el-menu-item>
</template>
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/utils/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,17 +521,17 @@ export function getAge(d1: string): string {

let res = '';
if (dayDiff > 0) {
res += String(dayDiff) + ' ' + i18n.global.t('commons.units.day') + ' ';
res += String(dayDiff) + ' ' + i18n.global.t('commons.units.day', dayDiff) + ' ';
if (hours <= 0) {
return res;
}
}
if (hours > 0) {
res += String(hours) + ' ' + i18n.global.t('commons.units.hour');
res += String(hours) + ' ' + i18n.global.t('commons.units.hour', hours);
return res;
}
if (minutes > 0) {
res += String(minutes) + ' ' + i18n.global.t('commons.units.minute');
res += String(minutes) + ' ' + i18n.global.t('commons.units.minute', minutes);
return res;
}
return i18n.global.t('app.less1Minute');
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/app-store/apps/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<LayoutContent v-loading="loading" v-if="!showDetail" :title="$t('app.app')">
<LayoutContent v-loading="loading" v-if="!showDetail" :title="$t('app.app', 2)">
<template #search>
<Tags @change="changeTag" />
</template>
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/views/app-store/installed/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,17 @@
class="d-description flex flex-wrap items-center justify-start gap-1.5"
>
<el-button class="mr-1" plain size="small">
{{ $t('app.version') }}:{{ installed.version }}
{{ $t('app.version') }}{{ $t('commons.colon')
}}{{ installed.version }}
</el-button>
<el-button
v-if="installed.httpPort > 0"
class="mr-1"
plain
size="small"
>
{{ $t('app.busPort') }}:{{ installed.httpPort }}
{{ $t('app.busPort') }}{{ $t('commons.colon')
}}{{ installed.httpPort }}
</el-button>
<el-button v-if="installed.httpsPort > 0" plain size="small">
{{ $t('app.busPort') }}:{{ installed.httpsPort }}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/container/compose/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@search="search"
/>

<LayoutContent v-if="!isOnDetail && isExist" :title="$t('container.compose')" :class="{ mask: !isActive }">
<LayoutContent v-if="!isOnDetail && isExist" :title="$t('container.compose', 2)" :class="{ mask: !isActive }">
<template #leftToolBar>
<el-button type="primary" @click="onOpenDialog()">
{{ $t('container.createCompose') }}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/container/container/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div v-loading="loading">
<docker-status v-model:isActive="isActive" v-model:isExist="isExist" @search="search" />

<LayoutContent :title="$t('menu.container')" v-if="isExist" :class="{ mask: !isActive }">
<LayoutContent :title="$t('menu.container', 2)" v-if="isExist" :class="{ mask: !isActive }">
<template #search v-if="tags.length !== 0">
<div class="card-interval" v-if="isExist && isActive">
<div v-for="item in tags" :key="item.key" class="inline">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/container/container/upgrade/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
v-if="form.fromApp"
class="common-prompt"
:closable="false"
type="error"
type="warning"
/>
<el-form @submit.prevent ref="formRef" :model="form" label-position="top">
<el-form-item :label="$t('container.oldImage')" prop="oldImage">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/container/image/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@mounted="loadRepos"
/>

<LayoutContent v-if="isExist" :title="$t('container.image')" :class="{ mask: !isActive }">
<LayoutContent v-if="isExist" :title="$t('container.image', 2)" :class="{ mask: !isActive }">
<template #leftToolBar>
<el-button type="primary" plain @click="onOpenPull">
{{ $t('container.imagePull') }}
Expand Down
Loading
Loading