From 337f719e8ff49f01416a596406a8b47766810e16 Mon Sep 17 00:00:00 2001 From: Aka jazzy Date: Tue, 7 Mar 2023 15:30:34 +0800 Subject: [PATCH 01/31] feat(i18n): add navigation/homepage translation --- lang/default.json | 182 +++++++++++++++--- lang/en.json | 161 ++++++++++++++-- lang/zh-Hans.json | 163 ++++++++++++++-- lang/zh-Hant.json | 178 +++++++++++++++-- .../Buttons/ConnectWallet/index.tsx | 6 +- src/components/Buttons/Shuffle.tsx | 5 +- src/components/Buttons/ViewAll/index.tsx | 12 +- src/components/Layout/NavMenu/Bottom.tsx | 23 ++- src/components/Layout/NavMenu/Top.tsx | 19 +- src/components/Layout/SideFooter/index.tsx | 28 ++- src/components/Layout/SideNav/index.tsx | 35 ++-- .../CircleNewDiscussionComments.tsx | 5 +- .../Notice/TagNotice/TagAddEditorNotice.tsx | 5 +- .../Notice/TagNotice/TagAdoptionNotice.tsx | 5 +- .../Notice/TagNotice/TagLeaveEditorNotice.tsx | 10 +- .../Notice/TagNotice/TagLeaveNotice.tsx | 5 +- src/components/Search/SearchBar/index.tsx | 30 +-- src/views/Help/index.tsx | 14 +- src/views/Home/Announcements/index.tsx | 9 +- src/views/Home/Feed/Authors/index.tsx | 4 +- src/views/Home/Feed/SortBy/index.tsx | 8 +- src/views/Home/Feed/Tags/index.tsx | 4 +- src/views/Home/SectionHeader/index.tsx | 8 +- .../SwitchLanguage/index.tsx | 12 +- .../DisplayPreferences/index.tsx | 13 +- .../AnonymousSettings/Enhance/index.tsx | 13 +- .../AnonymousSettings/Learn/index.tsx | 30 ++- 27 files changed, 799 insertions(+), 188 deletions(-) diff --git a/lang/default.json b/lang/default.json index 738a50135a..821e3f0d95 100644 --- a/lang/default.json +++ b/lang/default.json @@ -15,14 +15,30 @@ "defaultMessage": "Enter Community", "description": "src/components/Forms/EmailSignUpForm/Complete.tsx" }, + "/ns2st": { + "defaultMessage": "Download App", + "description": "" + }, "/nu5ho": { "defaultMessage": "replied to your comment on", "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx" }, + "1pFLGZ": { + "defaultMessage": "Bug Bounty", + "description": "" + }, + "2atspc": { + "defaultMessage": "Drafts", + "description": "" + }, "2eebTb": { "defaultMessage": "bookmarked your article", "description": "src/components/Notice/ArticleNotice/ArticleNewSubscriberNotice.tsx" }, + "2slIPX": { + "defaultMessage": "Likes", + "description": "" + }, "3WKlPP": { "defaultMessage": "commented in", "description": "" @@ -31,6 +47,14 @@ "defaultMessage": "Please email", "description": "src/views/Help/index.tsx" }, + "3yk8fB": { + "defaultMessage": "Wallet", + "description": "" + }, + "47FYwb": { + "defaultMessage": "Cancel", + "description": "" + }, "4giHJT": { "defaultMessage": "Have wallet questions on mobile device ? Click the", "description": "src/components/Forms/WalletAuthForm/Select.tsx" @@ -47,6 +71,18 @@ "defaultMessage": "Password", "description": "" }, + "6flWFg": { + "defaultMessage": "Term of Services", + "description": "" + }, + "6gOpfl": { + "defaultMessage": "You won't see announcements for 7 days", + "description": "src/views/Home/Announcements/index.tsx" + }, + "7DIW6+": { + "defaultMessage": "Learn More", + "description": "" + }, "9+Ddtu": { "defaultMessage": "Next", "description": "" @@ -71,14 +107,18 @@ "defaultMessage": ". Take a look at your income", "description": "src/components/Notice/TransactionNotice/PaymentReceivedDonationNotice.tsx" }, - "BqXRy4": { - "defaultMessage": "Download App", - "description": "src/views/Help/index.tsx" + "CnPG8j": { + "defaultMessage": "Featured", + "description": "" }, "CwSpld": { "defaultMessage": "Not for login", "description": "src/components/Forms/WalletAuthForm/Connect.tsx" }, + "D3idYv": { + "defaultMessage": "Settings", + "description": "" + }, "EfJYPI": { "defaultMessage": "Verification Code", "description": "src/components/Forms/WalletAuthForm/Connect.tsx" @@ -95,6 +135,10 @@ "defaultMessage": "Install MetaMask", "description": "src/components/Forms/WalletAuthForm/Select.tsx" }, + "FhWC22": { + "defaultMessage": "Matters Community", + "description": "" + }, "GBm/sD": { "defaultMessage": "posted a new topic and mentioned you", "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx" @@ -103,14 +147,30 @@ "defaultMessage": "tutorial", "description": "src/components/Forms/WalletAuthForm/Select.tsx" }, + "GZJpDf": { + "defaultMessage": "Analytics", + "description": "" + }, + "H0JBH6": { + "defaultMessage": "Log Out", + "description": "" + }, "H8KGyc": { "defaultMessage": "Enter", "description": "" }, + "HtSDyc": { + "defaultMessage": "Help Center", + "description": "" + }, "HxcjQl": { "defaultMessage": "Matters continues to provide services that combine creativity with blockchain technology. You will be the first to experience them after completing connecting wallet.", "description": "src/components/Forms/WalletAuthForm/Select.tsx" }, + "HzaRKA": { + "defaultMessage": "Migrate to Matters", + "description": "" + }, "IFY8r4": { "defaultMessage": "Enter Password", "description": "src/components/Forms/EmailLoginForm/index.tsx" @@ -127,10 +187,6 @@ "defaultMessage": "Your article has been published to decentralized network", "description": "src/components/Notice/ArticleNotice/ArticlePublishedNotice.tsx" }, - "JMRVO6": { - "defaultMessage": "Matters Community", - "description": "src/views/Help/index.tsx" - }, "Jc+W6M": { "defaultMessage": "resigned as tag maintainer. Would you like to be the new tag maintainer?", "description": "src/components/Notice/TagNotice/TagLeaveNotice.tsx" @@ -155,6 +211,10 @@ "defaultMessage": "Wallet address will be part of your digital identity and shown in your profile page.", "description": "src/components/Forms/WalletAuthForm/Select.tsx" }, + "MkwOFW": { + "defaultMessage": "Read History", + "description": "" + }, "N2IrpM": { "defaultMessage": "Confirm", "description": "" @@ -163,6 +223,10 @@ "defaultMessage": "Matters will never ask for your wallet mnemonic through any channel.", "description": "src/components/Forms/WalletAuthForm/Connect.tsx" }, + "NAidKb": { + "defaultMessage": "Notifications", + "description": "" + }, "NzfL1d": { "defaultMessage": "Enter password again", "description": "src/components/Forms/EmailSignUpForm/Password.tsx" @@ -175,13 +239,17 @@ "defaultMessage": "liked your article", "description": "src/components/Notice/ArticleNotice/ArticleNewAppreciationNotice.tsx" }, + "Pp/0po": { + "defaultMessage": "Shuffle", + "description": "" + }, "QV19cI": { "defaultMessage": "Failed to republish article", "description": "src/components/Notice/ArticleNotice/RevisedArticleNotPublishedNotice.tsx" }, - "RKs1fz": { - "defaultMessage": "Open Source", - "description": "src/views/Help/index.tsx" + "Szd1tH": { + "defaultMessage": "Failed to log out, please try again.", + "description": "" }, "U/Tqmx": { "defaultMessage": "commented on your bookmarked article", @@ -215,6 +283,14 @@ "defaultMessage": "Have an account?", "description": "src/components/Forms/EmailSignUpForm/Buttons.tsx" }, + "Xd0J7Y": { + "defaultMessage": "Open Source", + "description": "" + }, + "XgdZSb": { + "defaultMessage": "Authors", + "description": "" + }, "Xz/AHp": { "defaultMessage": "broadcast and mentioned you", "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx" @@ -231,14 +307,26 @@ "defaultMessage": "Broadcast and mentioned you in comment", "description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx" }, + "Z6ewE3": { + "defaultMessage": "Build Together", + "description": "src/views/Me/Settings/AnonymousSettings/Enhance/index.tsx" + }, "ZUPQzl": { "defaultMessage": "comment", "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx" }, + "ZjDH42": { + "defaultMessage": "About Us", + "description": "" + }, "aaUBvF": { "defaultMessage": "comment_circle", "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx" }, + "adThp5": { + "defaultMessage": "Latest", + "description": "" + }, "b+LSgI": { "defaultMessage": "replied to your discussion on", "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx" @@ -247,6 +335,14 @@ "defaultMessage": "withdrawal process has started. Please refer to your bank for payout status.", "description": "src/components/Notice/TransactionNotice/PaymentPayoutNotice.tsx" }, + "cE4Hfw": { + "defaultMessage": "Discover", + "description": "" + }, + "cPIKU2": { + "defaultMessage": "Following", + "description": "" + }, "cfL5uk": { "defaultMessage": "Over 200 words, current {numbers}", "description": "src/components/UserProfile/DropdownActions/EditProfileDialog/Content.tsx" @@ -267,10 +363,18 @@ "defaultMessage": "uh-oh,", "description": "src/components/Notice/TagNotice/TagLeaveEditorNotice.tsx" }, + "enMIYK": { + "defaultMessage": "My Page", + "description": "" + }, "euNJsE": { "defaultMessage": "A new article has been added to the circle, read it now!", "description": "src/components/Notice/ArticleNotice/CircleNewArticle.tsx" }, + "fG41Ux": { + "defaultMessage": "Logged out successfully", + "description": "" + }, "fOgusL": { "defaultMessage": "Choose a method to enter", "description": "src/components/Forms/SelectAuthMethodForm/index.tsx" @@ -307,6 +411,10 @@ "defaultMessage": "Login with Email", "description": "src/components/Forms/EmailSignUpForm/Buttons.tsx" }, + "itPgxd": { + "defaultMessage": "Profile", + "description": "" + }, "jF+Mle": { "defaultMessage": "days for free. Try it and have fun!", "description": "src/components/Notice/CircleNotice/CircleInvitationNotice.tsx" @@ -323,6 +431,10 @@ "defaultMessage": "followed you", "description": "src/components/Notice/UserNotice/UserNewFollowerNotice.tsx" }, + "kc79d3": { + "defaultMessage": "Topics", + "description": "" + }, "l5vWO8": { "defaultMessage": "Your Matters display name, can be changed later", "description": "src/components/Forms/EmailSignUpForm/Init.tsx" @@ -331,14 +443,26 @@ "defaultMessage": "Enter Email", "description": "" }, + "ll/ufR": { + "defaultMessage": "Trending", + "description": "" + }, "mPe6DK": { "defaultMessage": "subscribed your circle", "description": "src/components/Notice/CircleNotice/CircleNewUserNotice.tsx" }, + "mk+LCk": { + "defaultMessage": "Display Preferences", + "description": "src/views/Me/Settings/AnonymousSettings/DisplayPreferences/index.tsx" + }, "ml3SZN": { "defaultMessage": "Minimum 8 characters. Uppercase/lowercase letters, numbers and symbols are allowed", "description": "" }, + "nGBrvw": { + "defaultMessage": "Bookmarks", + "description": "" + }, "nYeDrI": { "defaultMessage": "Not Registered?", "description": "src/components/Forms/EmailLoginForm/Buttons.tsx" @@ -347,10 +471,6 @@ "defaultMessage": "Terms and Privacy Policy", "description": "src/components/Forms/EmailSignUpForm/Init.tsx" }, - "nmmItN": { - "defaultMessage": "About Us", - "description": "src/views/Help/index.tsx" - }, "nsaJRn": { "defaultMessage": "Logged in successfully", "description": "" @@ -358,9 +478,9 @@ "ntjlWR": { "defaultMessage": "comment" }, - "q7jZPx": { - "defaultMessage": "Term of Services", - "description": "src/views/Help/index.tsx" + "pla6ZF": { + "defaultMessage": "Search articles, tags and authors", + "description": "src/components/Search/SearchBar/index.tsx" }, "qPPrzm": { "defaultMessage": "supported your article", @@ -370,10 +490,6 @@ "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" @@ -382,10 +498,6 @@ "defaultMessage": "Email will not be used as a login but only as a contact channel.", "description": "" }, - "rXbLl7": { - "defaultMessage": "Migrate to Matters", - "description": "src/views/Help/index.tsx" - }, "reOeq5": { "defaultMessage": "You have created your personal creative space. Publish your first work!", "description": "src/components/Forms/EmailSignUpForm/Complete.tsx" @@ -418,6 +530,10 @@ "defaultMessage": "replied to topics and mentioned you", "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx" }, + "uVCg1l": { + "defaultMessage": "Explore Matters", + "description": "" + }, "uqmi/b": { "defaultMessage": "pinned your comment on", "description": "src/components/Notice/CommentNotice/CommentPinnedNotice.tsx" @@ -430,6 +546,10 @@ "defaultMessage": "Account", "description": "src/components/Forms/WalletAuthForm/Select.tsx" }, + "vH8sCb": { + "defaultMessage": "Circle", + "description": "" + }, "wSEOxH": { "defaultMessage": "Contact Channel", "description": "src/components/Forms/WalletAuthForm/Connect.tsx" @@ -446,10 +566,18 @@ "defaultMessage": "Continue with Email", "description": "src/components/Forms/SelectAuthMethodForm/index.tsx" }, + "xmcVZ0": { + "defaultMessage": "Search", + "description": "" + }, "xwj01D": { "defaultMessage": "invites you to become a collaborator", "description": "src/components/Notice/TagNotice/TagAddEditorNotice.tsx" }, + "y1Z3or": { + "defaultMessage": "Language", + "description": "" + }, "yZfKI4": { "defaultMessage": "discussion and mentioned you", "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx" @@ -457,5 +585,9 @@ "z4NaU2": { "defaultMessage": "Your", "description": "src/components/Notice/TransactionNotice/PaymentPayoutNotice.tsx" + }, + "zQvVDJ": { + "defaultMessage": "All", + "description": "" } } diff --git a/lang/en.json b/lang/en.json index 0749f343a9..89a74d4c1e 100644 --- a/lang/en.json +++ b/lang/en.json @@ -7,9 +7,9 @@ "defaultMessage": " followed you", "description": "src/components/Notice/UserNotice/UserNewFollowerNotice.tsx" }, - "BqXRy4": { + "/ns2st": { "defaultMessage": "Download App", - "description": "src/views/Help/index.tsx" + "description": "" }, "FaTb0A": { "defaultMessage": "Install MetaMask", @@ -19,9 +19,9 @@ "defaultMessage": "User registered by email can login and enable wallet login later", "description": "src/components/Forms/SelectAuthMethodForm/index.tsx" }, - "JMRVO6": { + "FhWC22": { "defaultMessage": "Matters Community", - "description": "src/views/Help/index.tsx" + "description": "" }, "RKs1fz": { "defaultMessage": "Open Source", @@ -43,21 +43,21 @@ "defaultMessage": "For unregistered or users enabled wallet login", "description": "src/components/Forms/SelectAuthMethodForm/index.tsx" }, - "nmmItN": { + "ZjDH42": { "defaultMessage": "About Us", - "description": "src/views/Help/index.tsx" + "description": "" }, - "q7jZPx": { + "6flWFg": { "defaultMessage": "Term of Services", "description": "src/views/Help/index.tsx" }, - "qXcvBF": { + "uVCg1l": { "defaultMessage": "Explore Matters", - "description": "src/views/Help/index.tsx" + "description": "" }, - "rXbLl7": { + "HzaRKA": { "defaultMessage": "Migrate to Matters", - "description": "src/views/Help/index.tsx" + "description": "" }, "skbUBl": { "defaultMessage": "Log in", @@ -261,7 +261,8 @@ }, "9+Ddtu": { "defaultMessage": "Next", - "description": ""}, + "description": "" + }, "KZlRde": { "defaultMessage": " replied to ", "description": "src/components/Notice/ArticleArticleNotice/ArticleNewCollectedNotice.tsx" @@ -489,5 +490,141 @@ "Jc+W6M": { "defaultMessage": " resigned as tag maintainer. Would you like to be the new tag maintainer?", "description": "src/components/Notice/TagNotice/TagLeaveNotice.tsx" + }, + "sT9HoG": { + "defaultMessage": "Welcome to Matters, a free, autonomous and permanent space for creation and civil discourse.", + "description": "src/views/Follow/PickAuthors/index.tsx" + }, + "7DIW6+": { + "defaultMessage": "Learn More", + "description": "" + }, + "Z6ewE3": { + "defaultMessage": "Build Together", + "description": "src/views/Me/Settings/AnonymousSettings/Enhance/index.tsx" + }, + "1pFLGZ": { + "defaultMessage": "Bug Bounty", + "description": "" + }, + "mk+LCk": { + "defaultMessage": "Display Preferences", + "description": "src/views/Me/Settings/AnonymousSettings/DisplayPreferences/index.tsx" + }, + "y1Z3or": { + "defaultMessage": "Language", + "description": "" + }, + "itPgxd": { + "defaultMessage": "Profile", + "description": "" + }, + "vH8sCb": { + "defaultMessage": "Circle", + "description": "" + }, + "2atspc": { + "defaultMessage": "Drafts", + "description": "" + }, + "3yk8fB": { + "defaultMessage": "Wallet", + "description": "" + }, + "GZJpDf": { + "defaultMessage": "Analytics", + "description": "" + }, + "nGBrvw": { + "defaultMessage": "Bookmarks", + "description": "" + }, + "2slIPX": { + "defaultMessage": "Likes", + "description": "" + }, + "MkwOFW": { + "defaultMessage": "Read History", + "description": "" + }, + "fG41Ux": { + "defaultMessage": "Logged out successfully", + "description": "" + }, + "Szd1tH": { + "defaultMessage": "Failed to log out, please try again.", + "description": "" + }, + "HtSDyc": { + "defaultMessage": "Help Center", + "description": "" + }, + "D3idYv": { + "defaultMessage": "Settings", + "description": "" + }, + "H0JBH6": { + "defaultMessage": "Log Out", + "description": "" + }, + "cE4Hfw": { + "defaultMessage": "Discover", + "description": "" + }, + "cPIKU2": { + "defaultMessage": "Following", + "description": "" + }, + "NAidKb": { + "defaultMessage": "Notifications", + "description": "" + }, + "enMIYK": { + "defaultMessage": "My Page", + "description": "" + }, + "xmcVZ0": { + "defaultMessage": "Search", + "description": "" + }, + "47FYwb": { + "defaultMessage": "Cancel", + "description": "" + }, + "ll/ufR": { + "defaultMessage": "Trending", + "description": "" + }, + "adThp5": { + "defaultMessage": "Latest", + "description": "" + }, + "CnPG8j": { + "defaultMessage": "Featured", + "description": "" + }, + "zQvVDJ": { + "defaultMessage": "All", + "description": "" + }, + "XgdZSb": { + "defaultMessage": "Authors", + "description": "" + }, + "kc79d3": { + "defaultMessage": "Topics", + "description": "" + }, + "Pp/0po": { + "defaultMessage": "Shuffle", + "description": "" + }, + "6gOpfl": { + "defaultMessage": "You won't see announcements for 7 days", + "description": "src/views/Home/Announcements/index.tsx" + }, + "pla6ZF": { + "defaultMessage": "Search articles, tags and authors", + "description": "src/components/Search/SearchBar/index.tsx" } } diff --git a/lang/zh-Hans.json b/lang/zh-Hans.json index 3c56def559..f7a0504755 100644 --- a/lang/zh-Hans.json +++ b/lang/zh-Hans.json @@ -7,17 +7,17 @@ "defaultMessage": "若你希望向 Matters 提出建议,或遭遇操作异常,请发送邮件至", "description": "src/views/Help/index.tsx" }, - "BqXRy4": { + "/ns2st": { "defaultMessage": "下载应用", - "description": "src/views/Help/index.tsx" + "description": "" }, "FaTb0A": { "defaultMessage": "安装 MetaMask", "description": "src/components/Forms/WalletAuthForm/Select.tsx" }, - "JMRVO6": { + "FhWC22": { "defaultMessage": "社区共建基地", - "description": "src/views/Help/index.tsx" + "description": "" }, "RKs1fz": { "defaultMessage": "开放社区", @@ -27,21 +27,21 @@ "defaultMessage": ",我们会尽快回复!", "description": "src/views/Help/index.tsx" }, - "nmmItN": { + "ZjDH42": { "defaultMessage": "关于我们", - "description": "src/views/Help/index.tsx" + "description": "" }, - "q7jZPx": { + "6flWFg": { "defaultMessage": "用户协议", - "description": "src/views/Help/index.tsx" + "description": "" }, - "qXcvBF": { + "uVCg1l": { "defaultMessage": "玩转 Matters 实用指南", - "description": "src/views/Help/index.tsx" + "description": "" }, - "rXbLl7": { + "HzaRKA": { "defaultMessage": "一键搬家", - "description": "src/views/Help/index.tsx" + "description": "" }, "fOgusL": { "defaultMessage": "选择进入方式", @@ -261,7 +261,8 @@ }, "9+Ddtu": { "defaultMessage": "下一步", - "description": ""}, + "description": "" + }, "k5NnNF": { "defaultMessage": "追踪了你", "description": "src/components/Notice/UserNotice/UserNewFollowerNotice.tsx" @@ -489,5 +490,141 @@ "Jc+W6M": { "defaultMessage": " 辞去了标签主理人权限,你要不要试试看成为新的主理人?", "description": "src/components/Notice/TagNotice/TagLeaveNotice.tsx" + }, + "sT9HoG": { + "defaultMessage": "欢迎加入 Matters,一个自由、自主、永续的创作与公共讨论空间。", + "description": "src/views/Follow/PickAuthors/index.tsx" + }, + "7DIW6+": { + "defaultMessage": "了解更多", + "description": "" + }, + "Z6ewE3": { + "defaultMessage": "参与开发", + "description": "src/views/Me/Settings/AnonymousSettings/Enhance/index.tsx" + }, + "1pFLGZ": { + "defaultMessage": "漏洞赏金计划", + "description": "" + }, + "mk+LCk": { + "defaultMessage": "界面设定", + "description": "src/views/Me/Settings/AnonymousSettings/DisplayPreferences/index.tsx" + }, + "y1Z3or": { + "defaultMessage": "修改介面语言", + "description": "" + }, + "itPgxd": { + "defaultMessage": "个人主页", + "description": "" + }, + "vH8sCb": { + "defaultMessage": "我的围炉", + "description": "" + }, + "2atspc": { + "defaultMessage": "我的草稿", + "description": "" + }, + "3yk8fB": { + "defaultMessage": "我的钱包", + "description": "" + }, + "GZJpDf": { + "defaultMessage": "数据后台", + "description": "" + }, + "nGBrvw": { + "defaultMessage": "我的收藏", + "description": "" + }, + "2slIPX": { + "defaultMessage": "我的赞赏", + "description": "" + }, + "MkwOFW": { + "defaultMessage": "浏览记录", + "description": "" + }, + "fG41Ux": { + "defaultMessage": "登出成功", + "description": "" + }, + "Szd1tH": { + "defaultMessage": "登出失败,再来一次", + "description": "" + }, + "HtSDyc": { + "defaultMessage": "帮助中心", + "description": "" + }, + "D3idYv": { + "defaultMessage": "设定", + "description": "" + }, + "H0JBH6": { + "defaultMessage": "登出", + "description": "" + }, + "cE4Hfw": { + "defaultMessage": "发现", + "description": "" + }, + "cPIKU2": { + "defaultMessage": "追踪", + "description": "" + }, + "NAidKb": { + "defaultMessage": "通知", + "description": "" + }, + "enMIYK": { + "defaultMessage": "我的", + "description": "" + }, + "xmcVZ0": { + "defaultMessage": "搜索", + "description": "" + }, + "47FYwb": { + "defaultMessage": "关闭", + "description": "" + }, + "ll/ufR": { + "defaultMessage": "热门", + "description": "" + }, + "adThp5": { + "defaultMessage": "最新", + "description": "" + }, + "CnPG8j": { + "defaultMessage": "精华", + "description": "" + }, + "zQvVDJ": { + "defaultMessage": "查看全部", + "description": "" + }, + "XgdZSb": { + "defaultMessage": "值得关注", + "description": "" + }, + "kc79d3": { + "defaultMessage": "找你想看的", + "description": "" + }, + "Pp/0po": { + "defaultMessage": "换一批", + "description": "" + }, + "6gOpfl": { + "defaultMessage": "暂时隐藏公告栏 7 天", + "description": "src/views/Home/Announcements/index.tsx" + }, + "pla6ZF": { + "defaultMessage": "搜索作品、标签、作者", + "description": "src/components/Search/SearchBar/index.tsx" } } diff --git a/lang/zh-Hant.json b/lang/zh-Hant.json index 2b710a5c6e..0bf634d870 100644 --- a/lang/zh-Hant.json +++ b/lang/zh-Hant.json @@ -7,17 +7,17 @@ "defaultMessage": "若你希望向 Matters 提出建議,或遭遇操作異常,请發送郵件至", "description": "src/views/Help/index.tsx" }, - "BqXRy4": { + "/ns2st": { "defaultMessage": "下載應用", - "description": "src/views/Help/index.tsx" + "description": "" }, "FaTb0A": { "defaultMessage": "安裝 MetaMask", "description": "src/components/Forms/WalletAuthForm/Select.tsx" }, - "JMRVO6": { + "FhWC22": { "defaultMessage": "社區共建基地", - "description": "src/views/Help/index.tsx" + "description": "" }, "RKs1fz": { "defaultMessage": "開放社區", @@ -27,21 +27,21 @@ "defaultMessage": ",我們會儘快回覆!", "description": "src/views/Help/index.tsx" }, - "nmmItN": { + "ZjDH42": { "defaultMessage": "關於我們", - "description": "src/views/Help/index.tsx" + "description": "" }, - "q7jZPx": { + "6flWFg": { "defaultMessage": "用戶協議", - "description": "src/views/Help/index.tsx" + "description": "" }, - "qXcvBF": { + "uVCg1l": { "defaultMessage": "玩轉 Matters 實用指南", - "description": "src/views/Help/index.tsx" + "description": "" }, - "rXbLl7": { + "HzaRKA": { "defaultMessage": "一鍵搬家", - "description": "src/views/Help/index.tsx" + "description": "" }, "fOgusL": { "defaultMessage": "選擇進入方式", @@ -261,7 +261,8 @@ }, "9+Ddtu": { "defaultMessage": "下一步", - "description": ""}, + "description": "" + }, "k5NnNF": { "defaultMessage": "追蹤了你", "description": "src/components/Notice/UserNotice/UserNewFollowerNotice.tsx" @@ -483,12 +484,147 @@ "description": "src/components/Notice/TagNotice/TagLeaveEditorNotice.tsx" }, "dsBCfK": { - "defaultMessage": "哎呀,標籤協作者", - "description": "src/components/Notice/TagNotice/TagLeaveEditorNotice.tsx" -}, -"Jc+W6M": { - "defaultMessage": " 辭去了標籤主理人權限,你要不要試試看成為新的主理人?", - "description": "src/components/Notice/TagNotice/TagLeaveNotice.tsx" -} + "defaultMessage": "哎呀,標籤協作者", + "description": "src/components/Notice/TagNotice/TagLeaveEditorNotice.tsx" + }, + "Jc+W6M": { + "defaultMessage": " 辭去了標籤主理人權限,你要不要試試看成為新的主理人?", + "description": "src/components/Notice/TagNotice/TagLeaveNotice.tsx" + }, + "sT9HoG": { + "defaultMessage": "歡迎加入 Matters,一個自由、自主、永續的創作與公共討論空間。", + "description": "src/views/Follow/PickAuthors/index.tsx" + }, + "7DIW6+": { + "defaultMessage": "暸解更多", + "description": "" + }, + "Z6ewE3": { + "defaultMessage": "參與開發", + "description": "src/views/Me/Settings/AnonymousSettings/Enhance/index.tsx" + }, + "1pFLGZ": { + "defaultMessage": "漏洞賞金計畫", + "description": "" + }, + "mk+LCk": { + "defaultMessage": "介面設定", + "description": "src/views/Me/Settings/AnonymousSettings/DisplayPreferences/index.tsx" + }, + "y1Z3or": { + "defaultMessage": "修改界面語言", + "description": "" + }, + "itPgxd": { + "defaultMessage": "個人主頁", + "description": "" + }, + "vH8sCb": { + "defaultMessage": "我的圍爐", + "description": "" + }, + "2atspc": { + "defaultMessage": "我的草稿", + "description": "" + }, + "3yk8fB": { + "defaultMessage": "我的錢包", + "description": "" + }, + "GZJpDf": { + "defaultMessage": "數據後台", + "description": "" + }, + "nGBrvw": { + "defaultMessage": "我的收藏", + "description": "" + }, + "2slIPX": { + "defaultMessage": "我的讚賞", + "description": "" + }, + "MkwOFW": { + "defaultMessage": "瀏覽紀錄", + "description": "" + }, + "fG41Ux": { + "defaultMessage": "登出成功", + "description": "" + }, + "Szd1tH": { + "defaultMessage": "登出失敗,請重試", + "description": "" + }, + "HtSDyc": { + "defaultMessage": "幫助中心", + "description": "" + }, + "D3idYv": { + "defaultMessage": "設定", + "description": "" + }, + "H0JBH6": { + "defaultMessage": "登出", + "description": "" + }, + "cE4Hfw": { + "defaultMessage": "發現", + "description": "" + }, + "cPIKU2": { + "defaultMessage": "追蹤", + "description": "" + }, + "NAidKb": { + "defaultMessage": "通知", + "description": "" + }, + "enMIYK": { + "defaultMessage": "我的", + "description": "" + }, + "xmcVZ0": { + "defaultMessage": "搜索", + "description": "" + }, + "47FYwb": { + "defaultMessage": "關閉", + "description": "" + }, + "ll/ufR": { + "defaultMessage": "熱門", + "description": "" + }, + "adThp5": { + "defaultMessage": "最新", + "description": "" + }, + "CnPG8j": { + "defaultMessage": "精華", + "description": "" + }, + "zQvVDJ": { + "defaultMessage": "查看全部", + "description": "" + }, + "XgdZSb": { + "defaultMessage": "值得關注", + "description": "" + }, + "kc79d3": { + "defaultMessage": "找你想看的", + "description": "" + }, + "Pp/0po": { + "defaultMessage": "換一批", + "description": "" + }, + "6gOpfl": { + "defaultMessage": "暫時隱藏公告欄 7 天", + "description": "src/views/Home/Announcements/index.tsx" + }, + "pla6ZF": { + "defaultMessage": "搜尋作品、標籤、作者", + "description": "src/components/Search/SearchBar/index.tsx" + } } - diff --git a/src/components/Buttons/ConnectWallet/index.tsx b/src/components/Buttons/ConnectWallet/index.tsx index b35f28213d..390ad3d1ab 100644 --- a/src/components/Buttons/ConnectWallet/index.tsx +++ b/src/components/Buttons/ConnectWallet/index.tsx @@ -1,5 +1,7 @@ +import { FormattedMessage } from 'react-intl' + import { PATHS } from '~/common/enums' -import { Button, TextIcon, Translate } from '~/components' +import { Button, TextIcon } from '~/components' export const ConnectWalletButton = () => { return ( @@ -11,7 +13,7 @@ export const ConnectWalletButton = () => { href={PATHS.ME_SETTINGS_CONNECT_WALLET} > - + ) diff --git a/src/components/Buttons/Shuffle.tsx b/src/components/Buttons/Shuffle.tsx index ba00adaefe..a3b7433b4e 100644 --- a/src/components/Buttons/Shuffle.tsx +++ b/src/components/Buttons/Shuffle.tsx @@ -1,10 +1,11 @@ +import { FormattedMessage } from 'react-intl' + import { Button, ButtonProps, IconReload12, TextIcon, TextIconProps, - Translate, } from '~/components' type ShuffleButtonProps = ButtonProps & Pick @@ -25,7 +26,7 @@ export const ShuffleButton: React.FC = ({ size="xs" weight="md" > - + ) diff --git a/src/components/Buttons/ViewAll/index.tsx b/src/components/Buttons/ViewAll/index.tsx index 3e5e242699..1cc811f28d 100644 --- a/src/components/Buttons/ViewAll/index.tsx +++ b/src/components/Buttons/ViewAll/index.tsx @@ -1,10 +1,6 @@ -import { - Button, - ButtonProps, - IconArrowRight8, - TextIcon, - Translate, -} from '~/components' +import { FormattedMessage } from 'react-intl' + +import { Button, ButtonProps, IconArrowRight8, TextIcon } from '~/components' type ViewAllButtonProps = ButtonProps @@ -23,7 +19,7 @@ export const ViewAllButton: React.FC = ({ ...props }) => { weight="md" textPlacement="left" > - + ) diff --git a/src/components/Layout/NavMenu/Bottom.tsx b/src/components/Layout/NavMenu/Bottom.tsx index df494ba406..46559786ce 100644 --- a/src/components/Layout/NavMenu/Bottom.tsx +++ b/src/components/Layout/NavMenu/Bottom.tsx @@ -1,3 +1,5 @@ +import { FormattedMessage } from 'react-intl' + import { ADD_TOAST, COOKIE_TOKEN_NAME, @@ -12,7 +14,6 @@ import { IconSettings24, Menu, TextIcon, - Translate, useMutation, } from '~/components' import USER_LOGOUT from '~/components/GQL/mutations/userLogout' @@ -36,7 +37,12 @@ const NavMenuBottom: React.FC = ({ isInSideDrawerNav }) => { new CustomEvent(ADD_TOAST, { detail: { color: 'green', - content: , + content: ( + + ), }, }) ) @@ -49,7 +55,12 @@ const NavMenuBottom: React.FC = ({ isInSideDrawerNav }) => { new CustomEvent(ADD_TOAST, { detail: { color: 'red', - content: , + content: ( + + ), }, }) ) @@ -69,7 +80,7 @@ const NavMenuBottom: React.FC = ({ isInSideDrawerNav }) => { spacing="base" size={menuItemSize} > - + @@ -79,7 +90,7 @@ const NavMenuBottom: React.FC = ({ isInSideDrawerNav }) => { spacing="base" size={menuItemSize} > - + @@ -89,7 +100,7 @@ const NavMenuBottom: React.FC = ({ isInSideDrawerNav }) => { spacing="base" size={menuItemSize} > - + diff --git a/src/components/Layout/NavMenu/Top.tsx b/src/components/Layout/NavMenu/Top.tsx index ead02f63be..bb6d725be6 100644 --- a/src/components/Layout/NavMenu/Top.tsx +++ b/src/components/Layout/NavMenu/Top.tsx @@ -1,4 +1,5 @@ import { useContext } from 'react' +import { FormattedMessage } from 'react-intl' import { PATHS } from '~/common/enums' import { toPath } from '~/common/utils' @@ -14,7 +15,7 @@ import { IconWallet24, Menu, TextIcon, - Translate, + // Translate, useFeatures, ViewerContext, } from '~/components' @@ -52,7 +53,7 @@ const NavMenuTop: React.FC = ({ isInSideDrawerNav }) => { spacing="base" size={menuItemSize} > - + {circlePath && ( @@ -62,7 +63,7 @@ const NavMenuTop: React.FC = ({ isInSideDrawerNav }) => { spacing="base" size={menuItemSize} > - + )} @@ -72,7 +73,7 @@ const NavMenuTop: React.FC = ({ isInSideDrawerNav }) => { spacing="base" size={menuItemSize} > - + {(features.add_credit || features.payout) && ( @@ -82,7 +83,7 @@ const NavMenuTop: React.FC = ({ isInSideDrawerNav }) => { spacing="base" size={menuItemSize} > - + )} @@ -92,7 +93,7 @@ const NavMenuTop: React.FC = ({ isInSideDrawerNav }) => { spacing="base" size={menuItemSize} > - + @@ -101,7 +102,7 @@ const NavMenuTop: React.FC = ({ isInSideDrawerNav }) => { spacing="base" size={menuItemSize} > - + @@ -110,7 +111,7 @@ const NavMenuTop: React.FC = ({ isInSideDrawerNav }) => { spacing="base" size={menuItemSize} > - + @@ -119,7 +120,7 @@ const NavMenuTop: React.FC = ({ isInSideDrawerNav }) => { spacing="base" size={menuItemSize} > - + diff --git a/src/components/Layout/SideFooter/index.tsx b/src/components/Layout/SideFooter/index.tsx index 9892d72942..845ca4062b 100644 --- a/src/components/Layout/SideFooter/index.tsx +++ b/src/components/Layout/SideFooter/index.tsx @@ -1,8 +1,9 @@ import Link from 'next/link' import { useContext } from 'react' +import { FormattedMessage } from 'react-intl' import { GUIDE_LINKS, PATHS } from '~/common/enums' -import { LanguageContext, LanguageSwitch, Translate } from '~/components' +import { LanguageContext, LanguageSwitch } from '~/components' import styles from './styles.css' @@ -19,31 +20,40 @@ const SideFooter = () => {
- + - + - + - + - + @@ -52,7 +62,7 @@ const SideFooter = () => { target="_blank" rel="noreferrer" > - + { target="_blank" rel="noreferrer" > - + - + diff --git a/src/components/Layout/SideNav/index.tsx b/src/components/Layout/SideNav/index.tsx index 870937da04..09939ff0a9 100644 --- a/src/components/Layout/SideNav/index.tsx +++ b/src/components/Layout/SideNav/index.tsx @@ -2,9 +2,9 @@ import VisuallyHidden from '@reach/visually-hidden' import Link from 'next/link' import { useContext } from 'react' import FocusLock from 'react-focus-lock' +import { FormattedMessage, useIntl } from 'react-intl' import { PATHS, Z_INDEX } from '~/common/enums' -import { translate } from '~/common/utils' import { Dropdown, hidePopperOnClick, @@ -14,10 +14,8 @@ import { IconNavHomeActive24, IconNavSearch24, IconNavSettings24, - LanguageContext, Media, Menu, - Translate, useRoute, ViewerContext, WriteButton, @@ -30,8 +28,6 @@ import NavListItem from './NavListItem' import styles from './styles.css' const SideNav = () => { - const { lang } = useContext(LanguageContext) - const { isInPath, isPathStartWith, getQuery } = useRoute() const viewer = useContext(ViewerContext) @@ -47,11 +43,17 @@ const SideNav = () => { const isInMe = (!isInNotification && isPathStartWith('/me')) || userName === viewerUserName + const intl = useIntl() return (
- + @@ -64,7 +66,7 @@ const SideNav = () => {
@@ -204,15 +214,22 @@ const EditProfileDialogContent: React.FC = ({ )} } + label={ + + } type="text" name="displayName" required - placeholder={translate({ - id: 'enterDisplayName', - lang, + placeholder={intl.formatMessage({ + defaultMessage: 'Enter Display Name', + description: '', })} - hint={} + hint={ + + } value={values.displayName} error={touched.displayName && errors.displayName} onBlur={handleBlur} @@ -220,14 +237,19 @@ const EditProfileDialogContent: React.FC = ({ /> } + label={} name="description" required - placeholder={translate({ - id: 'enterUserDescription', - lang, + placeholder={intl.formatMessage({ + defaultMessage: 'Enter Bio', + description: '', })} - hint={} + hint={ + + } value={values.description} error={touched.description && errors.description} onBlur={handleBlur} @@ -243,7 +265,7 @@ const EditProfileDialogContent: React.FC = ({ type="submit" form={formId} disabled={!isValid || isSubmitting} - text={} + text={} loading={isSubmitting} /> ) diff --git a/src/views/Circle/CircleDetailTabs/index.tsx b/src/views/Circle/CircleDetailTabs/index.tsx index f047b35bd5..40dbf41c88 100644 --- a/src/views/Circle/CircleDetailTabs/index.tsx +++ b/src/views/Circle/CircleDetailTabs/index.tsx @@ -1,5 +1,7 @@ +import { FormattedMessage } from 'react-intl' + import { toPath } from '~/common/utils' -import { Tabs, Translate, useRoute } from '~/components' +import { Tabs, useRoute } from '~/components' const CircleDetailTabs = () => { const { isInPath, getQuery } = useRoute() @@ -21,21 +23,21 @@ const CircleDetailTabs = () => { return ( - + - + - + ) diff --git a/src/views/Circle/Profile/AddCircleArticle/Button.tsx b/src/views/Circle/Profile/AddCircleArticle/Button.tsx index b8badd6228..42162d7574 100644 --- a/src/views/Circle/Profile/AddCircleArticle/Button.tsx +++ b/src/views/Circle/Profile/AddCircleArticle/Button.tsx @@ -1,4 +1,6 @@ -import { Button, IconPen16, TextIcon, Translate } from '~/components' +import { FormattedMessage } from 'react-intl' + +import { Button, IconPen16, TextIcon } from '~/components' import AddCircleArticleDialog from './Dialog' @@ -22,10 +24,9 @@ const AddArticlesButton = ({ circle }: AddArticlesButtonProps) => { aria-haspopup="dialog" > } weight="md" size="md-s"> - diff --git a/src/views/Circle/Profile/AddCircleArticle/Dialog/ConfirmContent.tsx b/src/views/Circle/Profile/AddCircleArticle/Dialog/ConfirmContent.tsx index 12dc0dc0f2..2a70be6123 100644 --- a/src/views/Circle/Profile/AddCircleArticle/Dialog/ConfirmContent.tsx +++ b/src/views/Circle/Profile/AddCircleArticle/Dialog/ConfirmContent.tsx @@ -1,6 +1,7 @@ import { useState } from 'react' +import { FormattedMessage } from 'react-intl' -import { Dialog, Translate } from '~/components' +import { Dialog } from '~/components' import SelectLicense from '~/components/Editor/ToggleAccess/SelectLicense' import { ArticleLicenseType } from '~/gql/graphql' @@ -29,7 +30,7 @@ const ConfirmContent: React.FC = ({ onClick={() => onConfirm(license === ArticleLicenseType.Arr, license) } - text={} + text={} loading={loading} /> } diff --git a/src/views/Circle/Profile/AddCircleArticle/Dialog/index.tsx b/src/views/Circle/Profile/AddCircleArticle/Dialog/index.tsx index d68a1ae0a2..6fc212ec08 100644 --- a/src/views/Circle/Profile/AddCircleArticle/Dialog/index.tsx +++ b/src/views/Circle/Profile/AddCircleArticle/Dialog/index.tsx @@ -1,5 +1,6 @@ import dynamic from 'next/dynamic' import { useContext, useState } from 'react' +import { FormattedMessage } from 'react-intl' import { ADD_TOAST, REFETCH_CIRCLE_DETAIL_ARTICLES } from '~/common/enums' import { translate } from '~/common/utils' @@ -7,7 +8,6 @@ import { Dialog, LanguageContext, Spinner, - Translate, useDialogSwitch, useMutation, useStep, @@ -117,7 +117,9 @@ const AddCircleArticleDialog = ({ onSave={onSaveArticles} nodes={articles} saving={loading} - headerRightButtonText={} + headerRightButtonText={ + + } closeDialog={closeDialog} /> )} diff --git a/src/views/Circle/Profile/DropdownActions/index.tsx b/src/views/Circle/Profile/DropdownActions/index.tsx index 832dd79769..cba10d0ff9 100644 --- a/src/views/Circle/Profile/DropdownActions/index.tsx +++ b/src/views/Circle/Profile/DropdownActions/index.tsx @@ -1,8 +1,9 @@ import _isEmpty from 'lodash/isEmpty' import _pickBy from 'lodash/pickBy' import { useContext } from 'react' +import { FormattedMessage, useIntl } from 'react-intl' -import { toPath, translate } from '~/common/utils' +import { toPath } from '~/common/utils' import { Button, DropdownDialog, @@ -11,10 +12,8 @@ import { IconLogout24, IconMore32, IconSettings32, - LanguageContext, Menu, TextIcon, - Translate, UnsubscribeCircleDialog, ViewerContext, } from '~/components' @@ -51,14 +50,16 @@ const BaseDropdownActions = ({ openUnsubscribeCircleDialog, }: BaseDropdownActionsProps) => { - const { lang } = useContext(LanguageContext) - + const intl = useIntl() const Content = ({ isInDropdown }: { isInDropdown?: boolean }) => ( {isCircleOwner && ( } size="md" spacing="base"> - + )} @@ -70,7 +71,7 @@ const BaseDropdownActions = ({ size="md" spacing="base" > - + )} @@ -78,7 +79,10 @@ const BaseDropdownActions = ({ {hasUnsubscribeCircle && ( } size="md" spacing="base"> - + )} @@ -99,7 +103,10 @@ const BaseDropdownActions = ({ {({ openDialog, type, ref }) => ( ) diff --git a/src/views/Circle/Profile/FollowButton/Unfollow.tsx b/src/views/Circle/Profile/FollowButton/Unfollow.tsx index 29564ff30d..751059de13 100644 --- a/src/views/Circle/Profile/FollowButton/Unfollow.tsx +++ b/src/views/Circle/Profile/FollowButton/Unfollow.tsx @@ -1,13 +1,8 @@ import _isNil from 'lodash/isNil' import { useContext, useState } from 'react' +import { FormattedMessage } from 'react-intl' -import { - Button, - TextIcon, - Translate, - useMutation, - ViewerContext, -} from '~/components' +import { Button, TextIcon, useMutation, ViewerContext } from '~/components' import TOGGLE_FOLLOW_CIRCLE from '~/components/GQL/mutations/toggleFollowCircle' import updateCircleFollowerCount from '~/components/GQL/updates/circleFollowerCount' import updateCircleFollowers from '~/components/GQL/updates/circleFollowers' @@ -64,7 +59,11 @@ const Unfollow = ({ circle }: UnfollowCircleProps) => { onMouseLeave={() => setHover(false)} > - {hover ? : } + {hover ? ( + + ) : ( + + )} ) diff --git a/src/views/Circle/Profile/FollowersDialog/Content.tsx b/src/views/Circle/Profile/FollowersDialog/Content.tsx index 34f45b35d8..465a4d17dd 100644 --- a/src/views/Circle/Profile/FollowersDialog/Content.tsx +++ b/src/views/Circle/Profile/FollowersDialog/Content.tsx @@ -1,4 +1,5 @@ import { useContext, useEffect } from 'react' +import { FormattedMessage } from 'react-intl' import { analytics, mergeConnections } from '~/common/utils' import { @@ -8,7 +9,6 @@ import { List, QueryError, Spinner, - Translate, usePublicQuery, useRoute, ViewerContext, @@ -91,11 +91,7 @@ const FollowersDialogContent = () => { return ( + } /> ) diff --git a/src/views/Circle/Profile/FollowersDialog/index.tsx b/src/views/Circle/Profile/FollowersDialog/index.tsx index da9dff3a11..6993867eca 100644 --- a/src/views/Circle/Profile/FollowersDialog/index.tsx +++ b/src/views/Circle/Profile/FollowersDialog/index.tsx @@ -1,6 +1,7 @@ import dynamic from 'next/dynamic' +import { FormattedMessage } from 'react-intl' -import { Dialog, Spinner, Translate, useDialogSwitch } from '~/components' +import { Dialog, Spinner, useDialogSwitch } from '~/components' import { ProfileCirclePublicFragment } from '~/gql/graphql' interface FollowersDialogProps { @@ -20,10 +21,12 @@ const BaseFollowersDialog = ({ circle, children }: FollowersDialogProps) => { } closeDialog={closeDialog} diff --git a/src/views/Circle/Profile/MembersDialog/Content.tsx b/src/views/Circle/Profile/MembersDialog/Content.tsx index a657b24a6d..a6ecc3e25e 100644 --- a/src/views/Circle/Profile/MembersDialog/Content.tsx +++ b/src/views/Circle/Profile/MembersDialog/Content.tsx @@ -1,4 +1,5 @@ import { useContext, useEffect } from 'react' +import { FormattedMessage } from 'react-intl' import { analytics, mergeConnections } from '~/common/utils' import { @@ -8,7 +9,6 @@ import { List, QueryError, Spinner, - Translate, usePublicQuery, useRoute, ViewerContext, @@ -92,10 +92,9 @@ const MembersDialogContent = () => { return ( } /> diff --git a/src/views/Circle/Profile/MembersDialog/index.tsx b/src/views/Circle/Profile/MembersDialog/index.tsx index c3586eb635..67e381f7e5 100644 --- a/src/views/Circle/Profile/MembersDialog/index.tsx +++ b/src/views/Circle/Profile/MembersDialog/index.tsx @@ -1,6 +1,7 @@ import dynamic from 'next/dynamic' +import { FormattedMessage } from 'react-intl' -import { Dialog, Spinner, Translate, useDialogSwitch } from '~/components' +import { Dialog, Spinner, useDialogSwitch } from '~/components' interface MembersDialogProps { children: ({ openDialog }: { openDialog: () => void }) => React.ReactNode @@ -20,7 +21,12 @@ const BaseMembersDialog = ({ children }: MembersDialogProps) => { } + title={ + + } closeDialog={closeDialog} closeTextId="close" /> diff --git a/src/views/Circle/Profile/index.tsx b/src/views/Circle/Profile/index.tsx index e50feeeda3..0ddf9e55d7 100644 --- a/src/views/Circle/Profile/index.tsx +++ b/src/views/Circle/Profile/index.tsx @@ -1,4 +1,5 @@ import { useContext, useEffect, useState } from 'react' +import { FormattedMessage } from 'react-intl' import ICON_AVATAR_DEFAULT from '@/public/static/icons/72px/avatar-default.svg' import CIRCLE_COVER from '@/public/static/images/circle-cover.svg' @@ -13,7 +14,6 @@ import { Spinner, SubscribeCircleDialog, Throw404, - Translate, useEventListener, usePublicQuery, useRoute, @@ -184,7 +184,8 @@ const CircleProfile = () => {
{price.amount}
- {price.currency} / + {price.currency} /{' '} +
)} @@ -216,7 +217,8 @@ const CircleProfile = () => { {numAbbr(circle.members.totalCount)} - + {/* */} + )} @@ -231,7 +233,9 @@ const CircleProfile = () => { {numAbbr(circle.followers.totalCount)} - + {/* */} + + )} diff --git a/src/views/Me/Analytics/EmptyAnalytics/index.tsx b/src/views/Me/Analytics/EmptyAnalytics/index.tsx index aa47722856..49edb5cfd8 100644 --- a/src/views/Me/Analytics/EmptyAnalytics/index.tsx +++ b/src/views/Me/Analytics/EmptyAnalytics/index.tsx @@ -23,10 +23,12 @@ const EmptyAnalytics = () => { const intl = useIntl() const [putDraft] = useMutation(CREATE_DRAFT, { - variables: { title: intl.formatMessage({ - defaultMessage: 'Untitled', - description: '' - }) }, + variables: { + title: intl.formatMessage({ + defaultMessage: 'Untitled', + description: '', + }), + }, }) return ( @@ -38,12 +40,18 @@ const EmptyAnalytics = () => { color="black" size="md" > - +

- +

@@ -68,7 +76,10 @@ const EmptyAnalytics = () => {

- + { {numAbbr(totalCount)}   - + diff --git a/src/views/TagDetail/Buttons/AddButton/AddMyArticlesButton/index.tsx b/src/views/TagDetail/Buttons/AddButton/AddMyArticlesButton/index.tsx index ef83b61e1c..6a82bb7b40 100644 --- a/src/views/TagDetail/Buttons/AddButton/AddMyArticlesButton/index.tsx +++ b/src/views/TagDetail/Buttons/AddButton/AddMyArticlesButton/index.tsx @@ -1,4 +1,6 @@ -import { IconHashTag16, Menu, TextIcon, Translate } from '~/components' +import { FormattedMessage } from 'react-intl' + +import { IconHashTag16, Menu, TextIcon } from '~/components' interface AddMyArticlesButtonProps { onClick: () => void @@ -10,7 +12,10 @@ const AddMyArticlesButton: React.FC = ({ return ( } size="md" spacing="base"> - + ) diff --git a/src/views/TagDetail/Buttons/AddButton/CreateDraftMenuItem/index.tsx b/src/views/TagDetail/Buttons/AddButton/CreateDraftMenuItem/index.tsx index f3f9d26836..4dc72d9db8 100644 --- a/src/views/TagDetail/Buttons/AddButton/CreateDraftMenuItem/index.tsx +++ b/src/views/TagDetail/Buttons/AddButton/CreateDraftMenuItem/index.tsx @@ -1,14 +1,13 @@ import { useRouter } from 'next/router' import { useContext } from 'react' +import { FormattedMessage, useIntl } from 'react-intl' import { ADD_TOAST, OPEN_LIKE_COIN_DIALOG } from '~/common/enums' -import { analytics, toPath, translate } from '~/common/utils' +import { analytics, toPath } from '~/common/utils' import { IconAdd24, - LanguageContext, Menu, TextIcon, - Translate, useMutation, ViewerContext, } from '~/components' @@ -22,10 +21,9 @@ interface CreateDraftButtonProps { const BaseCreateDraftButton = ({ onClick }: { onClick: () => any }) => ( } size="md" spacing="base"> - @@ -33,12 +31,15 @@ const BaseCreateDraftButton = ({ onClick }: { onClick: () => any }) => ( const CreateDraftButton: React.FC = ({ tag }) => { const router = useRouter() - const { lang } = useContext(LanguageContext) const viewer = useContext(ViewerContext) + const intl = useIntl() const [putDraft] = useMutation(CREATE_DRAFT, { variables: { - title: translate({ id: 'untitle', lang }), + title: intl.formatMessage({ + defaultMessage: 'Untitled', + description: '', + }), tags: [tag.content], }, }) @@ -49,7 +50,12 @@ const CreateDraftButton: React.FC = ({ tag }) => { new CustomEvent(ADD_TOAST, { detail: { color: 'red', - content: , + content: ( + + ), }, }) ) diff --git a/src/views/TagDetail/Buttons/FollowButton/Follow.tsx b/src/views/TagDetail/Buttons/FollowButton/Follow.tsx index 9d54c36983..c9ae2f13e1 100644 --- a/src/views/TagDetail/Buttons/FollowButton/Follow.tsx +++ b/src/views/TagDetail/Buttons/FollowButton/Follow.tsx @@ -1,5 +1,6 @@ import _isNil from 'lodash/isNil' import { useContext } from 'react' +import { FormattedMessage } from 'react-intl' import { OPEN_UNIVERSAL_AUTH_DIALOG, @@ -9,7 +10,6 @@ import { Button, IconAdd16, TextIcon, - Translate, useMutation, ViewerContext, } from '~/components' @@ -71,7 +71,7 @@ const Follow = ({ tag }: FollowProps) => { onClick={onClick} > } weight="md" size="md-s"> - + ) diff --git a/src/views/TagDetail/Buttons/FollowButton/Unfollow.tsx b/src/views/TagDetail/Buttons/FollowButton/Unfollow.tsx index 9b41e8f6e4..b249c00887 100644 --- a/src/views/TagDetail/Buttons/FollowButton/Unfollow.tsx +++ b/src/views/TagDetail/Buttons/FollowButton/Unfollow.tsx @@ -1,13 +1,8 @@ import _isNil from 'lodash/isNil' import { useContext, useState } from 'react' +import { FormattedMessage } from 'react-intl' -import { - Button, - TextIcon, - Translate, - useMutation, - ViewerContext, -} from '~/components' +import { Button, TextIcon, useMutation, ViewerContext } from '~/components' import TOGGLE_FOLLOW_TAG from '~/components/GQL/mutations/toggleFollowTag' import updateTagFollowers from '~/components/GQL/updates/tagFollowers' import { @@ -55,7 +50,11 @@ const Unfollow = ({ tag }: UnfollowTagProps) => { onMouseLeave={() => setHover(false)} > - {hover ? : } + {hover ? ( + + ) : ( + + )} ) diff --git a/src/views/TagDetail/Community/Maintainers/index.tsx b/src/views/TagDetail/Community/Maintainers/index.tsx index 41827410b8..e4bda9d225 100644 --- a/src/views/TagDetail/Community/Maintainers/index.tsx +++ b/src/views/TagDetail/Community/Maintainers/index.tsx @@ -1,4 +1,5 @@ import { useQuery } from '@apollo/react-hooks' +import { FormattedMessage } from 'react-intl' import { Button, @@ -7,7 +8,6 @@ import { Spinner, TagEditorDialog, TextIcon, - Translate, UserDigest, } from '~/components' import TAG_MAINTAINERS from '~/components/GQL/queries/tagMaintainers' @@ -34,7 +34,7 @@ const ManageButton = ({ id }: Props) => { aria-haspopup="dialog" > } weight="md" size={'xs'}> - + )} @@ -74,7 +74,7 @@ const Maintainers = ({ id, isOwner }: Props) => { <>

- +
{isOwner && (
@@ -96,7 +96,7 @@ const Maintainers = ({ id, isOwner }: Props) => { <>
- + ({editors.length})
diff --git a/src/views/TagDetail/Community/Participants/index.tsx b/src/views/TagDetail/Community/Participants/index.tsx index fb371722df..788cc82d37 100644 --- a/src/views/TagDetail/Community/Participants/index.tsx +++ b/src/views/TagDetail/Community/Participants/index.tsx @@ -1,4 +1,5 @@ import { NetworkStatus } from 'apollo-client' +import { FormattedMessage } from 'react-intl' import { analytics, mergeConnections } from '~/common/utils' import { @@ -6,7 +7,6 @@ import { List, QueryError, Spinner, - Translate, usePublicQuery, UserDigest, } from '~/components' @@ -77,7 +77,7 @@ const Participants = ({ id }: Props) => { <>
- + ({count})
diff --git a/src/views/TagDetail/DropdownActions/index.tsx b/src/views/TagDetail/DropdownActions/index.tsx index 4aefc9c394..4217bf60e2 100644 --- a/src/views/TagDetail/DropdownActions/index.tsx +++ b/src/views/TagDetail/DropdownActions/index.tsx @@ -1,9 +1,9 @@ import _isEmpty from 'lodash/isEmpty' import _pickBy from 'lodash/pickBy' import { useContext } from 'react' +import { FormattedMessage, useIntl } from 'react-intl' import { ADD_TOAST, REFETCH_TAG_DETAIL_ARTICLES } from '~/common/enums' -import { translate } from '~/common/utils' import { Button, DropdownDialog, @@ -12,13 +12,11 @@ import { IconProfile24, IconRemove24, IconSettings32, - LanguageContext, Menu, TagDialog, TagEditorDialog, TagLeaveDialog, TextIcon, - Translate, useMutation, ViewerContext, } from '~/components' @@ -65,14 +63,13 @@ const BaseDropdownActions = ({ openTagEditorDialog, openTagLeaveDialog, }: BaseDropdownActionsProps) => { - const { lang } = useContext(LanguageContext) - + const intl = useIntl() const Content = ({ isInDropdown }: { isInDropdown?: boolean }) => ( {hasEditTag && ( } size="md" spacing="base"> - + )} @@ -82,10 +79,9 @@ const BaseDropdownActions = ({ ariaHasPopup="dialog" > } size="md" spacing="base"> - @@ -93,10 +89,9 @@ const BaseDropdownActions = ({ {hasManageCommunity && ( } size="md" spacing="base"> - @@ -109,10 +104,9 @@ const BaseDropdownActions = ({ size="md" spacing="base" > - @@ -135,7 +129,10 @@ const BaseDropdownActions = ({
diff --git a/src/views/TagDetail/Owner/index.tsx b/src/views/TagDetail/Owner/index.tsx index c01b894dd8..369be2e950 100644 --- a/src/views/TagDetail/Owner/index.tsx +++ b/src/views/TagDetail/Owner/index.tsx @@ -1,4 +1,5 @@ import { useContext } from 'react' +import { FormattedMessage } from 'react-intl' import { ADD_TOAST } from '~/common/enums' import { @@ -6,7 +7,6 @@ import { IconAvatarEmpty24, TagAdoptionDialog, TextIcon, - Translate, UserDigest, ViewerContext, } from '~/components' @@ -22,7 +22,12 @@ const Owner = ({ tag }: { tag: TagFragmentFragment }) => { new CustomEvent(ADD_TOAST, { detail: { color: 'red', - content: , + content: ( + + ), }, }) ) @@ -42,10 +47,9 @@ const Owner = ({ tag }: { tag: TagFragmentFragment }) => { size="md-s" spacing="xtight" > -
@@ -62,7 +66,10 @@ const Owner = ({ tag }: { tag: TagFragmentFragment }) => { aria-haspopup="dialog" > - + )} @@ -84,7 +91,7 @@ const Owner = ({ tag }: { tag: TagFragmentFragment }) => { /> - +
{/* editos */}
diff --git a/src/views/TagDetail/RelatedTags/index.tsx b/src/views/TagDetail/RelatedTags/index.tsx index d8704f3d01..e58615f8d1 100644 --- a/src/views/TagDetail/RelatedTags/index.tsx +++ b/src/views/TagDetail/RelatedTags/index.tsx @@ -3,6 +3,7 @@ import classNames from 'classnames' import _chunk from 'lodash/chunk' import _get from 'lodash/get' import _random from 'lodash/random' +import { FormattedMessage } from 'react-intl' import { PATHS } from '~/common/enums' import { analytics } from '~/common/utils' @@ -12,7 +13,6 @@ import { ShuffleButton, Slides, TagDigest, - Translate, usePublicQuery, ViewAllButton, ViewMoreCard, @@ -40,7 +40,10 @@ const RelatedTagsHeader = ({ return ( + } is="h2" hasNoBorder @@ -131,7 +134,7 @@ const RelatedTags: React.FC = ({ tagId, inSidebar }) => { textIconProps={{ size: 'sm', weight: 'md', spacing: 'xxtight' }} textAlign="center" > - +
diff --git a/src/views/TagDetail/index.tsx b/src/views/TagDetail/index.tsx index ac5ea7f56d..3b209a021f 100644 --- a/src/views/TagDetail/index.tsx +++ b/src/views/TagDetail/index.tsx @@ -1,5 +1,6 @@ import dynamic from 'next/dynamic' import { useContext, useEffect, useState } from 'react' +import { FormattedMessage } from 'react-intl' import IMAGE_TAG_COVER from '@/public/static/images/tag-cover.png' import { ERROR_CODES } from '~/common/enums' @@ -21,7 +22,6 @@ import { Spinner, Tabs, Throw404, - Translate, useFeatures, usePublicQuery, useRoute, @@ -203,11 +203,11 @@ const TagDetail = ({ tag }: { tag: TagFragmentFragment }) => { changeFeed('hottest')}> - + changeFeed('latest')}> - + {hasSelectedFeed && ( @@ -215,12 +215,12 @@ const TagDetail = ({ tag }: { tag: TagFragmentFragment }) => { selected={isSelected} onClick={() => changeFeed('selected')} > - + )} changeFeed('creators')}> - + From bc08664661055baccb77c3a6d9b2b0089f0cab78 Mon Sep 17 00:00:00 2001 From: Aka jazzy Date: Wed, 8 Mar 2023 17:54:39 +0800 Subject: [PATCH 22/31] feat(i18n): add NFT collection translation --- lang/default.json | 8 +++++++ lang/en.json | 8 +++++++ lang/zh-Hans.json | 8 +++++++ lang/zh-Hant.json | 8 +++++++ .../EditProfileDialog/NFTCollection/index.tsx | 22 +++++++++---------- 5 files changed, 42 insertions(+), 12 deletions(-) diff --git a/lang/default.json b/lang/default.json index 56ea09fb42..752e272f42 100644 --- a/lang/default.json +++ b/lang/default.json @@ -135,6 +135,10 @@ "defaultMessage": "replied to topics", "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx" }, + "A3wDZ8": { + "defaultMessage": "My NFT Collections", + "description": "src/components/UserProfile/DropdownActions/EditProfileDialog/NFTCollection/index.tsx" + }, "A41QIy": { "defaultMessage": "Enter Password", "description": "" @@ -343,6 +347,10 @@ "defaultMessage": "Description", "description": "" }, + "QCo7Gc": { + "defaultMessage": "Select NFT as your avatar", + "description": "src/components/UserProfile/DropdownActions/EditProfileDialog/NFTCollection/index.tsx" + }, "QV19cI": { "defaultMessage": "Failed to republish article", "description": "src/components/Notice/ArticleNotice/RevisedArticleNotPublishedNotice.tsx" diff --git a/lang/en.json b/lang/en.json index 8c7f0a2d23..8c11ceac47 100644 --- a/lang/en.json +++ b/lang/en.json @@ -786,5 +786,13 @@ "jvo0vs": { "defaultMessage": "Save", "description": "" + }, + "A3wDZ8": { + "defaultMessage": "My NFT Collections", + "description": "src/components/UserProfile/DropdownActions/EditProfileDialog/NFTCollection/index.tsx" + }, + "QCo7Gc": { + "defaultMessage": "Select NFT as your avatar", + "description": "src/components/UserProfile/DropdownActions/EditProfileDialog/NFTCollection/index.tsx" } } diff --git a/lang/zh-Hans.json b/lang/zh-Hans.json index 7bf8c5b4d0..8dd66fd788 100644 --- a/lang/zh-Hans.json +++ b/lang/zh-Hans.json @@ -786,5 +786,13 @@ "jvo0vs": { "defaultMessage": "保存", "description": "" + }, + "A3wDZ8": { + "defaultMessage": "我的 NFT 收藏", + "description": "src/components/UserProfile/DropdownActions/EditProfileDialog/NFTCollection/index.tsx" + }, + "QCo7Gc": { + "defaultMessage": "选择 NFT 作为你的头像", + "description": "src/components/UserProfile/DropdownActions/EditProfileDialog/NFTCollection/index.tsx" } } diff --git a/lang/zh-Hant.json b/lang/zh-Hant.json index bfe8d80c97..c4734cfe8d 100644 --- a/lang/zh-Hant.json +++ b/lang/zh-Hant.json @@ -786,5 +786,13 @@ "jvo0vs": { "defaultMessage": "儲存", "description": "" + }, + "A3wDZ8": { + "defaultMessage": "我的 NFT 收藏", + "description": "src/components/UserProfile/DropdownActions/EditProfileDialog/NFTCollection/index.tsx" + }, + "QCo7Gc": { + "defaultMessage": "選擇 NFT 作為你的頭像", + "description": "src/components/UserProfile/DropdownActions/EditProfileDialog/NFTCollection/index.tsx" } } diff --git a/src/components/UserProfile/DropdownActions/EditProfileDialog/NFTCollection/index.tsx b/src/components/UserProfile/DropdownActions/EditProfileDialog/NFTCollection/index.tsx index 171d0c8e99..799c1f106b 100644 --- a/src/components/UserProfile/DropdownActions/EditProfileDialog/NFTCollection/index.tsx +++ b/src/components/UserProfile/DropdownActions/EditProfileDialog/NFTCollection/index.tsx @@ -1,12 +1,10 @@ -import { useContext, useState } from 'react' +import { useState } from 'react' +import { FormattedMessage, useIntl } from 'react-intl' -import { translate } from '~/common/utils' import { Avatar, Form, IconChecked, - LanguageContext, - Translate, } from '~/components' import { EditProfileDialogUserPrivateFragment } from '~/gql/graphql' @@ -55,15 +53,15 @@ const NFTCollectionItem = ({ } const NFTCollection: React.FC = ({ nfts, setField }) => { - const { lang } = useContext(LanguageContext) const [selectedNFTIndex, setSelectedNFTIndex] = useState(-1) const fieldId = `field-nft-collection` const fieldMsgId = `field-msg-nft-collection` + const intl = useIntl() return ( } + label={} htmlFor={fieldId} /> @@ -88,12 +86,12 @@ const NFTCollection: React.FC = ({ nfts, setField }) => { ) From e664a92cd23d3b9221d416de54efe5237d9bf3c0 Mon Sep 17 00:00:00 2001 From: Aka jazzy Date: Wed, 8 Mar 2023 17:59:10 +0800 Subject: [PATCH 23/31] feat(i18n): add Maintainer translation --- lang/default.json | 32 ++++++++++++++----- lang/en.json | 28 ++++++++++++++-- lang/zh-Hans.json | 28 ++++++++++++++-- lang/zh-Hant.json | 28 ++++++++++++++-- .../EditProfileDialog/NFTCollection/index.tsx | 24 +++++++------- .../Me/Analytics/EmptyAnalytics/index.tsx | 2 +- src/views/Me/Analytics/SelectPeriod/index.tsx | 20 +++++++----- src/views/Me/Analytics/index.tsx | 6 ++-- src/views/TagDetail/Owner/index.tsx | 2 +- src/views/TagDetail/index.tsx | 2 +- 10 files changed, 132 insertions(+), 40 deletions(-) diff --git a/lang/default.json b/lang/default.json index 752e272f42..6696f3f157 100644 --- a/lang/default.json +++ b/lang/default.json @@ -11,6 +11,10 @@ "defaultMessage": "is growing", "description": "src/components/Notice/ArticleNotice/CircleNewArticle.tsx" }, + "/IMR+8": { + "defaultMessage": "Top Supporters", + "description": "" + }, "/asuIY": { "defaultMessage": "Enter Community", "description": "src/components/Forms/EmailSignUpForm/Complete.tsx" @@ -135,6 +139,10 @@ "defaultMessage": "replied to topics", "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx" }, + "A3rLZt": { + "defaultMessage": "Last {months} months", + "description": "src/views/Me/Analytics/SelectPeriod/index.tsx" + }, "A3wDZ8": { "defaultMessage": "My NFT Collections", "description": "src/components/UserProfile/DropdownActions/EditProfileDialog/NFTCollection/index.tsx" @@ -303,10 +311,6 @@ "defaultMessage": "Wallet address will be part of your digital identity and shown in your profile page.", "description": "src/components/Forms/WalletAuthForm/Select.tsx" }, - "MW9PzQ": { - "defaultMessage": "Top Supporters", - "description": "src/views/Me/Analytics/EmptyAnalytics/index.tsx" - }, "MkwOFW": { "defaultMessage": "Read History", "description": "" @@ -339,6 +343,10 @@ "defaultMessage": "liked your article", "description": "src/components/Notice/ArticleNotice/ArticleNewAppreciationNotice.tsx" }, + "Po+kJe": { + "defaultMessage": "Last {month} month", + "description": "src/views/Me/Analytics/SelectPeriod/index.tsx" + }, "Pp/0po": { "defaultMessage": "Shuffle", "description": "" @@ -475,6 +483,10 @@ "defaultMessage": "replied to your discussion on", "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx" }, + "b3onWZ": { + "defaultMessage": "Last {days} days", + "description": "src/views/Me/Analytics/SelectPeriod/index.tsx" + }, "bVZDVx": { "defaultMessage": "withdrawal process has started. Please refer to your bank for payout status.", "description": "src/components/Notice/TransactionNotice/PaymentPayoutNotice.tsx" @@ -519,6 +531,10 @@ "defaultMessage": "uh-oh,", "description": "src/components/Notice/TagNotice/TagLeaveEditorNotice.tsx" }, + "eTpiYa": { + "defaultMessage": "No data yet.", + "description": "" + }, "eXDZGQ": { "defaultMessage": "Maintainer", "description": "" @@ -682,10 +698,6 @@ "defaultMessage": "Email will not be used as a login but only as a contact channel.", "description": "" }, - "rMKNsr": { - "defaultMessage": "c", - "description": "" - }, "reOeq5": { "defaultMessage": "You have created your personal creative space. Publish your first work!", "description": "src/components/Forms/EmailSignUpForm/Complete.tsx" @@ -789,5 +801,9 @@ "z4NaU2": { "defaultMessage": "Your", "description": "src/components/Notice/TransactionNotice/PaymentPayoutNotice.tsx" + }, + "zQvVDJ": { + "defaultMessage": "All", + "description": "" } } diff --git a/lang/en.json b/lang/en.json index 8c11ceac47..f9f293383a 100644 --- a/lang/en.json +++ b/lang/en.json @@ -643,9 +643,9 @@ "defaultMessage": "Manage", "description": "" }, - "tjvyrl": { + "eXDZGQ": { "defaultMessage": "Maintainer", - "description": "src/views/TagDetail/Community/Maintainers/index.tsx" + "description": "" }, "dg3JCQ": { "defaultMessage": "collaborators", @@ -794,5 +794,29 @@ "QCo7Gc": { "defaultMessage": "Select NFT as your avatar", "description": "src/components/UserProfile/DropdownActions/EditProfileDialog/NFTCollection/index.tsx" + }, + "eTpiYa": { + "defaultMessage": "No data yet.", + "description": "" + }, + "/IMR+8": { + "defaultMessage": "Top Supporters", + "description": "" + }, + "b3onWZ": { + "defaultMessage": "Last {days} days", + "description": "src/views/Me/Analytics/SelectPeriod/index.tsx" + }, + "Po+kJe": { + "defaultMessage": "Last {months} month", + "description": "src/views/Me/Analytics/SelectPeriod/index.tsx" + }, + "A3rLZt": { + "defaultMessage": "Last {months} months", + "description": "src/views/Me/Analytics/SelectPeriod/index.tsx" + }, + "zQvVDJ": { + "defaultMessage": "All", + "description": "" } } diff --git a/lang/zh-Hans.json b/lang/zh-Hans.json index 8dd66fd788..ba319c0318 100644 --- a/lang/zh-Hans.json +++ b/lang/zh-Hans.json @@ -639,9 +639,9 @@ "defaultMessage": "管理", "description": "" }, - "tjvyrl": { + "eXDZGQ": { "defaultMessage": "主理人", - "description": "src/views/TagDetail/Community/Maintainers/index.tsx" + "description": "" }, "dg3JCQ": { "defaultMessage": "协作者", @@ -794,5 +794,29 @@ "QCo7Gc": { "defaultMessage": "选择 NFT 作为你的头像", "description": "src/components/UserProfile/DropdownActions/EditProfileDialog/NFTCollection/index.tsx" + }, + "eTpiYa": { + "defaultMessage": "尚无支持数据", + "description": "" + }, + "/IMR+8": { + "defaultMessage": "支持排行榜", + "description": "" + }, + "b3onWZ": { + "defaultMessage": "最近 {days} 天", + "description": "src/views/Me/Analytics/SelectPeriod/index.tsx" + }, + "Po+kJe": { + "defaultMessage": "最近 {month} 个月", + "description": "src/views/Me/Analytics/SelectPeriod/index.tsx" + }, + "A3rLZt": { + "defaultMessage": "最近 {months} 个月", + "description": "src/views/Me/Analytics/SelectPeriod/index.tsx" + }, + "zQvVDJ": { + "defaultMessage": "全部", + "description": "" } } diff --git a/lang/zh-Hant.json b/lang/zh-Hant.json index c4734cfe8d..5c251f4913 100644 --- a/lang/zh-Hant.json +++ b/lang/zh-Hant.json @@ -639,9 +639,9 @@ "defaultMessage": "管理", "description": "" }, - "tjvyrl": { + "eXDZGQ": { "defaultMessage": "主理人", - "description": "src/views/TagDetail/Community/Maintainers/index.tsx" + "description": "" }, "dg3JCQ": { "defaultMessage": "協作者", @@ -794,5 +794,29 @@ "QCo7Gc": { "defaultMessage": "選擇 NFT 作為你的頭像", "description": "src/components/UserProfile/DropdownActions/EditProfileDialog/NFTCollection/index.tsx" + }, + "eTpiYa": { + "defaultMessage": "尚無支持數據", + "description": "" + }, + "/IMR+8": { + "defaultMessage": "支持排行榜", + "description": "" + }, + "b3onWZ": { + "defaultMessage": "最近 {days} 天", + "description": "src/views/Me/Analytics/SelectPeriod/index.tsx" + }, + "Po+kJe": { + "defaultMessage": "最近 {month} 個月", + "description": "src/views/Me/Analytics/SelectPeriod/index.tsx" + }, + "A3rLZt": { + "defaultMessage": "最近 {months} 個月", + "description": "src/views/Me/Analytics/SelectPeriod/index.tsx" + }, + "zQvVDJ": { + "defaultMessage": "全部", + "description": "" } } diff --git a/src/components/UserProfile/DropdownActions/EditProfileDialog/NFTCollection/index.tsx b/src/components/UserProfile/DropdownActions/EditProfileDialog/NFTCollection/index.tsx index 799c1f106b..a02aaa6c66 100644 --- a/src/components/UserProfile/DropdownActions/EditProfileDialog/NFTCollection/index.tsx +++ b/src/components/UserProfile/DropdownActions/EditProfileDialog/NFTCollection/index.tsx @@ -1,11 +1,7 @@ import { useState } from 'react' import { FormattedMessage, useIntl } from 'react-intl' -import { - Avatar, - Form, - IconChecked, -} from '~/components' +import { Avatar, Form, IconChecked } from '~/components' import { EditProfileDialogUserPrivateFragment } from '~/gql/graphql' import styles from './styles.css' @@ -61,7 +57,12 @@ const NFTCollection: React.FC = ({ nfts, setField }) => { return ( } + label={ + + } htmlFor={fieldId} /> @@ -86,12 +87,11 @@ const NFTCollection: React.FC = ({ nfts, setField }) => { ) diff --git a/src/views/Me/Analytics/EmptyAnalytics/index.tsx b/src/views/Me/Analytics/EmptyAnalytics/index.tsx index 49edb5cfd8..2d28f04eb5 100644 --- a/src/views/Me/Analytics/EmptyAnalytics/index.tsx +++ b/src/views/Me/Analytics/EmptyAnalytics/index.tsx @@ -42,7 +42,7 @@ const EmptyAnalytics = () => { >
diff --git a/src/views/Me/Analytics/SelectPeriod/index.tsx b/src/views/Me/Analytics/SelectPeriod/index.tsx index ded8af7a29..90fd3f6cd3 100644 --- a/src/views/Me/Analytics/SelectPeriod/index.tsx +++ b/src/views/Me/Analytics/SelectPeriod/index.tsx @@ -1,3 +1,5 @@ +import { FormattedMessage } from 'react-intl' + import { ReactComponent as IconArrowDown } from '@/public/static/icons/8px/arrow-down.svg' import { Z_INDEX } from '~/common/enums' import { @@ -5,7 +7,6 @@ import { DropdownDialog, Menu, TextIcon, - Translate, withIcon, } from '~/components' @@ -19,8 +20,9 @@ const SelectPeriod: React.FC = ({ period, onChange }) => { { label: ( <> - 7{' '} - + ), value: 7, @@ -28,8 +30,9 @@ const SelectPeriod: React.FC = ({ period, onChange }) => { { label: ( <> - 1{' '} - + ), value: 30, @@ -37,8 +40,9 @@ const SelectPeriod: React.FC = ({ period, onChange }) => { { label: ( <> - 3{' '} - + ), value: 90, @@ -46,7 +50,7 @@ const SelectPeriod: React.FC = ({ period, onChange }) => { { label: ( <> - + ), value: 0, diff --git a/src/views/Me/Analytics/index.tsx b/src/views/Me/Analytics/index.tsx index 4b9724acfd..b4ddd5c7bb 100644 --- a/src/views/Me/Analytics/index.tsx +++ b/src/views/Me/Analytics/index.tsx @@ -1,6 +1,7 @@ import { useQuery } from '@apollo/react-hooks' import gql from 'graphql-tag' import { useState } from 'react' +import { FormattedMessage } from 'react-intl' import { ReactComponent as AnalyticsNoSupporter } from '@/public/static/images/analytics-no-supporter.svg' import { @@ -11,7 +12,6 @@ import { QueryError, Spinner, TextIcon, - Translate, } from '~/components' import { UserDigest } from '~/components/UserDigest' import { MeAnalyticsQuery } from '~/gql/graphql' @@ -92,7 +92,7 @@ const BaseAnalytics = () => { color="black" size="md" > - +
@@ -105,7 +105,7 @@ const BaseAnalytics = () => {

- +

)} diff --git a/src/views/TagDetail/Owner/index.tsx b/src/views/TagDetail/Owner/index.tsx index 369be2e950..53dcb0f427 100644 --- a/src/views/TagDetail/Owner/index.tsx +++ b/src/views/TagDetail/Owner/index.tsx @@ -91,7 +91,7 @@ const Owner = ({ tag }: { tag: TagFragmentFragment }) => { /> - +
{/* editos */}
diff --git a/src/views/TagDetail/index.tsx b/src/views/TagDetail/index.tsx index 3b209a021f..a79e50304f 100644 --- a/src/views/TagDetail/index.tsx +++ b/src/views/TagDetail/index.tsx @@ -207,7 +207,7 @@ const TagDetail = ({ tag }: { tag: TagFragmentFragment }) => { changeFeed('latest')}> - + {hasSelectedFeed && ( From 3ded4252065973d20731b0b3267703fbe0ee5df1 Mon Sep 17 00:00:00 2001 From: Aka jazzy Date: Wed, 8 Mar 2023 19:08:29 +0800 Subject: [PATCH 24/31] feat(i18n): revise tag/circle page translation --- lang/default.json | 16 ++++++++++---- lang/en.json | 22 ++++++++++++++++--- lang/zh-Hans.json | 22 ++++++++++++++++--- lang/zh-Hant.json | 22 ++++++++++++++++--- .../Circle/Profile/MembersDialog/index.tsx | 2 +- src/views/TagDetail/ArticlesCount/index.tsx | 2 +- src/views/TagDetail/Followers/index.tsx | 2 +- src/views/TagDetail/Owner/index.tsx | 4 ++-- 8 files changed, 74 insertions(+), 18 deletions(-) diff --git a/lang/default.json b/lang/default.json index 6696f3f157..6f902c3d76 100644 --- a/lang/default.json +++ b/lang/default.json @@ -283,6 +283,10 @@ "defaultMessage": "Profile updated", "description": "src/components/UserProfile/DropdownActions/EditProfileDialog/Content.tsx" }, + "KMcrz8": { + "defaultMessage": "Maintain Tag", + "description": "src/views/TagDetail/Owner/index.tsx" + }, "KZlRde": { "defaultMessage": "replied to", "description": "src/components/Notice/ArticleArticleNotice/ArticleNewCollectedNotice.tsx" @@ -363,10 +367,6 @@ "defaultMessage": "Failed to republish article", "description": "src/components/Notice/ArticleNotice/RevisedArticleNotPublishedNotice.tsx" }, - "RjE9E9": { - "defaultMessage": "Members", - "description": "src/views/Circle/Profile/MembersDialog/index.tsx" - }, "Seanpx": { "defaultMessage": "Required", "description": "" @@ -567,6 +567,10 @@ "defaultMessage": "Important information will be notified by email. So filling in your email address will be required.", "description": "src/components/Forms/WalletAuthForm/Connect.tsx" }, + "hYG5fb": { + "defaultMessage": "are following", + "description": "src/views/TagDetail/Followers/index.tsx" + }, "hk2aiz": { "defaultMessage": "followed your circle", "description": "src/components/Notice/CircleNotice/CircleNewUserNotice.tsx" @@ -802,6 +806,10 @@ "defaultMessage": "Your", "description": "src/components/Notice/TransactionNotice/PaymentPayoutNotice.tsx" }, + "zPEMFy": { + "defaultMessage": "articles in total", + "description": "" + }, "zQvVDJ": { "defaultMessage": "All", "description": "" diff --git a/lang/en.json b/lang/en.json index f9f293383a..b8ba766158 100644 --- a/lang/en.json +++ b/lang/en.json @@ -691,8 +691,8 @@ "defaultMessage": "Back to All", "description": "" }, - "ANA7sk": { - "defaultMessage": "Maintain", + "KMcrz8": { + "defaultMessage": "Maintain Tag", "description": "src/views/TagDetail/Owner/index.tsx" }, "63HuBz": { @@ -751,7 +751,7 @@ "defaultMessage": "No followers yet", "description": "" }, - "RjE9E9": { + "+a+2ug": { "defaultMessage": "Members", "description": "" }, @@ -818,5 +818,21 @@ "zQvVDJ": { "defaultMessage": "All", "description": "" + }, + "FOOymB": { + "defaultMessage": "No members yet", + "description": "src/views/Circle/Profile/MembersDialog/Content.tsx" + }, + "zPEMFy": { + "defaultMessage": "articles in total", + "description": "" + }, + "hYG5fb": { + "defaultMessage": "are following", + "description": "src/views/TagDetail/Followers/index.tsx" + }, + "ANA7sk": { + "defaultMessage": "Maintain", + "description": "src/views/TagDetail/Owner/index.tsx" } } diff --git a/lang/zh-Hans.json b/lang/zh-Hans.json index ba319c0318..d6716c99e7 100644 --- a/lang/zh-Hans.json +++ b/lang/zh-Hans.json @@ -675,7 +675,7 @@ "defaultMessage": "已追踪", "description": "" }, - "3KNMbJ": { + "zPEMFy": { "defaultMessage": "篇作品", "description": "" }, @@ -687,7 +687,7 @@ "defaultMessage": "返回全部", "description": "" }, - "ANA7sk": { + "KMcrz8": { "defaultMessage": "认领", "description": "src/views/TagDetail/Owner/index.tsx" }, @@ -751,7 +751,7 @@ "defaultMessage": "还没有追踪者", "description": "" }, - "RjE9E9": { + "+a+2ug": { "defaultMessage": "成员", "description": "" }, @@ -818,5 +818,21 @@ "zQvVDJ": { "defaultMessage": "全部", "description": "" + }, + "FOOymB": { + "defaultMessage": "还没有成员", + "description": "src/views/Circle/Profile/MembersDialog/Content.tsx" + }, + "hYG5fb": { + "defaultMessage": "人追踪", + "description": "src/views/TagDetail/Followers/index.tsx" + }, + "ANA7sk": { + "defaultMessage": "主理", + "description": "src/views/TagDetail/Owner/index.tsx" + }, + "3KNMbJ": { + "defaultMessage": "作品", + "description": "" } } diff --git a/lang/zh-Hant.json b/lang/zh-Hant.json index 5c251f4913..d25add25c9 100644 --- a/lang/zh-Hant.json +++ b/lang/zh-Hant.json @@ -675,7 +675,7 @@ "defaultMessage": "已追蹤", "description": "" }, - "3KNMbJ": { + "zPEMFy": { "defaultMessage": "篇作品", "description": "" }, @@ -687,7 +687,7 @@ "defaultMessage": "返回全部", "description": "" }, - "ANA7sk": { + "KMcrz8": { "defaultMessage": "認領", "description": "src/views/TagDetail/Owner/index.tsx" }, @@ -751,7 +751,7 @@ "defaultMessage": "還沒有追蹤者", "description": "" }, - "RjE9E9": { + "+a+2ug": { "defaultMessage": "成員", "description": "" }, @@ -818,5 +818,21 @@ "zQvVDJ": { "defaultMessage": "全部", "description": "" + }, + "FOOymB": { + "defaultMessage": "還沒有成員", + "description": "src/views/Circle/Profile/MembersDialog/Content.tsx" + }, + "hYG5fb": { + "defaultMessage": "人追蹤", + "description": "src/views/TagDetail/Followers/index.tsx" + }, + "ANA7sk": { + "defaultMessage": "主理", + "description": "src/views/TagDetail/Owner/index.tsx" + }, + "3KNMbJ": { + "defaultMessage": "作品", + "description": "" } } diff --git a/src/views/Circle/Profile/MembersDialog/index.tsx b/src/views/Circle/Profile/MembersDialog/index.tsx index 67e381f7e5..9277f70d25 100644 --- a/src/views/Circle/Profile/MembersDialog/index.tsx +++ b/src/views/Circle/Profile/MembersDialog/index.tsx @@ -24,7 +24,7 @@ const BaseMembersDialog = ({ children }: MembersDialogProps) => { title={ } closeDialog={closeDialog} diff --git a/src/views/TagDetail/ArticlesCount/index.tsx b/src/views/TagDetail/ArticlesCount/index.tsx index 4ad19017e6..de61e6ecb9 100644 --- a/src/views/TagDetail/ArticlesCount/index.tsx +++ b/src/views/TagDetail/ArticlesCount/index.tsx @@ -18,7 +18,7 @@ const ArticlesCount = ({ tag }: ArticlesCountProps) => { {numAbbr(totalCount)}   - + diff --git a/src/views/TagDetail/Followers/index.tsx b/src/views/TagDetail/Followers/index.tsx index fdc68f321a..cfb34bda8b 100644 --- a/src/views/TagDetail/Followers/index.tsx +++ b/src/views/TagDetail/Followers/index.tsx @@ -38,7 +38,7 @@ const Followers = ({ tag }: FollowersProps) => { {numAbbr(totalCount)}   - + diff --git a/src/views/TagDetail/Owner/index.tsx b/src/views/TagDetail/Owner/index.tsx index 53dcb0f427..60ee354b6a 100644 --- a/src/views/TagDetail/Owner/index.tsx +++ b/src/views/TagDetail/Owner/index.tsx @@ -67,7 +67,7 @@ const Owner = ({ tag }: { tag: TagFragmentFragment }) => { > @@ -91,7 +91,7 @@ const Owner = ({ tag }: { tag: TagFragmentFragment }) => { /> - +
{/* editos */}
From e7308ea5ca31fbdacf444e17337193ad828c8684 Mon Sep 17 00:00:00 2001 From: Aka jazzy Date: Thu, 9 Mar 2023 18:32:29 +0800 Subject: [PATCH 25/31] feat(i18n): fix nav item/user profile etc copies --- lang/default.json | 103 +++++++++++++++-- lang/en.json | 103 ++++++++++++++++- lang/zh-Hans.json | 105 +++++++++++++++-- lang/zh-Hant.json | 107 +++++++++++++++++- src/common/enums/text.ts | 2 +- .../DropdownActions/ArchiveArticle/Button.tsx | 6 +- .../DropdownActions/ArchiveArticle/Dialog.tsx | 21 ++-- .../DropdownActions/EditButton.tsx | 8 +- .../DropdownActions/SetTagSelectedButton.tsx | 14 ++- .../SetTagUnselectedButton.tsx | 19 ++-- .../DropdownActions/StickyButton.tsx | 12 +- src/components/CircleDigest/Price/index.tsx | 4 +- .../DropdownActions/DeleteComment/Button.tsx | 6 +- .../Comment/DropdownActions/EditButton.tsx | 9 +- .../Comment/DropdownActions/PinButton.tsx | 28 ++++- src/components/Layout/SideNav/index.tsx | 7 +- src/components/UserProfile/index.tsx | 5 +- src/views/Circle/Broadcast/Broadcast.tsx | 30 ++--- src/views/Circle/Discussion/Discussion.tsx | 31 +++-- .../Circle/Profile/MembersDialog/index.tsx | 7 +- .../Me/Analytics/EmptyAnalytics/index.tsx | 5 +- src/views/Me/Analytics/SelectPeriod/index.tsx | 38 ++++--- src/views/TagDetail/Followers/index.tsx | 5 +- src/views/TagDetail/Owner/index.tsx | 5 +- src/views/User/Articles/UserArticles.tsx | 5 +- 25 files changed, 550 insertions(+), 135 deletions(-) diff --git a/lang/default.json b/lang/default.json index 457c6c89ba..21e2bd7122 100644 --- a/lang/default.json +++ b/lang/default.json @@ -63,6 +63,10 @@ "defaultMessage": "Likes", "description": "" }, + "32bml8": { + "defaultMessage": "Following", + "description": "src/components/Layout/SideNav/index.tsx" + }, "3KNMbJ": { "defaultMessage": "Articles", "description": "" @@ -91,6 +95,10 @@ "defaultMessage": "Cancel", "description": "" }, + "4HVCON": { + "defaultMessage": "Article pinned", + "description": "src/components/ArticleDigest/DropdownActions/StickyButton.tsx" + }, "4giHJT": { "defaultMessage": "Have wallet questions on mobile device ? Click the", "description": "src/components/Forms/WalletAuthForm/Select.tsx" @@ -99,6 +107,10 @@ "defaultMessage": "Your article has been republished to decentralized network", "description": "src/components/Notice/ArticleNotice/RevisedArticlePublishedNotice.tsx" }, + "50cquj": { + "defaultMessage": "No discussion yet", + "description": "src/views/Circle/Discussion/Discussion.tsx" + }, "5FO4vn": { "defaultMessage": "You do not have permission to perform this operation", "description": "" @@ -131,6 +143,10 @@ "defaultMessage": "Learn More", "description": "" }, + "7xnrxG": { + "defaultMessage": "The article has been added to the Trending", + "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" + }, "8cv9D4": { "defaultMessage": "Next Step", "description": "" @@ -147,6 +163,10 @@ "defaultMessage": "Next", "description": "" }, + "9nNpKP": { + "defaultMessage": "Discussion sent", + "description": "src/views/Circle/Discussion/Discussion.tsx" + }, "A3LOng": { "defaultMessage": "replied to topics", "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx" @@ -171,6 +191,10 @@ "defaultMessage": "Enter Bio", "description": "" }, + "AGcU5J": { + "defaultMessage": "Pin Broadcast", + "description": "src/components/Comment/DropdownActions/PinButton.tsx" + }, "ANA7sk": { "defaultMessage": "Maintain", "description": "src/views/TagDetail/Owner/index.tsx" @@ -211,6 +235,10 @@ "defaultMessage": "Must be between 2-20 characters long. Chinese characters, letters, numbers and underscores are allowed.", "description": "" }, + "EW5R4p": { + "defaultMessage": "Request an update, ask, share and discuss", + "description": "src/views/Circle/Discussion/Discussion.tsx" + }, "EfJYPI": { "defaultMessage": "Verification Code", "description": "src/components/Forms/WalletAuthForm/Connect.tsx" @@ -303,10 +331,18 @@ "defaultMessage": "resigned as tag maintainer. Would you like to be the new tag maintainer?", "description": "src/components/Notice/TagNotice/TagLeaveNotice.tsx" }, + "Js/Fij": { + "defaultMessage": "This article has been removed from Trending", + "description": "src/components/ArticleDigest/DropdownActions/SetTagUnselectedButton.tsx" + }, "JxlxVc": { "defaultMessage": "Forget Password", "description": "src/components/Forms/EmailLoginForm/Buttons.tsx" }, + "K3r6DQ": { + "defaultMessage": "Delete", + "description": "" + }, "KL502d": { "defaultMessage": "Profile updated", "description": "src/components/UserProfile/DropdownActions/EditProfileDialog/Content.tsx" @@ -363,10 +399,6 @@ "defaultMessage": "Notifications", "description": "" }, - "NG8uih": { - "defaultMessage": "articles", - "description": "src/views/User/Articles/UserArticles.tsx" - }, "NONfAh": { "defaultMessage": "Douban", "description": "src/components/Share/Buttons/Douban.tsx" @@ -411,6 +443,14 @@ "defaultMessage": "Failed to republish article", "description": "src/components/Notice/ArticleNotice/RevisedArticleNotPublishedNotice.tsx" }, + "RFzVUD": { + "defaultMessage": "Unpin Broadcast", + "description": "src/components/Comment/DropdownActions/PinButton.tsx" + }, + "SY0cqp": { + "defaultMessage": "Add to Trending", + "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" + }, "Seanpx": { "defaultMessage": "Required", "description": "" @@ -419,6 +459,14 @@ "defaultMessage": "Failed to log out, please try again.", "description": "" }, + "TQLBox": { + "defaultMessage": "Unpin", + "description": "src/components/ArticleDigest/DropdownActions/StickyButton.tsx" + }, + "TjWWxF": { + "defaultMessage": "Broadcast sent", + "description": "src/views/Circle/Broadcast/Broadcast.tsx" + }, "TzhzIH": { "defaultMessage": "Creators", "description": "" @@ -471,6 +519,10 @@ "defaultMessage": "Followers of {circleName}", "description": "src/views/Circle/Profile/FollowersDialog/index.tsx" }, + "X+Xvgq": { + "defaultMessage": "Unpin Comment", + "description": "src/components/Comment/DropdownActions/PinButton.tsx" + }, "XH0Lb6": { "defaultMessage": "Welcome to Matters!", "description": "src/components/Forms/EmailSignUpForm/Complete.tsx" @@ -515,6 +567,10 @@ "defaultMessage": "comment", "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx" }, + "ZVoJan": { + "defaultMessage": "Edit", + "description": "src/components/ArticleDigest/DropdownActions/EditButton.tsx" + }, "ZjDH42": { "defaultMessage": "About Us", "description": "" @@ -523,6 +579,10 @@ "defaultMessage": "Add Articles into Trending", "description": "src/views/TagDetail/DropdownActions/index.tsx" }, + "aa0nss": { + "defaultMessage": "Unpin from Trending", + "description": "src/components/ArticleDigest/DropdownActions/SetTagUnselectedButton.tsx" + }, "aaUBvF": { "defaultMessage": "comment_circle", "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx" @@ -559,10 +619,6 @@ "defaultMessage": "Discover", "description": "" }, - "cPIKU2": { - "defaultMessage": "Following", - "description": "" - }, "cf37Zy": { "defaultMessage": "Add hash from IPFS into compatible reader such as", "description": "src/components/Dialogs/RssFeedDialog/Content.tsx" @@ -647,6 +703,10 @@ "defaultMessage": "Don't have a wallet yet? Check the", "description": "src/components/Forms/WalletAuthForm/Select.tsx" }, + "hrgo+E": { + "defaultMessage": "Archive", + "description": "" + }, "i/4KO2": { "defaultMessage": "This account is archived due to violation of community guidelines", "description": "src/components/UserProfile/index.tsx" @@ -675,6 +735,10 @@ "defaultMessage": "days for free. Try it and have fun!", "description": "src/components/Notice/CircleNotice/CircleInvitationNotice.tsx" }, + "jJ1Brc": { + "defaultMessage": "Pin Comment", + "description": "src/components/Comment/DropdownActions/PinButton.tsx" + }, "jL2ZHb": { "defaultMessage": "Code will expire after 20 minutes", "description": "" @@ -719,6 +783,14 @@ "defaultMessage": "User unblocked. User can now comment on your articles.", "description": "src/components/BlockUser/Button/index.tsx" }, + "mWjpk9": { + "defaultMessage": "No broadcast yet.", + "description": "src/views/Circle/Broadcast/Broadcast.tsx" + }, + "mikY/9": { + "defaultMessage": "Edit", + "description": "src/components/Comment/DropdownActions/EditButton.tsx" + }, "mk+LCk": { "defaultMessage": "Display Preferences", "description": "src/views/Me/Settings/AnonymousSettings/DisplayPreferences/index.tsx" @@ -746,10 +818,18 @@ "defaultMessage": "Back to All", "description": "" }, + "oIkacT": { + "defaultMessage": "Article is hidden", + "description": "src/components/ArticleDigest/DropdownActions/ArchiveArticle/Dialog.tsx" + }, "oNYnCM": { "defaultMessage": "Account Archived", "description": "src/components/UserProfile/index.tsx" }, + "ohgTH4": { + "defaultMessage": "Following", + "description": "src/components/UserProfile/index.tsx" + }, "pla6ZF": { "defaultMessage": "Search articles, tags and authors", "description": "src/components/Search/SearchBar/index.tsx" @@ -838,6 +918,10 @@ "defaultMessage": "Copy Link", "description": "" }, + "uIdMon": { + "defaultMessage": "Are you sure you want to archive the article?", + "description": "src/components/ArticleDigest/DropdownActions/ArchiveArticle/Dialog.tsx" + }, "uVCg1l": { "defaultMessage": "Explore Matters", "description": "" @@ -918,6 +1002,9 @@ "defaultMessage": "All", "description": "" }, + "zb8Kx1": { + "defaultMessage": "Announcement, reminder, chattering..." + }, "zxlwbc": { "defaultMessage": "Waiting ...", "description": "src/components/Dialogs/RssFeedDialog/Content.tsx" diff --git a/lang/en.json b/lang/en.json index 307ab11479..c6dbc9e3ce 100644 --- a/lang/en.json +++ b/lang/en.json @@ -635,10 +635,6 @@ "defaultMessage": "Discover", "description": "" }, - "cPIKU2": { - "defaultMessage": "Following", - "description": "" - }, "i/4KO2": { "defaultMessage": "This account is archived due to violation of community guidelines", "description": "src/components/UserProfile/index.tsx" @@ -946,5 +942,104 @@ "ANA7sk": { "defaultMessage": "Maintain", "description": "src/views/TagDetail/Owner/index.tsx" + }, + "4HVCON": { + "defaultMessage": "Article pinned", + "description": "src/components/ArticleDigest/DropdownActions/StickyButton.tsx" + }, + "TQLBox": { + "defaultMessage": "Unpin", + "description": "src/components/ArticleDigest/DropdownActions/StickyButton.tsx" + }, + "ZVoJan": { + "defaultMessage": "Edit", + "description": "src/components/ArticleDigest/DropdownActions/EditButton.tsx" + }, + "hrgo+E": { + "defaultMessage": "Archive", + "description": "" + }, + "uIdMon": { + "defaultMessage": "Are you sure you want to archive the article?", + "description": "src/components/ArticleDigest/DropdownActions/ArchiveArticle/Dialog.tsx" + }, + "oIkacT": { + "defaultMessage": "Article is hidden", + "description": "src/components/ArticleDigest/DropdownActions/ArchiveArticle/Dialog.tsx" + }, + "K3r6DQ": { + "defaultMessage": "Delete", + "description": "" + }, + "mikY/9": { + "defaultMessage": "Edit", + "description": "src/components/Comment/DropdownActions/EditButton.tsx" + }, + "50cquj": { + "defaultMessage": "No discussion yet", + "description": "src/views/Circle/Discussion/Discussion.tsx" + }, + "EW5R4p": { + "defaultMessage": "Request an update, ask, share and discuss", + "description": "src/views/Circle/Discussion/Discussion.tsx" + }, + "9nNpKP": { + "defaultMessage": "Discussion sent", + "description": "src/views/Circle/Discussion/Discussion.tsx" + }, + "TjWWxF": { + "defaultMessage": "Broadcast sent", + "description": "src/views/Circle/Broadcast/Broadcast.tsx" + }, + "mWjpk9": { + "defaultMessage": "No broadcast yet.", + "description": "src/views/Circle/Broadcast/Broadcast.tsx" + }, + "zb8Kx1": { + "defaultMessage": "Announcement, reminder, chattering..." + }, + "AGcU5J": { + "defaultMessage": "Pin Broadcast", + "description": "src/components/Comment/DropdownActions/PinButton.tsx" + }, + "jJ1Brc": { + "defaultMessage": "Pin Comment", + "description": "src/components/Comment/DropdownActions/PinButton.tsx" + }, + "RFzVUD": { + "defaultMessage": "Unpin Broadcast", + "description": "src/components/Comment/DropdownActions/PinButton.tsx" + }, + "X+Xvgq": { + "defaultMessage": "Unpin Comment", + "description": "src/components/Comment/DropdownActions/PinButton.tsx" + }, + "7xnrxG": { + "defaultMessage": "The article has been added to the Trending", + "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" + }, + "SY0cqp": { + "defaultMessage": "Add to Trending", + "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" + }, + "Js/Fij": { + "defaultMessage": "This article has been removed from Trending", + "description": "src/components/ArticleDigest/DropdownActions/SetTagUnselectedButton.tsx" + }, + "aa0nss": { + "defaultMessage": "Unpin from Trending", + "description": "src/components/ArticleDigest/DropdownActions/SetTagUnselectedButton.tsx" + }, + "32bml8": { + "defaultMessage": "Following", + "description": "src/components/Layout/SideNav/index.tsx" + }, + "ohgTH4": { + "defaultMessage": "Following", + "description": "src/components/UserProfile/index.tsx" + }, + "Cu3Cty": { + "defaultMessage": "month", + "description": "" } } diff --git a/lang/zh-Hans.json b/lang/zh-Hans.json index 62e7559b04..b2368da8bc 100644 --- a/lang/zh-Hans.json +++ b/lang/zh-Hans.json @@ -555,10 +555,6 @@ "defaultMessage": "快来搭建围炉,呼召你的支持者加入!", "description": "src/components/UserProfile/CircleWidget/index.tsx" }, - "cPIKU2": { - "defaultMessage": "追踪中", - "description": "" - }, "pzTOmv": { "defaultMessage": "追踪者", "description": "" @@ -696,7 +692,7 @@ "description": "" }, "47FYwb": { - "defaultMessage": "关闭", + "defaultMessage": "取消", "description": "" }, "ll/ufR": { @@ -943,8 +939,103 @@ "defaultMessage": "主理", "description": "src/views/TagDetail/Owner/index.tsx" }, - "3KNMbJ": { - "defaultMessage": "作品", + "4HVCON": { + "defaultMessage": "置顶作品", + "description": "src/components/ArticleDigest/DropdownActions/StickyButton.tsx" + }, + "TQLBox": { + "defaultMessage": "取消置顶", + "description": "src/components/ArticleDigest/DropdownActions/StickyButton.tsx" + }, + "ZVoJan": { + "defaultMessage": "修订作品", + "description": "src/components/ArticleDigest/DropdownActions/EditButton.tsx" + }, + "hrgo+E": { + "defaultMessage": "隐藏", + "description": "" + }, + "uIdMon": { + "defaultMessage": "确认隐藏,其他用户将无法从站内访问该作品。隐藏后无法回退,如需再次呈现作品,你需要重新发布。", + "description": "src/components/ArticleDigest/DropdownActions/ArchiveArticle/Dialog.tsx" + }, + "oIkacT": { + "defaultMessage": "作品已隐藏", + "description": "src/components/ArticleDigest/DropdownActions/ArchiveArticle/Dialog.tsx" + }, + "K3r6DQ": { + "defaultMessage": "刪除", + "description": "" + }, + "mikY/9": { + "defaultMessage": "编辑", + "description": "src/components/Comment/DropdownActions/EditButton.tsx" + }, + "50cquj": { + "defaultMessage": "还没有众聊", + "description": "src/views/Circle/Discussion/Discussion.tsx" + }, + "EW5R4p": { + "defaultMessage": "催更、提问、分享、讨论…", + "description": "src/views/Circle/Discussion/Discussion.tsx" + }, + "9nNpKP": { + "defaultMessage": "讨论已送出", + "description": "src/views/Circle/Discussion/Discussion.tsx" + }, + "TjWWxF": { + "defaultMessage": "广播已送出", + "description": "src/views/Circle/Broadcast/Broadcast.tsx" + }, + "mWjpk9": { + "defaultMessage": "还没有广播", + "description": "src/views/Circle/Broadcast/Broadcast.tsx" + }, + "zb8Kx1": { + "defaultMessage": "公告、提醒、碎碎念…" + }, + "AGcU5J": { + "defaultMessage": "置顶", + "description": "src/components/Comment/DropdownActions/PinButton.tsx" + }, + "jJ1Brc": { + "defaultMessage": "喜欢回应", + "description": "src/components/Comment/DropdownActions/PinButton.tsx" + }, + "RFzVUD": { + "defaultMessage": "取消置顶", + "description": "src/components/Comment/DropdownActions/PinButton.tsx" + }, + "X+Xvgq": { + "defaultMessage": "取消精选", + "description": "src/components/Comment/DropdownActions/PinButton.tsx" + }, + "7xnrxG": { + "defaultMessage": "作品已添加至精选", + "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" + }, + "SY0cqp": { + "defaultMessage": "添加到精选", + "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" + }, + "Js/Fij": { + "defaultMessage": "作品已取消精选", + "description": "src/components/ArticleDigest/DropdownActions/SetTagUnselectedButton.tsx" + }, + "aa0nss": { + "defaultMessage": "取消精选", + "description": "src/components/ArticleDigest/DropdownActions/SetTagUnselectedButton.tsx" + }, + "32bml8": { + "defaultMessage": "追踪", + "description": "src/components/Layout/SideNav/index.tsx" + }, + "ohgTH4": { + "defaultMessage": "追踪中", + "description": "src/components/UserProfile/index.tsx" + }, + "Cu3Cty": { + "defaultMessage": "月", "description": "" } } diff --git a/lang/zh-Hant.json b/lang/zh-Hant.json index 46db281970..09430658bc 100644 --- a/lang/zh-Hant.json +++ b/lang/zh-Hant.json @@ -551,10 +551,6 @@ "defaultMessage": "快來搭建圍爐,呼召你的支持者加入", "description": "src/components/UserProfile/CircleWidget/index.tsx" }, - "cPIKU2": { - "defaultMessage": "追蹤中", - "description": "" - }, "pzTOmv": { "defaultMessage": "追蹤者", "description": "" @@ -688,7 +684,7 @@ "description": "" }, "47FYwb": { - "defaultMessage": "關閉", + "defaultMessage": "取消", "description": "" }, "ll/ufR": { @@ -824,7 +820,7 @@ "description": "src/views/TagDetail/DropdownActions/index.tsx" }, "wEQDC6": { - "defaultMessage": "編輯標籤", + "defaultMessage": "編輯資料", "description": "" }, "beLe/F": { @@ -942,5 +938,104 @@ "3KNMbJ": { "defaultMessage": "作品", "description": "" + }, + "4HVCON": { + "defaultMessage": "置頂作品", + "description": "src/components/ArticleDigest/DropdownActions/StickyButton.tsx" + }, + "TQLBox": { + "defaultMessage": "取消置頂", + "description": "src/components/ArticleDigest/DropdownActions/StickyButton.tsx" + }, + "ZVoJan": { + "defaultMessage": "修訂作品", + "description": "src/components/ArticleDigest/DropdownActions/EditButton.tsx" + }, + "hrgo+E": { + "defaultMessage": "隱藏", + "description": "" + }, + "uIdMon": { + "defaultMessage": "確認隱藏,其他用戶將無法從站內訪問該作品。隱藏後無法回退,如需再次呈現作品,你需要重新發布。", + "description": "src/components/ArticleDigest/DropdownActions/ArchiveArticle/Dialog.tsx" + }, + "oIkacT": { + "defaultMessage": "作品已隱藏", + "description": "src/components/ArticleDigest/DropdownActions/ArchiveArticle/Dialog.tsx" + }, + "K3r6DQ": { + "defaultMessage": "刪除", + "description": "" + }, + "mikY/9": { + "defaultMessage": "編輯", + "description": "src/components/Comment/DropdownActions/EditButton.tsx" + }, + "50cquj": { + "defaultMessage": "還沒有眾聊", + "description": "src/views/Circle/Discussion/Discussion.tsx" + }, + "EW5R4p": { + "defaultMessage": "催更、提問、分享、討論…", + "description": "src/views/Circle/Discussion/Discussion.tsx" + }, + "9nNpKP": { + "defaultMessage": "討論已送出", + "description": "src/views/Circle/Discussion/Discussion.tsx" + }, + "TjWWxF": { + "defaultMessage": "廣播已送出", + "description": "src/views/Circle/Broadcast/Broadcast.tsx" + }, + "mWjpk9": { + "defaultMessage": "還沒有廣播", + "description": "src/views/Circle/Broadcast/Broadcast.tsx" + }, + "zb8Kx1": { + "defaultMessage": "公告、提醒、碎碎念…" + }, + "AGcU5J": { + "defaultMessage": "置頂", + "description": "src/components/Comment/DropdownActions/PinButton.tsx" + }, + "jJ1Brc": { + "defaultMessage": "喜歡回應", + "description": "src/components/Comment/DropdownActions/PinButton.tsx" + }, + "RFzVUD": { + "defaultMessage": "取消置頂", + "description": "src/components/Comment/DropdownActions/PinButton.tsx" + }, + "X+Xvgq": { + "defaultMessage": "取消精選", + "description": "src/components/Comment/DropdownActions/PinButton.tsx" + }, + "7xnrxG": { + "defaultMessage": "作品已添加至精選", + "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" + }, + "SY0cqp": { + "defaultMessage": "添加到精選", + "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" + }, + "Js/Fij": { + "defaultMessage": "作品已取消精選", + "description": "src/components/ArticleDigest/DropdownActions/SetTagUnselectedButton.tsx" + }, + "aa0nss": { + "defaultMessage": "取消精選", + "description": "src/components/ArticleDigest/DropdownActions/SetTagUnselectedButton.tsx" + }, + "32bml8": { + "defaultMessage": "追蹤", + "description": "src/components/Layout/SideNav/index.tsx" + }, + "ohgTH4": { + "defaultMessage": "追蹤中", + "description": "src/components/UserProfile/index.tsx" + }, + "Cu3Cty": { + "defaultMessage": "月", + "description": "" } } diff --git a/src/common/enums/text.ts b/src/common/enums/text.ts index db9df9ac84..17bc1cd7ca 100644 --- a/src/common/enums/text.ts +++ b/src/common/enums/text.ts @@ -1141,7 +1141,7 @@ export const TEXT = { settingsNotificationGeneral: 'General', settingsNotificationCircle: 'Circle', settingsUI: 'Display Preferences', - settingsWallet: 'Wallet Setting', + settingsWallet: 'Wallet Settings', setup: 'Settings', setupLikeCoin: 'Liker ID', share: 'Share', diff --git a/src/components/ArticleDigest/DropdownActions/ArchiveArticle/Button.tsx b/src/components/ArticleDigest/DropdownActions/ArchiveArticle/Button.tsx index 046cb929f8..9245536480 100644 --- a/src/components/ArticleDigest/DropdownActions/ArchiveArticle/Button.tsx +++ b/src/components/ArticleDigest/DropdownActions/ArchiveArticle/Button.tsx @@ -1,10 +1,12 @@ -import { IconArchive24, Menu, TextIcon, Translate } from '~/components' +import { FormattedMessage } from 'react-intl' + +import { IconArchive24, Menu, TextIcon } from '~/components' const ArchiveArticleButton = ({ openDialog }: { openDialog: () => void }) => { return ( } size="md" spacing="base"> - + ) diff --git a/src/components/ArticleDigest/DropdownActions/ArchiveArticle/Dialog.tsx b/src/components/ArticleDigest/DropdownActions/ArchiveArticle/Dialog.tsx index 467fbc2091..953dd884c3 100644 --- a/src/components/ArticleDigest/DropdownActions/ArchiveArticle/Dialog.tsx +++ b/src/components/ArticleDigest/DropdownActions/ArchiveArticle/Dialog.tsx @@ -1,7 +1,8 @@ import gql from 'graphql-tag' +import { FormattedMessage } from 'react-intl' import { ADD_TOAST } from '~/common/enums' -import { Dialog, Translate, useDialogSwitch, useMutation } from '~/components' +import { Dialog, useDialogSwitch, useMutation } from '~/components' import updateUserArticles from '~/components/GQL/updates/userArticles' import { ArchiveArticleArticleFragment, @@ -59,7 +60,12 @@ const ArchiveArticleDialog = ({ new CustomEvent(ADD_TOAST, { detail: { color: 'green', - content: , + content: ( + + ), buttonPlacement: 'center', }, }) @@ -75,10 +81,9 @@ const ArchiveArticleDialog = ({

-

@@ -91,7 +96,7 @@ const ArchiveArticleDialog = ({ closeDialog() }} > - + - + diff --git a/src/components/ArticleDigest/DropdownActions/EditButton.tsx b/src/components/ArticleDigest/DropdownActions/EditButton.tsx index b71e5321c2..9fdfe88e2a 100644 --- a/src/components/ArticleDigest/DropdownActions/EditButton.tsx +++ b/src/components/ArticleDigest/DropdownActions/EditButton.tsx @@ -1,8 +1,9 @@ import gql from 'graphql-tag' +import { FormattedMessage } from 'react-intl' import { URL_QS } from '~/common/enums' import { toPath } from '~/common/utils' -import { IconEdit16, Menu, TextIcon, Translate } from '~/components' +import { IconEdit16, Menu, TextIcon } from '~/components' import { EditArticleButtonArticleFragment } from '~/gql/graphql' const fragments = { @@ -32,7 +33,10 @@ const EditArticleButton = ({ is="link" > } size="md" spacing="base"> - + ) diff --git a/src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx b/src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx index c34b04b1a0..ab2e5d235f 100644 --- a/src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx +++ b/src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx @@ -1,7 +1,8 @@ import gql from 'graphql-tag' +import { FormattedMessage } from 'react-intl' import { ADD_TOAST } from '~/common/enums' -import { IconAdd24, Menu, TextIcon, Translate, useMutation } from '~/components' +import { IconAdd24, Menu, TextIcon, useMutation } from '~/components' import { SetTagSelectedButtonArticleFragment, SetTagSelectedMutation, @@ -58,9 +59,9 @@ const SetTagSelectedButton = ({ detail: { color: 'green', content: ( - ), duration: 2000, @@ -70,7 +71,10 @@ const SetTagSelectedButton = ({ }} > } size="md" spacing="base"> - + ) diff --git a/src/components/ArticleDigest/DropdownActions/SetTagUnselectedButton.tsx b/src/components/ArticleDigest/DropdownActions/SetTagUnselectedButton.tsx index ad98c4cf7b..9a281b8b35 100644 --- a/src/components/ArticleDigest/DropdownActions/SetTagUnselectedButton.tsx +++ b/src/components/ArticleDigest/DropdownActions/SetTagUnselectedButton.tsx @@ -1,15 +1,10 @@ import gql from 'graphql-tag' import _filter from 'lodash/filter' import _get from 'lodash/get' +import { FormattedMessage } from 'react-intl' import { ADD_TOAST } from '~/common/enums' -import { - IconUnPin24, - Menu, - TextIcon, - Translate, - useMutation, -} from '~/components' +import { IconUnPin24, Menu, TextIcon, useMutation } from '~/components' import { SetTagUnselectedButtonArticleFragment, SetTagUnselectedMutation, @@ -106,7 +101,10 @@ const SetTagUnselectedButton = ({ detail: { color: 'green', content: ( - + ), duration: 2000, }, @@ -121,7 +119,10 @@ const SetTagUnselectedButton = ({ }} > } size="md" spacing="base"> - + ) diff --git a/src/components/ArticleDigest/DropdownActions/StickyButton.tsx b/src/components/ArticleDigest/DropdownActions/StickyButton.tsx index 1d78c34964..81a5876288 100644 --- a/src/components/ArticleDigest/DropdownActions/StickyButton.tsx +++ b/src/components/ArticleDigest/DropdownActions/StickyButton.tsx @@ -1,11 +1,11 @@ import gql from 'graphql-tag' +import { FormattedMessage } from 'react-intl' import { IconPin24, IconUnPin24, Menu, TextIcon, - Translate, useMutation, } from '~/components' import updateUserArticles from '~/components/GQL/updates/userArticles' @@ -64,11 +64,17 @@ const StickyButton = ({ {article.sticky ? ( } size="md" spacing="base"> - + ) : ( } size="md" spacing="base"> - + )} diff --git a/src/components/CircleDigest/Price/index.tsx b/src/components/CircleDigest/Price/index.tsx index 489c4d29ed..efc53a097b 100644 --- a/src/components/CircleDigest/Price/index.tsx +++ b/src/components/CircleDigest/Price/index.tsx @@ -1,5 +1,6 @@ import gql from 'graphql-tag' import { useContext } from 'react' +import { FormattedMessage } from 'react-intl' import { OPEN_SUBSCRIBE_CIRCLE_DIALOG, @@ -101,7 +102,8 @@ const Price = ({ circle, onClick }: PriceProps) => { }} > - {price.amount} {price.currency} / + {price.amount} {price.currency} / + ) diff --git a/src/components/Comment/DropdownActions/DeleteComment/Button.tsx b/src/components/Comment/DropdownActions/DeleteComment/Button.tsx index 180caee42a..2d07d1a9a3 100644 --- a/src/components/Comment/DropdownActions/DeleteComment/Button.tsx +++ b/src/components/Comment/DropdownActions/DeleteComment/Button.tsx @@ -1,10 +1,12 @@ -import { IconRemove24, Menu, TextIcon, Translate } from '~/components' +import { FormattedMessage } from 'react-intl' + +import { IconRemove24, Menu, TextIcon } from '~/components' const DeleteCommentButton = ({ openDialog }: { openDialog: () => void }) => { return ( } size="md" spacing="base"> - + ) diff --git a/src/components/Comment/DropdownActions/EditButton.tsx b/src/components/Comment/DropdownActions/EditButton.tsx index bdce4e3b54..dc7788af03 100644 --- a/src/components/Comment/DropdownActions/EditButton.tsx +++ b/src/components/Comment/DropdownActions/EditButton.tsx @@ -1,4 +1,6 @@ -import { IconEdit16, Menu, TextIcon, Translate } from '~/components' +import { FormattedMessage } from 'react-intl' + +import { IconEdit16, Menu, TextIcon } from '~/components' interface EditButtonProps { openEditCommentDialog: () => void @@ -8,7 +10,10 @@ const EditButton = ({ openEditCommentDialog }: EditButtonProps) => { return ( } size="md" spacing="base"> - + ) diff --git a/src/components/Comment/DropdownActions/PinButton.tsx b/src/components/Comment/DropdownActions/PinButton.tsx index cb2ef56b7a..6ae4e919ed 100644 --- a/src/components/Comment/DropdownActions/PinButton.tsx +++ b/src/components/Comment/DropdownActions/PinButton.tsx @@ -1,4 +1,5 @@ import gql from 'graphql-tag' +import { FormattedMessage } from 'react-intl' import { REFETCH_CIRCLE_DETAIL } from '~/common/enums' import { @@ -7,7 +8,6 @@ import { IconUnPin24, Menu, TextIcon, - Translate, useMutation, } from '~/components' import TOGGLE_PIN_COMMENT from '~/components/GQL/mutations/togglePinComment' @@ -111,9 +111,17 @@ const PinButton = ({ }} > } size="md" spacing="base"> - + {circle ? ( + + ) : ( + + )} ) @@ -131,7 +139,17 @@ const PinButton = ({ } > } size="md" spacing="base"> - + {circle ? ( + + ) : ( + + )} ) diff --git a/src/components/Layout/SideNav/index.tsx b/src/components/Layout/SideNav/index.tsx index 09939ff0a9..adf2388611 100644 --- a/src/components/Layout/SideNav/index.tsx +++ b/src/components/Layout/SideNav/index.tsx @@ -74,7 +74,12 @@ const SideNav = () => { /> } + name={ + + } icon={} activeIcon={} active={isInFollow} diff --git a/src/components/UserProfile/index.tsx b/src/components/UserProfile/index.tsx index c5d2a9829a..eff790368f 100644 --- a/src/components/UserProfile/index.tsx +++ b/src/components/UserProfile/index.tsx @@ -301,7 +301,10 @@ export const UserProfile = () => { {numAbbr(user.following.users.totalCount)} - + )} diff --git a/src/views/Circle/Broadcast/Broadcast.tsx b/src/views/Circle/Broadcast/Broadcast.tsx index 66c0a64358..5dbd6494e6 100644 --- a/src/views/Circle/Broadcast/Broadcast.tsx +++ b/src/views/Circle/Broadcast/Broadcast.tsx @@ -2,25 +2,19 @@ import jump from 'jump.js' import _differenceBy from 'lodash/differenceBy' import _get from 'lodash/get' import { useContext, useEffect } from 'react' +import { FormattedMessage, useIntl } from 'react-intl' import { ADD_TOAST, URL_FRAGMENT } from '~/common/enums' -import { - dom, - filterComments, - mergeConnections, - translate, -} from '~/common/utils' +import { dom, filterComments, mergeConnections } from '~/common/utils' import { CommentForm, EmptyComment, InfiniteScroll, - LanguageContext, List, QueryError, Spinner, ThreadComment, Throw404, - Translate, usePublicQuery, useRoute, ViewerContext, @@ -44,9 +38,9 @@ const RESPONSES_COUNT = 15 const CricleBroadcast = () => { const { getQuery } = useRoute() const viewer = useContext(ViewerContext) - const { lang } = useContext(LanguageContext) const name = getQuery('name') + const intl = useIntl() /** * Data Fetching */ @@ -204,10 +198,9 @@ const CricleBroadcast = () => { detail: { color: 'green', content: ( - ), buttonPlacement: 'center', @@ -227,10 +220,8 @@ const CricleBroadcast = () => { @@ -241,7 +232,10 @@ const CricleBroadcast = () => { (comments.length <= 0 && ( + } /> ))} diff --git a/src/views/Circle/Discussion/Discussion.tsx b/src/views/Circle/Discussion/Discussion.tsx index 4a80d75cc1..550a61cde9 100644 --- a/src/views/Circle/Discussion/Discussion.tsx +++ b/src/views/Circle/Discussion/Discussion.tsx @@ -3,25 +3,19 @@ import jump from 'jump.js' // import _differenceBy from 'lodash/differenceBy' // import _get from 'lodash/get' import { useContext, useEffect, useState } from 'react' +import { FormattedMessage, useIntl } from 'react-intl' import { ADD_TOAST, URL_FRAGMENT } from '~/common/enums' -import { - dom, - filterComments, - mergeConnections, - translate, -} from '~/common/utils' +import { dom, filterComments, mergeConnections } from '~/common/utils' import { CommentForm, EmptyComment, InfiniteScroll, - LanguageContext, List, QueryError, Spinner, ThreadComment, Throw404, - Translate, usePublicQuery, useRoute, ViewerContext, @@ -46,7 +40,6 @@ const RESPONSES_COUNT = 15 const CricleDiscussion = () => { const { getQuery } = useRoute() const viewer = useContext(ViewerContext) - const { lang } = useContext(LanguageContext) const name = getQuery('name') // public data @@ -59,6 +52,7 @@ const CricleDiscussion = () => { const isMember = circle?.circleIsMember const hasPermission = isOwner || isMember + const intl = useIntl() // private data const [privateFetched, setPrivateFetched] = useState(false) const loadPrivate = async (publicData?: DiscussionPublicQuery) => { @@ -157,10 +151,9 @@ const CricleDiscussion = () => { detail: { color: 'green', content: ( - ), buttonPlacement: 'center', @@ -256,10 +249,9 @@ const CricleDiscussion = () => { @@ -270,7 +262,10 @@ const CricleDiscussion = () => { (comments.length <= 0 && ( + } /> ))} diff --git a/src/views/Circle/Profile/MembersDialog/index.tsx b/src/views/Circle/Profile/MembersDialog/index.tsx index 9277f70d25..b015ee3c7f 100644 --- a/src/views/Circle/Profile/MembersDialog/index.tsx +++ b/src/views/Circle/Profile/MembersDialog/index.tsx @@ -21,12 +21,7 @@ const BaseMembersDialog = ({ children }: MembersDialogProps) => { - } + title={} closeDialog={closeDialog} closeTextId="close" /> diff --git a/src/views/Me/Analytics/EmptyAnalytics/index.tsx b/src/views/Me/Analytics/EmptyAnalytics/index.tsx index 2d28f04eb5..6458d3ea45 100644 --- a/src/views/Me/Analytics/EmptyAnalytics/index.tsx +++ b/src/views/Me/Analytics/EmptyAnalytics/index.tsx @@ -40,10 +40,7 @@ const EmptyAnalytics = () => { color="black" size="md" > - +
diff --git a/src/views/Me/Analytics/SelectPeriod/index.tsx b/src/views/Me/Analytics/SelectPeriod/index.tsx index 90fd3f6cd3..e966be9d95 100644 --- a/src/views/Me/Analytics/SelectPeriod/index.tsx +++ b/src/views/Me/Analytics/SelectPeriod/index.tsx @@ -2,13 +2,7 @@ import { FormattedMessage } from 'react-intl' import { ReactComponent as IconArrowDown } from '@/public/static/icons/8px/arrow-down.svg' import { Z_INDEX } from '~/common/enums' -import { - Button, - DropdownDialog, - Menu, - TextIcon, - withIcon, -} from '~/components' +import { Button, DropdownDialog, Menu, TextIcon, withIcon } from '~/components' type SelectProps = { period: number @@ -20,9 +14,13 @@ const SelectPeriod: React.FC = ({ period, onChange }) => { { label: ( <> - + ), value: 7, @@ -30,9 +28,13 @@ const SelectPeriod: React.FC = ({ period, onChange }) => { { label: ( <> - + ), value: 30, @@ -40,9 +42,13 @@ const SelectPeriod: React.FC = ({ period, onChange }) => { { label: ( <> - + ), value: 90, diff --git a/src/views/TagDetail/Followers/index.tsx b/src/views/TagDetail/Followers/index.tsx index cfb34bda8b..80b818a75c 100644 --- a/src/views/TagDetail/Followers/index.tsx +++ b/src/views/TagDetail/Followers/index.tsx @@ -38,7 +38,10 @@ const Followers = ({ tag }: FollowersProps) => { {numAbbr(totalCount)}   - +
diff --git a/src/views/TagDetail/Owner/index.tsx b/src/views/TagDetail/Owner/index.tsx index 60ee354b6a..f1f16e9a40 100644 --- a/src/views/TagDetail/Owner/index.tsx +++ b/src/views/TagDetail/Owner/index.tsx @@ -91,7 +91,10 @@ const Owner = ({ tag }: { tag: TagFragmentFragment }) => { /> - +
{/* editos */}
diff --git a/src/views/User/Articles/UserArticles.tsx b/src/views/User/Articles/UserArticles.tsx index 7b688cbd92..6353906cca 100644 --- a/src/views/User/Articles/UserArticles.tsx +++ b/src/views/User/Articles/UserArticles.tsx @@ -45,10 +45,7 @@ const ArticleSummaryInfo = ({ description="src/views/User/Articles/UserArticles.tsx" />  {articles}  - + From fa7174232afa3c93e8dea3eb29466bf614f984b4 Mon Sep 17 00:00:00 2001 From: Aka jazzy Date: Thu, 9 Mar 2023 19:01:26 +0800 Subject: [PATCH 26/31] feat(i18n): fix circle dropdown copies --- lang/default.json | 8 ++++++++ lang/en.json | 8 ++++++++ lang/zh-Hans.json | 8 ++++++++ lang/zh-Hant.json | 8 ++++++++ .../ArticleDigest/DropdownActions/RemoveTagButton.tsx | 4 ++-- .../Comment/DropdownActions/CollapseComment/Button.tsx | 6 ++++-- src/views/Circle/Discussion/Discussion.tsx | 2 +- 7 files changed, 39 insertions(+), 5 deletions(-) diff --git a/lang/default.json b/lang/default.json index 21e2bd7122..725e630bc4 100644 --- a/lang/default.json +++ b/lang/default.json @@ -830,6 +830,10 @@ "defaultMessage": "Following", "description": "src/components/UserProfile/index.tsx" }, + "pRV+UD": { + "defaultMessage": "Collapse", + "description": "src/components/Comment/DropdownActions/CollapseComment/Button.tsx" + }, "pla6ZF": { "defaultMessage": "Search articles, tags and authors", "description": "src/components/Search/SearchBar/index.tsx" @@ -858,6 +862,10 @@ "defaultMessage": "unsubscribed your circle", "description": "src/components/Notice/CircleNotice/CircleNewUserNotice.tsx" }, + "qlki7w": { + "defaultMessage": "Remove Article", + "description": "src/components/ArticleDigest/DropdownActions/RemoveTagButton.tsx" + }, "qswU4E": { "defaultMessage": "Email will not be used as a login but only as a contact channel.", "description": "" diff --git a/lang/en.json b/lang/en.json index c6dbc9e3ce..b130b8f425 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1041,5 +1041,13 @@ "Cu3Cty": { "defaultMessage": "month", "description": "" + }, + "qlki7w": { + "defaultMessage": "Remove Article", + "description": "src/components/ArticleDigest/DropdownActions/RemoveTagButton.tsx" + }, + "pRV+UD": { + "defaultMessage": "Collapse", + "description": "src/components/Comment/DropdownActions/CollapseComment/Button.tsx" } } diff --git a/lang/zh-Hans.json b/lang/zh-Hans.json index b2368da8bc..caf679658d 100644 --- a/lang/zh-Hans.json +++ b/lang/zh-Hans.json @@ -1037,5 +1037,13 @@ "Cu3Cty": { "defaultMessage": "月", "description": "" + }, + "qlki7w": { + "defaultMessage": "移除作品", + "description": "src/components/ArticleDigest/DropdownActions/RemoveTagButton.tsx" + }, + "pRV+UD": { + "defaultMessage": "折叠", + "description": "src/components/Comment/DropdownActions/CollapseComment/Button.tsx" } } diff --git a/lang/zh-Hant.json b/lang/zh-Hant.json index 09430658bc..2db2e63d9d 100644 --- a/lang/zh-Hant.json +++ b/lang/zh-Hant.json @@ -1037,5 +1037,13 @@ "Cu3Cty": { "defaultMessage": "月", "description": "" + }, + "qlki7w": { + "defaultMessage": "移除作品", + "description": "src/components/ArticleDigest/DropdownActions/RemoveTagButton.tsx" + }, + "pRV+UD": { + "defaultMessage": "闔上", + "description": "src/components/Comment/DropdownActions/CollapseComment/Button.tsx" } } diff --git a/src/components/ArticleDigest/DropdownActions/RemoveTagButton.tsx b/src/components/ArticleDigest/DropdownActions/RemoveTagButton.tsx index 2a2fd5bd8b..4b6f6113ff 100644 --- a/src/components/ArticleDigest/DropdownActions/RemoveTagButton.tsx +++ b/src/components/ArticleDigest/DropdownActions/RemoveTagButton.tsx @@ -1,12 +1,12 @@ import gql from 'graphql-tag' import _isArray from 'lodash/isArray' +import { FormattedMessage } from 'react-intl' import { REFETCH_TAG_DETAIL_ARTICLES } from '~/common/enums' import { IconRemove24, Menu, TextIcon, - Translate, useMutation, } from '~/components' import updateTagArticlesCount from '~/components/GQL/updates/tagArticlesCount' @@ -75,7 +75,7 @@ const RemoveTagButton = ({ }} > } size="md" spacing="base"> - + ) diff --git a/src/components/Comment/DropdownActions/CollapseComment/Button.tsx b/src/components/Comment/DropdownActions/CollapseComment/Button.tsx index b38b2dd3f2..0b3e37f36b 100644 --- a/src/components/Comment/DropdownActions/CollapseComment/Button.tsx +++ b/src/components/Comment/DropdownActions/CollapseComment/Button.tsx @@ -1,10 +1,12 @@ -import { IconCollapse16, Menu, TextIcon, Translate } from '~/components' +import { FormattedMessage } from 'react-intl' + +import { IconCollapse16, Menu, TextIcon } from '~/components' const CollapseCommentButton = ({ openDialog }: { openDialog: () => void }) => { return ( } size="md" spacing="base"> - + ) diff --git a/src/views/Circle/Discussion/Discussion.tsx b/src/views/Circle/Discussion/Discussion.tsx index 550a61cde9..ace2a34837 100644 --- a/src/views/Circle/Discussion/Discussion.tsx +++ b/src/views/Circle/Discussion/Discussion.tsx @@ -41,6 +41,7 @@ const CricleDiscussion = () => { const { getQuery } = useRoute() const viewer = useContext(ViewerContext) const name = getQuery('name') + const intl = useIntl() // public data const { data, loading, error, client } = @@ -52,7 +53,6 @@ const CricleDiscussion = () => { const isMember = circle?.circleIsMember const hasPermission = isOwner || isMember - const intl = useIntl() // private data const [privateFetched, setPrivateFetched] = useState(false) const loadPrivate = async (publicData?: DiscussionPublicQuery) => { From 23f8fbf263ac1185a88739edc7646f92de881d74 Mon Sep 17 00:00:00 2001 From: Matty <98379126+matters-tech@users.noreply.github.com> Date: Fri, 10 Mar 2023 11:17:08 +0700 Subject: [PATCH 27/31] Update Crowdin configuration file --- crowdin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crowdin.yml b/crowdin.yml index dbad58390f..2469310f19 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,3 +1,3 @@ files: - - source: /lang/en.json + - source: /lang/default.json translation: /lang/%locale%.json From 56da3f506d328b5357de56fb5f32e19ee62bb139 Mon Sep 17 00:00:00 2001 From: Aka jazzy Date: Mon, 13 Mar 2023 16:31:24 +0800 Subject: [PATCH 28/31] fix(i18n): revise copies --- lang/default.json | 40 ++++++++++++------- lang/en.json | 30 +++++++++----- lang/zh-Hans.json | 20 ++++++++-- lang/zh-Hant.json | 22 +++++++--- src/common/enums/text.ts | 2 +- .../DropdownActions/SetTagSelectedButton.tsx | 2 +- .../DropdownActions/StickyButton.tsx | 2 +- .../DropdownActions/DeleteComment/Dialog.tsx | 31 +++++++------- src/views/TagDetail/ArticlesCount/index.tsx | 2 +- src/views/TagDetail/DropdownActions/index.tsx | 2 +- src/views/User/Articles/UserArticles.tsx | 2 +- 11 files changed, 102 insertions(+), 53 deletions(-) diff --git a/lang/default.json b/lang/default.json index 725e630bc4..1f0de18f20 100644 --- a/lang/default.json +++ b/lang/default.json @@ -95,8 +95,8 @@ "defaultMessage": "Cancel", "description": "" }, - "4HVCON": { - "defaultMessage": "Article pinned", + "4Odb0J": { + "defaultMessage": "Pin article", "description": "src/components/ArticleDigest/DropdownActions/StickyButton.tsx" }, "4giHJT": { @@ -211,6 +211,10 @@ "defaultMessage": ". Take a look at your income", "description": "src/components/Notice/TransactionNotice/PaymentReceivedDonationNotice.tsx" }, + "Cdkhl8": { + "defaultMessage": "Delete {commentType}", + "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" + }, "CnPG8j": { "defaultMessage": "Featured", "description": "" @@ -443,14 +447,14 @@ "defaultMessage": "Failed to republish article", "description": "src/components/Notice/ArticleNotice/RevisedArticleNotPublishedNotice.tsx" }, + "QvQPfZ": { + "defaultMessage": "Add Articles into featured", + "description": "src/views/TagDetail/DropdownActions/index.tsx" + }, "RFzVUD": { "defaultMessage": "Unpin Broadcast", "description": "src/components/Comment/DropdownActions/PinButton.tsx" }, - "SY0cqp": { - "defaultMessage": "Add to Trending", - "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" - }, "Seanpx": { "defaultMessage": "Required", "description": "" @@ -575,10 +579,6 @@ "defaultMessage": "About Us", "description": "" }, - "aUPhEs": { - "defaultMessage": "Add Articles into Trending", - "description": "src/views/TagDetail/DropdownActions/index.tsx" - }, "aa0nss": { "defaultMessage": "Unpin from Trending", "description": "src/components/ArticleDigest/DropdownActions/SetTagUnselectedButton.tsx" @@ -687,6 +687,14 @@ "defaultMessage": "RSS Subscription", "description": "src/components/Dialogs/RssFeedDialog/Content.tsx" }, + "h9CG9E": { + "defaultMessage": "{commentType} has been deleted", + "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" + }, + "hSxDqf": { + "defaultMessage": "Add to featured", + "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" + }, "hWs95P": { "defaultMessage": "Important information will be notified by email. So filling in your email address will be required.", "description": "src/components/Forms/WalletAuthForm/Connect.tsx" @@ -719,6 +727,10 @@ "defaultMessage": "Follow", "description": "" }, + "ikVIu3": { + "defaultMessage": "articles", + "description": "" + }, "ipQlDG": { "defaultMessage": "Login with Email", "description": "src/components/Forms/EmailSignUpForm/Buttons.tsx" @@ -850,6 +862,10 @@ "defaultMessage": "Manage Circle", "description": "src/views/Circle/Profile/DropdownActions/index.tsx" }, + "q8xxel": { + "defaultMessage": "Confirm deletion of the {commentType}, The {commentType} will be removed immediately.", + "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" + }, "qPPrzm": { "defaultMessage": "supported your article", "description": "src/components/Notice/TransactionNotice/PaymentReceivedDonationNotice.tsx" @@ -1002,10 +1018,6 @@ "defaultMessage": "Your", "description": "src/components/Notice/TransactionNotice/PaymentPayoutNotice.tsx" }, - "zPEMFy": { - "defaultMessage": "articles in total", - "description": "" - }, "zQvVDJ": { "defaultMessage": "All", "description": "" diff --git a/lang/en.json b/lang/en.json index b130b8f425..5f05d57ca0 100644 --- a/lang/en.json +++ b/lang/en.json @@ -823,8 +823,8 @@ "defaultMessage": "Manage Community", "description": "src/views/TagDetail/DropdownActions/index.tsx" }, - "aUPhEs": { - "defaultMessage": "Add Articles into Trending", + "QvQPfZ": { + "defaultMessage": "Add Articles into featured", "description": "src/views/TagDetail/DropdownActions/index.tsx" }, "wEQDC6": { @@ -840,7 +840,7 @@ "description": "" }, "U9IXic": { - "defaultMessage": "添加作品", + "defaultMessage": "Add Articles", "description": "src/views/Circle/Profile/AddCircleArticle/Button.tsx" }, "q+N5Wd": { @@ -931,8 +931,8 @@ "defaultMessage": "No members yet", "description": "src/views/Circle/Profile/MembersDialog/Content.tsx" }, - "zPEMFy": { - "defaultMessage": "articles in total", + "ikVIu3": { + "defaultMessage": "articles", "description": "" }, "hYG5fb": { @@ -943,8 +943,8 @@ "defaultMessage": "Maintain", "description": "src/views/TagDetail/Owner/index.tsx" }, - "4HVCON": { - "defaultMessage": "Article pinned", + "4Odb0J": { + "defaultMessage": "Pin article", "description": "src/components/ArticleDigest/DropdownActions/StickyButton.tsx" }, "TQLBox": { @@ -1018,8 +1018,8 @@ "defaultMessage": "The article has been added to the Trending", "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" }, - "SY0cqp": { - "defaultMessage": "Add to Trending", + "hSxDqf": { + "defaultMessage": "Add to featured", "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" }, "Js/Fij": { @@ -1049,5 +1049,17 @@ "pRV+UD": { "defaultMessage": "Collapse", "description": "src/components/Comment/DropdownActions/CollapseComment/Button.tsx" + }, + "h9CG9E": { + "defaultMessage": "{commentType} has been deleted", + "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" + }, + "Cdkhl8": { + "defaultMessage": "Delete {commentType}", + "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" + }, + "q8xxel": { + "defaultMessage": "Confirm deletion of this {commentType}, the {commentType} will be removed immediately.", + "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" } } diff --git a/lang/zh-Hans.json b/lang/zh-Hans.json index caf679658d..a342099480 100644 --- a/lang/zh-Hans.json +++ b/lang/zh-Hans.json @@ -791,7 +791,7 @@ "defaultMessage": "已追踪", "description": "" }, - "zPEMFy": { + "ikVIu3": { "defaultMessage": "篇作品", "description": "" }, @@ -823,7 +823,7 @@ "defaultMessage": "管理社群", "description": "src/views/TagDetail/DropdownActions/index.tsx" }, - "aUPhEs": { + "QvQPfZ": { "defaultMessage": "添加精选", "description": "src/views/TagDetail/DropdownActions/index.tsx" }, @@ -939,7 +939,7 @@ "defaultMessage": "主理", "description": "src/views/TagDetail/Owner/index.tsx" }, - "4HVCON": { + "4Odb0J": { "defaultMessage": "置顶作品", "description": "src/components/ArticleDigest/DropdownActions/StickyButton.tsx" }, @@ -1014,7 +1014,7 @@ "defaultMessage": "作品已添加至精选", "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" }, - "SY0cqp": { + "hSxDqf": { "defaultMessage": "添加到精选", "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" }, @@ -1045,5 +1045,17 @@ "pRV+UD": { "defaultMessage": "折叠", "description": "src/components/Comment/DropdownActions/CollapseComment/Button.tsx" + }, + "h9CG9E": { + "defaultMessage": "{commentType}已刪除", + "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" + }, + "Cdkhl8": { + "defaultMessage": "刪除{commentType}", + "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" + }, + "q8xxel": { + "defaultMessage": "确认删除{commentType},{commentType}会马上消失。", + "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" } } diff --git a/lang/zh-Hant.json b/lang/zh-Hant.json index 2db2e63d9d..67c8e2a004 100644 --- a/lang/zh-Hant.json +++ b/lang/zh-Hant.json @@ -783,7 +783,7 @@ "defaultMessage": "已追蹤", "description": "" }, - "zPEMFy": { + "ikVIu3": { "defaultMessage": "篇作品", "description": "" }, @@ -815,7 +815,7 @@ "defaultMessage": "管理社群", "description": "src/views/TagDetail/DropdownActions/index.tsx" }, - "aUPhEs": { + "QvQPfZ": { "defaultMessage": "添加精選", "description": "src/views/TagDetail/DropdownActions/index.tsx" }, @@ -828,7 +828,7 @@ "description": "" }, "20bImY": { - "defaultMessage": "衆聊", + "defaultMessage": "眾聊", "description": "" }, "jx7Hn3": { @@ -939,7 +939,7 @@ "defaultMessage": "作品", "description": "" }, - "4HVCON": { + "4Odb0J": { "defaultMessage": "置頂作品", "description": "src/components/ArticleDigest/DropdownActions/StickyButton.tsx" }, @@ -1014,7 +1014,7 @@ "defaultMessage": "作品已添加至精選", "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" }, - "SY0cqp": { + "hSxDqf": { "defaultMessage": "添加到精選", "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" }, @@ -1045,5 +1045,17 @@ "pRV+UD": { "defaultMessage": "闔上", "description": "src/components/Comment/DropdownActions/CollapseComment/Button.tsx" + }, + "h9CG9E": { + "defaultMessage": "{commentType}已刪除", + "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" + }, + "Cdkhl8": { + "defaultMessage": "刪除{commentType}", + "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" + }, + "q8xxel": { + "defaultMessage": "確認刪除{commentType},{commentType}會馬上消失。", + "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" } } diff --git a/src/common/enums/text.ts b/src/common/enums/text.ts index 17bc1cd7ca..c0aa70c353 100644 --- a/src/common/enums/text.ts +++ b/src/common/enums/text.ts @@ -1264,7 +1264,7 @@ export const COMMENT_TYPE_TEXT = { circleDiscussion: '众聊', }, en: { - article: 'Article', + article: 'comment', circleBroadcast: 'Broadcast', circleDiscussion: 'Discussion', }, diff --git a/src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx b/src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx index ab2e5d235f..535f45ff60 100644 --- a/src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx +++ b/src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx @@ -72,7 +72,7 @@ const SetTagSelectedButton = ({ > } size="md" spacing="base"> diff --git a/src/components/ArticleDigest/DropdownActions/StickyButton.tsx b/src/components/ArticleDigest/DropdownActions/StickyButton.tsx index 81a5876288..eeec71d44b 100644 --- a/src/components/ArticleDigest/DropdownActions/StickyButton.tsx +++ b/src/components/ArticleDigest/DropdownActions/StickyButton.tsx @@ -72,7 +72,7 @@ const StickyButton = ({ ) : ( } size="md" spacing="base"> diff --git a/src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx b/src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx index c7d5b972df..74aa4c5a6a 100644 --- a/src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx +++ b/src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx @@ -1,10 +1,12 @@ import gql from 'graphql-tag' +import { useContext } from 'react' +import { FormattedMessage } from 'react-intl' import { ADD_TOAST, COMMENT_TYPE_TEXT } from '~/common/enums' import { CommentFormType, Dialog, - Translate, + LanguageContext, useDialogSwitch, useMutation, } from '~/components' @@ -36,6 +38,8 @@ const DeleteCommentDialog = ({ const { show, openDialog, closeDialog } = useDialogSwitch(true) const commentId = comment.id + const { lang } = useContext(LanguageContext) + const [deleteComment] = useMutation(DELETE_COMMENT, { variables: { id: commentId }, optimisticResponse: { @@ -55,10 +59,9 @@ const DeleteCommentDialog = ({ detail: { color: 'green', content: ( - + ), buttonPlacement: 'center', @@ -74,10 +77,9 @@ const DeleteCommentDialog = ({ + } closeDialog={closeDialog} mode="inner" @@ -85,10 +87,9 @@ const DeleteCommentDialog = ({

- +

@@ -100,7 +101,7 @@ const DeleteCommentDialog = ({ closeDialog() }} > - + - +
diff --git a/src/views/TagDetail/ArticlesCount/index.tsx b/src/views/TagDetail/ArticlesCount/index.tsx index de61e6ecb9..db11ff80b3 100644 --- a/src/views/TagDetail/ArticlesCount/index.tsx +++ b/src/views/TagDetail/ArticlesCount/index.tsx @@ -18,7 +18,7 @@ const ArticlesCount = ({ tag }: ArticlesCountProps) => { {numAbbr(totalCount)}   - + diff --git a/src/views/TagDetail/DropdownActions/index.tsx b/src/views/TagDetail/DropdownActions/index.tsx index 4217bf60e2..fde47e6a19 100644 --- a/src/views/TagDetail/DropdownActions/index.tsx +++ b/src/views/TagDetail/DropdownActions/index.tsx @@ -80,7 +80,7 @@ const BaseDropdownActions = ({ > } size="md" spacing="base"> diff --git a/src/views/User/Articles/UserArticles.tsx b/src/views/User/Articles/UserArticles.tsx index 6353906cca..b7be2648f7 100644 --- a/src/views/User/Articles/UserArticles.tsx +++ b/src/views/User/Articles/UserArticles.tsx @@ -45,7 +45,7 @@ const ArticleSummaryInfo = ({ description="src/views/User/Articles/UserArticles.tsx" />  {articles}  - + From 3d4f0cb54ea25568da56c1e2120b05b53b881b8e Mon Sep 17 00:00:00 2001 From: Aka jazzy Date: Mon, 13 Mar 2023 17:13:11 +0800 Subject: [PATCH 29/31] fix(i18n): revise thread deleting pop up copy --- lang/default.json | 8 ++++---- lang/en.json | 4 ++-- lang/zh-Hans.json | 4 ++-- lang/zh-Hant.json | 4 ++-- src/common/enums/text.ts | 4 ++-- .../Comment/DropdownActions/DeleteComment/Dialog.tsx | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lang/default.json b/lang/default.json index 1f0de18f20..9e65b7e6b4 100644 --- a/lang/default.json +++ b/lang/default.json @@ -139,6 +139,10 @@ "defaultMessage": "You won't see announcements for 7 days", "description": "src/views/Home/Announcements/index.tsx" }, + "77tYPg": { + "defaultMessage": "After deletion, the {commentType} will be removed immediately", + "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" + }, "7DIW6+": { "defaultMessage": "Learn More", "description": "" @@ -862,10 +866,6 @@ "defaultMessage": "Manage Circle", "description": "src/views/Circle/Profile/DropdownActions/index.tsx" }, - "q8xxel": { - "defaultMessage": "Confirm deletion of the {commentType}, The {commentType} will be removed immediately.", - "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" - }, "qPPrzm": { "defaultMessage": "supported your article", "description": "src/components/Notice/TransactionNotice/PaymentReceivedDonationNotice.tsx" diff --git a/lang/en.json b/lang/en.json index 5f05d57ca0..6ec8d0e3c8 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1058,8 +1058,8 @@ "defaultMessage": "Delete {commentType}", "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" }, - "q8xxel": { - "defaultMessage": "Confirm deletion of this {commentType}, the {commentType} will be removed immediately.", + "77tYPg": { + "defaultMessage": "After deletion, the {commentType} will be removed immediately", "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" } } diff --git a/lang/zh-Hans.json b/lang/zh-Hans.json index a342099480..8c3ebdd5d3 100644 --- a/lang/zh-Hans.json +++ b/lang/zh-Hans.json @@ -1054,8 +1054,8 @@ "defaultMessage": "刪除{commentType}", "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" }, - "q8xxel": { - "defaultMessage": "确认删除{commentType},{commentType}会马上消失。", + "77tYPg": { + "defaultMessage": "确认删除后,{commentType}会立即消失。", "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" } } diff --git a/lang/zh-Hant.json b/lang/zh-Hant.json index 67c8e2a004..3117d856b4 100644 --- a/lang/zh-Hant.json +++ b/lang/zh-Hant.json @@ -1054,8 +1054,8 @@ "defaultMessage": "刪除{commentType}", "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" }, - "q8xxel": { - "defaultMessage": "確認刪除{commentType},{commentType}會馬上消失。", + "77tYPg": { + "defaultMessage": "確認刪除後,{commentType}會立即消失。", "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" } } diff --git a/src/common/enums/text.ts b/src/common/enums/text.ts index c0aa70c353..83e4cb9f95 100644 --- a/src/common/enums/text.ts +++ b/src/common/enums/text.ts @@ -1265,7 +1265,7 @@ export const COMMENT_TYPE_TEXT = { }, en: { article: 'comment', - circleBroadcast: 'Broadcast', - circleDiscussion: 'Discussion', + circleBroadcast: 'broadcast', + circleDiscussion: 'thread', }, } diff --git a/src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx b/src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx index 74aa4c5a6a..9aeba1687b 100644 --- a/src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx +++ b/src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx @@ -87,7 +87,7 @@ const DeleteCommentDialog = ({

-

From 7817abdd73788bdb615e65a4f5c2a8c53d5e5b1d Mon Sep 17 00:00:00 2001 From: Aka jazzy Date: Mon, 13 Mar 2023 18:55:03 +0800 Subject: [PATCH 30/31] fix(i18n): revise tag detail copies --- lang/default.json | 20 +++++++++++-------- lang/en.json | 16 +++++++-------- lang/zh-Hans.json | 8 ++++++-- lang/zh-Hant.json | 8 ++++++-- .../DropdownActions/SetTagSelectedButton.tsx | 2 +- src/views/TagDetail/ArticlesCount/index.tsx | 4 +++- src/views/TagDetail/DropdownActions/index.tsx | 2 +- 7 files changed, 37 insertions(+), 23 deletions(-) diff --git a/lang/default.json b/lang/default.json index 9e65b7e6b4..30379f9a89 100644 --- a/lang/default.json +++ b/lang/default.json @@ -451,10 +451,6 @@ "defaultMessage": "Failed to republish article", "description": "src/components/Notice/ArticleNotice/RevisedArticleNotPublishedNotice.tsx" }, - "QvQPfZ": { - "defaultMessage": "Add Articles into featured", - "description": "src/views/TagDetail/DropdownActions/index.tsx" - }, "RFzVUD": { "defaultMessage": "Unpin Broadcast", "description": "src/components/Comment/DropdownActions/PinButton.tsx" @@ -523,6 +519,10 @@ "defaultMessage": "Responses", "description": "" }, + "WSUAwk": { + "defaultMessage": "Add to Featured", + "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" + }, "WuvE8X": { "defaultMessage": "Followers of {circleName}", "description": "src/views/Circle/Profile/FollowersDialog/index.tsx" @@ -623,6 +623,10 @@ "defaultMessage": "Discover", "description": "" }, + "cd/II9": { + "defaultMessage": "{totalCount, plural, =1 {article} other {articles}}", + "description": "" + }, "cf37Zy": { "defaultMessage": "Add hash from IPFS into compatible reader such as", "description": "src/components/Dialogs/RssFeedDialog/Content.tsx" @@ -695,10 +699,6 @@ "defaultMessage": "{commentType} has been deleted", "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" }, - "hSxDqf": { - "defaultMessage": "Add to featured", - "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" - }, "hWs95P": { "defaultMessage": "Important information will be notified by email. So filling in your email address will be required.", "description": "src/components/Forms/WalletAuthForm/Connect.tsx" @@ -1010,6 +1010,10 @@ "defaultMessage": "Language", "description": "" }, + "ySGgTo": { + "defaultMessage": "Add Articles into Featured", + "description": "src/views/TagDetail/DropdownActions/index.tsx" + }, "yZfKI4": { "defaultMessage": "discussion and mentioned you", "description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx" diff --git a/lang/en.json b/lang/en.json index 6ec8d0e3c8..e400ac2acd 100644 --- a/lang/en.json +++ b/lang/en.json @@ -651,10 +651,6 @@ "defaultMessage": "Created", "description": "src/views/User/Articles/UserArticles.tsx" }, - "NG8uih": { - "defaultMessage": "articles", - "description": "src/views/User/Articles/UserArticles.tsx" - }, "UxfPXa": { "defaultMessage": "In total", "description": "src/views/User/Articles/UserArticles.tsx" @@ -823,8 +819,8 @@ "defaultMessage": "Manage Community", "description": "src/views/TagDetail/DropdownActions/index.tsx" }, - "QvQPfZ": { - "defaultMessage": "Add Articles into featured", + "ySGgTo": { + "defaultMessage": "Add Articles into Featured", "description": "src/views/TagDetail/DropdownActions/index.tsx" }, "wEQDC6": { @@ -1018,8 +1014,8 @@ "defaultMessage": "The article has been added to the Trending", "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" }, - "hSxDqf": { - "defaultMessage": "Add to featured", + "WSUAwk": { + "defaultMessage": "Add to Featured", "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" }, "Js/Fij": { @@ -1061,5 +1057,9 @@ "77tYPg": { "defaultMessage": "After deletion, the {commentType} will be removed immediately", "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" + }, + "cd/II9": { + "defaultMessage": "{totalCount, plural, =1 {article} other {articles}}", + "description": "" } } diff --git a/lang/zh-Hans.json b/lang/zh-Hans.json index 8c3ebdd5d3..6d56e58083 100644 --- a/lang/zh-Hans.json +++ b/lang/zh-Hans.json @@ -823,7 +823,7 @@ "defaultMessage": "管理社群", "description": "src/views/TagDetail/DropdownActions/index.tsx" }, - "QvQPfZ": { + "ySGgTo": { "defaultMessage": "添加精选", "description": "src/views/TagDetail/DropdownActions/index.tsx" }, @@ -1014,7 +1014,7 @@ "defaultMessage": "作品已添加至精选", "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" }, - "hSxDqf": { + "WSUAwk": { "defaultMessage": "添加到精选", "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" }, @@ -1057,5 +1057,9 @@ "77tYPg": { "defaultMessage": "确认删除后,{commentType}会立即消失。", "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" + }, + "cd/II9": { + "defaultMessage": "{totalCount, plural, =1 {篇文章} other {篇文章}}", + "description": "" } } diff --git a/lang/zh-Hant.json b/lang/zh-Hant.json index 3117d856b4..43472f4151 100644 --- a/lang/zh-Hant.json +++ b/lang/zh-Hant.json @@ -815,7 +815,7 @@ "defaultMessage": "管理社群", "description": "src/views/TagDetail/DropdownActions/index.tsx" }, - "QvQPfZ": { + "ySGgTo": { "defaultMessage": "添加精選", "description": "src/views/TagDetail/DropdownActions/index.tsx" }, @@ -1014,7 +1014,7 @@ "defaultMessage": "作品已添加至精選", "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" }, - "hSxDqf": { + "WSUAwk": { "defaultMessage": "添加到精選", "description": "src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx" }, @@ -1057,5 +1057,9 @@ "77tYPg": { "defaultMessage": "確認刪除後,{commentType}會立即消失。", "description": "src/components/Comment/DropdownActions/DeleteComment/Dialog.tsx" + }, + "cd/II9": { + "defaultMessage": "{totalCount, plural, =1 {篇文章} other {篇文章}}", + "description": "" } } diff --git a/src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx b/src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx index 535f45ff60..14cd00f147 100644 --- a/src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx +++ b/src/components/ArticleDigest/DropdownActions/SetTagSelectedButton.tsx @@ -72,7 +72,7 @@ const SetTagSelectedButton = ({ > } size="md" spacing="base"> diff --git a/src/views/TagDetail/ArticlesCount/index.tsx b/src/views/TagDetail/ArticlesCount/index.tsx index db11ff80b3..fb6e22fd3e 100644 --- a/src/views/TagDetail/ArticlesCount/index.tsx +++ b/src/views/TagDetail/ArticlesCount/index.tsx @@ -18,7 +18,9 @@ const ArticlesCount = ({ tag }: ArticlesCountProps) => { {numAbbr(totalCount)}   - + diff --git a/src/views/TagDetail/DropdownActions/index.tsx b/src/views/TagDetail/DropdownActions/index.tsx index fde47e6a19..a8bce41572 100644 --- a/src/views/TagDetail/DropdownActions/index.tsx +++ b/src/views/TagDetail/DropdownActions/index.tsx @@ -80,7 +80,7 @@ const BaseDropdownActions = ({ > } size="md" spacing="base"> From c93c653e9dd31b69cff618fc66a3cdf303872b47 Mon Sep 17 00:00:00 2001 From: Aka jazzy Date: Mon, 13 Mar 2023 19:19:13 +0800 Subject: [PATCH 31/31] chore(release):v4.17.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5bb45daf03..9383359928 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matters-web", - "version": "4.17.1", + "version": "4.17.2", "description": "codebase of Matters' website", "sideEffects": false, "author": "Matters ",