feat(i18n): improve translations (#219)

Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
Co-authored-by: 沈青川 <46062972+ShenQingchuan@users.noreply.github.com>
This commit is contained in:
Alex 2022-11-29 18:55:28 +08:00 committed by GitHub
parent 8df22b8a3f
commit 09f80f291b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 103 additions and 44 deletions

View file

@ -117,39 +117,19 @@ const toggleBlockDomain = async () => {
<template v-else>
<NuxtLink to="/pinned">
<CommonDropdownItem
text="Pinned"
icon="i-ri:pushpin-line"
:command="command"
/>
<CommonDropdownItem :text="$t('account.pinned')" icon="i-ri:pushpin-line" :command="command" />
</NuxtLink>
<NuxtLink to="/favourites">
<CommonDropdownItem
text="Favourites"
icon="i-ri:heart-3-line"
:command="command"
/>
<CommonDropdownItem :text="$t('account.favourites')" icon="i-ri:heart-3-line" :command="command" />
</NuxtLink>
<NuxtLink to="/mutes">
<CommonDropdownItem
text="Muted users"
icon="i-ri:volume-mute-line"
:command="command"
/>
<CommonDropdownItem :text="$t('account.muted_users')" icon="i-ri:volume-mute-line" :command="command" />
</NuxtLink>
<NuxtLink to="/blocks">
<CommonDropdownItem
text="Blocked users"
icon="i-ri:forbid-2-line"
:command="command"
/>
<CommonDropdownItem :text="$t('account.blocked_users')" icon="i-ri:forbid-2-line" :command="command" />
</NuxtLink>
<NuxtLink to="/domain_blocks">
<CommonDropdownItem
text="Blocked domains"
icon="i-ri:shut-down-line"
:command="command"
/>
<CommonDropdownItem text="$t('account.blocked_domains')" icon="i-ri:shut-down-line" :command="command" />
</NuxtLink>
</template>
</template>

View file

@ -2,7 +2,7 @@
<div flex="~ col" items-center>
<div i-ri:forbid-line text-10 mt10 mb2 />
<div text-lg>
<slot>404 Not Found</slot>
<slot>{{ $t('common.not_found') }}</slot>
</div>
</div>
</template>

View file

@ -55,10 +55,10 @@ const { items, prevItems, update, state, endAnchor, error } = usePaginator(pagin
</div>
</slot>
<div v-else-if="state === 'done'" p5 text-secondary italic text-center>
End of the list
{{ $t('common.end_of_list') }}
</div>
<div v-else-if="state === 'error'" p5 text-secondary>
ERROR: {{ error }}
{{ $t('common.error') }}: {{ error }}
</div>
</div>
</template>

View file

@ -12,7 +12,7 @@ const { notification } = defineProps<{
<div flex ml-4 items-center>
<div i-ri:user-follow-fill mr-3 color-primary />
<AccountInlineInfo :account="notification.account" mr1 />
followed you
{{ $t('notification.followed_you') }}
</div>
<AccountCard :account="notification.account" p3 />
</template>
@ -20,7 +20,7 @@ const { notification } = defineProps<{
<div flex ml-4 items-center>
<div i-ri:user-follow-fill mr-3 />
<AccountInlineInfo :account="notification.account" mr1 />
requested to follow you
{{ $t('notification.request_to_follow') }}
</div>
<!-- TODO: accept request -->
<AccountCard :account="notification.account" p3 />
@ -29,7 +29,7 @@ const { notification } = defineProps<{
<div flex ml-4 items-center>
<div i-ri:heart-fill mr-3 color-red />
<AccountInlineInfo :account="notification.account" mr1 />
favourited your post
{{ $t('notification.favourited_post') }}
</div>
<StatusCard :status="notification.status!" p3 />
</template>
@ -37,7 +37,7 @@ const { notification } = defineProps<{
<div flex ml-4 items-center>
<div i-ri:repeat-fill mr-3 color-green />
<AccountInlineInfo :account="notification.account" mr1 />
reblogged your post
{{ $t('notification.reblogged_post') }}
</div>
<StatusCard :status="notification.status!" p3 />
</template>
@ -45,7 +45,7 @@ const { notification } = defineProps<{
<div flex ml-4 items-center>
<div i-ri:edit-2-fill mr-3 text-secondary />
<AccountInlineInfo :account="notification.account" mr1 />
updated their status
{{ $t('notification.update_status') }}
</div>
<StatusCard :status="notification.status!" p3 />
</template>
@ -54,7 +54,7 @@ const { notification } = defineProps<{
</template>
<template v-else>
<div text-red font-bold>
[DEV] MISSING notification.type: '{{ notification.type }}'
[DEV] {{ $t('notification.missing_type') }} '{{ notification.type }}'
</div>
</template>
</article>

View file

@ -18,7 +18,7 @@ async function handleInput() {
<template>
<form text-center justify-center items-center flex="~ col gap2" @submit.prevent="oauth">
<div text-3xl mb2>
Sign in
{{ $t('action.sign_in') }}
</div>
<div>Mastodon Server Name</div>
<div flex bg-gray:10 px2 py1 mxa rounded border="~ border" text-xl items-center>
@ -26,7 +26,7 @@ async function handleInput() {
<input v-model="server" :placeholder="DEFAULT_SERVER" outline-none bg-transparent @input="handleInput">
</div>
<button btn-solid mt2>
Sign in
{{ $t('action.sign_in') }}
</button>
</form>
</template>

View file

@ -1,10 +1,10 @@
<template>
<div p8 flex="~ col gap4">
<div text-sm text-secondary>
Sign in to follow profiles or hashtags, favourite, share and reply to posts, or interact from your account on a different server.
{{ $t('nav_user.sign_in_desc') }}
</div>
<button class="btn-solid text-center" @click="openSigninDialog()">
Sign in
{{ $t('action.sign_in') }}
</button>
</div>
</template>