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>
<article flex flex-col gap-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" />
</div>
<StatusCard v-if="conversation.lastStatus" :status="conversation.lastStatus" :actions="false" />

View file

@ -17,12 +17,12 @@ const originalUrl = computed(() => {
<template>
<CommonNotFound>
<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">
<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 />
Try original site
{{ $t('status.try_original_site') }}
</button>
</NuxtLink>
</div>

View file

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

View file

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