From 54f7e10e3e9888b6fa4487406d6cdf513159f3b4 Mon Sep 17 00:00:00 2001
From: Aka jazzy
Date: Wed, 22 Feb 2023 14:29:03 +0800
Subject: [PATCH 01/28] feat(i18n): migrate notification page
---
lang/default.json | 201 ++++++++++++++++++
lang/en.json | 172 +++++++++++++++
lang/zh-Hans.json | 164 ++++++++++++++
lang/zh-Hant.json | 168 +++++++++++++++
package.json | 2 +-
.../Forms/WalletAuthForm/Select.tsx | 3 +-
.../ArticleNewCollectedNotice.tsx | 10 +-
.../CircleNotice/CircleInvitationNotice.tsx | 21 +-
.../CircleNewBroadcastComments.tsx | 59 +++--
.../CircleNewDiscussionComments.tsx | 65 +++---
.../CircleNotice/CircleNewUserNotice.tsx | 23 +-
.../CommentNewReplyNotice.tsx | 26 ++-
.../CommentNotice/ArticleNewCommentNotice.tsx | 10 +-
.../CircleNewBroadcastNotice.tsx | 19 +-
.../CommentMentionedYouNotice.tsx | 53 +++--
.../CommentNotice/CommentPinnedNotice.tsx | 11 +-
.../SubscribedArticleNewCommentNotice.tsx | 10 +-
.../CryptoWalletAirdropNotice.tsx | 9 +-
.../CryptoWalletConnectedNotice.tsx | 9 +-
.../TransactionNotice/PaymentPayoutNotice.tsx | 16 +-
.../PaymentReceivedDonationNotice.tsx | 18 +-
.../UserNotice/UserNewFollowerNotice.tsx | 8 +-
22 files changed, 900 insertions(+), 177 deletions(-)
create mode 100644 lang/default.json
diff --git a/lang/default.json b/lang/default.json
new file mode 100644
index 0000000000..5c8b81cb79
--- /dev/null
+++ b/lang/default.json
@@ -0,0 +1,201 @@
+{
+ "+AdTsY": {
+ "defaultMessage": "Discussion and mentioned you",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "+hfUcV": {
+ "defaultMessage": "sent a new broadcast on {circlename}",
+ "description": "src/components/Notice/CommentNotice/CircleNewBroadcastNotice.tsx"
+ },
+ "/nu5ho": {
+ "defaultMessage": "replied to your comment on",
+ "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx"
+ },
+ "3uQKhx": {
+ "defaultMessage": "Please email",
+ "description": "src/views/Help/index.tsx"
+ },
+ "5sAbzJ": {
+ "defaultMessage": "started a new topic",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "7wEMbb": {
+ "defaultMessage": "Followed You",
+ "description": "src/components/Notice/UserNotice/UserNewFollowerNotice.tsx"
+ },
+ "A3LOng": {
+ "defaultMessage": "replied to topics",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "An0rpe": {
+ "defaultMessage": "commented in {circlename} Broadcast",
+ "description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
+ },
+ "BHFHeY": {
+ "defaultMessage": "commented in {commentCircle}",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "BjzRe8": {
+ "defaultMessage": ". Take a look at your income",
+ "description": "src/components/Notice/TransactionNotice/PaymentReceivedDonationNotice.tsx"
+ },
+ "BqXRy4": {
+ "defaultMessage": "Download App",
+ "description": "src/views/Help/index.tsx"
+ },
+ "FaTb0A": {
+ "defaultMessage": "Install MetaMask",
+ "description": "src/components/Forms/WalletAuthForm/Select.tsx"
+ },
+ "GBm/sD": {
+ "defaultMessage": "posted a new topic and mentioned you",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "ISn3eZ": {
+ "defaultMessage": "Broadcast and mentioned you",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "JMRVO6": {
+ "defaultMessage": "Matters Community",
+ "description": "src/views/Help/index.tsx"
+ },
+ "KZlRde": {
+ "defaultMessage": "replied to",
+ "description": "src/components/Notice/ArticleArticleNotice/ArticleNewCollectedNotice.tsx"
+ },
+ "KyWDUu": {
+ "defaultMessage": "invites you to join Circle for",
+ "description": "src/components/Notice/CircleNotice/CircleInvitationNotice.tsx"
+ },
+ "LW1aX1": {
+ "defaultMessage": "Congrats!",
+ "description": "src/components/Notice/CircleNotice/CircleInvitationNotice.tsx"
+ },
+ "NNCFpf": {
+ "defaultMessage": "commented_circle",
+ "description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
+ },
+ "RKs1fz": {
+ "defaultMessage": "Open Source",
+ "description": "src/views/Help/index.tsx"
+ },
+ "U/Tqmx": {
+ "defaultMessage": "commented on your bookmarked article",
+ "description": "src/components/Notice/CommentNotice/SubscribedArticleNewCommentNotice.tsx"
+ },
+ "UgvfcU": {
+ "defaultMessage": "You have successfully completed Ethereum wallet settings. Please confirm wallet address:",
+ "description": "src/components/Notice/CryptoNotice/CryptoWalletConnectedNotice.tsx"
+ },
+ "VO4Elt": {
+ "defaultMessage": "mentioned you in a comment on {commentArticle}",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "VjxGd7": {
+ "defaultMessage": "commented on",
+ "description": "src/components/Notice/CommentNotice/ArticleNewCommentNotice.tsx"
+ },
+ "YlxpJl": {
+ "defaultMessage": "Broadcast and mentioned you in comment",
+ "description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
+ },
+ "ZUPQzl": {
+ "defaultMessage": "comment",
+ "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx"
+ },
+ "aaUBvF": {
+ "defaultMessage": "comment_circle",
+ "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx"
+ },
+ "b+LSgI": {
+ "defaultMessage": "replied to your discussion on",
+ "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx"
+ },
+ "bVZDVx": {
+ "defaultMessage": "withdrawal process has started. Please refer to your bank for payout status.",
+ "description": "src/components/Notice/TransactionNotice/PaymentPayoutNotice.tsx"
+ },
+ "cfL5uk": {
+ "defaultMessage": "Over 200 words, current {numbers}",
+ "description": "src/components/UserProfile/DropdownActions/EditProfileDialog/Content.tsx"
+ },
+ "dnsfmR": {
+ "defaultMessage": "for bug reports or suggestions. We will reply to you as soon we can!",
+ "description": "src/views/Help/index.tsx"
+ },
+ "ftD7Hy": {
+ "defaultMessage": "mentioned you",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "g/L3Fm": {
+ "defaultMessage": "posted and replied to topics",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "gAdgU7": {
+ "defaultMessage": "{circlename} Broadcast",
+ "description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
+ },
+ "hk2aiz": {
+ "defaultMessage": "followed your circle",
+ "description": "src/components/Notice/CircleNotice/CircleNewUserNotice.tsx"
+ },
+ "jF+Mle": {
+ "defaultMessage": "days for free. Try it and have fun!",
+ "description": "src/components/Notice/CircleNotice/CircleInvitationNotice.tsx"
+ },
+ "ldnt+K": {
+ "defaultMessage": "commented in your circle",
+ "description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
+ },
+ "mPe6DK": {
+ "defaultMessage": "subscribed your circle",
+ "description": "src/components/Notice/CircleNotice/CircleNewUserNotice.tsx"
+ },
+ "nmmItN": {
+ "defaultMessage": "About Us",
+ "description": "src/views/Help/index.tsx"
+ },
+ "ntjlWR": {
+ "defaultMessage": "comment"
+ },
+ "q7jZPx": {
+ "defaultMessage": "Term of Services",
+ "description": "src/views/Help/index.tsx"
+ },
+ "qPPrzm": {
+ "defaultMessage": "supported your article",
+ "description": "src/components/Notice/TransactionNotice/PaymentReceivedDonationNotice.tsx"
+ },
+ "qQmSxu": {
+ "defaultMessage": "Airdrop registration completed. Your NFT will be revealed on November 12. Confirm your ETH wallet address:",
+ "description": "src/components/Notice/CryptoNotice/CryptoWalletAirdropNotice.tsx"
+ },
+ "qXcvBF": {
+ "defaultMessage": "Explore Matters",
+ "description": "src/views/Help/index.tsx"
+ },
+ "qYzBk8": {
+ "defaultMessage": "unsubscribed your circle",
+ "description": "src/components/Notice/CircleNotice/CircleNewUserNotice.tsx"
+ },
+ "rXbLl7": {
+ "defaultMessage": "Migrate to Matters",
+ "description": "src/views/Help/index.tsx"
+ },
+ "tQsujN": {
+ "defaultMessage": "replied to topics and mentioned you",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "uqmi/b": {
+ "defaultMessage": "pinned your comment on",
+ "description": "src/components/Notice/CommentNotice/CommentPinnedNotice.tsx"
+ },
+ "uuEGON": {
+ "defaultMessage": "posted and replied to topics and mentioned you",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "z4NaU2": {
+ "defaultMessage": "Your",
+ "description": "src/components/Notice/TransactionNotice/PaymentPayoutNotice.tsx"
+ }
+}
diff --git a/lang/en.json b/lang/en.json
index 0e81f70aa6..81eabe6162 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -3,6 +3,10 @@
"defaultMessage": "Please email",
"description": "src/views/Help/index.tsx"
},
+ "7wEMbb": {
+ "defaultMessage": "Followed You",
+ "description": "src/components/Notice/UserNotice/UserNewFollowerNotice.tsx"
+ },
"BqXRy4": {
"defaultMessage": "Download App",
"description": "src/views/Help/index.tsx"
@@ -42,5 +46,173 @@
"rXbLl7": {
"defaultMessage": "Migrate to Matters",
"description": "src/views/Help/index.tsx"
+ },
+ "KZlRde": {
+ "defaultMessage": " replied to ",
+ "description": "src/components/Notice/ArticleArticleNotice/ArticleNewCollectedNotice.tsx"
+ },
+ "/nu5ho": {
+ "defaultMessage": "replied to your comment on ",
+ "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx"
+ },
+ "ZUPQzl": {
+ "defaultMessage": "",
+ "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx"
+ },
+ "b+LSgI": {
+ "defaultMessage": " replied to your discussion on ",
+ "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx"
+ },
+ "aaUBvF": {
+ "defaultMessage": "",
+ "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx"
+ },
+ "DIQKiC": {
+ "defaultMessage": " mentioned you in a comment on ",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "jqACL/": {
+ "defaultMessage": "",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "+8Q3Y4": {
+ "defaultMessage": " commented in ",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "+AdTsY": {
+ "defaultMessage": " Discussion and mentioned you",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "ISn3eZ": {
+ "defaultMessage": " Broadcast and mentioned you",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "uqmi/b": {
+ "defaultMessage": " pinned your comment on ",
+ "description": "src/components/Notice/CommentNotice/CommentPinnedNotice.tsx"
+ },
+ "VjxGd7": {
+ "defaultMessage": " commented on ",
+ "description": "src/components/Notice/CommentNotice/ArticleNewCommentNotice.tsx"
+ },
+ "U/Tqmx": {
+ "defaultMessage": " commented on your bookmarked article ",
+ "description": "src/components/Notice/CommentNotice/SubscribedArticleNewCommentNotice.tsx"
+ },
+ "VoOZni": {
+ "defaultMessage": " sent a new broadcast on ",
+ "description": "src/components/Notice/CommentNotice/CircleNewBroadcastNotice.tsx"
+ },
+ "oaDToH": {
+ "defaultMessage": "",
+ "description": "src/components/Notice/CommentNotice/CircleNewBroadcastNotice.tsx"
+ },
+ "qPPrzm": {
+ "defaultMessage": "supported your article ",
+ "description": "src/components/Notice/TransactionNotice/PaymentReceivedDonationNotice.tsx"
+ },
+ "BjzRe8": {
+ "defaultMessage": ". Take a look at your income",
+ "description": "src/components/Notice/TransactionNotice/PaymentReceivedDonationNotice.tsx"
+ },
+ "z4NaU2": {
+ "defaultMessage": "Your",
+ "description": "src/components/Notice/TransactionNotice/PaymentPayoutNotice.tsx"
+ },
+ "bVZDVx": {
+ "defaultMessage": " withdrawal process has started. Please refer to your bank for payout status.",
+ "description": "src/components/Notice/TransactionNotice/PaymentPayoutNotice.tsx"
+ },
+ "G0AvRm": {
+ "defaultMessage": " followed your circle",
+ "description": "src/components/Notice/CircleNotice/CircleNewUserNotice.tsx"
+ },
+ "nto8ly": {
+ "defaultMessage": " subscribed your circle",
+ "description": "src/components/Notice/CircleNotice/CircleNewUserNotice.tsx"
+ },
+ "lh/zbl": {
+ "defaultMessage": " unsubscribed your circle",
+ "description": "src/components/Notice/CircleNotice/CircleNewUserNotice.tsx"
+ },
+ "LW1aX1": {
+ "defaultMessage": "Congrats!",
+ "description": "src/components/Notice/CircleNotice/CircleInvitationNotice.tsx"
+ },
+ "KyWDUu": {
+ "defaultMessage": " invites you to join Circle for ",
+ "description": "src/components/Notice/CircleNotice/CircleInvitationNotice.tsx"
+ },
+ "jF+Mle": {
+ "defaultMessage": " days for free. Try it and have fun!",
+ "description": "src/components/Notice/CircleNotice/CircleInvitationNotice.tsx"
+ },
+ "ldnt+K": {
+ "defaultMessage": " commented in your circle ",
+ "description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
+ },
+ "NNCFpf": {
+ "defaultMessage": " commented in ",
+ "description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
+ },
+ "PNok6+": {
+ "defaultMessage": " Broadcast ",
+ "description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
+ },
+ "YlxpJl": {
+ "defaultMessage": " Broadcast and mentioned you ",
+ "description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
+ },
+ "qQmSxu": {
+ "defaultMessage": "Airdrop registration completed. Your NFT will be revealed on November 12. Confirm your ETH wallet address:",
+ "description": "src/components/Notice/CryptoNotice/CryptoWalletAirdropNotice.tsx"
+ },
+ "UgvfcU": {
+ "defaultMessage": "You have successfully completed Ethereum wallet settings. Please confirm wallet address:",
+ "description": "src/components/Notice/CryptoNotice/CryptoWalletConnectedNotice.tsx"
+ },
+ "+hfUcV": {
+ "defaultMessage": "sent a new broadcast on {circlename}",
+ "description": "src/components/Notice/CommentNotice/CircleNewBroadcastNotice.tsx"
+ },
+ "An0rpe": {
+ "defaultMessage": "{circlename} Broadcast",
+ "description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
+ },
+ "VO4Elt": {
+ "defaultMessage": " mentioned you in a comment on {commentArticle}",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "BHFHeY": {
+ "defaultMessage": " commented in {commentCircle}",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "5sAbzJ": {
+ "defaultMessage": " started a new topic ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "A3LOng": {
+ "defaultMessage": " replied to topics ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "ftD7Hy": {
+ "defaultMessage": " mentioned you ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "g/L3Fm": {
+ "defaultMessage": " posted and replied to topics ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "GBm/sD": {
+ "defaultMessage": " posted a new topic and mentioned you ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "tQsujN": {
+ "defaultMessage": " replied to topics and mentioned you ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "uuEGON": {
+ "defaultMessage": " posted and replied to topics and mentioned you ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
}
}
diff --git a/lang/zh-Hans.json b/lang/zh-Hans.json
index d05efc5d03..16173827d1 100644
--- a/lang/zh-Hans.json
+++ b/lang/zh-Hans.json
@@ -42,5 +42,169 @@
"rXbLl7": {
"defaultMessage": "一键搬家",
"description": "src/views/Help/index.tsx"
+ },
+ "7wEMbb": {
+ "defaultMessage": "追踪了你",
+ "description": "src/components/Notice/UserNotice/UserNewFollowerNotice.tsx"
+ },
+ "KZlRde": {
+ "defaultMessage": " 关联了你的作品 ",
+ "description": "src/components/Notice/ArticleArticleNotice/ArticleNewCollectedNotice.tsx"
+ },
+ "/nu5ho": {
+ "defaultMessage": "回复了你在作品 ",
+ "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx"
+ },
+ "ZUPQzl": {
+ "defaultMessage": "的评论",
+ "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx"
+ },
+ "b+LSgI": {
+ "defaultMessage": "回复了你在围炉 ",
+ "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx"
+ },
+ "aaUBvF": {
+ "defaultMessage": " 中的发言",
+ "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx"
+ },
+ "DIQKiC": {
+ "defaultMessage": " 在作品 ",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "jqACL/": {
+ "defaultMessage": " 的评论中提及你",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "+AdTsY": {
+ "defaultMessage": " 众聊提及你",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "ISn3eZ": {
+ "defaultMessage": " 广播提及你",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "uqmi/b": {
+ "defaultMessage": " 置顶了你在作品 ",
+ "description": "src/components/Notice/CommentNotice/CommentPinnedNotice.tsx"
+ },
+ "VjxGd7": {
+ "defaultMessage": "评论了作品 ",
+ "description": "src/components/Notice/CommentNotice/ArticleNewCommentNotice.tsx"
+ },
+ "U/Tqmx": {
+ "defaultMessage": "评论了你收藏的作品 ",
+ "description": "src/components/Notice/CommentNotice/SubscribedArticleNewCommentNotice.tsx"
+ },
+ "VoOZni": {
+ "defaultMessage": "在围炉 ",
+ "description": "src/components/Notice/CommentNotice/CircleNewBroadcastNotice.tsx"
+ },
+ "oaDToH": {
+ "defaultMessage": " 发布了新广播",
+ "description": "src/components/Notice/CommentNotice/CircleNewBroadcastNotice.tsx"
+ },
+ "qPPrzm": {
+ "defaultMessage": "支持了你的作品 ",
+ "description": "src/components/Notice/TransactionNotice/PaymentReceivedDonationNotice.tsx"
+ },
+ "BjzRe8": {
+ "defaultMessage": ",快去查看自己的收入吧!",
+ "description": "src/components/Notice/TransactionNotice/PaymentReceivedDonationNotice.tsx"
+ },
+ "z4NaU2": {
+ "defaultMessage": "你的 ",
+ "description": "src/components/Notice/TransactionNotice/PaymentPayoutNotice.tsx"
+ },
+ "bVZDVx": {
+ "defaultMessage": " 提现流程已开始,到帐时间请关注银行提醒。",
+ "description": "src/components/Notice/TransactionNotice/PaymentPayoutNotice.tsx"
+ },
+ "G0AvRm": {
+ "defaultMessage": "追踪了你的圍爐",
+ "description": "src/components/Notice/CircleNotice/CircleNewUserNotice.tsx"
+ },
+ "nto8ly": {
+ "defaultMessage": "订阅了你的围炉",
+ "description": "src/components/Notice/CircleNotice/CircleNewUserNotice.tsx"
+ },
+ "lh/zbl": {
+ "defaultMessage": "退订了你的围炉",
+ "description": "src/components/Notice/CircleNotice/CircleNewUserNotice.tsx"
+ },
+ "LW1aX1": {
+ "defaultMessage": "恭喜你!",
+ "description": "src/components/Notice/CircleNotice/CircleInvitationNotice.tsx"
+ },
+ "KyWDUu": {
+ "defaultMessage": " 邀请你免费加入围炉 ",
+ "description": "src/components/Notice/CircleNotice/CircleInvitationNotice.tsx"
+ },
+ "jF+Mle": {
+ "defaultMessage": " 天,前去免费体验,与大家谈天说地吧。",
+ "description": "src/components/Notice/CircleNotice/CircleInvitationNotice.tsx"
+ },
+ "ldnt+K": {
+ "defaultMessage": "在你的围炉 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
+ },
+ "PNok6+": {
+ "defaultMessage": " 广播中留言 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
+ },
+ "YlxpJl": {
+ "defaultMessage": " 广播中留言,其中有提及你 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
+ },
+ "qQmSxu": {
+ "defaultMessage": "你已成功登记参加空投且完成以太坊钱包设定,空投活动将在 2021/11/12 进行。你设定的空投地址:",
+ "description": "src/components/Notice/CryptoNotice/CryptoWalletAirdropNotice.tsx"
+ },
+ "UgvfcU": {
+ "defaultMessage": "你已完成以太坊钱包设定。你设定的地址:",
+ "description": "src/components/Notice/CryptoNotice/CryptoWalletConnectedNotice.tsx"
+ },
+ "+hfUcV": {
+ "defaultMessage": "在围炉 {circlename} 发布了新广播",
+ "description": "src/components/Notice/CommentNotice/CircleNewBroadcastNotice.tsx"
+ },
+ "An0rpe": {
+ "defaultMessage": "{circlename} 广播中留言 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
+ },
+ "VO4Elt": {
+ "defaultMessage": " 在作品 {commentArticle} 的评论中提及你",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "BHFHeY": {
+ "defaultMessage": " 在围炉 {commentCircle}",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "5sAbzJ": {
+ "defaultMessage": " 众聊中发表话题 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "A3LOng": {
+ "defaultMessage": " 众聊中回复话题 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "ftD7Hy": {
+ "defaultMessage": " 众聊提及了你 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "g/L3Fm": {
+ "defaultMessage": " 众聊中发表与回复话题 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "GBm/sD": {
+ "defaultMessage": " 众聊中发表话题,其中有提及你 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "tQsujN": {
+ "defaultMessage": " 众聊中回复话题,其中有提到你 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "uuEGON": {
+ "defaultMessage": " 众聊中发表与回复话题,其中有提到你 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
}
}
diff --git a/lang/zh-Hant.json b/lang/zh-Hant.json
index ed8cf41ad2..c1028c23c6 100644
--- a/lang/zh-Hant.json
+++ b/lang/zh-Hant.json
@@ -42,5 +42,173 @@
"rXbLl7": {
"defaultMessage": "一鍵搬家",
"description": "src/views/Help/index.tsx"
+ },
+ "7wEMbb": {
+ "defaultMessage": "追蹤了你",
+ "description": "src/components/Notice/UserNotice/UserNewFollowerNotice.tsx"
+ },
+ "KZlRde": {
+ "defaultMessage": " 關聯了你的作品 ",
+ "description": "src/components/Notice/ArticleArticleNotice/ArticleNewCollectedNotice.tsx"
+ },
+ "/nu5ho": {
+ "defaultMessage": "回覆了你在作品 ",
+ "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx"
+ },
+ "ZUPQzl": {
+ "defaultMessage": "的評論",
+ "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx"
+ },
+ "b+LSgI": {
+ "defaultMessage": "回覆了你在圍爐 ",
+ "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx"
+ },
+ "aaUBvF": {
+ "defaultMessage": " 中的發言",
+ "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx"
+ },
+ "DIQKiC": {
+ "defaultMessage": " 在作品 ",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "jqACL/": {
+ "defaultMessage": " 的評論中提及你",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "+AdTsY": {
+ "defaultMessage": " 眾聊提及你",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "ISn3eZ": {
+ "defaultMessage": " 廣播提及你",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "uqmi/b": {
+ "defaultMessage": " 置頂了你在作品 ",
+ "description": "src/components/Notice/CommentNotice/CommentPinnedNotice.tsx"
+ },
+ "VjxGd7": {
+ "defaultMessage": "評論了作品 ",
+ "description": "src/components/Notice/CommentNotice/ArticleNewCommentNotice.tsx"
+ },
+ "U/Tqmx": {
+ "defaultMessage": "評論了你收藏的作品 ",
+ "description": "src/components/Notice/CommentNotice/SubscribedArticleNewCommentNotice.tsx"
+ },
+ "VoOZni": {
+ "defaultMessage": "在圍爐 ",
+ "description": "src/components/Notice/CommentNotice/CircleNewBroadcastNotice.tsx"
+ },
+ "oaDToH": {
+ "defaultMessage": " 發布了新廣播",
+ "description": "src/components/Notice/CommentNotice/CircleNewBroadcastNotice.tsx"
+ },
+ "qPPrzm": {
+ "defaultMessage": "支持了你的作品 ",
+ "description": "src/components/Notice/TransactionNotice/PaymentReceivedDonationNotice.tsx"
+ },
+ "BjzRe8": {
+ "defaultMessage": ",快去查看自己的收入吧!",
+ "description": "src/components/Notice/TransactionNotice/PaymentReceivedDonationNotice.tsx"
+ },
+ "z4NaU2": {
+ "defaultMessage": "你的 ",
+ "description": "src/components/Notice/TransactionNotice/PaymentPayoutNotice.tsx"
+ },
+ "bVZDVx": {
+ "defaultMessage": "提現流程已開始,到帳時間請關注銀行提醒。",
+ "description": "src/components/Notice/TransactionNotice/PaymentPayoutNotice.tsx"
+ },
+ "G0AvRm": {
+ "defaultMessage": "追蹤了你的圍爐",
+ "description": "src/components/Notice/CircleNotice/CircleNewUserNotice.tsx"
+ },
+ "nto8ly": {
+ "defaultMessage": "訂閱了你的圍爐",
+ "description": "src/components/Notice/CircleNotice/CircleNewUserNotice.tsx"
+ },
+ "lh/zbl": {
+ "defaultMessage": "退訂了你的圍爐",
+ "description": "src/components/Notice/CircleNotice/CircleNewUserNotice.tsx"
+ },
+ "LW1aX1": {
+ "defaultMessage": "恭喜你!",
+ "description": "src/components/Notice/CircleNotice/CircleInvitationNotice.tsx"
+ },
+ "KyWDUu": {
+ "defaultMessage": " 邀請你免費加入圍爐 ",
+ "description": "src/components/Notice/CircleNotice/CircleInvitationNotice.tsx"
+ },
+ "jF+Mle": {
+ "defaultMessage": " 天,前去免費體驗,與大家談天說地吧。",
+ "description": "src/components/Notice/CircleNotice/CircleInvitationNotice.tsx"
+ },
+ "ldnt+K": {
+ "defaultMessage": "在你的圍爐 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
+ },
+ "PNok6+": {
+ "defaultMessage": " 廣播中留言 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
+ },
+ "YlxpJl": {
+ "defaultMessage": " 廣播中留言,其中有提及你 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
+ },
+ "iW8uz9": {
+ "defaultMessage": "在你的圍爐 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "qQmSxu": {
+ "defaultMessage": "你已成功登記參加空投且完成以太坊錢包設定,空投活動將在 2021/11/12 進行。你設定的空投地址:",
+ "description": "src/components/Notice/CryptoNotice/CryptoWalletAirdropNotice.tsx"
+ },
+ "UgvfcU": {
+ "defaultMessage": "你已完成以太坊錢包設定。你設定的地址:",
+ "description": "src/components/Notice/CryptoNotice/CryptoWalletConnectedNotice.tsx"
+ },
+ "+hfUcV": {
+ "defaultMessage": "在圍爐 {circlename} 發布了新廣播",
+ "description": "src/components/Notice/CommentNotice/CircleNewBroadcastNotice.tsx"
+ },
+ "An0rpe": {
+ "defaultMessage": " {circlename} 廣播中留言 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
+ },
+ "VO4Elt": {
+ "defaultMessage": " 在作品 {commentArticle} 的評論中提及你",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "BHFHeY": {
+ "defaultMessage": " 在圍爐 {commentCircle}",
+ "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
+ },
+ "5sAbzJ": {
+ "defaultMessage": " 眾聊中發表話題 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "A3LOng": {
+ "defaultMessage": " 眾聊中回覆話題 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "ftD7Hy": {
+ "defaultMessage": " 眾聊提及了你 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "g/L3Fm": {
+ "defaultMessage": " 眾聊中發表與回覆話題 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "GBm/sD": {
+ "defaultMessage": " 眾聊中發表話題,其中有提及你 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "tQsujN": {
+ "defaultMessage": " 眾聊中回覆話題,其中有提到你 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
+ },
+ "uuEGON": {
+ "defaultMessage": " 眾聊中發表與回覆話題,其中有提到你 ",
+ "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx"
}
}
diff --git a/package.json b/package.json
index ac7ba55773..a6094333d5 100644
--- a/package.json
+++ b/package.json
@@ -29,7 +29,7 @@
"build-storybook": "build-storybook",
"prepare": "husky install",
"vercel-build": "set -xe; npm run gen:type && if [[ \"$NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF\" =~ release/* ]] ; then cp -va .env.prod .env.local ; echo 'NEXT_PUBLIC_SITE_DOMAIN=web-next.matters.news' | tee -a .env.local; else cp -va .env.dev .env.local ; echo 'NEXT_PUBLIC_SITE_DOMAIN=web-dev.matters.news' | tee -a .env.local ; fi && echo 'NEXT_PUBLIC_NEXT_ASSET_DOMAIN=' | tee -a .env.local && npm run build",
- "i18n:extract": "formatjs extract 'src/**/*.ts*' --ignore='**/*.d.ts' --id-interpolation-pattern '[sha512:contenthash:base64:6]' --out-file lang/en.json",
+ "i18n:extract": "formatjs extract 'src/**/*.ts*' --ignore='**/*.d.ts' --id-interpolation-pattern '[sha512:contenthash:base64:6]' --out-file lang/default.json",
"i18n:compile": "formatjs compile-folder --ast lang compiled-lang",
"i18n": "npm run i18n:extract && npm run i18n:compile"
},
diff --git a/src/components/Forms/WalletAuthForm/Select.tsx b/src/components/Forms/WalletAuthForm/Select.tsx
index f5d0e7c3d9..e8ea3c62e0 100644
--- a/src/components/Forms/WalletAuthForm/Select.tsx
+++ b/src/components/Forms/WalletAuthForm/Select.tsx
@@ -223,7 +223,8 @@ const Select: React.FC = ({
>
+ description="src/components/Forms/WalletAuthForm/Select.tsx"
+ />
}
htmlHref={EXTERNAL_LINKS.METAMASK}
diff --git a/src/components/Notice/ArticleArticleNotice/ArticleNewCollectedNotice.tsx b/src/components/Notice/ArticleArticleNotice/ArticleNewCollectedNotice.tsx
index 20709ca817..c621ca90c4 100644
--- a/src/components/Notice/ArticleArticleNotice/ArticleNewCollectedNotice.tsx
+++ b/src/components/Notice/ArticleArticleNotice/ArticleNewCollectedNotice.tsx
@@ -1,7 +1,7 @@
import gql from 'graphql-tag'
+import { FormattedMessage } from 'react-intl'
import { TEST_ID } from '~/common/enums'
-import { Translate } from '~/components'
import { ArticleNewCollectedNoticeFragment } from '~/gql/graphql'
import NoticeActorAvatar from '../NoticeActorAvatar'
@@ -35,11 +35,11 @@ const ArticleNewCollectedNotice = ({
-
+
diff --git a/src/components/Notice/CircleNotice/CircleInvitationNotice.tsx b/src/components/Notice/CircleNotice/CircleInvitationNotice.tsx
index 683b2df1ab..c81b267626 100644
--- a/src/components/Notice/CircleNotice/CircleInvitationNotice.tsx
+++ b/src/components/Notice/CircleNotice/CircleInvitationNotice.tsx
@@ -1,7 +1,7 @@
import gql from 'graphql-tag'
+import { FormattedMessage } from 'react-intl'
import { TEST_ID } from '~/common/enums'
-import { Translate } from '~/components'
import { CircleInvitationNoticeFragment } from '~/gql/graphql'
import NoticeActorName from '../NoticeActorName'
@@ -31,18 +31,19 @@ const CircleInvitationNotice = ({
-
+
-
{circle?.invitedBy?.freePeriod}
-
diff --git a/src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx b/src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx
index abe35229e6..a58b769b40 100644
--- a/src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx
+++ b/src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx
@@ -1,9 +1,10 @@
import gql from 'graphql-tag'
import { useContext } from 'react'
+import { FormattedMessage } from 'react-intl'
import { TEST_ID } from '~/common/enums'
import { toPath } from '~/common/utils'
-import { Translate, ViewerContext } from '~/components'
+import { ViewerContext } from '~/components'
import { CircleNewBroadcastCommentsFragment } from '~/gql/graphql'
import NoticeActorAvatar from '../NoticeActorAvatar'
@@ -70,38 +71,52 @@ const CircleNewBroadcastComments = ({
<>
{isCircleOwner ? (
-
) : (
-
)}
-
{replyCount && !mentionCount && (
-
+ ),
+ }}
/>
)}
+
+ ),
+ }}
+ />
{!replyCount && mentionCount && (
-
)}
{replyCount && mentionCount && (
-
)}
>
diff --git a/src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx b/src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx
index dee609f305..0f43adfc32 100644
--- a/src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx
+++ b/src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx
@@ -1,9 +1,10 @@
import gql from 'graphql-tag'
import { useContext } from 'react'
+import { FormattedMessage } from 'react-intl'
import { TEST_ID } from '~/common/enums'
import { toPath } from '~/common/utils'
-import { LanguageContext, Translate, ViewerContext } from '~/components'
+import { LanguageContext, ViewerContext } from '~/components'
import { CircleNewDiscussionCommentsFragment } from '~/gql/graphql'
import NoticeActorAvatar from '../NoticeActorAvatar'
@@ -80,13 +81,16 @@ const CircleNewDiscussionComments = ({
{!isEn ? (
<>
{isCircleOwner ? (
-
) : (
-
+ //
+
)}
)}
{!newDiscussionCount && replyCount && !mentionCount && (
-
)}
{!newDiscussionCount && !replyCount && mentionCount && (
-
)}
{newDiscussionCount && replyCount && !mentionCount && (
-
)}
{newDiscussionCount && !replyCount && mentionCount && (
-
)}
{!newDiscussionCount && replyCount && mentionCount && (
-
)}
{newDiscussionCount && replyCount && mentionCount && (
-
)}
{isEn ? (
diff --git a/src/components/Notice/CircleNotice/CircleNewUserNotice.tsx b/src/components/Notice/CircleNotice/CircleNewUserNotice.tsx
index 0c347e893a..d423ab03b0 100644
--- a/src/components/Notice/CircleNotice/CircleNewUserNotice.tsx
+++ b/src/components/Notice/CircleNotice/CircleNewUserNotice.tsx
@@ -1,7 +1,7 @@
import gql from 'graphql-tag'
+import { FormattedMessage } from 'react-intl'
import { TEST_ID } from '~/common/enums'
-import { Translate } from '~/components'
import { CircleNewUserNoticeFragment } from '~/gql/graphql'
import NoticeActorAvatar from '../NoticeActorAvatar'
@@ -48,24 +48,21 @@ const CircleNewUserNotice = ({ notice, userType }: CircleNewUserNotice) => {
{isNewFollower && (
-
)}
{isNewSubscriber && (
-
)}
{isNewUnsubscriber && (
-
)}
diff --git a/src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx b/src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx
index 8b156e4636..08613f8a21 100644
--- a/src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx
+++ b/src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx
@@ -1,7 +1,7 @@
import gql from 'graphql-tag'
+import { FormattedMessage } from 'react-intl'
import { TEST_ID } from '~/common/enums'
-import { Translate } from '~/components'
import { CommentNewReplyNoticeFragment } from '~/gql/graphql'
import NoticeActorAvatar from '../NoticeActorAvatar'
@@ -47,24 +47,28 @@ const CommentNewReplyNotice = ({
{replyCommentArticle && (
<>
-
-
+
>
)}
{replyCommentCircle && (
<>
-
-
+
>
)}
diff --git a/src/components/Notice/CommentNotice/ArticleNewCommentNotice.tsx b/src/components/Notice/CommentNotice/ArticleNewCommentNotice.tsx
index dc4c00b7e3..cac3059e37 100644
--- a/src/components/Notice/CommentNotice/ArticleNewCommentNotice.tsx
+++ b/src/components/Notice/CommentNotice/ArticleNewCommentNotice.tsx
@@ -1,7 +1,7 @@
import gql from 'graphql-tag'
+import { FormattedMessage } from 'react-intl'
import { TEST_ID } from '~/common/enums'
-import { Translate } from '~/components'
import { ArticleNewCommentNoticeFragment } from '~/gql/graphql'
import NoticeActorAvatar from '../NoticeActorAvatar'
@@ -42,11 +42,9 @@ const ArticleNewCommentNotice = ({
-
-
{commentArticle && }
diff --git a/src/components/Notice/CommentNotice/CircleNewBroadcastNotice.tsx b/src/components/Notice/CommentNotice/CircleNewBroadcastNotice.tsx
index ca2c09622b..7a935e9164 100644
--- a/src/components/Notice/CommentNotice/CircleNewBroadcastNotice.tsx
+++ b/src/components/Notice/CommentNotice/CircleNewBroadcastNotice.tsx
@@ -1,8 +1,8 @@
import gql from 'graphql-tag'
+import { FormattedMessage } from 'react-intl'
import { TEST_ID } from '~/common/enums'
import { toPath } from '~/common/utils'
-import { Translate } from '~/components'
import { CircleNewBroadcastNoticeFragment } from '~/gql/graphql'
import NoticeActorAvatar from '../NoticeActorAvatar'
@@ -55,8 +55,19 @@ const CircleNewBroadcastNotice = ({
-
-
+ ),
+ }}
+ description="src/components/Notice/CommentNotice/CircleNewBroadcastNotice.tsx"
+ />
+ {/*
+ /> */}
{isMultiActors ? (
diff --git a/src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx b/src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx
index c9cc860733..b958b3af82 100644
--- a/src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx
+++ b/src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx
@@ -1,8 +1,8 @@
import gql from 'graphql-tag'
+import { FormattedMessage } from 'react-intl'
import { TEST_ID } from '~/common/enums'
import { toPath } from '~/common/utils'
-import { Translate } from '~/components'
import { CommentMentionedYouNoticeFragment } from '~/gql/graphql'
import NoticeActorAvatar from '../NoticeActorAvatar'
@@ -66,42 +66,41 @@ const CommentMentionedYouNotice = ({
{commentArticle && (
<>
-
-
-
+ ),
+ }}
/>
>
)}
{commentCircle && (
<>
-
-
+ ),
+ }}
/>
{commentCircleDiscussion && (
-
)}
{commentCircleBroadcast && (
-
)}
>
diff --git a/src/components/Notice/CommentNotice/CommentPinnedNotice.tsx b/src/components/Notice/CommentNotice/CommentPinnedNotice.tsx
index 91e408ac54..44be73eac8 100644
--- a/src/components/Notice/CommentNotice/CommentPinnedNotice.tsx
+++ b/src/components/Notice/CommentNotice/CommentPinnedNotice.tsx
@@ -1,7 +1,7 @@
import gql from 'graphql-tag'
+import { FormattedMessage } from 'react-intl'
import { TEST_ID } from '~/common/enums'
-import { Translate } from '~/components'
import { CommentPinnedNoticeFragment } from '~/gql/graphql'
import NoticeActorAvatar from '../NoticeActorAvatar'
@@ -36,13 +36,12 @@ const CommentPinnedNotice = ({
-
{commentArticle && }
-
+
diff --git a/src/components/Notice/CommentNotice/SubscribedArticleNewCommentNotice.tsx b/src/components/Notice/CommentNotice/SubscribedArticleNewCommentNotice.tsx
index d6cbd90d67..9449f3d3ae 100644
--- a/src/components/Notice/CommentNotice/SubscribedArticleNewCommentNotice.tsx
+++ b/src/components/Notice/CommentNotice/SubscribedArticleNewCommentNotice.tsx
@@ -1,7 +1,7 @@
import gql from 'graphql-tag'
+import { FormattedMessage } from 'react-intl'
import { TEST_ID } from '~/common/enums'
-import { Translate } from '~/components'
import { SubscribedArticleNewCommentNoticeFragment } from '~/gql/graphql'
import NoticeActorAvatar from '../NoticeActorAvatar'
@@ -45,11 +45,9 @@ const SubscribedArticleNewCommentNotice = ({
-
-
{commentArticle && }
diff --git a/src/components/Notice/CryptoNotice/CryptoWalletAirdropNotice.tsx b/src/components/Notice/CryptoNotice/CryptoWalletAirdropNotice.tsx
index b726c318ab..22e9aaaf3a 100644
--- a/src/components/Notice/CryptoNotice/CryptoWalletAirdropNotice.tsx
+++ b/src/components/Notice/CryptoNotice/CryptoWalletAirdropNotice.tsx
@@ -1,7 +1,7 @@
import gql from 'graphql-tag'
+import { FormattedMessage } from 'react-intl'
import { TEST_ID } from '~/common/enums'
-import { Translate } from '~/components'
import { CryptoWalletAirdropNoticeFragment } from '~/gql/graphql'
import NoticeDate from '../NoticeDate'
@@ -21,10 +21,9 @@ const CryptoWalletAirdropNotice = ({
-
{notice.target.address}
diff --git a/src/components/Notice/CryptoNotice/CryptoWalletConnectedNotice.tsx b/src/components/Notice/CryptoNotice/CryptoWalletConnectedNotice.tsx
index 16a21b9c04..c1f89e6a60 100644
--- a/src/components/Notice/CryptoNotice/CryptoWalletConnectedNotice.tsx
+++ b/src/components/Notice/CryptoNotice/CryptoWalletConnectedNotice.tsx
@@ -1,7 +1,7 @@
import gql from 'graphql-tag'
+import { FormattedMessage } from 'react-intl'
import { TEST_ID } from '~/common/enums'
-import { Translate } from '~/components'
import { CryptoWalletConnectedNoticeFragment } from '~/gql/graphql'
import NoticeDate from '../NoticeDate'
@@ -24,10 +24,9 @@ const CryptoWalletConnectedNotice = ({
-
{notice.target.address}
diff --git a/src/components/Notice/TransactionNotice/PaymentPayoutNotice.tsx b/src/components/Notice/TransactionNotice/PaymentPayoutNotice.tsx
index 2b5722c5d7..92a943f625 100644
--- a/src/components/Notice/TransactionNotice/PaymentPayoutNotice.tsx
+++ b/src/components/Notice/TransactionNotice/PaymentPayoutNotice.tsx
@@ -1,7 +1,7 @@
import gql from 'graphql-tag'
+import { FormattedMessage } from 'react-intl'
import { TEST_ID } from '~/common/enums'
-import { Translate } from '~/components'
import { PaymentPayoutNoticeFragment } from '~/gql/graphql'
import NoticeDate from '../NoticeDate'
@@ -23,18 +23,18 @@ const PaymentPayoutNotice = ({
-
+
{tx && (
{tx.amount} {tx.currency}
)}
-
diff --git a/src/components/Notice/TransactionNotice/PaymentReceivedDonationNotice.tsx b/src/components/Notice/TransactionNotice/PaymentReceivedDonationNotice.tsx
index dbea4aac9e..850c6e866f 100644
--- a/src/components/Notice/TransactionNotice/PaymentReceivedDonationNotice.tsx
+++ b/src/components/Notice/TransactionNotice/PaymentReceivedDonationNotice.tsx
@@ -1,7 +1,7 @@
import gql from 'graphql-tag'
+import { FormattedMessage } from 'react-intl'
import { TEST_ID } from '~/common/enums'
-import { Translate } from '~/components'
import { PaymentReceivedDonationNoticeFragment } from '~/gql/graphql'
import NoticeActorAvatar from '../NoticeActorAvatar'
@@ -34,11 +34,10 @@ const PaymentReceivedDonationNotice = ({
- {' '}
-
+
{tx && (
)}
-
diff --git a/src/components/Notice/UserNotice/UserNewFollowerNotice.tsx b/src/components/Notice/UserNotice/UserNewFollowerNotice.tsx
index 0d6bb5f951..4998f6a472 100644
--- a/src/components/Notice/UserNotice/UserNewFollowerNotice.tsx
+++ b/src/components/Notice/UserNotice/UserNewFollowerNotice.tsx
@@ -1,7 +1,7 @@
import gql from 'graphql-tag'
+import { FormattedMessage } from 'react-intl'
import { TEST_ID } from '~/common/enums'
-import { Translate } from '~/components'
import { UserNewFollowerNoticeFragment } from '~/gql/graphql'
import NoticeActorAvatar from '../NoticeActorAvatar'
@@ -36,8 +36,10 @@ const UserNewFollowerNotice = ({
-
-
+
{isMultiActors ? (
From 3e77e5d17c640c5520af531e3b0b56cdfb46d0ae Mon Sep 17 00:00:00 2001
From: bluecloud <96812901+pitb2022@users.noreply.github.com>
Date: Mon, 20 Feb 2023 14:24:04 +0800
Subject: [PATCH 02/28] feat(Expandable): revise expandable style
---
src/components/Expandable/styles.css | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/components/Expandable/styles.css b/src/components/Expandable/styles.css
index 6a5d82da19..158c10bf2f 100644
--- a/src/components/Expandable/styles.css
+++ b/src/components/Expandable/styles.css
@@ -16,6 +16,17 @@
& .richWrapper {
overflow-y: hidden;
overflow-y: clip;
+
+ &::after {
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ height: 50%;
+ pointer-events: none;
+ content: '';
+ background: linear-gradient(180deg, rgb(255 255 255 / 0%) 0%, #fff 100%);
+ }
}
}
From 3c319a89499e10491bf8b6b4a9083dc6ce091636 Mon Sep 17 00:00:00 2001
From: bluecloud <96812901+pitb2022@users.noreply.github.com>
Date: Fri, 24 Feb 2023 16:58:17 +0800
Subject: [PATCH 03/28] fix(test): skip switch display language test
---
tests/mutateUser.spec.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/mutateUser.spec.ts b/tests/mutateUser.spec.ts
index 020b7bf78c..f0f4c15bb3 100644
--- a/tests/mutateUser.spec.ts
+++ b/tests/mutateUser.spec.ts
@@ -253,7 +253,7 @@ test.describe('User Mutation', () => {
expect(stripSpaces(aliceBio)).toBe(stripSpaces(bio))
})
- authedTest(
+ authedTest.skip(
'Alice switch display language',
async ({ alicePage, isMobile }) => {
// [Alice] Go to setting page
From 50a7b87c0c162ff6ec4c12bca7e1f8cceb638b16 Mon Sep 17 00:00:00 2001
From: bluecloud <96812901+pitb2022@users.noreply.github.com>
Date: Mon, 27 Feb 2023 17:17:49 +0800
Subject: [PATCH 04/28] feat(test): add waitForLoadState=networkidle
---
tests/authentication.spec.ts | 4 ++--
tests/commentArticle.spec.ts | 2 +-
tests/helpers/auth.ts | 2 +-
tests/helpers/poms/articleDetail.ts | 3 +++
tests/helpers/poms/home.ts | 2 +-
tests/helpers/poms/notifications.ts | 2 +-
tests/helpers/poms/userProfile.ts | 2 +-
tests/mutateUser.spec.ts | 15 +++++++++------
tests/supportArticle.spec.ts | 8 ++++++--
9 files changed, 25 insertions(+), 15 deletions(-)
diff --git a/tests/authentication.spec.ts b/tests/authentication.spec.ts
index 268560ade4..8de91c737f 100644
--- a/tests/authentication.spec.ts
+++ b/tests/authentication.spec.ts
@@ -6,7 +6,7 @@ import { authedTest, login, logout } from './helpers'
test.describe('Authentication', () => {
test('can login in homepage dialog', async ({ page, isMobile }) => {
- await page.goto('/')
+ await page.goto('/', { waitUntil: 'networkidle' })
// Expect homepage has "Enter" button
let enterButton
@@ -48,7 +48,7 @@ test.describe('Authentication', () => {
authedTest(
'can login and logout with worker-scoped fixtures',
async ({ alicePage: page, isMobile }) => {
- await page.goto('/')
+ await page.goto('/', { waitUntil: 'networkidle' })
// [Logged-in] Expect homepage has "Notification" button on the left side
await expect(
diff --git a/tests/commentArticle.spec.ts b/tests/commentArticle.spec.ts
index 9334cbeed1..eee998e2d7 100644
--- a/tests/commentArticle.spec.ts
+++ b/tests/commentArticle.spec.ts
@@ -26,7 +26,7 @@ test.describe('Comment to article', () => {
expect(aliceArticleLink).toBeTruthy()
// [Bob] Go to Alice's article page
- await bobPage.goto(aliceArticleLink)
+ await bobPage.goto(aliceArticleLink, { waitUntil: 'networkidle' })
const aliceArticleDetail = new ArticleDetailPage(bobPage, isMobile)
// [Bob] Send a comment
diff --git a/tests/helpers/auth.ts b/tests/helpers/auth.ts
index 8390dcc557..1883d9a770 100644
--- a/tests/helpers/auth.ts
+++ b/tests/helpers/auth.ts
@@ -40,7 +40,7 @@ export const login = async ({
target = encodeURIComponent(
`${process.env.PLAYWRIGHT_TEST_BASE_URL}${target}`
)
- await page.goto(`/login?target=${target}`)
+ await page.goto(`/login?target=${target}`, { waitUntil: 'networkidle' })
}
// Login with email & password
diff --git a/tests/helpers/poms/articleDetail.ts b/tests/helpers/poms/articleDetail.ts
index 2f1bcd7bfc..033389979a 100644
--- a/tests/helpers/poms/articleDetail.ts
+++ b/tests/helpers/poms/articleDetail.ts
@@ -189,12 +189,15 @@ export class ArticleDetailPage {
async supportHKD(password: string, amount: number) {
// Open support dialog
await this.supportButton.click()
+ await this.page.waitForLoadState('networkidle')
// select fiat currency
await this.dialog.getByRole('button', { name: 'Fiat Currency' }).click()
+ await this.page.waitForLoadState('networkidle')
// top-up
await this.dialog.getByRole('button', { name: 'Top Up' }).click()
+ await this.page.waitForLoadState('networkidle')
await this.dialog
.getByLabel('Enter amount')
.fill(Math.max(20, amount).toString())
diff --git a/tests/helpers/poms/home.ts b/tests/helpers/poms/home.ts
index 2508de2c51..ed39581739 100644
--- a/tests/helpers/poms/home.ts
+++ b/tests/helpers/poms/home.ts
@@ -26,7 +26,7 @@ export class HomePage {
}
async goto() {
- await this.page.goto('/')
+ await this.page.goto('/', { waitUntil: 'networkidle' })
}
async shuffleSidebarTags() {
diff --git a/tests/helpers/poms/notifications.ts b/tests/helpers/poms/notifications.ts
index 822c164df3..4a69cdccea 100644
--- a/tests/helpers/poms/notifications.ts
+++ b/tests/helpers/poms/notifications.ts
@@ -8,6 +8,6 @@ export class NotificationsPage {
}
async goto() {
- await this.page.goto('/me/notifications')
+ await this.page.goto('/me/notifications', { waitUntil: 'networkidle' })
}
}
diff --git a/tests/helpers/poms/userProfile.ts b/tests/helpers/poms/userProfile.ts
index 2e03f6ec22..84703d6610 100644
--- a/tests/helpers/poms/userProfile.ts
+++ b/tests/helpers/poms/userProfile.ts
@@ -80,7 +80,7 @@ export class UserProfilePage {
}
async goto(userName: string) {
- await this.page.goto(`/@${userName}`)
+ await this.page.goto(`/@${userName}`, { waitUntil: 'networkidle' })
}
async setCover() {
diff --git a/tests/mutateUser.spec.ts b/tests/mutateUser.spec.ts
index f0f4c15bb3..f250418eed 100644
--- a/tests/mutateUser.spec.ts
+++ b/tests/mutateUser.spec.ts
@@ -58,7 +58,7 @@ test.describe('User Mutation', () => {
const bobDisplayName = await bobProfile.displayName.innerText()
// [Bob] Go to Alice's User Profile
- await bobPage.goto(alicePage.url())
+ await bobPage.goto(alicePage.url(), { waitUntil: 'networkidle' })
if (
await bobPage
@@ -102,7 +102,7 @@ test.describe('User Mutation', () => {
await bobProfile.gotoMeProfile()
// [Bob] Go to Alice's User Profile
- await bobPage.goto(alicePage.url())
+ await bobPage.goto(alicePage.url(), { waitUntil: 'networkidle' })
if (
await bobPage
@@ -119,6 +119,7 @@ test.describe('User Mutation', () => {
await unfollow(bobPage)
await bobPage.reload()
+ await bobPage.waitForLoadState('networkidle')
const unfollowCount = await bobPage
.getByTestId(TEST_ID.USER_PROFILE_FOLLOWERS_COUNT)
@@ -141,7 +142,7 @@ test.describe('User Mutation', () => {
await bobProfile.gotoMeProfile()
// [Bob] Go to Alice's User Profile
- await bobPage.goto(alicePage.url())
+ await bobPage.goto(alicePage.url(), { waitUntil: 'networkidle' })
await bobPage
.getByTestId(TEST_ID.LAYOUT_HEADER)
@@ -183,7 +184,7 @@ test.describe('User Mutation', () => {
bobPage.getByRole('button', { name: 'Block' }).click(),
])
- await bobPage.goto('/me/settings/blocked')
+ await bobPage.goto('/me/settings/blocked', { waitUntil: 'networkidle' })
const blockDisplayName = await bobPage
.getByTestId(TEST_ID.DIGEST_USER_RICH)
@@ -208,7 +209,7 @@ test.describe('User Mutation', () => {
])
// [Bob] Go to Alice's User Profile and Check Block state
- await bobPage.goto(alicePage.url())
+ await bobPage.goto(alicePage.url(), { waitUntil: 'networkidle' })
await bobPage
.getByTestId(TEST_ID.LAYOUT_HEADER)
.getByRole('button', { name: 'More Actions' })
@@ -257,7 +258,7 @@ test.describe('User Mutation', () => {
'Alice switch display language',
async ({ alicePage, isMobile }) => {
// [Alice] Go to setting page
- await alicePage.goto('/')
+ await alicePage.goto('/', { waitUntil: 'networkidle' })
await alicePage.getByRole('button', { name: 'My Page' }).click()
await alicePage
.getByRole('link', { name: 'Settings', exact: true })
@@ -277,6 +278,7 @@ test.describe('User Mutation', () => {
])
await alicePage.reload()
+ await alicePage.waitForLoadState('networkidle')
await alicePage.getByRole('button', { name: '介面語言 繁體中文' }).click()
await Promise.all([
@@ -292,6 +294,7 @@ test.describe('User Mutation', () => {
])
await alicePage.reload()
+ await alicePage.waitForLoadState('networkidle')
await alicePage.getByRole('button', { name: '界面语言 简体中文' }).click()
await Promise.all([
diff --git a/tests/supportArticle.spec.ts b/tests/supportArticle.spec.ts
index a5fd458319..ceb92d23c1 100644
--- a/tests/supportArticle.spec.ts
+++ b/tests/supportArticle.spec.ts
@@ -28,7 +28,9 @@ test.describe('Support article', () => {
expect(aliceArticleLink).toBeTruthy()
// [Bob] Go to Alice's article page
- await bobPage.goto(aliceArticleLink)
+ await bobPage.goto(aliceArticleLink, {
+ waitUntil: 'networkidle',
+ })
const aliceArticleDetail = new ArticleDetailPage(bobPage, isMobile)
const amount = _random(1, 50, false)
@@ -72,7 +74,9 @@ test.describe('Support article', () => {
)
// [Alice] Check Transactions History
- await alicePage.goto('/me/wallet/transactions')
+ await alicePage.goto('/me/wallet/transactions', {
+ waitUntil: 'networkidle',
+ })
const aliceTransactionItemAmount = await alicePage
.getByTestId(TEST_ID.ME_WALLET_TRANSACTIONS_ITEM)
.first()
From 88d4e65e36ada282d6e0e91176e3761d08633887 Mon Sep 17 00:00:00 2001
From: bluecloud <96812901+pitb2022@users.noreply.github.com>
Date: Mon, 27 Feb 2023 17:20:57 +0800
Subject: [PATCH 05/28] fix(test): fix comment multi element error
---
tests/commentArticle.spec.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/commentArticle.spec.ts b/tests/commentArticle.spec.ts
index eee998e2d7..b589bd0498 100644
--- a/tests/commentArticle.spec.ts
+++ b/tests/commentArticle.spec.ts
@@ -33,7 +33,7 @@ test.describe('Comment to article', () => {
const commentContent = await aliceArticleDetail.sendComment()
// [Bob] Expect article detail shows this comment
- await expect(bobPage.getByText(commentContent)).toBeVisible()
+ await expect(bobPage.getByText(commentContent).first()).toBeVisible()
// [Alice] Go to notifications page
const aliceNotifications = new NotificationsPage(alicePage)
From 695051e2dffe27d070aa5360af492a63e184e850 Mon Sep 17 00:00:00 2001
From: bluecloud <96812901+pitb2022@users.noreply.github.com>
Date: Mon, 27 Feb 2023 18:00:09 +0800
Subject: [PATCH 06/28] feat(test): revise page goto
---
tests/authentication.spec.ts | 4 ++--
tests/commentArticle.spec.ts | 3 ++-
tests/helpers/index.ts | 1 +
tests/helpers/poms/draftDetail.ts | 3 ++-
tests/helpers/poms/home.ts | 3 ++-
tests/helpers/poms/notifications.ts | 4 +++-
tests/helpers/poms/userProfile.ts | 5 +++--
tests/helpers/utils.ts | 4 ++++
tests/mutateUser.spec.ts | 11 ++++++-----
tests/supportArticle.spec.ts | 9 +++------
10 files changed, 28 insertions(+), 19 deletions(-)
create mode 100644 tests/helpers/utils.ts
diff --git a/tests/authentication.spec.ts b/tests/authentication.spec.ts
index 8de91c737f..5ec3c46d2f 100644
--- a/tests/authentication.spec.ts
+++ b/tests/authentication.spec.ts
@@ -2,7 +2,7 @@ import { expect, test } from '@playwright/test'
import { TEST_ID } from '~/common/enums'
-import { authedTest, login, logout } from './helpers'
+import { authedTest, login, logout, pageGoto } from './helpers'
test.describe('Authentication', () => {
test('can login in homepage dialog', async ({ page, isMobile }) => {
@@ -48,7 +48,7 @@ test.describe('Authentication', () => {
authedTest(
'can login and logout with worker-scoped fixtures',
async ({ alicePage: page, isMobile }) => {
- await page.goto('/', { waitUntil: 'networkidle' })
+ await pageGoto(page, '/')
// [Logged-in] Expect homepage has "Notification" button on the left side
await expect(
diff --git a/tests/commentArticle.spec.ts b/tests/commentArticle.spec.ts
index b589bd0498..4e27fc2ca3 100644
--- a/tests/commentArticle.spec.ts
+++ b/tests/commentArticle.spec.ts
@@ -7,6 +7,7 @@ import {
ArticleDetailPage,
authedTest,
NotificationsPage,
+ pageGoto,
UserProfilePage,
} from './helpers'
@@ -26,7 +27,7 @@ test.describe('Comment to article', () => {
expect(aliceArticleLink).toBeTruthy()
// [Bob] Go to Alice's article page
- await bobPage.goto(aliceArticleLink, { waitUntil: 'networkidle' })
+ await pageGoto(bobPage, aliceArticleLink)
const aliceArticleDetail = new ArticleDetailPage(bobPage, isMobile)
// [Bob] Send a comment
diff --git a/tests/helpers/index.ts b/tests/helpers/index.ts
index b45a69c46f..c6161804e0 100644
--- a/tests/helpers/index.ts
+++ b/tests/helpers/index.ts
@@ -4,3 +4,4 @@ export * from './fixtures'
export * from './fuzz'
export * from './poms'
export * from './text'
+export * from './utils'
diff --git a/tests/helpers/poms/draftDetail.ts b/tests/helpers/poms/draftDetail.ts
index 5e82f40357..d1fdd985a4 100644
--- a/tests/helpers/poms/draftDetail.ts
+++ b/tests/helpers/poms/draftDetail.ts
@@ -12,6 +12,7 @@ import {
generateTags,
generateTitle,
} from '../text'
+import { pageGoto } from '../utils'
type License = 'CC BY-NC-ND 2.0 License' | 'CC0 License' | 'All Rights Reserved'
@@ -103,7 +104,7 @@ export class DraftDetailPage {
}
async createDraft() {
- await this.page.goto('/')
+ await pageGoto(this.page, '/')
// Promise.all prevents a race condition between clicking and waiting.
await Promise.all([
diff --git a/tests/helpers/poms/home.ts b/tests/helpers/poms/home.ts
index ed39581739..98186d0526 100644
--- a/tests/helpers/poms/home.ts
+++ b/tests/helpers/poms/home.ts
@@ -3,6 +3,7 @@ import { Locator, Page } from '@playwright/test'
import { TEST_ID } from '~/common/enums'
import { waitForAPIResponse } from '../api'
+import { pageGoto } from '../utils'
export class HomePage {
readonly page: Page
@@ -26,7 +27,7 @@ export class HomePage {
}
async goto() {
- await this.page.goto('/', { waitUntil: 'networkidle' })
+ await pageGoto(this.page, '/')
}
async shuffleSidebarTags() {
diff --git a/tests/helpers/poms/notifications.ts b/tests/helpers/poms/notifications.ts
index 4a69cdccea..9be0659af6 100644
--- a/tests/helpers/poms/notifications.ts
+++ b/tests/helpers/poms/notifications.ts
@@ -1,5 +1,7 @@
import { Page } from '@playwright/test'
+import { pageGoto } from '../utils'
+
export class NotificationsPage {
readonly page: Page
@@ -8,6 +10,6 @@ export class NotificationsPage {
}
async goto() {
- await this.page.goto('/me/notifications', { waitUntil: 'networkidle' })
+ await pageGoto(this.page, '/me/notifications')
}
}
diff --git a/tests/helpers/poms/userProfile.ts b/tests/helpers/poms/userProfile.ts
index 84703d6610..8fecf11765 100644
--- a/tests/helpers/poms/userProfile.ts
+++ b/tests/helpers/poms/userProfile.ts
@@ -4,6 +4,7 @@ import { TEST_ID } from '~/common/enums'
import { waitForAPIResponse } from '../api'
import { generateBio, generateDisplayName } from '../text'
+import { pageGoto } from '../utils'
export class UserProfilePage {
readonly page: Page
@@ -66,7 +67,7 @@ export class UserProfilePage {
async gotoMeProfile() {
// go to homepage
- await this.page.goto('/')
+ await pageGoto(this.page, '/')
// click "My Page" button
await this.page.getByRole('button', { name: 'My Page' }).click()
@@ -80,7 +81,7 @@ export class UserProfilePage {
}
async goto(userName: string) {
- await this.page.goto(`/@${userName}`, { waitUntil: 'networkidle' })
+ await pageGoto(this.page, `/@${userName}`)
}
async setCover() {
diff --git a/tests/helpers/utils.ts b/tests/helpers/utils.ts
new file mode 100644
index 0000000000..670a3341be
--- /dev/null
+++ b/tests/helpers/utils.ts
@@ -0,0 +1,4 @@
+import { Page } from '@playwright/test'
+
+export const pageGoto = async (page: Page, path: string) =>
+ await page.goto(path, { waitUntil: 'networkidle' })
diff --git a/tests/mutateUser.spec.ts b/tests/mutateUser.spec.ts
index f250418eed..dd0b528d9e 100644
--- a/tests/mutateUser.spec.ts
+++ b/tests/mutateUser.spec.ts
@@ -6,6 +6,7 @@ import { stripSpaces } from '~/common/utils/text'
import {
authedTest,
NotificationsPage,
+ pageGoto,
UserProfilePage,
waitForAPIResponse,
} from './helpers'
@@ -58,7 +59,7 @@ test.describe('User Mutation', () => {
const bobDisplayName = await bobProfile.displayName.innerText()
// [Bob] Go to Alice's User Profile
- await bobPage.goto(alicePage.url(), { waitUntil: 'networkidle' })
+ await pageGoto(bobPage, alicePage.url())
if (
await bobPage
@@ -102,7 +103,7 @@ test.describe('User Mutation', () => {
await bobProfile.gotoMeProfile()
// [Bob] Go to Alice's User Profile
- await bobPage.goto(alicePage.url(), { waitUntil: 'networkidle' })
+ await pageGoto(bobPage, alicePage.url())
if (
await bobPage
@@ -142,7 +143,7 @@ test.describe('User Mutation', () => {
await bobProfile.gotoMeProfile()
// [Bob] Go to Alice's User Profile
- await bobPage.goto(alicePage.url(), { waitUntil: 'networkidle' })
+ await pageGoto(bobPage, alicePage.url())
await bobPage
.getByTestId(TEST_ID.LAYOUT_HEADER)
@@ -184,7 +185,7 @@ test.describe('User Mutation', () => {
bobPage.getByRole('button', { name: 'Block' }).click(),
])
- await bobPage.goto('/me/settings/blocked', { waitUntil: 'networkidle' })
+ await pageGoto(bobPage, '/me/settings/blocked')
const blockDisplayName = await bobPage
.getByTestId(TEST_ID.DIGEST_USER_RICH)
@@ -258,7 +259,7 @@ test.describe('User Mutation', () => {
'Alice switch display language',
async ({ alicePage, isMobile }) => {
// [Alice] Go to setting page
- await alicePage.goto('/', { waitUntil: 'networkidle' })
+ await pageGoto(alicePage, '/')
await alicePage.getByRole('button', { name: 'My Page' }).click()
await alicePage
.getByRole('link', { name: 'Settings', exact: true })
diff --git a/tests/supportArticle.spec.ts b/tests/supportArticle.spec.ts
index ceb92d23c1..c1ba15d3e6 100644
--- a/tests/supportArticle.spec.ts
+++ b/tests/supportArticle.spec.ts
@@ -8,6 +8,7 @@ import {
ArticleDetailPage,
authedTest,
NotificationsPage,
+ pageGoto,
UserProfilePage,
} from './helpers'
import { users } from './helpers/auth'
@@ -28,9 +29,7 @@ test.describe('Support article', () => {
expect(aliceArticleLink).toBeTruthy()
// [Bob] Go to Alice's article page
- await bobPage.goto(aliceArticleLink, {
- waitUntil: 'networkidle',
- })
+ await pageGoto(bobPage, aliceArticleLink)
const aliceArticleDetail = new ArticleDetailPage(bobPage, isMobile)
const amount = _random(1, 50, false)
@@ -74,9 +73,7 @@ test.describe('Support article', () => {
)
// [Alice] Check Transactions History
- await alicePage.goto('/me/wallet/transactions', {
- waitUntil: 'networkidle',
- })
+ await pageGoto(alicePage, '/me/wallet/transactions')
const aliceTransactionItemAmount = await alicePage
.getByTestId(TEST_ID.ME_WALLET_TRANSACTIONS_ITEM)
.first()
From f4a74795f53eb7155fc70437b1678fdce61ea513 Mon Sep 17 00:00:00 2001
From: bluecloud <96812901+pitb2022@users.noreply.github.com>
Date: Mon, 27 Feb 2023 19:44:58 +0800
Subject: [PATCH 07/28] feat(test): use pageGoto
---
tests/authentication.spec.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/authentication.spec.ts b/tests/authentication.spec.ts
index 5ec3c46d2f..2561c9e8ab 100644
--- a/tests/authentication.spec.ts
+++ b/tests/authentication.spec.ts
@@ -6,7 +6,7 @@ import { authedTest, login, logout, pageGoto } from './helpers'
test.describe('Authentication', () => {
test('can login in homepage dialog', async ({ page, isMobile }) => {
- await page.goto('/', { waitUntil: 'networkidle' })
+ await pageGoto(page, '/')
// Expect homepage has "Enter" button
let enterButton
From 5e464af9dfc114bfedfdc103a302f4c12adeedc3 Mon Sep 17 00:00:00 2001
From: robertu <4065233+robertu7@users.noreply.github.com>
Date: Tue, 28 Feb 2023 09:53:04 +0700
Subject: [PATCH 08/28] fix(comment): deprecate jump to `#comment`
---
.../Responses/LatestResponses/index.tsx | 5 ++---
src/views/ArticleDetail/Responses/index.tsx | 2 +-
src/views/ArticleDetail/index.tsx | 15 +--------------
src/views/Circle/Broadcast/Broadcast.tsx | 11 +++--------
src/views/Circle/Discussion/Discussion.tsx | 7 +++----
5 files changed, 10 insertions(+), 30 deletions(-)
diff --git a/src/views/ArticleDetail/Responses/LatestResponses/index.tsx b/src/views/ArticleDetail/Responses/LatestResponses/index.tsx
index 77ae82c6c0..245d037da9 100644
--- a/src/views/ArticleDetail/Responses/LatestResponses/index.tsx
+++ b/src/views/ArticleDetail/Responses/LatestResponses/index.tsx
@@ -63,9 +63,8 @@ const LatestResponses = ({ id, lock }: { id: string; lock: boolean }) => {
* Fragment Patterns
*
* 0. ``
- * 1. `#comment`
- * 2. `#parentCommentId`
- * 3. `#parentComemntId-childCommentId`
+ * 1. `#parentCommentId`
+ * 2. `#parentComemntId-childCommentId`
*/
let fragment = ''
let parentId = ''
diff --git a/src/views/ArticleDetail/Responses/index.tsx b/src/views/ArticleDetail/Responses/index.tsx
index cbf4352905..2d4a23981e 100644
--- a/src/views/ArticleDetail/Responses/index.tsx
+++ b/src/views/ArticleDetail/Responses/index.tsx
@@ -41,7 +41,7 @@ const Responses = ({ id, lock }: { id: string; lock: boolean }) => {
const { article } = data
return (
-
-
-
-
-
-
-
-
@@ -129,6 +125,7 @@ const Connect: React.FC-
)} {isSignUp && (-
{
target="_blank"
rel="noreferrer"
>
-
+
-
-
{
target="_blank"
rel="noreferrer"
>
-
+
-
",