1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 00:09:16 +08:00

style: Optimize some internationalization styles (#7689)

This commit is contained in:
ssongliu 2025-01-10 12:11:44 +08:00 committed by GitHub
parent 42c30f324a
commit cf2a1372f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 44 additions and 18 deletions

View File

@ -10,6 +10,10 @@ import { GlobalStore } from '@/store';
import zhCn from 'element-plus/es/locale/lang/zh-cn'; import zhCn from 'element-plus/es/locale/lang/zh-cn';
import zhTw from 'element-plus/es/locale/lang/zh-tw'; import zhTw from 'element-plus/es/locale/lang/zh-tw';
import en from 'element-plus/es/locale/lang/en'; import en from 'element-plus/es/locale/lang/en';
import ja from 'element-plus/es/locale/lang/ja';
import ms from 'element-plus/es/locale/lang/ms';
import ptBR from 'element-plus/es/locale/lang/pt-br';
import ru from 'element-plus/es/locale/lang/ru';
import { useTheme } from '@/hooks/use-theme'; import { useTheme } from '@/hooks/use-theme';
useTheme(); useTheme();
@ -22,6 +26,10 @@ const i18nLocale = computed(() => {
if (globalStore.language === 'zh') return zhCn; if (globalStore.language === 'zh') return zhCn;
if (globalStore.language === 'tw') return zhTw; if (globalStore.language === 'tw') return zhTw;
if (globalStore.language === 'en') return en; if (globalStore.language === 'en') return en;
if (globalStore.language === 'ja') return ja;
if (globalStore.language === 'ms') return ms;
if (globalStore.language === 'ru') return ru;
if (globalStore.language === 'pt-br') return ptBR;
return zhCn; return zhCn;
}); });

View File

