Merge branch 'tusooa/1222-in-reply-to' into 'develop'

Make in-reply-to i18n-friendly

Closes #1222

See merge request pleroma/pleroma-fe!1749
This commit is contained in:
HJ 2024-12-26 23:46:18 +00:00
commit d31a7594e7
2 changed files with 50 additions and 35 deletions

View file

@ -311,11 +311,15 @@
v-if="isReply" v-if="isReply"
class="glued-label reply-glued-label" class="glued-label reply-glued-label"
> >
<i18n-t
keypath="status.reply_to_with_arg"
>
<template #replyToWithIcon>
<StatusPopover <StatusPopover
v-if="!isPreview" v-if="!isPreview"
:status-id="status.parent_visible && status.in_reply_to_status_id" :status-id="status.parent_visible && status.in_reply_to_status_id"
class="reply-to-popover" class="reply-to-popover"
style="min-width: 0;" style="min-width: 0"
:class="{ '-strikethrough': !status.parent_visible }" :class="{ '-strikethrough': !status.parent_visible }"
> >
<button <button
@ -323,17 +327,22 @@
:aria-label="$t('tool_tip.reply')" :aria-label="$t('tool_tip.reply')"
@click.prevent="gotoOriginal(status.in_reply_to_status_id)" @click.prevent="gotoOriginal(status.in_reply_to_status_id)"
> >
<i18n-t keypath="status.reply_to_with_icon">
<template #icon>
<FAIcon <FAIcon
class="fa-scale-110 fa-old-padding" class="fa-scale-110 fa-old-padding"
icon="reply" icon="reply"
flip="horizontal" flip="horizontal"
/> />
{{ ' ' }} </template>
<template #replyTo>
<span <span
class="reply-to-text" class="reply-to-text"
> >
{{ $t('status.reply_to') }} {{ $t('status.reply_to') }}
</span> </span>
</template>
</i18n-t>
</button> </button>
</StatusPopover> </StatusPopover>
@ -343,12 +352,16 @@
> >
<span class="reply-to-text">{{ $t('status.reply_to') }}</span> <span class="reply-to-text">{{ $t('status.reply_to') }}</span>
</span> </span>
</template>
<template #user>
<MentionLink <MentionLink
:content="replyToName" :content="replyToName"
:url="replyProfileLink" :url="replyProfileLink"
:user-id="status.in_reply_to_user_id" :user-id="status.in_reply_to_user_id"
:user-screen-name="status.in_reply_to_screen_name" :user-screen-name="status.in_reply_to_screen_name"
/> />
</template>
</i18n-t>
</span> </span>
<!-- This little wrapper is made for sole purpose of "gluing" --> <!-- This little wrapper is made for sole purpose of "gluing" -->

View file

@ -1218,6 +1218,8 @@
"delete_confirm_accept_button": "Delete", "delete_confirm_accept_button": "Delete",
"delete_confirm_cancel_button": "Keep", "delete_confirm_cancel_button": "Keep",
"reply_to": "Reply to", "reply_to": "Reply to",
"reply_to_with_icon": "{icon} {replyTo}",
"reply_to_with_arg": "{replyToWithIcon} {user}",
"mentions": "Mentions", "mentions": "Mentions",
"replies_list": "Replies:", "replies_list": "Replies:",
"replies_list_with_others": "Replies (+{numReplies} other): | Replies (+{numReplies} others):", "replies_list_with_others": "Replies (+{numReplies} other): | Replies (+{numReplies} others):",