-
SSH连接
+ {{ $t('SSH Connection') }}
- SSH端口:
+ {{ $t('SSH Port') }}:
{{ $jsiteServer.pg.ssh_port || '22' }}
- SSH用户:
+ {{ $t('SSH User') }}:
{{ $jsiteServer.pg.ssh_user || 'root' }}
-
服务器密码:
+
{{ $t('Server Password') }}:
- {{ showPassword ? decryptedPassword : ($jsiteServer.pg.password || '未设置') }}
+ {{ showPassword ? decryptedPassword : ($jsiteServer.pg.password || $t('Not Set')) }}
- 密钥对名称:
- {{ $jsiteServer.pg.key_pair_name || '未设置' }}
+ {{ $t('Key Pair Name') }}:
+ {{ $jsiteServer.pg.key_pair_name || $t('Not Set') }}
-
私钥:
+
{{ $t('Private Key') }}:
{{ $jsiteServer.pg.private_key }}
-
未设置
+
{{ $t('Not Set') }}
@@ -316,14 +316,14 @@ export default {
methods: {
getStatusText(status) {
const statusMap = {
- 'Pending': '准备中',
- 'Starting': '启动中',
- 'Running': '运行中',
- 'Stopping': '停止中',
- 'Stopped': '已停止',
- 'Resetting': '重置中',
- 'Upgrading': '升级中',
- 'Disabled': '已禁用'
+ 'Pending': this.$t('Pending'),
+ 'Starting': this.$t('Starting'),
+ 'Running': this.$t('Running'),
+ 'Stopping': this.$t('Stopping'),
+ 'Stopped': this.$t('Stopped'),
+ 'Resetting': this.$t('Resetting'),
+ 'Upgrading': this.$t('Upgrading'),
+ 'Disabled': this.$t('Disabled')
};
return statusMap[status] || status;
},
@@ -342,32 +342,32 @@ export default {
},
getRegionText(region) {
const regionMap = {
- 'cn-qingdao': '华北1(青岛)',
- 'cn-beijing': '华北2(北京)',
- 'cn-zhangjiakou': '华北3(张家口)',
- 'cn-huhehaote': '华北5(呼和浩特)',
- 'cn-hangzhou': '华东1(杭州)',
- 'cn-shanghai': '华东2(上海)',
- 'cn-shenzhen': '华南1(深圳)',
- 'cn-heyuan': '华南2(河源)',
- 'cn-chengdu': '西南1(成都)',
- 'cn-guangzhou': '华南3(广州)',
- 'cn-wulanchabu': '华北6(乌兰察布)',
- 'cn-nanjing': '华东5(南京)',
- 'cn-fuzhou': '华东6(福州)',
- 'cn-wuhan-lr': '华中1(武汉)',
- 'cn-hongkong': '中国香港',
- 'ap-southeast-1': '新加坡',
- 'ap-southeast-3': '马来西亚(吉隆坡)',
- 'ap-southeast-5': '印度尼西亚(雅加达)',
- 'ap-northeast-1': '日本(东京)',
- 'us-west-1': '美国(硅谷)',
- 'us-east-1': '美国(弗吉尼亚)',
- 'eu-central-1': '德国(法兰克福)',
- 'eu-west-1': '英国(伦敦)',
- 'ap-southeast-6': '菲律宾(马尼拉)',
- 'ap-southeast-7': '泰国(曼谷)',
- 'ap-northeast-2': '韩国(首尔)'
+ 'cn-qingdao': this.$t('North China 1 (Qingdao)'),
+ 'cn-beijing': this.$t('North China 2 (Beijing)'),
+ 'cn-zhangjiakou': this.$t('North China 3 (Zhangjiakou)'),
+ 'cn-huhehaote': this.$t('North China 5 (Hohhot)'),
+ 'cn-hangzhou': this.$t('East China 1 (Hangzhou)'),
+ 'cn-shanghai': this.$t('East China 2 (Shanghai)'),
+ 'cn-shenzhen': this.$t('South China 1 (Shenzhen)'),
+ 'cn-heyuan': this.$t('South China 2 (Heyuan)'),
+ 'cn-chengdu': this.$t('Southwest China 1 (Chengdu)'),
+ 'cn-guangzhou': this.$t('South China 3 (Guangzhou)'),
+ 'cn-wulanchabu': this.$t('North China 6 (Ulanqab)'),
+ 'cn-nanjing': this.$t('East China 5 (Nanjing)'),
+ 'cn-fuzhou': this.$t('East China 6 (Fuzhou)'),
+ 'cn-wuhan-lr': this.$t('Central China 1 (Wuhan)'),
+ 'cn-hongkong': this.$t('Hong Kong'),
+ 'ap-southeast-1': this.$t('Singapore'),
+ 'ap-southeast-3': this.$t('Malaysia (Kuala Lumpur)'),
+ 'ap-southeast-5': this.$t('Indonesia (Jakarta)'),
+ 'ap-northeast-1': this.$t('Japan (Tokyo)'),
+ 'us-west-1': this.$t('US (Silicon Valley)'),
+ 'us-east-1': this.$t('US (Virginia)'),
+ 'eu-central-1': this.$t('Germany (Frankfurt)'),
+ 'eu-west-1': this.$t('UK (London)'),
+ 'ap-southeast-6': this.$t('Philippines (Manila)'),
+ 'ap-southeast-7': this.$t('Thailand (Bangkok)'),
+ 'ap-northeast-2': this.$t('South Korea (Seoul)')
};
return regionMap[region] || region;
},
@@ -391,18 +391,18 @@ export default {
},
async restartServer() {
if (!this.$jsiteServer.pg.instance_id) {
- toast.error('服务器实例ID不存在');
+ toast.error(this.$t('Server instance ID does not exist'));
return;
}
confirmDialog({
- title: '重启',
- message: '确定要重启服务器吗?重启过程中服务器将暂时不可用。',
+ title: this.$t('Restart'),
+ message: this.$t('Are you sure you want to restart the server? The server will be temporarily unavailable during the restart process.'),
primaryAction: {
- label: '确定',
+ label: this.$t('Confirm'),
onClick: ({ hide }) => {
// 立即显示成功提示并关闭弹窗
- toast.success('重启请求已提交');
+ toast.success(this.$t('Restart request submitted'));
hide();
// 异步提交请求
@@ -428,17 +428,17 @@ export default {
},
async forceRestartServer() {
if (!this.$jsiteServer.pg.instance_id) {
- toast.error('服务器实例ID不存在');
+ toast.error(this.$t('Server instance ID does not exist'));
return;
}
confirmDialog({
- title: '强制重启',
- message: '确定要强制重启服务器吗?该操作可能会导致未保存的数据丢失。',
+ title: this.$t('Force Restart'),
+ message: this.$t('Are you sure you want to force restart the server? This operation may cause unsaved data loss.'),
primaryAction: {
- label: '确定',
+ label: this.$t('Confirm'),
onClick: ({ hide }) => {
- toast.success('强制重启请求已提交');
+ toast.success(this.$t('Force restart request submitted'));
hide();
this.forceRestartLoading = true;
const req = createResource({
@@ -462,7 +462,7 @@ export default {
},
async resetPassword() {
if (!this.$jsiteServer.pg.instance_id) {
- toast.error('服务器实例ID不存在');
+ toast.error(this.$t('Server instance ID does not exist'));
return;
}
@@ -470,11 +470,11 @@ export default {
const PasswordDialog = defineAsyncComponent(() => import('../dialogs/PasswordDialog.vue'));
renderDialog(h(PasswordDialog, {
- title: '重置服务器密码',
- description: '长度为 8 至 30 个字符,必须同时包含大小写英文字母、数字和特殊符号。',
+ title: this.$t('Reset Server Password'),
+ description: this.$t('Length must be between 8 and 30 characters, and must include uppercase and lowercase letters, numbers, and special characters.'),
onConfirm: (password) => {
// 立即显示成功提示
- toast.success('密码重置请求已提交');
+ toast.success(this.$t('Password reset request submitted'));
// 异步提交请求
this.resetPasswordLoading = true;
@@ -499,18 +499,18 @@ export default {
},
async resetKeyPair() {
if (!this.$jsiteServer.pg.instance_id) {
- toast.error('服务器实例ID不存在');
+ toast.error(this.$t('Server instance ID does not exist'));
return;
}
confirmDialog({
- title: '重置密钥对',
- message: '确定要重置密钥对吗?这将删除旧的密钥对并创建新的密钥对。重置后需要使用新的私钥才能连接服务器。',
+ title: this.$t('Reset Key Pair'),
+ message: this.$t('Are you sure you want to reset the key pair? This will delete the old key pair and create a new one. After resetting, you will need to use the new private key to connect to the server.'),
primaryAction: {
- label: '确定',
+ label: this.$t('Confirm'),
onClick: ({ hide }) => {
// 立即显示成功提示并关闭弹窗
- toast.success('密钥对重置请求已提交');
+ toast.success(this.$t('Key pair reset request submitted'));
hide();
// 异步提交请求
@@ -535,18 +535,18 @@ export default {
},
async deleteKeyPair() {
if (!this.$jsiteServer.pg.instance_id) {
- toast.error('服务器实例ID不存在');
+ toast.error(this.$t('Server instance ID does not exist'));
return;
}
confirmDialog({
- title: '删除密钥对',
- message: '确定要删除密钥对吗?删除后将无法使用私钥连接服务器,建议先设置服务器密码。',
+ title: this.$t('Delete Key Pair'),
+ message: this.$t('Are you sure you want to delete the key pair? After deletion, you will not be able to connect to the server using the private key. It is recommended to set a server password first.'),
primaryAction: {
- label: '确定',
+ label: this.$t('Confirm'),
onClick: ({ hide }) => {
// 立即显示成功提示并关闭弹窗
- toast.success('密钥对删除请求已提交');
+ toast.success(this.$t('Key pair deletion request submitted'));
hide();
// 异步提交请求
@@ -573,18 +573,18 @@ export default {
},
async resetSystem() {
if (!this.$jsiteServer.pg.instance_id) {
- toast.error('服务器实例ID不存在');
+ toast.error(this.$t('Server instance ID does not exist'));
return;
}
confirmDialog({
- title: '重置系统',
- message: '确定要重置系统吗?这将清除所有数据并重新安装系统,操作不可逆!',
+ title: this.$t('Reset System'),
+ message: this.$t('Are you sure you want to reset the system? This will clear all data and reinstall the system. This operation is irreversible!'),
primaryAction: {
- label: '确定',
+ label: this.$t('Confirm'),
onClick: ({ hide }) => {
// 立即显示成功提示并关闭弹窗
- toast.success('系统重置请求已提交');
+ toast.success(this.$t('System reset request submitted'));
hide();
// 异步提交请求
@@ -625,11 +625,11 @@ export default {
this.decryptedPassword = response;
this.showPassword = true;
} else {
- toast.warning('当前没有保存的密码');
+ toast.warning(this.$t('No password is currently saved'));
}
},
onError: (error) => {
- toast.error('获取密码失败');
+ toast.error(this.$t('Failed to get password'));
}
});
getPasswordRequest.submit();
@@ -639,22 +639,22 @@ export default {
if (this.$jsiteServer.pg.private_key) {
navigator.clipboard.writeText(this.$jsiteServer.pg.private_key).then(() => {
this.copySuccess = true;
- toast.success('私钥已复制到剪贴板');
+ toast.success(this.$t('Private key copied to clipboard'));
setTimeout(() => {
this.copySuccess = false;
}, 2000);
}).catch(() => {
- toast.error('复制失败,请手动复制');
+ toast.error(this.$t('Copy failed, please copy manually'));
});
}
},
onRenewalSuccess(data) {
- toast.success('服务器续费成功!');
+ toast.success(this.$t('Server renewal successful!'));
// 刷新服务器数据
this.$jsiteServer.reload();
},
onUpgradeSuccess(data) {
- toast.success('服务器升级成功!');
+ toast.success(this.$t('Server upgrade successful!'));
// 刷新服务器数据
this.$jsiteServer.reload();
},
@@ -688,17 +688,17 @@ export default {
const newName = this.editServerNameValue.trim();
if (!newName) {
- toast.error('服务器名称不能为空');
+ toast.error(this.$t('Server name cannot be empty'));
return;
}
if (newName.length < 2) {
- toast.error('服务器名称至少需要2个字符');
+ toast.error(this.$t('Server name must be at least 2 characters'));
return;
}
if (newName.length > 100) {
- toast.error('服务器名称不能超过100个字符');
+ toast.error(this.$t('Server name cannot exceed 100 characters'));
return;
}
@@ -714,7 +714,7 @@ export default {
{ title: newName },
{
onSuccess: () => {
- toast.success('服务器名称已更新');
+ toast.success(this.$t('Server name updated'));
this.editingServerName = false;
this.editServerNameValue = '';
this.saveServerNameLoading = false;
@@ -726,7 +726,7 @@ export default {
}
);
} catch (error) {
- toast.error('更新失败,请重试');
+ toast.error(this.$t('Update failed, please try again'));
this.saveServerNameLoading = false;
}
},
@@ -735,31 +735,31 @@ export default {
serverInformation() {
return [
{
- label: '状态',
+ label: this.$t('Status'),
value: this.getStatusText(this.$jsiteServer.pg?.status),
},
{
- label: '服务器名称',
+ label: this.$t('Server Name'),
value: this.$jsiteServer.pg?.title || this.$jsiteServer.pg?.name,
},
{
- label: '实例ID',
+ label: this.$t('Instance ID'),
value: this.$jsiteServer.pg?.instance_id || '',
},
{
- label: '公网IP',
+ label: this.$t('Public IP'),
value: this.$jsiteServer.pg?.public_ip || '',
},
{
- label: '内网IP',
+ label: this.$t('Private IP'),
value: this.$jsiteServer.pg?.private_ip || '',
},
{
- label: '区域',
+ label: this.$t('Region'),
value: this.getRegionText(this.$jsiteServer.pg?.region),
},
{
- label: '系统',
+ label: this.$t('System'),
value: this.$jsiteServer.pg?.system || '',
},
];
diff --git a/dashboard/src/objects/jsite_server.js b/dashboard/src/objects/jsite_server.js
index 395e411..1a00091 100644
--- a/dashboard/src/objects/jsite_server.js
+++ b/dashboard/src/objects/jsite_server.js
@@ -7,6 +7,7 @@ import { duration, planTitle, userCurrency } from '../utils/format';
import { trialDays } from '../utils/site';
import { getJobsTab } from './common/jobs';
import { tagTab } from './common/tags';
+import { t } from '../utils/i18n';
export default {
pagetype: 'Jsite Server',
@@ -19,7 +20,7 @@ export default {
},
list: {
route: '/jsite-servers',
- title: '服务器',
+ title: t('Servers'),
fields: [
'name',
'title',
@@ -43,52 +44,52 @@ export default {
return [
{
type: 'select',
- label: '状态',
+ label: t('Status'),
fieldname: 'status',
options: [
{ label: '', value: '' },
- { label: '准备中', value: 'Pending' },
- { label: '启动中', value: 'Starting' },
- { label: '运行中', value: 'Running' },
- { label: '停止中', value: 'Stopping' },
- { label: '已停止', value: 'Stopped' },
- { label: '重置中', value: 'Resetting' },
- { label: '升级中', value: 'Upgrading' },
- { label: '已禁用', value: 'Disabled' }
+ { label: t('Pending'), value: 'Pending' },
+ { label: t('Starting'), value: 'Starting' },
+ { label: t('Running'), value: 'Running' },
+ { label: t('Stopping'), value: 'Stopping' },
+ { label: t('Stopped'), value: 'Stopped' },
+ { label: t('Resetting'), value: 'Resetting' },
+ { label: t('Upgrading'), value: 'Upgrading' },
+ { label: t('Disabled'), value: 'Disabled' }
]
},
{
type: 'select',
- label: '区域',
+ label: t('Region'),
fieldname: 'region',
options: [
{ label: '', value: '' },
- { label: '华北1(青岛)', value: 'cn-qingdao' },
- { label: '华北2(北京)', value: 'cn-beijing' },
- { label: '华北3(张家口)', value: 'cn-zhangjiakou' },
- { label: '华北5(呼和浩特)', value: 'cn-huhehaote' },
- { label: '华东1(杭州)', value: 'cn-hangzhou' },
- { label: '华东2(上海)', value: 'cn-shanghai' },
- { label: '华南1(深圳)', value: 'cn-shenzhen' },
- { label: '华南2(河源)', value: 'cn-heyuan' },
- { label: '西南1(成都)', value: 'cn-chengdu' },
- { label: '华南3(广州)', value: 'cn-guangzhou' },
- { label: '华北6(乌兰察布)', value: 'cn-wulanchabu' },
- { label: '华东5(南京)', value: 'cn-nanjing' },
- { label: '华东6(福州)', value: 'cn-fuzhou' },
- { label: '华中1(武汉)', value: 'cn-wuhan-lr' },
- { label: '中国香港', value: 'cn-hongkong' },
- { label: '新加坡', value: 'ap-southeast-1' },
- { label: '马来西亚(吉隆坡)', value: 'ap-southeast-3' },
- { label: '印度尼西亚(雅加达)', value: 'ap-southeast-5' },
- { label: '日本(东京)', value: 'ap-northeast-1' },
- { label: '美国(硅谷)', value: 'us-west-1' },
- { label: '美国(弗吉尼亚)', value: 'us-east-1' },
- { label: '德国(法兰克福)', value: 'eu-central-1' },
- { label: '英国(伦敦)', value: 'eu-west-1' },
- { label: '菲律宾(马尼拉)', value: 'ap-southeast-6' },
- { label: '泰国(曼谷)', value: 'ap-southeast-7' },
- { label: '韩国(首尔)', value: 'ap-northeast-2' }
+ { label: t('North China 1 (Qingdao)'), value: 'cn-qingdao' },
+ { label: t('North China 2 (Beijing)'), value: 'cn-beijing' },
+ { label: t('North China 3 (Zhangjiakou)'), value: 'cn-zhangjiakou' },
+ { label: t('North China 5 (Hohhot)'), value: 'cn-huhehaote' },
+ { label: t('East China 1 (Hangzhou)'), value: 'cn-hangzhou' },
+ { label: t('East China 2 (Shanghai)'), value: 'cn-shanghai' },
+ { label: t('South China 1 (Shenzhen)'), value: 'cn-shenzhen' },
+ { label: t('South China 2 (Heyuan)'), value: 'cn-heyuan' },
+ { label: t('Southwest China 1 (Chengdu)'), value: 'cn-chengdu' },
+ { label: t('South China 3 (Guangzhou)'), value: 'cn-guangzhou' },
+ { label: t('North China 6 (Ulanqab)'), value: 'cn-wulanchabu' },
+ { label: t('East China 5 (Nanjing)'), value: 'cn-nanjing' },
+ { label: t('East China 6 (Fuzhou)'), value: 'cn-fuzhou' },
+ { label: t('Central China 1 (Wuhan)'), value: 'cn-wuhan-lr' },
+ { label: t('Hong Kong'), value: 'cn-hongkong' },
+ { label: t('Singapore'), value: 'ap-southeast-1' },
+ { label: t('Malaysia (Kuala Lumpur)'), value: 'ap-southeast-3' },
+ { label: t('Indonesia (Jakarta)'), value: 'ap-southeast-5' },
+ { label: t('Japan (Tokyo)'), value: 'ap-northeast-1' },
+ { label: t('US (Silicon Valley)'), value: 'us-west-1' },
+ { label: t('US (Virginia)'), value: 'us-east-1' },
+ { label: t('Germany (Frankfurt)'), value: 'eu-central-1' },
+ { label: t('UK (London)'), value: 'eu-west-1' },
+ { label: t('Philippines (Manila)'), value: 'ap-southeast-6' },
+ { label: t('Thailand (Bangkok)'), value: 'ap-southeast-7' },
+ { label: t('South Korea (Seoul)'), value: 'ap-northeast-2' }
]
}
];
@@ -97,7 +98,7 @@ export default {
searchField: 'title',
columns: [
{
- label: '服务器',
+ label: t('Server'),
fieldname: 'name',
width: 1.5,
class: 'font-medium',
@@ -106,83 +107,82 @@ export default {
}
},
{
- label: '状态',
+ label: t('Status'),
fieldname: 'status',
type: 'Badge',
width: 0.8,
format(value) {
const statusMap = {
- 'Pending': '准备中',
- 'Starting': '启动中',
- 'Running': '运行中',
- 'Stopping': '停止中',
- 'Stopped': '已停止',
- 'Resetting': '重置中',
- 'Upgrading': '升级中',
- 'Disabled': '已禁用'
+ 'Pending': t('Pending'),
+ 'Starting': t('Starting'),
+ 'Running': t('Running'),
+ 'Stopping': t('Stopping'),
+ 'Stopped': t('Stopped'),
+ 'Resetting': t('Resetting'),
+ 'Upgrading': t('Upgrading'),
+ 'Disabled': t('Disabled')
};
return statusMap[value] || value;
}
},
{
- label: '配置',
+ label: t('Configuration'),
fieldname: 'cpu',
format(value, row) {
- const cpu = row.cpu || '未知';
- const memory = row.memory || '未知';
- const disk = row.disk_size || '未知';
- return `${cpu}核/${memory}GB/${disk}GB`;
+ const cpu = row.cpu || t('Unknown');
+ const memory = row.memory || t('Unknown');
+ const disk = row.disk_size || t('Unknown');
+ return `${cpu}${t('cores')}/${memory}GB/${disk}GB`;
}
},
{
- label: '公网IP',
+ label: t('Public IP'),
fieldname: 'public_ip',
format(value) {
return value || '-';
}
},
{
- label: '区域',
+ label: t('Region'),
fieldname: 'region',
format(value) {
if (!value) return '-';
- // 区域ID到中文名称的映射表
+ // Region ID to name mapping
const regionMap = {
- 'cn-qingdao': '华北1(青岛)',
- 'cn-beijing': '华北2(北京)',
- 'cn-zhangjiakou': '华北3(张家口)',
- 'cn-huhehaote': '华北5(呼和浩特)',
- 'cn-hangzhou': '华东1(杭州)',
- 'cn-shanghai': '华东2(上海)',
- 'cn-shenzhen': '华南1(深圳)',
- 'cn-heyuan': '华南2(河源)',
- 'cn-chengdu': '西南1(成都)',
- 'cn-guangzhou': '华南3(广州)',
- 'cn-wulanchabu': '华北6(乌兰察布)',
- 'cn-nanjing': '华东5(南京)',
- 'cn-fuzhou': '华东6(福州)',
- 'cn-wuhan-lr': '华中1(武汉)',
- 'cn-hongkong': '中国香港',
- 'ap-southeast-1': '新加坡',
- 'ap-southeast-3': '马来西亚(吉隆坡)',
- 'ap-southeast-5': '印度尼西亚(雅加达)',
- 'ap-northeast-1': '日本(东京)',
- 'us-west-1': '美国(硅谷)',
- 'us-east-1': '美国(弗吉尼亚)',
- 'eu-central-1': '德国(法兰克福)',
- 'eu-west-1': '英国(伦敦)',
- 'ap-southeast-6': '菲律宾(马尼拉)',
- 'ap-southeast-7': '泰国(曼谷)',
- 'ap-northeast-2': '韩国(首尔)'
+ 'cn-qingdao': t('North China 1 (Qingdao)'),
+ 'cn-beijing': t('North China 2 (Beijing)'),
+ 'cn-zhangjiakou': t('North China 3 (Zhangjiakou)'),
+ 'cn-huhehaote': t('North China 5 (Hohhot)'),
+ 'cn-hangzhou': t('East China 1 (Hangzhou)'),
+ 'cn-shanghai': t('East China 2 (Shanghai)'),
+ 'cn-shenzhen': t('South China 1 (Shenzhen)'),
+ 'cn-heyuan': t('South China 2 (Heyuan)'),
+ 'cn-chengdu': t('Southwest China 1 (Chengdu)'),
+ 'cn-guangzhou': t('South China 3 (Guangzhou)'),
+ 'cn-wulanchabu': t('North China 6 (Ulanqab)'),
+ 'cn-nanjing': t('East China 5 (Nanjing)'),
+ 'cn-fuzhou': t('East China 6 (Fuzhou)'),
+ 'cn-wuhan-lr': t('Central China 1 (Wuhan)'),
+ 'cn-hongkong': t('Hong Kong'),
+ 'ap-southeast-1': t('Singapore'),
+ 'ap-southeast-3': t('Malaysia (Kuala Lumpur)'),
+ 'ap-southeast-5': t('Indonesia (Jakarta)'),
+ 'ap-northeast-1': t('Japan (Tokyo)'),
+ 'us-west-1': t('US (Silicon Valley)'),
+ 'us-east-1': t('US (Virginia)'),
+ 'eu-central-1': t('Germany (Frankfurt)'),
+ 'eu-west-1': t('UK (London)'),
+ 'ap-southeast-6': t('Philippines (Manila)'),
+ 'ap-southeast-7': t('Thailand (Bangkok)'),
+ 'ap-northeast-2': t('South Korea (Seoul)')
};
- // 如果是RegionId,返回对应的中文名称;如果已经是中文名称,直接返回
return regionMap[value] || value;
}
},
{
- label: '到期时间',
+ label: t('Expiry Date'),
fieldname: 'end_date',
format(value) {
if (!value) return '-';
@@ -192,7 +192,7 @@ export default {
],
primaryAction({ listResource: jsiteServers }) {
return {
- label: '新建服务器',
+ label: t('New Server'),
variant: 'solid',
slots: {
prefix: icon('plus')
@@ -205,14 +205,14 @@ export default {
statusBadge({ documentResource: jsiteServer }) {
const status = jsiteServer.pg?.status;
const statusMap = {
- 'Pending': '准备中',
- 'Starting': '启动中',
- 'Running': '运行中',
- 'Stopping': '停止中',
- 'Stopped': '已停止',
- 'Resetting': '重置中',
- 'Upgrading': '升级中',
- 'Disabled': '已禁用'
+ 'Pending': t('Pending'),
+ 'Starting': t('Starting'),
+ 'Running': t('Running'),
+ 'Stopping': t('Stopping'),
+ 'Stopped': t('Stopped'),
+ 'Resetting': t('Resetting'),
+ 'Upgrading': t('Upgrading'),
+ 'Disabled': t('Disabled')
};
return {
label: statusMap[status] || status
@@ -221,7 +221,7 @@ export default {
breadcrumbs({ documentResource: jsiteServer }) {
return [
{
- label: '服务器',
+ label: t('Servers'),
route: '/jsite-servers'
},
{
@@ -235,7 +235,7 @@ export default {
const actions = [
{
- label: '重启',
+ label: t('Restart'),
icon: 'refresh-cw',
onClick() {
jsiteServer.reboot.submit();
@@ -243,14 +243,14 @@ export default {
condition: () => jsiteServer.pg?.status === 'Running'
},
{
- label: '重命名',
+ label: t('Rename'),
icon: 'edit-3',
onClick() {
jsiteServer.rename.submit();
}
},
{
- label: '删除',
+ label: t('Delete'),
icon: 'trash-2',
onClick() {
jsiteServer.dropServer.submit();
@@ -263,10 +263,10 @@ export default {
},
detail: {
route: '/jsite-servers/:name',
- title: '服务器详细信息',
+ title: t('Server Details'),
tabs: [
{
- label: '概览',
+ label: t('Overview'),
route: '',
type: 'Component',
component: defineAsyncComponent(() => import('../components/JsiteServerOverview.vue')),
@@ -275,7 +275,7 @@ export default {
}
},
{
- label: '防火墙',
+ label: t('Firewall'),
route: 'firewall',
type: 'Component',
component: defineAsyncComponent(() => import('../components/JsiteServerFirewallRules.vue')),
@@ -286,7 +286,7 @@ export default {
],
fields: [
{
- label: '基本信息',
+ label: t('Basic Information'),
fields: [
'title',
'status',
@@ -296,7 +296,7 @@ export default {
]
},
{
- label: '服务器配置',
+ label: t('Server Configuration'),
fields: [
'cpu',
'memory',
@@ -309,7 +309,7 @@ export default {
]
},
{
- label: 'SSH连接',
+ label: t('SSH Connection'),
fields: [
'ssh_user',
'ssh_port',
@@ -319,7 +319,7 @@ export default {
]
},
{
- label: '其他信息',
+ label: t('Other Information'),
fields: [
'end_date',
'period'
diff --git a/dashboard/src/pages/NewJsiteServer.vue b/dashboard/src/pages/NewJsiteServer.vue
index 8f7ff43..1459b21 100644
--- a/dashboard/src/pages/NewJsiteServer.vue
+++ b/dashboard/src/pages/NewJsiteServer.vue
@@ -5,8 +5,8 @@
@@ -17,17 +17,17 @@
-
新建服务器
+
{{ $t('New Server') }}
- 请选择服务器配置和支付方式,点击"创建"后将自动为您开通。
+ {{ $t('Please select server configuration and payment method. Click "Create" to automatically provision the server.') }}
-
+
-
+
-
+
-
+
@@ -64,18 +64,18 @@
-
月度费用
+
{{ $t('Monthly Fee') }}
¥ {{ getSelectedPlanPrice() }}
- (月付)
+ ({{ $t('Monthly') }})
-
购买时长
-
{{ period }} 个月
+
{{ $t('Purchase Duration') }}
+
{{ period }} {{ $t('months') }}
-
总计
+
{{ $t('Total') }}
¥ {{ getTotalAmount() }}
@@ -83,7 +83,7 @@
@@ -145,7 +145,7 @@
-
正在处理支付,请稍候...
+
{{ $t('Processing payment, please wait...') }}
@@ -157,12 +157,12 @@
-
支付成功!
+
{{ $t('Payment Successful!') }}
- 您的订单已支付成功,服务器记录已创建。服务器正在后台创建中,创建并启动需要 3-5 分钟,请耐心等待。
+ {{ $t('Your order has been paid successfully and the server record has been created. The server is being created in the background. Creation and startup will take 3-5 minutes, please be patient.') }}
- 您可以在服务器列表中查看服务器状态,创建完成后状态将更新为"运行中"。
+ {{ $t('You can check the server status in the server list. After creation is complete, the status will be updated to "Running".') }}