chore: update locale

This commit is contained in:
vben
2024-06-29 15:41:10 +08:00
parent 36a4fcfad2
commit c58aa26dbf
35 changed files with 531 additions and 523 deletions

View File

@@ -49,10 +49,10 @@ const appName = computed(() => preferences.app.name);
<div class="flex-col-center -enter-x mr-20 h-full">
<SloganIcon :alt="appName" class="animate-float h-64 w-2/5" />
<div class="text-1xl mt-6 font-sans text-white lg:text-2xl">
{{ $t('authentication.layout-title') }}
{{ $t('authentication.page-title') }}
</div>
<div class="dark:text-muted-foreground mt-2 text-white/60">
{{ $t('authentication.layout-desc') }}
{{ $t('authentication.page-desc') }}
</div>
</div>
</div>

View File

@@ -21,17 +21,17 @@ const menus = computed((): VbenDropdownMenuItem[] => [
{
icon: MdiDockLeft,
key: 'panel-left',
text: $t('layout.align-left'),
text: $t('authentication.layout.align-left'),
},
{
icon: MdiDockBottom,
key: 'panel-center',
text: $t('layout.center'),
text: $t('authentication.layout.center'),
},
{
icon: MdiDockRight,
key: 'panel-right',
text: $t('layout.align-right'),
text: $t('authentication.layout.align-right'),
},
]);

View File

