refactor: reconstruct language files into multi-file structures (#4683)

* refactor: reconstruct language files into multi-file structures

* chore: typo
This commit is contained in:
Vben
2024-10-19 14:28:21 +08:00
committed by GitHub
parent d1ca09c7bb
commit 0df8c5c02c
93 changed files with 1707 additions and 1514 deletions

View File

@@ -123,12 +123,12 @@ onUnmounted(() => {
:cancel-text="$t('common.cancel')"
:confirm-text="$t('common.refresh')"
:fullscreen-button="false"
:title="$t('widgets.checkUpdatesTitle')"
:title="$t('ui.widgets.checkUpdatesTitle')"
centered
content-class="px-8 min-h-10"
footer-class="border-none mb-3 mr-3"
header-class="border-none"
>
{{ $t('widgets.checkUpdatesDescription') }}
{{ $t('ui.widgets.checkUpdatesDescription') }}
</UpdateNoticeModal>
</template>

View File

@@ -102,7 +102,7 @@ onMounted(() => {
<input
ref="searchInputRef"
v-model="keyword"
:placeholder="$t('widgets.search.searchNavigate')"
:placeholder="$t('ui.widgets.search.searchNavigate')"
class="ring-none placeholder:text-muted-foreground w-[80%] rounded-md border border-none bg-transparent p-2 pl-0 text-sm font-normal outline-none ring-0 ring-offset-transparent focus-visible:ring-transparent"
/>
</div>
@@ -113,16 +113,16 @@ onMounted(() => {
<div class="flex w-full justify-start text-xs">
<div class="mr-2 flex items-center">
<CornerDownLeft class="mr-1 size-3" />
{{ $t('widgets.search.select') }}
{{ $t('ui.widgets.search.select') }}
</div>
<div class="mr-2 flex items-center">
<ArrowUp class="mr-1 size-3" />
<ArrowDown class="mr-1 size-3" />
{{ $t('widgets.search.navigate') }}
{{ $t('ui.widgets.search.navigate') }}
</div>
<div class="flex items-center">
<MdiKeyboardEsc class="mr-1 size-3" />
{{ $t('widgets.search.close') }}
{{ $t('ui.widgets.search.close') }}
</div>
</div>
</template>
@@ -137,7 +137,7 @@ onMounted(() => {
<span
class="text-muted-foreground group-hover:text-foreground hidden text-xs duration-300 md:block"
>
{{ $t('widgets.search.title') }}
{{ $t('ui.widgets.search.title') }}
</span>
<span
v-if="enableShortcutKey"

View File

@@ -230,7 +230,7 @@ onMounted(() => {
>
<SearchX class="mx-auto mt-4 size-12" />
<p class="mb-10 mt-6 text-xs">
{{ $t('widgets.search.noResults') }}
{{ $t('ui.widgets.search.noResults') }}
<span class="text-foreground text-sm font-medium">
"{{ keyword }}"
</span>
@@ -242,7 +242,7 @@ onMounted(() => {
class="text-muted-foreground text-center"
>
<p class="my-10 text-xs">
{{ $t('widgets.search.noRecent') }}
{{ $t('ui.widgets.search.noRecent') }}
</p>
</div>
@@ -251,7 +251,7 @@ onMounted(() => {
v-if="searchHistory.length > 0 && !keyword"
class="text-muted-foreground mb-2 text-xs"
>
{{ $t('widgets.search.recent') }}
{{ $t('ui.widgets.search.recent') }}
</li>
<li
v-for="(item, index) in uniqueByField(searchResults, 'path')"

View File

@@ -42,14 +42,14 @@ const [Form, { resetForm, validate }] = useVbenForm(
{
component: 'VbenInputPassword' as const,
componentProps: {
placeholder: $t('widgets.lockScreen.placeholder'),
placeholder: $t('ui.widgets.lockScreen.placeholder'),
},
fieldName: 'lockScreenPassword',
formFieldProps: { validateOnBlur: false },
label: $t('authentication.password'),
rules: z
.string()
.min(1, { message: $t('widgets.lockScreen.placeholder') }),
.min(1, { message: $t('ui.widgets.lockScreen.placeholder') }),
},
]),
showDefaultActions: false,
@@ -79,7 +79,7 @@ async function handleSubmit() {
<Modal
:footer="false"
:fullscreen-button="false"
:title="$t('widgets.lockScreen.title')"
:title="$t('ui.widgets.lockScreen.title')"
>
<div
class="mb-10 flex w-full flex-col items-center px-10"
@@ -98,7 +98,7 @@ async function handleSubmit() {
</div>
<Form />
<VbenButton class="mt-1 w-full" @click="handleSubmit">
{{ $t('widgets.lockScreen.screenButton') }}
{{ $t('ui.widgets.lockScreen.screenButton') }}
</VbenButton>
</div>
</div>

View File

@@ -46,7 +46,7 @@ const [Form, { form, validate }] = useVbenForm(
{
component: 'VbenInputPassword' as const,
componentProps: {
placeholder: $t('widgets.lockScreen.placeholder'),
placeholder: $t('ui.widgets.lockScreen.placeholder'),
},
fieldName: 'password',
label: $t('authentication.password'),
@@ -90,7 +90,7 @@ useScrollLock();
<LockKeyhole
class="size-5 transition-all duration-300 group-hover:scale-125"
/>
<span>{{ $t('widgets.lockScreen.unlock') }}</span>
<span>{{ $t('ui.widgets.lockScreen.unlock') }}</span>
</div>
<div class="flex h-full justify-center px-[10%]">
<div
@@ -123,14 +123,14 @@ useScrollLock();
<Form />
</div>
<VbenButton class="enter-x w-full" @click="handleSubmit">
{{ $t('widgets.lockScreen.entry') }}
{{ $t('ui.widgets.lockScreen.entry') }}
</VbenButton>
<VbenButton
class="enter-x my-2 w-full"
variant="ghost"
@click="$emit('toLogin')"
>
{{ $t('widgets.lockScreen.backToLogin') }}
{{ $t('ui.widgets.lockScreen.backToLogin') }}
</VbenButton>
<VbenButton
class="enter-x mr-2 w-full"

View File

@@ -79,10 +79,10 @@ function handleClick(item: NotificationItem) {
<div class="relative">
<div class="flex items-center justify-between p-4 py-3">
<div class="text-foreground">{{ $t('widgets.notifications') }}</div>
<div class="text-foreground">{{ $t('ui.widgets.notifications') }}</div>
<VbenIconButton
:disabled="notifications.length <= 0"
:tooltip="$t('widgets.markAllAsRead')"
:tooltip="$t('ui.widgets.markAllAsRead')"
@click="handleMakeAll"
>
<MailCheck class="size-4" />
@@ -138,10 +138,10 @@ function handleClick(item: NotificationItem) {
variant="ghost"
@click="handleClear"
>
{{ $t('widgets.clearNotifications') }}
{{ $t('ui.widgets.clearNotifications') }}
</VbenButton>
<VbenButton size="sm" @click="handleViewAll">
{{ $t('widgets.viewAll') }}
{{ $t('ui.widgets.viewAll') }}
</VbenButton>
</div>
</div>

View File

@@ -44,7 +44,7 @@ const altView = computed(() => (isWindowsOs() ? 'Alt' : '⌥'));
<template #shortcut> {{ altView }} , </template>
</SwitchItem> -->
<SwitchItem v-model="shortcutKeysLockScreen" :disabled="!shortcutKeysEnable">
{{ $t('widgets.lockScreen.title') }}
{{ $t('ui.widgets.lockScreen.title') }}
<template #shortcut> {{ altView }} L </template>
</SwitchItem>
</template>

View File

@@ -152,7 +152,7 @@ if (enableShortcutKey.value) {
footer-class="border-none mb-3 mr-3"
header-class="border-none"
>
{{ $t('widgets.logoutTip') }}
{{ $t('ui.widgets.logoutTip') }}
</LogoutModal>
<DropdownMenu>
@@ -206,7 +206,7 @@ if (enableShortcutKey.value) {
@click="handleOpenLock"
>
<LockKeyhole class="mr-2 size-4" />
{{ $t('widgets.lockScreen.title') }}
{{ $t('ui.widgets.lockScreen.title') }}
<DropdownMenuShortcut v-if="enableLockScreenShortcutKey">
{{ altView }} L
</DropdownMenuShortcut>