@ -452,8 +452,8 @@ const message = {
remote: 'リモート', remote: 'リモート',
remoteDB: 'リモートサーバー|リモートサーバー', remoteDB: 'リモートサーバー|リモートサーバー',
manageRemoteDB: 'リモートDB', manageRemoteDB: 'リモートDB',
createRemoteDB: 'bind @.lower:database.remotedb', createRemoteDB: 'リモートサーバーを追加',
unBindRemoteDB: 'unbind @.lower:database.remotedb', unBindRemoteDB: 'リモートサーバーのバインドを解除',
unBindForce: '強制バインド', unBindForce: '強制バインド',
unBindForceHelper: '結合プロセス中にすべてのエラーを無視して最終操作が成功するようにします', unBindForceHelper: '結合プロセス中にすべてのエラーを無視して最終操作が成功するようにします',
unBindRemoteHelper: unBindRemoteHelper:
@ -1137,7 +1137,7 @@ const message = {
clamLog: '@:toolbox.clam.clamconfログ', clamLog: '@:toolbox.clam.clamconfログ',
freshClam: 'フレッシュクラム', freshClam: 'フレッシュクラム',
freshClamLog: '@:toolbox.clam.freshclamログ', freshClamLog: '@:toolbox.clam.freshclamログ',
alertHelper: 'ProfessionalバージョンはスケジュールされたスキャンとSMSアラートをサポートしています', alertHelper: 'プロフェッショナル版は定期スキャンとSMSアラート機能をサポートしています',
alertTitle: 'ウイルススキャンタスク{0}感染したファイルアラートが検出されました', alertTitle: 'ウイルススキャンタスク{0}感染したファイルアラートが検出されました',
}, },
}, },
@ -1678,7 +1678,8 @@ const message = {
}, },
license: { license: {
community: '無料', community: '無料',
pro: 'Pro', oss: '無料',
pro: '専門',
trial: 'トライアル', trial: 'トライアル',
office: '正式', office: '正式',
trialInfo: 'バージョン', trialInfo: 'バージョン',

View File

@ -20,10 +20,10 @@
prop="command" prop="command"
:rules="Rules.requiredInput" :rules="Rules.requiredInput"
> >
<el-checkbox style="width: 100px" border v-model="form.isCustom" @change="onChangeCommand"> <el-checkbox style="width: 180px" border v-model="form.isCustom" @change="onChangeCommand">
{{ $t('container.custom') }} {{ $t('container.custom') }}
</el-checkbox> </el-checkbox>
<el-input style="width: calc(100% - 100px)" clearable v-model="form.command" /> <el-input style="width: calc(100% - 180px)" clearable v-model="form.command" />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
v-if="!form.isCustom" v-if="!form.isCustom"
@ -31,10 +31,10 @@
prop="command" prop="command"
:rules="Rules.requiredSelect" :rules="Rules.requiredSelect"
> >
<el-checkbox style="width: 100px" border v-model="form.isCustom" @change="onChangeCommand"> <el-checkbox style="width: 180px" border v-model="form.isCustom" @change="onChangeCommand">
{{ $t('container.custom') }} {{ $t('container.custom') }}
</el-checkbox> </el-checkbox>
<el-select style="width: calc(100% - 100px)" filterable clearable v-model="form.command"> <el-select style="width: calc(100% - 180px)" filterable clearable v-model="form.command">
<el-option value="/bin/ash" label="/bin/ash" /> <el-option value="/bin/ash" label="/bin/ash" />
<el-option value="/bin/bash" label="/bin/bash" /> <el-option value="/bin/bash" label="/bin/bash" />
<el-option value="/bin/sh" label="/bin/sh" /> <el-option value="/bin/sh" label="/bin/sh" />

View File

@ -81,7 +81,7 @@
prop="password" prop="password"
> >
<el-input <el-input
style="width: calc(100% - 147px)" style="width: calc(100% - 167px)"
type="password" type="password"
show-password show-password
clearable clearable

View File

@ -169,13 +169,20 @@
<el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8"> <el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8">
<CardWithHeader :header="$t('home.systemInfo')"> <CardWithHeader :header="$t('home.systemInfo')">
<template #body> <template #body>
<el-scrollbar> <div class="h-systemInfo">
<el-descriptions :column="1" class="h-systemInfo" border> <el-descriptions :column="1" border>
<el-descriptions-item class-name="system-content" label-class-name="system-label"> <el-descriptions-item class-name="system-content" label-class-name="system-label">
<template #label> <template #label>
<span>{{ $t('home.hostname') }}</span> <span>{{ $t('home.hostname') }}</span>
</template> </template>
{{ baseInfo.hostname }} <el-tooltip
v-if="baseInfo.hostname.length > 30"
:content="baseInfo.hostname"
placement="bottom"
>
{{ baseInfo.hostname.substring(0, 27) + '...' }}
</el-tooltip>
<span v-else>{{ baseInfo.hostname }}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item class-name="system-content" label-class-name="system-label"> <el-descriptions-item class-name="system-content" label-class-name="system-label">
<template #label> <template #label>
@ -191,7 +198,14 @@
<template #label> <template #label>
<span>{{ $t('home.kernelVersion') }}</span> <span>{{ $t('home.kernelVersion') }}</span>
</template> </template>
{{ baseInfo.kernelVersion }} <el-tooltip
v-if="baseInfo.kernelVersion.length > 30"
:content="baseInfo.kernelVersion"
placement="bottom"
>
{{ baseInfo.kernelVersion.substring(0, 27) + '...' }}
</el-tooltip>
<span v-else>{{ baseInfo.kernelVersion }}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item class-name="system-content" label-class-name="system-label"> <el-descriptions-item class-name="system-content" label-class-name="system-label">
<template #label> <template #label>
@ -232,7 +246,7 @@
{{ loadUpTime(currentInfo.uptime) }} {{ loadUpTime(currentInfo.uptime) }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-scrollbar> </div>
</template> </template>
</CardWithHeader> </CardWithHeader>
@ -681,7 +695,8 @@ onBeforeUnmount(() => {
.h-systemInfo { .h-systemInfo {
margin-left: 18px; margin-left: 18px;
height: 276px; height: 296px;
overflow: auto;
} }
@-moz-document url-prefix() { @-moz-document url-prefix() {
.h-systemInfo { .h-systemInfo {
@ -695,8 +710,10 @@ onBeforeUnmount(() => {
color: var(--panel-text-color); color: var(--panel-text-color);
border: none !important; border: none !important;
background: none !important; background: none !important;
width: fit-content !important; max-width: 150px !important;
white-space: nowrap !important; white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
.system-content { .system-content {

View File

@ -1,6 +1,6 @@
<template> <template>
<el-row :gutter="20" v-loading="loading"> <el-row :gutter="20" v-loading="loading">
<el-col :xs="24" :sm="18" :md="8" :lg="8" :xl="8"> <el-col :xs="24" :sm="18" :md="9" :lg="9" :xl="9">
<el-form ref="websiteForm" label-position="right" label-width="150px" :model="form" :rules="rules"> <el-form ref="websiteForm" label-position="right" label-width="150px" :model="form" :rules="rules">
<el-form-item :label="$t('website.primaryDomain')" prop="primaryDomain"> <el-form-item :label="$t('website.primaryDomain')" prop="primaryDomain">
<el-input v-model="form.primaryDomain"></el-input> <el-input v-model="form.primaryDomain"></el-input>