fix: 添加国际化及样式修改 (#6555)

This commit is contained in:
John Bro 2024-09-23 18:11:14 +08:00 committed by GitHub
parent 753c996291
commit 656b39c880
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 29 additions and 22 deletions

View File

@ -770,8 +770,9 @@ const message = {
composeHelper:
'The composition created through 1Panel editor or template will be saved in the {0}/docker/compose directory.',
deleteFile: 'Delete file',
allDelete: 'Permanently Delete',
deleteComposeHelper:
'Delete all files in the {0} directory, including persistent files in this directory. Please proceed with caution!',
'1. Delete container orchestration records \n2. Delete all container orchestration files, including configuration and persistent files',
deleteCompose: '" Delete this composition.',
apps: 'Apps',
local: 'Local',
@ -784,6 +785,8 @@ const message = {
contentEmpty: 'Compose content cannot be empty, please enter and try again!',
containerNumber: 'Container number',
containerStatus: 'Container Status',
exited: 'Exited',
running: 'Running',
down: 'Down',
up: 'Up',
composeDetailHelper:

View File

@ -740,7 +740,8 @@ const message = {
composePathHelper: '配置文件保存路徑: {0}',
composeHelper: '通過 1Panel 編輯或者模版創建的編排將保存在 {0}/docker/compose 路徑下',
deleteFile: '刪除文件',
deleteComposeHelper: '刪除 {0} 目录下所有文件包括該文件下的持久化文件等請謹慎操作',
allDelete: '徹底刪除',
deleteComposeHelper: '1. 刪除容器編排記錄 \n2. 刪除容器編排的所有文件包括配置文件和持久化文件',
deleteCompose: '" 刪除此編排',
apps: '應用商店',
local: '本地',
@ -753,6 +754,8 @@ const message = {
contentEmpty: '編排內容不能為空請輸入後重試',
containerNumber: '容器數量',
containerStatus: '容器狀態',
exited: '已停止',
running: '運行中',
down: '刪除',
up: '啟動',
composeDetailHelper: ' compose 1Panel 編排外部創建暫不支持啟停操作',

View File

@ -737,13 +737,13 @@ const message = {
mirrorHelper:
'当存在多个加速器时需要换行显示 \nhttp://xxxxxx.m.daocloud.io \nhttps://xxxxxx.mirror.aliyuncs.com',
registrieHelper: '当存在多个私有仓库时需要换行显示\n172.16.10.111:8081 \n172.16.10.112:8081',
compose: '编排',
fromChangeHelper: '切换来源将清空当前已编辑内容是否继续',
composePathHelper: '配置文件保存路径: {0}',
composeHelper: '通过 1Panel 编辑或者模版创建的编排将保存在 {0}/docker/compose 路径下',
deleteFile: '删除文件',
deleteComposeHelper: '删除 {0} 目录下所有文件包括该文件下的持久化文件等请谨慎操作',
allDelete: '彻底删除',
deleteComposeHelper: '1. 删除容器编排记录 \n2. 删除容器编排的所有文件包括配置文件和持久化文件',
deleteCompose: '" 删除此编排',
apps: '应用商店',
local: '本地',
@ -756,6 +756,8 @@ const message = {
contentEmpty: '编排内容不能为空请输入后重试',
containerNumber: '容器数量',
containerStatus: '容器状态',
exited: '已停止',
running: '运行中',
down: '删除',
up: '启动',
composeDetailHelper: ' compose 1Panel 编排外部创建暂不支持启停操作',

View File

@ -7,9 +7,9 @@
>
<el-form ref="deleteForm" v-loading="loading">
<el-form-item>
<el-checkbox v-model="deleteFile" :label="$t('container.deleteFile')" />
<span class="input-help">
{{ $t('container.deleteComposeHelper', [loadComposeDir()]) }}
<el-checkbox v-model="deleteFile" :label="$t('container.allDelete')" />
<span class="input-help whitespace-break-spaces">
{{ $t('container.deleteComposeHelper') }}
</span>
</el-form-item>
<el-form-item>
@ -64,15 +64,6 @@ const acceptParams = async (prop: DialogProps) => {
dialogVisible.value = true;
};
const loadComposeDir = () => {
const parts = composePath.value.split('/');
if (parts.length <= 2) {
return '/';
}
const parentDirectory = parts.slice(0, -1).join('/');
return parentDirectory;
};
const submit = async () => {
loading.value = true;
let params = {

View File

@ -180,9 +180,9 @@ const getContainerStatus = (containers) => {
const totalCount = safeContainers.length;
const statusText = runningCount > 0 ? 'Running' : 'Exited';
if (statusText === 'Exited') {
return `${statusText}`;
return i18n.global.t('container.exited');
} else {
return `${statusText} (${runningCount}/${totalCount})`;
return i18n.global.t('container.running') + ` (${runningCount}/${totalCount})`;
}
};
const backList = async () => {

View File

@ -53,7 +53,9 @@
<template #prompt>
<el-alert type="info" :closable="false">
<template #title>
<span v-html="$t('file.fileHeper')"></span>
<span class="input-help whitespace-break-spaces">
{{ $t('file.fileHeper') }}
</span>
</template>
</el-alert>
</template>

View File

@ -5,7 +5,9 @@
<template #prompt>
<el-alert type="info" :closable="false">
<template #title>
<span v-html="$t('runtime.statusHelper')"></span>
<span class="input-help whitespace-break-spaces">
{{ $t('runtime.statusHelper') }}
</span>
</template>
</el-alert>
</template>

View File

@ -5,7 +5,9 @@
<template #prompt>
<el-alert type="info" :closable="false">
<template #title>
<span v-html="$t('runtime.statusHelper')"></span>
<span class="input-help whitespace-break-spaces">
{{ $t('runtime.statusHelper') }}
</span>
</template>
</el-alert>
</template>

View File

@ -5,7 +5,9 @@
<template #prompt>
<el-alert type="info" :closable="false">
<template #title>
<span v-html="$t('runtime.statusHelper')"></span>
<span class="input-help whitespace-break-spaces">
{{ $t('runtime.statusHelper') }}
</span>
</template>
</el-alert>
</template>