perf: optimize the naming of locale key

This commit is contained in:
vince
2024-07-10 21:55:16 +08:00
parent 25a1e93ab2
commit 4674380266
59 changed files with 664 additions and 1253 deletions

View File

@@ -35,7 +35,7 @@ const disableItem = computed(() => {
{{ $t('preferences.breadcrumb.enable') }}
</SwitchItem>
<SwitchItem v-model="breadcrumbHideOnlyOne" :disabled="disableItem">
{{ $t('preferences.breadcrumb.hide-only-one') }}
{{ $t('preferences.breadcrumb.hideOnlyOne') }}
</SwitchItem>
<SwitchItem v-model="breadcrumbShowIcon" :disabled="disableItem">
{{ $t('preferences.breadcrumb.icon') }}

View File

@@ -30,10 +30,10 @@ const itemDisabled = computed(() => props.disabled || !copyrightEnable.value);
</SwitchItem>
<InputItem v-model="copyrightCompanyName" :disabled="itemDisabled">
{{ $t('preferences.copyright.company-name') }}
{{ $t('preferences.copyright.companyName') }}
</InputItem>
<InputItem v-model="copyrightCompanySiteLink" :disabled="itemDisabled">
{{ $t('preferences.copyright.company-site-link') }}
{{ $t('preferences.copyright.companySiteLink') }}
</InputItem>
<InputItem v-model="copyrightDate" :disabled="itemDisabled">
{{ $t('preferences.copyright.date') }}
@@ -43,6 +43,6 @@ const itemDisabled = computed(() => props.disabled || !copyrightEnable.value);
{{ $t('preferences.copyright.icp') }}
</InputItem>
<InputItem v-model="copyrightIcpLink" :disabled="itemDisabled">
{{ $t('preferences.copyright.icp-link') }}
{{ $t('preferences.copyright.icpLink') }}
</InputItem>
</template>

View File

@@ -17,19 +17,19 @@ const headerMode = defineModel<LayoutHeaderModeType>('headerMode');
const localeItems: SelectListItem[] = [
{
label: $t('preferences.header.mode-static'),
label: $t('preferences.header.modeStatic'),
value: 'static',
},
{
label: $t('preferences.header.mode-fixed'),
label: $t('preferences.header.modeFixed'),
value: 'fixed',
},
{
label: $t('preferences.header.mode-auto'),
label: $t('preferences.header.modeAuto'),
value: 'auto',
},
{
label: $t('preferences.header.mode-auto-scroll'),
label: $t('preferences.header.modeAutoScroll'),
value: 'auto-scroll',
},
];

View File

@@ -38,27 +38,27 @@ const components: Record<LayoutType, Component> = {
const PRESET = computed((): PresetItem[] => [
{
name: $t('preferences.vertical'),
tip: $t('preferences.vertical-tip'),
tip: $t('preferences.verticalTip'),
type: 'sidebar-nav',
},
{
name: $t('preferences.two-column'),
tip: $t('preferences.two-column-tip'),
name: $t('preferences.twoColumn'),
tip: $t('preferences.twoColumnTip'),
type: 'sidebar-mixed-nav',
},
{
name: $t('preferences.horizontal'),
tip: $t('preferences.vertical-tip'),
tip: $t('preferences.horizontalTip'),
type: 'header-nav',
},
{
name: $t('preferences.mixed-menu'),
tip: $t('preferences.mixed-menu-tip'),
name: $t('preferences.mixedMenu'),
tip: $t('preferences.mixedMenuTip'),
type: 'mixed-nav',
},
{
name: $t('preferences.full-content'),
tip: $t('preferences.full-content-tip'),
name: $t('preferences.fullContent'),
tip: $t('preferences.fullContentTip'),
type: 'full-content',
},
]);

View File

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

View File

@@ -29,7 +29,7 @@ const sidebarCollapsed = defineModel<boolean>('sidebarCollapsed');
v-model="sidebarCollapsedShowTitle"
:disabled="!sidebarEnable || disabled"
>
{{ $t('preferences.sidebar.collapsed-show-title') }}
{{ $t('preferences.sidebar.collapsedShowTitle') }}
</SwitchItem>
<NumberFieldItem
v-model="sidebarWidth"

View File

@@ -18,13 +18,13 @@ const widgetSidebarToggle = defineModel<boolean>('widgetSidebarToggle');
<template>
<SwitchItem v-model="widgetGlobalSearch">
{{ $t('preferences.widget.global-search') }}
{{ $t('preferences.widget.globalSearch') }}
</SwitchItem>
<SwitchItem v-model="widgetThemeToggle">
{{ $t('preferences.widget.theme-toggle') }}
{{ $t('preferences.widget.themeToggle') }}
</SwitchItem>
<SwitchItem v-model="widgetLanguageToggle">
{{ $t('preferences.widget.language-toggle') }}
{{ $t('preferences.widget.languageToggle') }}
</SwitchItem>
<SwitchItem v-model="widgetFullscreen">
{{ $t('preferences.widget.fullscreen') }}
@@ -33,9 +33,9 @@ const widgetSidebarToggle = defineModel<boolean>('widgetSidebarToggle');
{{ $t('preferences.widget.notification') }}
</SwitchItem>
<SwitchItem v-model="widgetAiAssistant">
{{ $t('preferences.widget.ai-assistant') }}
{{ $t('preferences.widget.aiAssistant') }}
</SwitchItem>
<SwitchItem v-model="widgetSidebarToggle">
{{ $t('preferences.widget.sidebar-toggle') }}
{{ $t('preferences.widget.sidebarToggle') }}
</SwitchItem>
</template>