commit: d31a7594e748f1c9379a43568159bc9bafaf8c32
parent 0f20d0b0b0b8966ec10c372cfef03971c835a3fb
Author: HJ <30-hj@users.noreply.git.pleroma.social>
Date: Thu, 26 Dec 2024 23:46:18 +0000
Merge branch 'tusooa/1222-in-reply-to' into 'develop'
Make in-reply-to i18n-friendly
Closes #1222
See merge request pleroma/pleroma-fe!1749
Diffstat:
2 files changed, 49 insertions(+), 34 deletions(-)
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
@@ -311,44 +311,57 @@
v-if="isReply"
class="glued-label reply-glued-label"
>
- <StatusPopover
- v-if="!isPreview"
- :status-id="status.parent_visible && status.in_reply_to_status_id"
- class="reply-to-popover"
- style="min-width: 0;"
- :class="{ '-strikethrough': !status.parent_visible }"
+ <i18n-t
+ keypath="status.reply_to_with_arg"
>
- <button
- class="button-unstyled reply-to"
- :aria-label="$t('tool_tip.reply')"
- @click.prevent="gotoOriginal(status.in_reply_to_status_id)"
- >
- <FAIcon
- class="fa-scale-110 fa-old-padding"
- icon="reply"
- flip="horizontal"
- />
- {{ ' ' }}
+ <template #replyToWithIcon>
+ <StatusPopover
+ v-if="!isPreview"
+ :status-id="status.parent_visible && status.in_reply_to_status_id"
+ class="reply-to-popover"
+ style="min-width: 0"
+ :class="{ '-strikethrough': !status.parent_visible }"
+ >
+ <button
+ class="button-unstyled reply-to"
+ :aria-label="$t('tool_tip.reply')"
+ @click.prevent="gotoOriginal(status.in_reply_to_status_id)"
+ >
+ <i18n-t keypath="status.reply_to_with_icon">
+ <template #icon>
+ <FAIcon
+ class="fa-scale-110 fa-old-padding"
+ icon="reply"
+ flip="horizontal"
+ />
+ </template>
+ <template #replyTo>
+ <span
+ class="reply-to-text"
+ >
+ {{ $t('status.reply_to') }}
+ </span>
+ </template>
+ </i18n-t>
+ </button>
+ </StatusPopover>
+
<span
- class="reply-to-text"
+ v-else
+ class="reply-to-no-popover"
>
- {{ $t('status.reply_to') }}
+ <span class="reply-to-text">{{ $t('status.reply_to') }}</span>
</span>
- </button>
- </StatusPopover>
-
- <span
- v-else
- class="reply-to-no-popover"
- >
- <span class="reply-to-text">{{ $t('status.reply_to') }}</span>
- </span>
- <MentionLink
- :content="replyToName"
- :url="replyProfileLink"
- :user-id="status.in_reply_to_user_id"
- :user-screen-name="status.in_reply_to_screen_name"
- />
+ </template>
+ <template #user>
+ <MentionLink
+ :content="replyToName"
+ :url="replyProfileLink"
+ :user-id="status.in_reply_to_user_id"
+ :user-screen-name="status.in_reply_to_screen_name"
+ />
+ </template>
+ </i18n-t>
</span>
<!-- This little wrapper is made for sole purpose of "gluing" -->
diff --git a/src/i18n/en.json b/src/i18n/en.json
@@ -1218,6 +1218,8 @@
"delete_confirm_accept_button": "Delete",
"delete_confirm_cancel_button": "Keep",
"reply_to": "Reply to",
+ "reply_to_with_icon": "{icon} {replyTo}",
+ "reply_to_with_arg": "{replyToWithIcon} {user}",
"mentions": "Mentions",
"replies_list": "Replies:",
"replies_list_with_others": "Replies (+{numReplies} other): | Replies (+{numReplies} others):",