Skip to content

Commit

Permalink
[ProfilePage] add reply count in comment tab
Browse files Browse the repository at this point in the history
  • Loading branch information
MrOrz committed Oct 10, 2022
1 parent 57b87e9 commit f401bf7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
10 changes: 10 additions & 0 deletions components/ProfilePage/CommentTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const LOAD_USER_COMMENTS = gql`
article {
id
replyRequestCount
replyCount
createdAt
text
...ThumbnailArticleData
Expand Down Expand Up @@ -192,6 +193,15 @@ function CommentTab({ userId }) {
</Link>
)}
</TimeInfo>
{article.replyCount > 0 && (
<>
{ngettext(
msgid`${article.replyCount} reply`,
`${article.replyCount} replies`,
article.replyCount
)}
</>
)}
</Infos>
<Thumbnail article={article} />
{article.text && (
Expand Down
15 changes: 10 additions & 5 deletions i18n/zh_TW.po
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ msgid "Why do you think it is not useful?"
msgstr "您認為沒有幫助的理由是什麼呢?"

#: components/LandingPage/SectionArticles.js:153
#: components/ProfilePage/CommentTab.js:164
#: components/ProfilePage/CommentTab.js:165
#: components/ProfilePage/RepliedArticleTab.js:251
#: pages/articles.js:181
#: pages/hoax-for-you.js:133
Expand Down Expand Up @@ -702,7 +702,7 @@ msgid "Total Visit: ${ totalVisits }"
msgstr "${ totalVisits } 次瀏覽"

#: components/ListPageDisplays/ReplySearchItem.js:103
#: components/ProfilePage/CommentTab.js:182
#: components/ProfilePage/CommentTab.js:183
#: components/ProfilePage/RepliedArticleTab.js:269
#: pages/replies.js:256
#, javascript-format
Expand Down Expand Up @@ -2297,7 +2297,7 @@ msgstr "目前已經存有4萬5千筆以上查證過的資訊,透過投入資

#: components/ListPageDisplays/ArticleCard.js:111
#: components/ListPageDisplays/ReplySearchItem.js:112
#: components/ProfilePage/CommentTab.js:191
#: components/ProfilePage/CommentTab.js:192
#: components/ProfilePage/RepliedArticleTab.js:278
#: pages/article/[id].js:370
#: pages/replies.js:263
Expand Down Expand Up @@ -2447,13 +2447,13 @@ msgstr "格式"
msgid "Commented at"
msgstr "補充於"

#: components/ProfilePage/CommentTab.js:168
#: components/ProfilePage/CommentTab.js:169
msgid ""
"This user does not provide comments to any message in the specified date "
"range."
msgstr "這名使用者在指定日期範圍內沒有提供任何回報補充"

#: components/ProfilePage/CommentTab.js:172
#: components/ProfilePage/CommentTab.js:173
#, javascript-format
msgid "${ totalCount } comment matching criteria"
msgid_plural "${ totalCount } comments matching criteria"
Expand All @@ -2467,6 +2467,11 @@ msgstr "回報補充"
msgid "comments"
msgstr "回報補充"

#: components/ProfilePage/CommentTab.js:198
msgid "${ article.replyCount } reply"
msgid_plural "${ article.replyCount } replies"
msgstr[0] "${ article.replyCount } 則回應"

#: pages/index.js:29
msgctxt "site title"
msgid "Cofacts"
Expand Down

0 comments on commit f401bf7

Please sign in to comment.