From a932378851090c55fe6cb1602620fde59fcdcb9a Mon Sep 17 00:00:00 2001 From: naskya Date: Mon, 16 Oct 2023 08:46:26 +0900 Subject: [PATCH] fix: properly use singular/plural --- README.md | 2 + locales/en-US.yml | 8 +++- locales/ja-JP.yml | 4 ++ locales/zh-CN.yml | 4 ++ locales/zh-TW.yml | 4 ++ .../client/src/components/MkNoteDetailed.vue | 46 ++++++++++++++----- 6 files changed, 54 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 5dc53be4..7f1b8f81 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,8 @@ ## 細かい変更点 +- まだマージされていない本家 Firefish へのマージリクエストを独断で取り込み + - 投稿ページのタブに表示される英単語の単数形・複数形を正しくする ([MR](https://git.joinfirefish.org/firefish/firefish/-/merge_requests/10621)) - リアクションの履歴を公開する設定をデフォルトで有効に - 私がみんなのリアクションを見たいと思っているため - もちろん設定から無効にできます diff --git a/locales/en-US.yml b/locales/en-US.yml index d2fc86e6..74ff01b4 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -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" diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 8b937ccb..38bb79e5 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -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: "ピッカーに表示するリアクション" diff --git a/locales/zh-CN.yml b/locales/zh-CN.yml index 27390cc5..6da086ea 100644 --- a/locales/zh-CN.yml +++ b/locales/zh-CN.yml @@ -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: "在回应选择器中显示的回应" diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml index 17d8ddc5..1f7258c4 100644 --- a/locales/zh-TW.yml +++ b/locales/zh-TW.yml @@ -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: "在選擇器中顯示反應" diff --git a/packages/client/src/components/MkNoteDetailed.vue b/packages/client/src/components/MkNoteDetailed.vue index 662efb92..cbe21df0 100644 --- a/packages/client/src/components/MkNoteDetailed.vue +++ b/packages/client/src/components/MkNoteDetailed.vue @@ -36,30 +36,47 @@ @@ -190,6 +207,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 () => {