@@ -25,7 +25,7 @@ function useContentSpinner() {
};
router.beforeEach((to) => {
if (to.meta.loaded || !enableLoading.value) {
if (to.meta.loaded || !enableLoading.value || to.meta.iframeSrc) {
return true;
}
startTime.value = performance.now();
@@ -34,7 +34,7 @@ function useContentSpinner() {
});
router.afterEach((to) => {
if (to.meta.loaded || !enableLoading.value) {
if (to.meta.loaded || !enableLoading.value || to.meta.iframeSrc) {
return true;
}

View File

@@ -16,7 +16,7 @@ interface FallbackProps {
/**
* @zh_CN 内置类型
*/
status?: '403' | '404' | '500' | 'hello' | 'offline';
status?: '403' | '404' | '500' | 'comming-soon' | 'offline';
/**
* @zh_CN 页面提示语
*/

View File

@@ -19,14 +19,16 @@ const props = withDefaults(defineProps<Props>(), {
homePath: '/',
image: '',
showBack: true,
status: 'hello',
status: 'comming-soon',
title: '',
});
const Icon403 = defineAsyncComponent(() => import('./icons/icon-403.vue'));
const Icon404 = defineAsyncComponent(() => import('./icons/icon-404.vue'));
const Icon500 = defineAsyncComponent(() => import('./icons/icon-500.vue'));
const IconHello = defineAsyncComponent(() => import('./icons/icon-hello.vue'));
const IconHello = defineAsyncComponent(
() => import('./icons/icon-comming-soon.vue'),
);
const IconOffline = defineAsyncComponent(
() => import('./icons/icon-offline.vue'),
);
@@ -49,7 +51,7 @@ const titleText = computed(() => {
case 'offline': {
return $t('fallback.offline-error');
}
case 'hello': {
case 'comming-soon': {
return $t('fallback.coming-soon');
}
default: {
@@ -95,7 +97,7 @@ const fallbackIcon = computed(() => {
case 'offline': {
return IconOffline;
}
case 'hello': {
case 'comming-soon': {
return IconHello;
}
default: {

View File

@@ -71,7 +71,7 @@ if (props.enableShortcutKey) {
<span
class="text-muted-foreground group-hover:text-foreground hidden text-sm duration-300 md:block"
>
{{ $t('search.search') }}
{{ $t('widgets.search.title') }}
</span>
<span
v-if="enableShortcutKey"
@@ -94,7 +94,7 @@ if (props.enableShortcutKey) {
<IcRoundSearch class="mt-1 size-4" />
<input
v-model="keyword"
:placeholder="$t('search.search-navigate')"
:placeholder="$t('widgets.search.search-navigate')"
class="ring-none placeholder:text-muted-foreground w-[80%] rounded-md border border-none bg-transparent p-2 text-sm outline-none ring-0 ring-offset-transparent focus-visible:ring-transparent"
/>
</DialogTitle>
@@ -106,16 +106,16 @@ if (props.enableShortcutKey) {
>
<div class="flex items-center">
<IcRoundSubdirectoryArrowLeft class="mr-1" />
{{ $t('search.select') }}
{{ $t('widgets.search.select') }}
</div>
<div class="flex items-center">
<IcRoundArrowUpward class="mr-2" />
<IcRoundArrowDownward class="mr-2" />
{{ $t('search.navigate') }}
{{ $t('widgets.search.navigate') }}
</div>
<div class="flex items-center">
<MdiKeyboardEsc class="mr-1" />
{{ $t('search.close') }}
{{ $t('widgets.search.close') }}
</div>
</DialogFooter>
</DialogContent>

View File

@@ -223,7 +223,7 @@ onMounted(() => {
>
<IcRoundSearchOff class="size-12" />
<p class="my-10 text-xs">
{{ $t('search.no-results') }}
{{ $t('widgets.search.no-results') }}
<span class="text-foreground text-sm font-medium">
"{{ keyword }}"
</span>
@@ -235,7 +235,7 @@ onMounted(() => {
class="text-muted-foreground text-center"
>
<p class="my-10 text-xs">
{{ $t('search.no-recent') }}
{{ $t('widgets.search.no-recent') }}
</p>
</div>
@@ -244,7 +244,7 @@ onMounted(() => {
v-if="searchHistory.length > 0 && !keyword"
class="text-muted-foreground mb-2 text-xs"
>
{{ $t('search.recent') }}
{{ $t('widgets.search.recent') }}
</li>
<li
v-for="(item, index) in uniqueByField(searchResults, 'path')"

View File

@@ -13,7 +13,7 @@ const logoVisible = defineModel<boolean>('logoVisible');
<template>
<SwitchItem v-model="tabsVisible">
{{ $t('preferences.tabs-visible') }}
{{ $t('preferences.tabbar.enable') }}
</SwitchItem>
<SwitchItem v-model="logoVisible">
{{ $t('preferences.logo-visible') }}

View File

@@ -28,18 +28,18 @@ const stylesItems: SelectListItem[] = [
:disabled="disabled"
:items="stylesItems"
>
{{ $t('preferences.navigation-style') }}
{{ $t('preferences.navigation-menu.style') }}
</ToggleItem>
<SwitchItem
v-model="navigationSplit"
:disabled="disabledNavigationSplit || disabled"
>
{{ $t('preferences.navigation-split') }}
{{ $t('preferences.navigation-menu.split') }}
<template #tip>
{{ $t('preferences.navigation-split-tip') }}
{{ $t('preferences.navigation-menu.split-tip') }}
</template>
</SwitchItem>
<SwitchItem v-model="navigationAccordion" :disabled="disabled">
{{ $t('preferences.navigation-accordion') }}
{{ $t('preferences.navigation-menu.accordion') }}
</SwitchItem>
</template>

View File

@@ -15,10 +15,10 @@ const tabbarShowIcon = defineModel<boolean>('tabbarShowIcon');
<template>
<SwitchItem v-model="tabbarEnable" :disabled="disabled">
{{ $t('preferences.tabs-visible') }}
{{ $t('preferences.tabbar.enable') }}
</SwitchItem>
<SwitchItem v-model="tabbarShowIcon" :disabled="!tabbarEnable">
{{ $t('preferences.tabs-icon') }}
{{ $t('preferences.tabbar.icon') }}
</SwitchItem>
<!-- <SwitchItem v-model="sideCollapseShowTitle" :disabled="!tabsVisible">
{{ $t('preferences.collapse-show-title') }}

View File

@@ -28,50 +28,50 @@ const inputValue = computed(() => {
function typeView(name: BuiltinThemeType) {
switch (name) {
case 'default': {
return $t('preferences.theme.default');
return $t('preferences.theme.builtin.default');
}
case 'violet': {
return $t('preferences.theme.violet');
return $t('preferences.theme.builtin.violet');
}
case 'pink': {
return $t('preferences.theme.pink');
return $t('preferences.theme.builtin.pink');
}
case 'rose': {
return $t('preferences.theme.rose');
return $t('preferences.theme.builtin.rose');
}
case 'sky-blue': {
return $t('preferences.theme.sky-blue');
return $t('preferences.theme.builtin.sky-blue');
}
case 'deep-blue': {
return $t('preferences.theme.deep-blue');
return $t('preferences.theme.builtin.deep-blue');
}
case 'green': {
return $t('preferences.theme.green');
return $t('preferences.theme.builtin.green');
}
case 'deep-green': {
return $t('preferences.theme.deep-green');
return $t('preferences.theme.builtin.deep-green');
}
case 'orange': {
return $t('preferences.theme.orange');
return $t('preferences.theme.builtin.orange');
}
case 'yellow': {
return $t('preferences.theme.yellow');
return $t('preferences.theme.builtin.yellow');
}
case 'zinc': {
return $t('preferences.theme.zinc');
return $t('preferences.theme.builtin.zinc');
}
case 'neutral': {
return $t('preferences.theme.neutral');
return $t('preferences.theme.builtin.neutral');
}
case 'slate': {
return $t('preferences.theme.slate');
return $t('preferences.theme.builtin.slate');
}
case 'gray': {
return $t('preferences.theme.gray');
return $t('preferences.theme.builtin.gray');
}
case 'custom': {
return $t('preferences.theme.custom');
return $t('preferences.theme.builtin.custom');
}
}
}

View File

@@ -18,9 +18,9 @@ const appColorGrayMode = defineModel<boolean>('appColorGrayMode', {
<template>
<SwitchItem v-model="appColorWeakMode">
{{ $t('preferences.weak-mode') }}
{{ $t('preferences.theme.weak-mode') }}
</SwitchItem>
<SwitchItem v-model="appColorGrayMode">
{{ $t('preferences.gray-mode') }}
{{ $t('preferences.theme.gray-mode') }}
</SwitchItem>
</template>

View File

@@ -43,10 +43,10 @@ function activeClass(theme: string): string[] {
function nameView(name: string) {
switch (name) {
case 'light': {
return $t('preferences.light');
return $t('preferences.theme.light');
}
case 'dark': {
return $t('preferences.dark');
return $t('preferences.theme.dark');
}
case 'auto': {
return $t('preferences.follow-system');
@@ -79,7 +79,7 @@ function nameView(name: string) {
:disabled="modelValue !== 'light'"
class="mt-6"
>
{{ $t('preferences.dark-menu') }}
{{ $t('preferences.theme.dark-menu') }}
</SwitchItem>
</div>
</template>

View File

@@ -233,7 +233,7 @@ async function handleReset() {
:color-primary-presets="colorPrimaryPresets"
/>
</Block> -->
<Block :title="$t('preferences.theme.builtin')">
<Block :title="$t('preferences.theme.builtin.title')">
<BuiltinTheme
v-model="themeBuiltinType"
v-model:theme-color-primary="themeColorPrimary"
@@ -275,7 +275,7 @@ async function handleReset() {
/>
</Block>
<Block :title="$t('preferences.navigation-menu')">
<Block :title="$t('preferences.navigation-menu.title')">
<Navigation
v-model:navigation-accordion="navigationAccordion"
v-model:navigation-split="navigationSplit"
@@ -298,7 +298,7 @@ async function handleReset() {
/>
</Block>
<Block :title="$t('preferences.tabs')">
<Block :title="$t('preferences.tabbar.title')">
<Tabbar
v-model:tabbar-enable="tabbarEnable"
v-model:tabbar-show-icon="tabbarShowIcon"

View File

@@ -39,12 +39,12 @@ const PRESETS = [
{
icon: IcRoundWbSunny,
name: 'light',
title: $t('preferences.light'),
title: $t('preferences.theme.light'),
},
{
icon: MdiMoonAndStars,
name: 'dark',
title: $t('preferences.dark'),
title: $t('preferences.theme.dark'),
},
{
icon: IcRoundMotionPhotosAuto,

View File

@@ -1,3 +1,35 @@
page:
demos:
title: Demos
nested:
title: Nested Menu
menu1: Menu 1
menu2: Menu 2
menu21: Menu 2-1
menu3: Menu 3
menu31: Menu 3-1
menu32: Menu 3-2
menu321: Menu 3-2-1
outside:
title: External Page
embedded: embedded Page
external-link: External Link
fallback:
title: Exception Page
essentials:
login: Login
register: Register
code-login: Code Login
qrcode-login: Qrcode Login
forget-password: Forget Password
dashboard:
title: Dashboard
analytics: Analytics
workspace: Workspace
vben:
about: About
document: Document
common:
back: Back
back-to-home: Back To Home
@@ -6,15 +38,9 @@ common:
prompt: Prompt
cancel: Cancel
confirm: Comfirm
search: Search
not-data: No data
refresh: Refresh
layout:
center: Align Center
align-left: Align Left
align-right: Align Right
fallback:
page-not-found: Oops! Page Not Found
page-not-found-desc: Sorry, we couldn't find the page you were looking for.
@@ -36,33 +62,32 @@ widgets:
notifications: Notifications
make-all-as-read: Make all as read
clear-notifications: Clear
search:
search: Search
search-navigate: Search Navigate
select: To select
navigate: To navigate
close: To close
no-results: No results for
no-recent: No recent searches
recent: Recent
search:
title: Search
search-navigate: Search Navigate
select: To select
navigate: To navigate
close: To close
no-results: No results for
no-recent: No recent searches
recent: Recent
authentication:
layout-title: Plug-and-play backend system
layout-desc: Efficient, versatile frontend template
welcome-back: Welcome Back
page-title: Plug-and-play backend system
page-desc: Efficient, versatile frontend template
login-success: Login successful
login-success-desc: Welcome back
welcome-back: Welcome Back
login-subtitle: Enter your account details to manage your projects
username: Username
password: Password
username-tip: Username is required
password-tip: Password is required
account-tip: Don't have an account yet?
remember-me: Remember Me
create-an-account: Create an account
create-account: Create account
already-account: Already have an account?
remember-me: Remember Me
account-tip: Don't have an account yet?
sign-up: Sign Up
sign-up-subtitle: Make managing your applications simple and fun
comfirm-password: Comfirm Password
@@ -90,51 +115,21 @@ authentication:
send-code: Get Security code
send-text: "Reacquire in {0}s"
third-party-login: Or continue with
page:
essentials:
login: Login
register: Register
code-login: Code Login
qrcode-login: Qrcode Login
forget-password: Forget Password
dashboard:
title: Dashboard
analytics: Analytics
workspace: Workspace
vben:
about: About
document: Document
outside:
title: External Page
embedded: embedded Page
external-link: External Link
nested:
title: Nested Menu
menu1: Menu 1
menu2: Menu 2
menu21: Menu 2-1
menu3: Menu 3
menu31: Menu 3-1
menu32: Menu 3-2
menu321: Menu 3-2-1
fallback:
title: Exception Page
layout:
center: Align Center
align-left: Align Left
align-right: Align Right
preferences:
title: Preferences
subtitle: Customize Preferences & Preview in Real Time
reset-tip: The data has changed, click to reset
ai-assistant: Ai Assistant
# appearance
appearance: Appearance
theme-color: Theme Color
# layout
layout: Layout
general: General
content: Content
other: Other
light: Light
dark: Dark
dark-menu: Semi Dark Menu
wide: Fluid
compact: Fixed Width
follow-system: Follow System
@@ -151,29 +146,34 @@ preferences:
full-content-tip: Display only the main content, no menus
weak-mode: Color Weak Mode
gray-mode: Gray Mode
language: Language
dynamic-title: Dynamic Title
normal: Normal
plain: Plain
rounded: Rounded
collapse: Collpase Menu
collapse-show-title: Display menu name
navigation-menu: Navigation Menu
navigation-style: Navigation menu style
navigation-split: Navigation Menu Separation
navigation-accordion: Sidebar Navigation Menu Accordion mode
navigation-split-tip: When enabled, the sidebar shows the top bar's submenu
interface-control: Interface Layout Control
copy: Copy Preferences
copy-success: Copy successful. Please replace in `src/preferences.ts` of the app
reset-success: Preferences reset successfully
sidebar: Sidebar
side-visible: Display Sidebar
tabs-visible: Display Tab Bar
tabs: Tabs
tabs-icon: Display Tabbar Icon
mode: Mode
logo-visible: Display Logo
# general
general: General
language: Language
dynamic-title: Dynamic Title
ai-assistant: Ai Assistant
tabbar:
title: Tabbar
enable: Enable Tab Bar
icon: Display Tabbar Icon
navigation-menu:
title: Navigation Menu
style: Navigation menu style
split: Navigation Menu Separation
accordion: Sidebar Navigation Menu Accordion mode
split-tip: When enabled, the sidebar shows the top bar's submenu
breadcrumb:
title: Breadcrumb
home: Display the home button
@@ -189,23 +189,29 @@ preferences:
progress: Page transition progress
theme:
title: Theme
builtin: Built-in
radius: Radius
default: Default
violet: Violet
pink: Pink
rose: Rose
sky-blue: Sky Blue
deep-blue: Deep Blue
green: Green
deep-green: Deep Green
orange: Orange
yellow: Yellow
zinc: Zinc
neutral: Neutral
slate: Slate
gray: Gray
custom: Custom
light: Light
dark: Dark
dark-menu: Semi Dark Menu
weak-mode: Color Weak Mode
gray-mode: Gray Mode
builtin:
title: Built-in
default: Default
violet: Violet
pink: Pink
rose: Rose
sky-blue: Sky Blue
deep-blue: Deep Blue
green: Green
deep-green: Deep Green
orange: Orange
yellow: Yellow
zinc: Zinc
neutral: Neutral
slate: Slate
gray: Gray
custom: Custom
header:
title: Header
visible: Display Header

View File

@@ -1,3 +1,35 @@
page:
demos:
title: 演示
nested:
title: 嵌套菜单
menu1: 菜单 1
menu2: 菜单 2
menu21: 菜单 2-1
menu3: 菜单 3
menu31: 菜单 3-1
menu32: 菜单 3-2
menu321: 菜单 3-2-1
outside:
title: 外部页面
embedded: 内嵌
external-link: 外链
fallback:
title: 异常页面
essentials:
login: 登陆
register: 注册
code-login: 验证码登陆
qrcode-login: 二维码登陆
forget-password: 忘记密码
dashboard:
title: 概览
analytics: 分析页
workspace: 工作台
vben:
about: 关于
document: 文档
common:
back: 返回
back-to-home: 返回首页
@@ -9,11 +41,6 @@ common:
not-data: 暂无数据
refresh: 刷新
layout:
center: 居中
align-left: 居左
align-right: 居右
fallback:
page-not-found: 哎呀!未找到页面
page-not-found-desc: 抱歉,我们无法找到您要找的页面。
@@ -35,23 +62,22 @@ widgets:
notifications: 通知
make-all-as-read: 全部标记为已读
clear-notifications: 清空
search:
search: 搜索
search-navigate: 搜索导航菜单
select: 选择
navigate: 导航
close: 关闭
no-results: 未找到搜索结果
no-recent: 没有搜索历史
recent: 搜索历史
search:
title: 搜索
search-navigate: 搜索导航菜单
select: 选择
navigate: 导航
close: 关闭
no-results: 未找到搜索结果
no-recent: 没有搜索历史
recent: 搜索历史
authentication:
layout-title: 开箱即用的大型中后台管理系统
layout-desc: 工程化、高性能、跨组件库的前端模版
welcome-back: 欢迎回来
page-title: 开箱即用的大型中后台管理系统
page-desc: 工程化、高性能、跨组件库的前端模版
login-success: 登录成功
login-success-desc: 欢迎回来
welcome-back: 欢迎回来
login-subtitle: 请输入您的帐户信息以开始管理您的项目
username: 账号
password: 密码
@@ -89,57 +115,26 @@ authentication:
send-code: 获取验证码
send-text: "{0}秒后重新获取"
third-party-login: 其他登录方式
page:
essentials:
login: 登陆
register: 注册
code-login: 验证码登陆
qrcode-login: 二维码登陆
forget-password: 忘记密码
dashboard:
title: 概览
analytics: 分析页
workspace: 工作台
vben:
about: 关于
document: 文档
outside:
title: 外部页面
embedded: 内嵌
external-link: 外链
nested:
title: 嵌套菜单
menu1: 菜单 1
menu2: 菜单 2
menu21: 菜单 2-1
menu3: 菜单 3
menu31: 菜单 3-1
menu32: 菜单 3-2
menu321: 菜单 3-2-1
fallback:
title: 异常页面
layout:
center: 居中
align-left: 居左
align-right: 居右
preferences:
title: 偏好设置
subtitle: 自定义偏好设置 & 实时预览
reset-tip: 数据有变化,点击可进行重置
# appearance
appearance: 外观
theme-color: 主题色
# layout
layout: 布局
general: 通用
content: 内容
other: 其它
light: 浅色
dark: 深色
dark-menu: 深色菜单
language: 语言
dynamic-title: 动态标题
ai-assistant: Ai 助手
collapse: 折叠菜单
collapse-show-title: 显示菜单名
wide: 流式
compact: 定宽
follow-system: 跟随系统
collapse: 折叠菜单
collapse-show-title: 显示菜单名
vertical: 垂直
vertical-tip: 侧边垂直菜单模式
horizontal: 水平
@@ -151,14 +146,6 @@ preferences:
split-menu: 切割菜单
full-content: 内容全屏
full-content-tip: 不显示任何菜单,只显示内容主体
follow-system: 跟随系统
weak-mode: 色弱模式
gray-mode: 灰色模式
navigation-menu: 导航菜单
navigation-style: 导航菜单风格
navigation-accordion: 侧边导航菜单手风琴模式
navigation-split: 导航菜单分离
navigation-split-tip: 开启时,侧边栏显示顶栏对应菜单的子菜单
interface-control: 界面布局控制
normal: 默认
plain: 朴素
@@ -168,11 +155,24 @@ preferences:
reset-success: 重置偏好设置成功
sidebar: 侧边栏
side-visible: 显示侧边栏
tabs-visible: 显示标签栏
tabs: 标签栏
tabs-icon: 显示标签栏图标
mode: 模式
logo-visible: 显示 Logo
# general
general: 通用
language: 语言
dynamic-title: 动态标题
ai-assistant: Ai 助手
tabbar:
title: 标签栏
enable: 启用标签栏
icon: 显示标签栏图标
navigation-menu:
title: 导航菜单
style: 导航菜单风格
accordion: 侧边导航菜单手风琴模式
split: 导航菜单分离
split-tip: 开启时,侧边栏显示顶栏对应菜单的子菜单
breadcrumb:
title: 面包屑导航
enable: 开启面包屑导航
@@ -188,23 +188,29 @@ preferences:
progress: 页面切换进度条
theme:
title: 主题
builtin: 内置主题
radius: 圆角
default: 默认
violet: 紫罗兰
pink: 樱花粉
rose: 玫瑰红
sky-blue: 天蓝色
deep-blue: 深蓝色
green: 浅绿色
deep-green: 深绿色
orange: 橙黄色
yellow: 柠檬黄
zinc: 锌色灰
neutral: 中性
slate: 石板灰
gray: 中灰
custom: 自定义
light: 浅色
dark: 深色
dark-menu: 深色菜单
weak-mode: 色弱模式
gray-mode: 灰色模式
builtin:
title: 内置主题
default: 默认
violet: 紫罗兰
pink: 樱花粉
rose: 玫瑰红
sky-blue: 天蓝
deep-blue: 深蓝色
green: 浅绿
deep-green: 深绿色
orange: 橙黄色
yellow: 柠檬黄
zinc: 锌色灰
neutral: 中性色
slate: 石板灰
gray: 中灰色
custom: 自定义
header:
title: 顶栏
mode-static: 静止