Merge branch 'feat/singular' into 'develop'

fix: properly use singular/plural in MkNoteDetailed tabs

Co-authored-by: naskya <m@naskya.net>

See merge request firefish/firefish!10621
This commit is contained in:
Kainoa Kanter 2023-10-16 17:04:51 +00:00
commit 9339b9423b
5 changed files with 52 additions and 14 deletions

View File

@ -58,6 +58,7 @@ sendMessage: "Send a message"
copyUsername: "Copy username"
searchUser: "Search for a user"
reply: "Reply"
replies: "Replies"
jumpToPrevious: "Jump to previous"
loadMore: "Load more"
showMore: "Show more"
@ -112,18 +113,21 @@ unfollow: "Unfollow"
followRequestPending: "Follow request pending"
enterEmoji: "Enter an emoji"
renote: "Boost"
renotes: "Boosts"
unrenote: "Take back boost"
renoted: "Boosted."
cantRenote: "This post can't be boosted."
cantReRenote: "A boost can't be boosted."
quote: "Quote"
quotes: "Quotes"
pinnedNote: "Pinned post"
pinned: "Pin to profile"
you: "You"
clickToShow: "Click to show"
sensitive: "NSFW"
add: "Add"
reaction: "Reactions"
reaction: "Reaction"
reactions: "Reactions"
removeReaction: "Remove your reaction"
enableEmojiReactions: "Enable emoji reactions"
showEmojisInReactionNotifications: "Show emojis in reaction notifications"
@ -739,6 +743,7 @@ system: "System"
switchUi: "Layout"
desktop: "Desktop"
clip: "Clip"
clips: "Clips"
createNew: "Create new"
optional: "Optional"
createNewClip: "Create new clip"
@ -781,7 +786,6 @@ pageLikesCount: "Number of liked Pages"
pageLikedCount: "Number of received Page likes"
contact: "Contact"
useSystemFont: "Use the system's default font"
clips: "Clips"
clipsDesc: "Clips are like share-able categorized bookmarks. You can create clips
from the menu of individual posts."
experimentalFeatures: "Experimental features"

View File

@ -52,6 +52,7 @@ sendMessage: "メッセージを送信"
copyUsername: "ユーザー名をコピー"
searchUser: "ユーザーを検索"
reply: "返信"
replies: "返信"
loadMore: "もっと読み込む"
showMore: "もっと見る"
showLess: "閉じる"
@ -97,11 +98,13 @@ unfollow: "フォロー解除"
followRequestPending: "フォロー許可待ち"
enterEmoji: "絵文字を入力"
renote: "ブースト"
renotes: "ブースト"
unrenote: "ブースト解除"
renoted: "ブーストしました。"
cantRenote: "この投稿はブーストできません。"
cantReRenote: "ブーストをブーストすることはできません。"
quote: "引用"
quotes: "引用"
pinnedNote: "ピン留めされた投稿"
pinned: "ピン留め"
you: "あなた"
@ -109,6 +112,7 @@ clickToShow: "クリックして表示"
sensitive: "閲覧注意"
add: "追加"
reaction: "リアクション"
reactions: "リアクション"
enableEmojiReactions: "絵文字リアクションを有効にする"
showEmojisInReactionNotifications: "自分の投稿に対するリアクションの通知で絵文字を表示する"
reactionSetting: "ピッカーに表示するリアクション"

View File

@ -49,6 +49,7 @@ sendMessage: "发送"
copyUsername: "复制用户名"
searchUser: "搜索用户"
reply: "回复"
replies: "回复"
loadMore: "加载更多"
showMore: "查看更多"
showLess: "关闭"
@ -94,11 +95,13 @@ unfollow: "取消关注"
followRequestPending: "关注请求待批准"
enterEmoji: "输入表情符号"
renote: "转发"
renotes: "转发"
unrenote: "取消转发"
renoted: "已转发。"
cantRenote: "此帖子无法被转发。"
cantReRenote: "转发无法被再次转发。"
quote: "引用"
quotes: "引用"
pinnedNote: "已置顶的帖子"
pinned: "置顶"
you: "您"
@ -106,6 +109,7 @@ clickToShow: "点击以显示"
sensitive: "敏感内容"
add: "添加"
reaction: "回应"
reactions: "回应"
enableEmojiReaction: "启用表情符号回应"
showEmojisInReactionNotifications: "在回应通知中显示表情符号"
reactionSetting: "在回应选择器中显示的回应"

