refactor: i18n

zio/stable
Anthony Fu 2022-11-30 05:50:13 +08:00
parent 59e365591d
commit cf63bce459
11 changed files with 18 additions and 10 deletions

View File

@ -220,7 +220,7 @@ const onKeyDown = (e: KeyboardEvent) => {
:class="active === cmd.index ? 'opacity-100' : 'opacity-0'"
>
<div class="text-xs text-secondary">
Complete
{{ $t('command.complete') }}
</div>
<CommandKey name="Tab" />
</div>
@ -230,7 +230,7 @@ const onKeyDown = (e: KeyboardEvent) => {
:class="active === cmd.index ? 'opacity-100' : 'opacity-0'"
>
<div class="text-xs text-secondary">
Activate
{{ $t('command.activate') }}
</div>
<CommandKey name="Enter" />
</div>

View File

@ -21,11 +21,18 @@
"save_changes": "Save changes",
"sign_in": "Sign in"
},
"command": {
"activate": "Activate",
"complete": "Complete"
},
"common": {
"end_of_list": "End of the list",
"error": "ERROR",
"not_found": "404 Not Found"
},
"error": {
"account_not_found": "Account {0} not found"
},
"feature_flag": {
"virtual_scroll": "Virtual Scrolling"
},

View File

@ -31,7 +31,7 @@ onReactivated(() => {
</template>
<CommonNotFound v-else>
Account @{{ accountName }} not found
{{ $t('error.account_not_found', [`@${accountName}`]) }}
</CommonNotFound>
</MainContent>
</template>

View File

@ -13,7 +13,7 @@ useHead({
<template>
<MainContent back>
<template #title>
<span text-lg font-bold>Blocked users</span>
<span text-lg font-bold>{{ $t('account.blocked_users') }}</span>
</template>
<AccountPaginator :paginator="paginator" />
</MainContent>

View File

@ -17,7 +17,7 @@ const unblock = async (domain: string) => {
<template>
<MainContent back>
<template #title>
<span text-lg font-bold>Blocked domains</span>
<span text-lg font-bold>{{ $t('account.blocked_domains') }}</span>
</template>
<CommonPaginator :paginator="paginator">

View File

@ -13,7 +13,7 @@ useHead({
<template>
<MainContent back>
<template #title>
<span text-lg font-bold>Muted users</span>
<span text-lg font-bold>{{ $t('account.muted_users') }}</span>
</template>
<AccountPaginator :paginator="paginator" />
</MainContent>

View File

@ -4,9 +4,10 @@ definePageMeta({
})
const paginator = useMasto().accounts.getStatusesIterable(currentUser.value!.account.id, { pinned: true })
const { t } = useI18n()
useHead({
title: 'Pinned',
title: () => t('account.pinned'),
})
</script>
@ -14,7 +15,7 @@ useHead({
<MainContent>
<template #title>
<div i-ri:pushpin-line h-6 mr-1 />
<span>Pinned</span>
<span>{{ t('account.pinned') }}</span>
</template>
<TimelinePaginator :paginator="paginator" />

View File

@ -6,7 +6,7 @@ onBeforeUnmount(() => stream.disconnect())
const { t } = useI18n()
useHead({
title: () => t('nav_side.federated'),
title: () => t('title.federated_timeline'),
})
</script>

View File

@ -6,7 +6,7 @@ onBeforeUnmount(() => stream.disconnect())
const { t } = useI18n()
useHead({
title: () => t('nav_side.local'),
title: () => t('title.local_timeline'),
})
</script>