1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-09-06 20:29:08 +01:00

i18n: improve

This commit is contained in:
三咲智子 2022-12-01 21:59:28 +08:00
parent 335fc9f64b
commit 3485208929
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
7 changed files with 40 additions and 19 deletions

View file

@ -9,7 +9,7 @@ const props = defineProps<{
<template> <template>
<article flex flex-col gap-2> <article flex flex-col gap-2>
<div flex gap-2 flex-wrap text-sm px-2> <div flex gap-2 flex-wrap text-sm px-2>
with {{ $t('conversation.with') }}
<AccountInlineInfo v-for="account in conversation.accounts" :key="account.id" :account="account" /> <AccountInlineInfo v-for="account in conversation.accounts" :key="account.id" :account="account" />
</div> </div>
<StatusCard v-if="conversation.lastStatus" :status="conversation.lastStatus" :actions="false" /> <StatusCard v-if="conversation.lastStatus" :status="conversation.lastStatus" :actions="false" />

View file

@ -17,12 +17,12 @@ const originalUrl = computed(() => {
<template> <template>
<CommonNotFound> <CommonNotFound>
<div flex="~ col center gap2"> <div flex="~ col center gap2">
<div>Status not found</div> <div>{{ $t('error.status_not_found') }}</div>
<NuxtLink v-if="originalUrl" :to="originalUrl" target="_blank"> <NuxtLink v-if="originalUrl" :to="originalUrl" target="_blank">
<button btn-solid flex="~ center gap-2" px2 py1> <button btn-solid flex="~ center gap-2" text-sm px2 py1>
<div i-ri:arrow-right-up-line /> <div i-ri:arrow-right-up-line />
Try original site {{ $t('status.try_original_site') }}
</button> </button>
</NuxtLink> </NuxtLink>
</div> </div>

View file

@ -21,8 +21,9 @@ const showHistory = (edit: StatusEdit) => {
@click="showHistory(edit)" @click="showHistory(edit)"
> >
{{ getDisplayName(edit.account) }} {{ getDisplayName(edit.account) }}
{{ idx === statusEdits.length - 1 ? 'created' : 'edited' }} <i18n-t :keypath="`status_history.${idx === statusEdits.length - 1 ? 'created' : 'edited'}`">
{{ useTimeAgo(edit.createdAt, { showSecond: true }).value }} {{ useTimeAgo(edit.createdAt, { showSecond: true }).value }}
</i18n-t>
</CommonDropdownItem> </CommonDropdownItem>
</template> </template>
<template v-else> <template v-else>

View file

@ -27,7 +27,7 @@ const formatted = useFormattedDateTime(editedAt)
<template #popper> <template #popper>
<div text-sm p2> <div text-sm p2>
<div text-center mb1> <div text-center mb1>
Edited {{ formatted }} {{ $t('status.edited', [formatted]) }}
</div> </div>
<StatusEditHistory :status="status" /> <StatusEditHistory :status="status" />
</div> </div>

View file

@ -43,8 +43,12 @@
"not_found": "404 Not Found", "not_found": "404 Not Found",
"offline_desc": "Seems like you are offline. Please check your network connection." "offline_desc": "Seems like you are offline. Please check your network connection."
}, },
"conversation": {
"with": "with"
},
"error": { "error": {
"account_not_found": "Account {0} not found" "account_not_found": "Account {0} not found",
"status_not_found": "Status not found"
}, },
"feature_flag": { "feature_flag": {
"virtual_scroll": "Virtual Scrolling" "virtual_scroll": "Virtual Scrolling"
@ -113,9 +117,15 @@
"uploading": "Uploading..." "uploading": "Uploading..."
}, },
"status": { "status": {
"edited": "Edited {0}",
"reblogged": "{0} reblogged", "reblogged": "{0} reblogged",
"spoiler_show_less": "Show less", "spoiler_show_less": "Show less",
"spoiler_show_more": "Show more" "spoiler_show_more": "Show more",
"try_original_site": "Try original site"
},
"status_history": {
"created": "created {0}",
"edited": "edited {0}"
}, },
"tab": { "tab": {
"media": "Media", "media": "Media",

View file

@ -1,7 +1,7 @@
{ {
"account": { "account": {
"blocked_users": "ブロックしたユーザー",
"blocked_domains": "ブロックしたドメイン", "blocked_domains": "ブロックしたドメイン",
"blocked_users": "ブロックしたユーザー",
"favourites": "お気に入り", "favourites": "お気に入り",
"follow": "フォローする", "follow": "フォローする",
"follow_back": "フォローバックする", "follow_back": "フォローバックする",
@ -10,8 +10,8 @@
"following_count": "{0} フォロー中", "following_count": "{0} フォロー中",
"follows_you": "フォローされています", "follows_you": "フォローされています",
"muted_users": "ミュート済み", "muted_users": "ミュート済み",
"posts_count": "{0} 投稿",
"pinned": "固定された投稿", "pinned": "固定された投稿",
"posts_count": "{0} 投稿",
"unfollow": "フォロー解除" "unfollow": "フォロー解除"
}, },
"action": { "action": {
@ -22,9 +22,9 @@
"sign_in": "サインイン" "sign_in": "サインイン"
}, },
"common": { "common": {
"not_found": "404 Not Found",
"end_of_list": "他にはありません", "end_of_list": "他にはありません",
"error": "ERROR" "error": "ERROR",
"not_found": "404 Not Found"
}, },
"feature_flag": { "feature_flag": {
"virtual_scroll": "仮想スクロール" "virtual_scroll": "仮想スクロール"
@ -61,12 +61,12 @@
"sign_in_desc": "サインインすると、アカウントやハッシュタグをフォローしたり、お気に入りしたり、投稿を共有したり返信するほか、異なるサーバー上のあなたのアカウントから交流できます。" "sign_in_desc": "サインインすると、アカウントやハッシュタグをフォローしたり、お気に入りしたり、投稿を共有したり返信するほか、異なるサーバー上のあなたのアカウントから交流できます。"
}, },
"notification": { "notification": {
"followed_you": "さんがあなたをフォローしました",
"request_to_follow": "さんがあなたへフォローをリクエストしました",
"favourited_post": "さんがあなたの投稿お気に入り登録しました", "favourited_post": "さんがあなたの投稿お気に入り登録しました",
"followed_you": "さんがあなたをフォローしました",
"missing_type": "MISSING notification.type:",
"reblogged_post": "さんがあなたの投稿をブーストしました", "reblogged_post": "さんがあなたの投稿をブーストしました",
"update_status": "さんが投稿を更新しました", "request_to_follow": "さんがあなたへフォローをリクエストしました",
"missing_type": "MISSING notification.type:" "update_status": "さんが投稿を更新しました"
}, },
"state": { "state": {
"editing": "編集中", "editing": "編集中",

View file

@ -43,8 +43,12 @@
"not_found": "无法找到相关内容", "not_found": "无法找到相关内容",
"offline_desc": "您目前已离线,请检查网络连接。" "offline_desc": "您目前已离线,请检查网络连接。"
}, },
"conversation": {
"with": "与"
},
"error": { "error": {
"account_not_found": "未找到用户 {0}" "account_not_found": "未找到用户 {0}",
"status_not_found": "未找到帖文"
}, },
"feature_flag": { "feature_flag": {
"virtual_scroll": "虚拟滚动" "virtual_scroll": "虚拟滚动"
@ -112,9 +116,15 @@
"uploading": "上传中..." "uploading": "上传中..."
}, },
"status": { "status": {
"edited": "在 {0} 编辑了",
"reblogged": "{0} 转发了", "reblogged": "{0} 转发了",
"spoiler_show_less": "隐藏", "spoiler_show_less": "隐藏",
"spoiler_show_more": "显示更多" "spoiler_show_more": "显示更多",
"try_original_site": "尝试从源站打开"
},
"status_history": {
"created": "在 {0} 发布了",
"edited": "在 {0} 编辑了"
}, },
"tab": { "tab": {
"media": "媒体", "media": "媒体",