View File

@ -49,6 +49,7 @@ sendMessage: "發送訊息"
copyUsername: "複製使用者名稱"
searchUser: "搜尋使用者"
reply: "回覆"
replies: "回覆"
loadMore: "載入更多"
showMore: "載入更多"
showLess: "關閉"
@ -94,11 +95,13 @@ unfollow: "取消追隨"
followRequestPending: "追隨許可批准中"
enterEmoji: "輸入表情符號"
renote: "轉發"
renotes: "轉發"
unrenote: "取消轉發"
renoted: "已轉發。"
cantRenote: "無法轉發此貼文。"
cantReRenote: "無法轉發之前已經轉發過的內容。"
quote: "引用"
quotes: "引用"
pinnedNote: "已置頂的貼文"
pinned: "置頂"
you: "您"
@ -106,6 +109,7 @@ clickToShow: "按一下以顯示"
sensitive: "敏感內容"
add: "新增"
reaction: "反應"
reactions: "反應"
enableEmojiReaction: "啟用表情符號反應"
showEmojisInReactionNotifications: "在反應通知中顯示表情符號"
reactionSetting: "在選擇器中顯示反應"

View File

@ -36,30 +36,47 @@
<MkTab v-model="tab" :style="'underline'" @update:modelValue="loadTab">
<option value="replies">
<!-- <i class="ph-arrow-u-up-left ph-bold ph-lg"></i> -->
<span v-if="note.repliesCount > 0" class="count">{{
note.repliesCount
}}</span>
{{ i18n.ts._notification._types.reply }}
{{
wordWithCount(
note.repliesCount,
i18n.ts.reply,
i18n.ts.replies,
)
}}
</option>
<option v-if="note.renoteCount > 0" value="renotes">
<!-- <i class="ph-rocket-launch ph-bold ph-lg"></i> -->
<span class="count">{{ note.renoteCount }}</span>
{{ i18n.ts._notification._types.renote }}
{{
wordWithCount(
note.renoteCount,
i18n.ts.renote,
i18n.ts.renotes,
)
}}
</option>
<option v-if="reactionsCount > 0" value="reactions">
<!-- <i class="ph-smiley ph-bold ph-lg"></i> -->
<span class="count">{{ reactionsCount }}</span>
{{ i18n.ts.reaction }}
{{
wordWithCount(
reactionsCount,
i18n.ts.reaction,
i18n.ts.reactions,
)
}}
</option>
<option v-if="directQuotes?.length > 0" value="quotes">
<!-- <i class="ph-quotes ph-bold ph-lg"></i> -->
<span class="count">{{ directQuotes.length }}</span>
{{ i18n.ts._notification._types.quote }}
{{
wordWithCount(
directQuotes.length,
i18n.ts.quote,
i18n.ts.quotes,
)
}}
</option>
<option v-if="clips?.length > 0" value="clips">
<!-- <i class="ph-paperclip ph-bold ph-lg"></i> -->
<span class="count">{{ clips.length }}</span>
{{ i18n.ts.clips }}
{{ wordWithCount(clips.length, i18n.ts.clip, i18n.ts.clips) }}
</option>
</MkTab>
@ -191,6 +208,11 @@ const softMuteReasonI18nSrc = (what?: string) => {
return i18n.ts.userSaysSomething;
};
const wordWithCount = (count: number, singular: string, plural: string) => {
if (count === 0) return plural;
return `${count} ${count === 1 ? singular : plural}`;
};
// plugin
if (noteViewInterruptors.length > 0) {
onMounted(async () => {