From 0e106e9d76a61c79fdff5de4b57ee92bdb37a347 Mon Sep 17 00:00:00 2001 From: robertu <4065233+robertu7@users.noreply.github.com> Date: Fri, 3 May 2024 10:39:20 +0800 Subject: [PATCH 1/6] feat(copy): remove unused copy and revise "edit" --- lang/default.json | 76 +++++++++++ lang/en.json | 76 +++++++++++ lang/zh-Hans.json | 90 ++++++++++++- lang/zh-Hant.json | 90 ++++++++++++- src/common/enums/oauth.ts | 8 +- src/common/enums/text.ts | 126 ------------------ src/components/ArticleDigest/Title/index.tsx | 12 +- .../Buttons/DonationButton/index.tsx | 9 +- .../Dialogs/ReviseArticleDialog/index.tsx | 47 ++++--- .../Editor/ToggleResponse/index.tsx | 43 ++++-- src/components/Empty/EmptySearch.tsx | 10 +- src/stories/components/Button/Buttons.tsx | 12 -- .../index.tsx | 8 +- .../Edit/PublishState/PublishedState.tsx | 37 +++-- .../Profile/AddCircleArticle/Dialog/index.tsx | 11 +- .../ConfirmPublishDialogContent/index.tsx | 42 +++--- src/views/OAuth/Callback/Success/index.tsx | 5 +- src/views/Pay/Callback/Success/index.tsx | 5 +- 18 files changed, 462 insertions(+), 245 deletions(-) diff --git a/lang/default.json b/lang/default.json index c4cf7e9249..349b2f6068 100644 --- a/lang/default.json +++ b/lang/default.json @@ -1,4 +1,7 @@ { + "+12veD": { + "defaultMessage": "Allow Responses" + }, "+51DoZ": { "defaultMessage": "Please verify email first", "description": "src/views/Me/Settings/Settings/Password/index.tsx" @@ -17,6 +20,9 @@ "+7SAix": { "defaultMessage": "Must be between 2-12 characters long." }, + "+GAaxB": { + "defaultMessage": "The article has been archived due to violation of terms" + }, "+OStJM": { "defaultMessage": "Reset Payment Password" }, @@ -106,6 +112,9 @@ "06XHBC": { "defaultMessage": "Add to Circle" }, + "09AywK": { + "defaultMessage": "Your work has been republished. Share it on different platforms" + }, "0Azlrb": { "defaultMessage": "Manage" }, @@ -154,6 +163,9 @@ "defaultMessage": "Failed", "description": "src/components/Transaction/State/index.tsx" }, + "1DNHwi": { + "defaultMessage": "Your work will be stored in IPFS network. Currently the fee is covered by Matters." + }, "1PORwh": { "defaultMessage": "Archived article.", "description": "src/views/ArticleDetail/StickyTopBanner/index.tsx" @@ -174,6 +186,9 @@ "defaultMessage": "No data yet", "description": "src/views/Me/History/index.tsx" }, + "1exrSw": { + "defaultMessage": "Welcome onboard!" + }, "1hyiZ8": { "defaultMessage": "Confirm Matters ID", "description": "src/components/Dialogs/SetUserNameDialog/Content.tsx" @@ -389,6 +404,10 @@ "69+D96": { "defaultMessage": "Start Creating" }, + "6B+QXo": { + "defaultMessage": "Response", + "description": "src/components/Editor/ToggleResponse/index.tsx" + }, "6BXcdo": { "defaultMessage": "Set threshold for circle (per month)", "description": "src/components/Forms/CreateCircleForm/Init.tsx" @@ -536,6 +555,9 @@ "99OtWT": { "defaultMessage": "Pending..." }, + "9Dwh/Z": { + "defaultMessage": "The revised work will be republished to decentralized network. Please backup of the previous edition before revision." + }, "9EABqX": { "defaultMessage": "Like my work? Don't forget to support and clap, let me know that you are with me on the road of creation. Keep this enthusiasm together!" }, @@ -606,6 +628,9 @@ "defaultMessage": "Maintain", "description": "src/views/TagDetail/Owner/index.tsx" }, + "AQuumI": { + "defaultMessage": "View republished article" + }, "AVpR3Q": { "defaultMessage": "Wallet linked", "description": "src/components/UserProfile/WalletLabel/index.tsx" @@ -1148,6 +1173,10 @@ "defaultMessage": "followers", "description": "src/views/Circle/Analytics/FollowerAnalytics/index.tsx" }, + "MIA5xy": { + "defaultMessage": "Notice", + "description": "src/components/Dialogs/ReviseArticleDialog/index.tsx" + }, "MP6xe/": { "defaultMessage": "Billboard is an open and rentable on-chain NFT advertising protocol. Once a rental is completed, the content can be displayed for 14 days. The rental fee is calculated based on the concept of the Harberger tax, and the generated rental income is distributed to the community creators through quadratic funding. Please check out our {announcements}.", "description": "src/components/Dialogs/BillboardDialog/Content.tsx" @@ -1156,6 +1185,9 @@ "defaultMessage": "Operation failed, please try again later.", "description": "ACTION_FAILED" }, + "MV0JlP": { + "defaultMessage": "to receive more support" + }, "Me4s4Q": { "defaultMessage": "Please connect email", "description": "src/components/Dialogs/BindEmailHintDialog/index.tsx" @@ -1332,6 +1364,10 @@ "defaultMessage": "Circle Revenue", "description": "src/components/Transaction/index.tsx" }, + "REQGgU": { + "defaultMessage": "Notice", + "description": "src/views/Me/DraftDetail/SettingsButton/ConfirmPublishDialogContent/index.tsx" + }, "RFzVUD": { "defaultMessage": "Unpin Broadcast", "description": "src/components/Comment/DropdownActions/PinButton.tsx" @@ -1415,6 +1451,9 @@ "SuRTsQ": { "defaultMessage": "Register for ISCN" }, + "SwoXPI": { + "defaultMessage": "Content hash and gateway addresses will be public, and can be used for sharing." + }, "Szd1tH": { "defaultMessage": "Failed to log out, please try again." }, @@ -1436,6 +1475,9 @@ "TF1OhT": { "defaultMessage": "This login code has expired, please try to resend" }, + "TInwt3": { + "defaultMessage": "Disable Responses" + }, "TKsfIS": { "defaultMessage": "Meteor Canoe" }, @@ -1711,6 +1753,9 @@ "ZEMcZ6": { "defaultMessage": "Article Management" }, + "ZOW313": { + "defaultMessage": "You can edit the article four times after publishing it. You can also archive the original and republish.." + }, "ZUPQzl": { "defaultMessage": "comment", "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx" @@ -1914,6 +1959,9 @@ "e3qUqn": { "defaultMessage": "Pornography involving minors" }, + "eIlMHB": { + "defaultMessage": "Allow readers to respond to this article (can NOT be disabled afterwards)" + }, "eKVBm/": { "defaultMessage": "Optimism is a standalone blockchain. If you have USDT on other chains, you need to transfer them to Optimism. See details in the {link}." }, @@ -1946,12 +1994,18 @@ "ezYuE2": { "defaultMessage": "Support Author" }, + "fBzH+2": { + "defaultMessage": "Disallow readers to respond to this article (you can enable responses later by editing this article)" + }, "fDdcbi": { "defaultMessage": "This {type} has been deleted by the author" }, "fK6ptv": { "defaultMessage": "Sending failed. Please retry later." }, + "fKkBPz": { + "defaultMessage": "Support Again" + }, "fPcF7H": { "defaultMessage": "Adding tags helps readers find your articles." }, @@ -1962,6 +2016,9 @@ "fsB/4p": { "defaultMessage": "Saved" }, + "fxhue9": { + "defaultMessage": "Article will be published to IPFS, others can not tamper with it, and you own the copyright." + }, "g5pX+a": { "defaultMessage": "About" }, @@ -1973,6 +2030,9 @@ "defaultMessage": "Your work {articleTitle} has been republished to decentralized network", "description": "src/components/Notice/ArticleNotice/RevisedArticlePublishedNotice.tsx" }, + "gS1u3d": { + "defaultMessage": "{left} modifications available" + }, "gW/KWu": { "defaultMessage": "Comments has been pinned", "description": "src/views/Me/Settings/Notifications/GeneralSettings/index.tsx" @@ -1981,6 +2041,9 @@ "defaultMessage": "The payment amount is invalid, please re-enter.", "description": "PAYMENT_AMOUNT_INVALID" }, + "gz0EGC": { + "defaultMessage": "Article republished" + }, "h+punE": { "defaultMessage": "Updated {date}", "description": "src/views/User/CollectionDetail/Content.tsx" @@ -2044,6 +2107,9 @@ "defaultMessage": "Under the moonlight, dreams are about to come true. The Moonlight Dream badge signifies your participation in the Nomad Matters.", "description": "src/views/User/UserProfile/BadgeNomadLabel/index.tsx" }, + "iYk6P9": { + "defaultMessage": "Result not found" + }, "icdrwy": { "defaultMessage": "Followed You", "description": "src/components/Buttons/FollowUser/FollowState.tsx" @@ -2399,6 +2465,10 @@ "defaultMessage": "Follow", "description": "src/components/Buttons/FollowUser/Follow.tsx" }, + "rJqgwV": { + "defaultMessage": "Edit", + "description": "src/components/Dialogs/ReviseArticleDialog/index.tsx" + }, "rLlTQ9": { "defaultMessage": "Tag Name" }, @@ -2755,6 +2825,9 @@ "defaultMessage": "Settings", "description": "src/views/Me/Settings/Notifications/index.tsx" }, + "z1ucgb": { + "defaultMessage": "Articles added" + }, "z3uIHQ": { "defaultMessage": "Undo upvote" }, @@ -2776,6 +2849,9 @@ "zQvVDJ": { "defaultMessage": "All" }, + "zWXgmM": { + "defaultMessage": "Return and continue" + }, "zaY8Cu": { "defaultMessage": "Enter transaction password", "description": "src/components/Forms/PaymentForm/PayTo/Confirm/index.tsx" diff --git a/lang/en.json b/lang/en.json index 7e3bee20ae..30b1294da4 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1,4 +1,7 @@ { + "+12veD": { + "defaultMessage": "Allow Responses" + }, "+51DoZ": { "defaultMessage": "Please verify email first", "description": "src/views/Me/Settings/Settings/Password/index.tsx" @@ -17,6 +20,9 @@ "+7SAix": { "defaultMessage": "Must be between 2-12 characters long." }, + "+GAaxB": { + "defaultMessage": "The article has been archived due to violation of terms" + }, "+OStJM": { "defaultMessage": "Reset Payment Password" }, @@ -106,6 +112,9 @@ "06XHBC": { "defaultMessage": "Add to Circle" }, + "09AywK": { + "defaultMessage": "Your work has been republished. Share it on different platforms" + }, "0Azlrb": { "defaultMessage": "Manage" }, @@ -154,6 +163,9 @@ "defaultMessage": "Failed", "description": "src/components/Transaction/State/index.tsx" }, + "1DNHwi": { + "defaultMessage": "Your work will be stored in IPFS network. Currently the fee is covered by Matters." + }, "1PORwh": { "defaultMessage": "Archived article.", "description": "src/views/ArticleDetail/StickyTopBanner/index.tsx" @@ -174,6 +186,9 @@ "defaultMessage": "No data yet", "description": "src/views/Me/History/index.tsx" }, + "1exrSw": { + "defaultMessage": "Welcome onboard!" + }, "1hyiZ8": { "defaultMessage": "Confirm Matters ID", "description": "src/components/Dialogs/SetUserNameDialog/Content.tsx" @@ -389,6 +404,10 @@ "69+D96": { "defaultMessage": "Start Creating" }, + "6B+QXo": { + "defaultMessage": "Response", + "description": "src/components/Editor/ToggleResponse/index.tsx" + }, "6BXcdo": { "defaultMessage": "Set threshold for circle (per month)", "description": "src/components/Forms/CreateCircleForm/Init.tsx" @@ -536,6 +555,9 @@ "99OtWT": { "defaultMessage": "Pending..." }, + "9Dwh/Z": { + "defaultMessage": "The revised work will be republished to decentralized network. Please backup of the previous edition before revision." + }, "9EABqX": { "defaultMessage": "Like my work? Don't forget to support and clap, let me know that you are with me on the road of creation. Keep this enthusiasm together!" }, @@ -606,6 +628,9 @@ "defaultMessage": "Maintain", "description": "src/views/TagDetail/Owner/index.tsx" }, + "AQuumI": { + "defaultMessage": "View republished article" + }, "AVpR3Q": { "defaultMessage": "Wallet linked", "description": "src/components/UserProfile/WalletLabel/index.tsx" @@ -1148,6 +1173,10 @@ "defaultMessage": "followers", "description": "src/views/Circle/Analytics/FollowerAnalytics/index.tsx" }, + "MIA5xy": { + "defaultMessage": "Notice", + "description": "src/components/Dialogs/ReviseArticleDialog/index.tsx" + }, "MP6xe/": { "defaultMessage": "Billboard is an open and rentable on-chain NFT advertising protocol. Once a rental is completed, the content can be displayed for 14 days. The rental fee is calculated based on the concept of the Harberger tax, and the generated rental income is distributed to the community creators through quadratic funding. Please check out our {announcements}.", "description": "src/components/Dialogs/BillboardDialog/Content.tsx" @@ -1156,6 +1185,9 @@ "defaultMessage": "Operation failed, please try again later.", "description": "ACTION_FAILED" }, + "MV0JlP": { + "defaultMessage": "to receive more support" + }, "Me4s4Q": { "defaultMessage": "Please connect email", "description": "src/components/Dialogs/BindEmailHintDialog/index.tsx" @@ -1332,6 +1364,10 @@ "defaultMessage": "Circle Revenue", "description": "src/components/Transaction/index.tsx" }, + "REQGgU": { + "defaultMessage": "Notice", + "description": "src/views/Me/DraftDetail/SettingsButton/ConfirmPublishDialogContent/index.tsx" + }, "RFzVUD": { "defaultMessage": "Unpin Broadcast", "description": "src/components/Comment/DropdownActions/PinButton.tsx" @@ -1415,6 +1451,9 @@ "SuRTsQ": { "defaultMessage": "Register for ISCN" }, + "SwoXPI": { + "defaultMessage": "Content hash and gateway addresses will be public, and can be used for sharing." + }, "Szd1tH": { "defaultMessage": "Failed to log out, please try again." }, @@ -1436,6 +1475,9 @@ "TF1OhT": { "defaultMessage": "This login code has expired, please try to resend" }, + "TInwt3": { + "defaultMessage": "Disable Responses" + }, "TKsfIS": { "defaultMessage": "Meteor Canoe" }, @@ -1711,6 +1753,9 @@ "ZEMcZ6": { "defaultMessage": "Article Management" }, + "ZOW313": { + "defaultMessage": "You can edit the article four times after publishing it. You can also archive the original and republish.." + }, "ZUPQzl": { "defaultMessage": " ", "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx" @@ -1914,6 +1959,9 @@ "e3qUqn": { "defaultMessage": "Pornography involving minors" }, + "eIlMHB": { + "defaultMessage": "Allow readers to respond to this article (can NOT be disabled afterwards)" + }, "eKVBm/": { "defaultMessage": "Optimism is a standalone blockchain. If you have USDT on other chains, you need to transfer them to Optimism. See details in the {link}." }, @@ -1946,12 +1994,18 @@ "ezYuE2": { "defaultMessage": "Support Author" }, + "fBzH+2": { + "defaultMessage": "Disallow readers to respond to this article (you can enable responses later by editing this article)" + }, "fDdcbi": { "defaultMessage": "This {type} has been deleted by the author" }, "fK6ptv": { "defaultMessage": "Sending failed. Please retry later." }, + "fKkBPz": { + "defaultMessage": "Support Again" + }, "fPcF7H": { "defaultMessage": "Adding tags helps readers find your articles." }, @@ -1962,6 +2016,9 @@ "fsB/4p": { "defaultMessage": "Saved" }, + "fxhue9": { + "defaultMessage": "Article will be published to IPFS, others can not tamper with it, and you own the copyright." + }, "g5pX+a": { "defaultMessage": "About" }, @@ -1973,6 +2030,9 @@ "defaultMessage": "Your work {articleTitle} has been republished to decentralized network", "description": "src/components/Notice/ArticleNotice/RevisedArticlePublishedNotice.tsx" }, + "gS1u3d": { + "defaultMessage": "{left} modifications available" + }, "gW/KWu": { "defaultMessage": "Comments has been pinned", "description": "src/views/Me/Settings/Notifications/GeneralSettings/index.tsx" @@ -1981,6 +2041,9 @@ "defaultMessage": "The payment amount is invalid, please re-enter.", "description": "PAYMENT_AMOUNT_INVALID" }, + "gz0EGC": { + "defaultMessage": "Article republished" + }, "h+punE": { "defaultMessage": "Updated {date}", "description": "src/views/User/CollectionDetail/Content.tsx" @@ -2044,6 +2107,9 @@ "defaultMessage": "Under the moonlight, dreams are about to come true. The Moonlight Dream badge signifies your participation in the Nomad Matters.", "description": "src/views/User/UserProfile/BadgeNomadLabel/index.tsx" }, + "iYk6P9": { + "defaultMessage": "Result not found" + }, "icdrwy": { "defaultMessage": "Followed You", "description": "src/components/Buttons/FollowUser/FollowState.tsx" @@ -2399,6 +2465,10 @@ "defaultMessage": "Follow", "description": "src/components/Buttons/FollowUser/Follow.tsx" }, + "rJqgwV": { + "defaultMessage": "Edit", + "description": "src/components/Dialogs/ReviseArticleDialog/index.tsx" + }, "rLlTQ9": { "defaultMessage": "Tag Name" }, @@ -2755,6 +2825,9 @@ "defaultMessage": "Settings", "description": "src/views/Me/Settings/Notifications/index.tsx" }, + "z1ucgb": { + "defaultMessage": "Articles added" + }, "z3uIHQ": { "defaultMessage": "Undo upvote" }, @@ -2776,6 +2849,9 @@ "zQvVDJ": { "defaultMessage": "All" }, + "zWXgmM": { + "defaultMessage": "Return and continue" + }, "zaY8Cu": { "defaultMessage": "Enter transaction password", "description": "src/components/Forms/PaymentForm/PayTo/Confirm/index.tsx" diff --git a/lang/zh-Hans.json b/lang/zh-Hans.json index c0c39cff85..84d72ff942 100644 --- a/lang/zh-Hans.json +++ b/lang/zh-Hans.json @@ -1,4 +1,7 @@ { + "+12veD": { + "defaultMessage": "开启回应" + }, "+51DoZ": { "defaultMessage": "请先验证邮箱", "description": "src/views/Me/Settings/Settings/Password/index.tsx" @@ -17,6 +20,9 @@ "+7SAix": { "defaultMessage": "2-12 个字符" }, + "+GAaxB": { + "defaultMessage": "作品因违反社区约章被封存" + }, "+OStJM": { "defaultMessage": "重置交易密码" }, @@ -106,6 +112,9 @@ "06XHBC": { "defaultMessage": "加入围炉" }, + "09AywK": { + "defaultMessage": "编辑作品发布成功,快把作品分享到不同渠道," + }, "0Azlrb": { "defaultMessage": "管理" }, @@ -154,6 +163,9 @@ "defaultMessage": "失败", "description": "src/components/Transaction/State/index.tsx" }, + "1DNHwi": { + "defaultMessage": "你的作品即将存储在星际文件系统(IPFS)分布式节点中。在 IPFS 的存储费用目前由 Matters 平台支付。" + }, "1PORwh": { "defaultMessage": "仅作者本人可见封存作品,", "description": "src/views/ArticleDetail/StickyTopBanner/index.tsx" @@ -174,6 +186,9 @@ "defaultMessage": "尚无阅读记录", "description": "src/views/Me/History/index.tsx" }, + "1exrSw": { + "defaultMessage": "欢迎上船!" + }, "1hyiZ8": { "defaultMessage": "确认 Matters ID", "description": "src/components/Dialogs/SetUserNameDialog/Content.tsx" @@ -206,7 +221,7 @@ "description": "src/components/Editor/Sidebar/Response/index.tsx" }, "24jhEp": { - "defaultMessage": "你的修订作品 {articleTitle} 发布失败", + "defaultMessage": "你的编辑作品 {articleTitle} 发布失败", "description": "src/components/Notice/ArticleNotice/RevisedArticleNotPublishedNotice.tsx" }, "25oM9Q": { @@ -389,6 +404,10 @@ "69+D96": { "defaultMessage": "开始创作" }, + "6B+QXo": { + "defaultMessage": "回应设置", + "description": "src/components/Editor/ToggleResponse/index.tsx" + }, "6BXcdo": { "defaultMessage": "设定围炉门槛(每月)", "description": "src/components/Forms/CreateCircleForm/Init.tsx" @@ -536,6 +555,9 @@ "99OtWT": { "defaultMessage": "写入中…" }, + "9Dwh/Z": { + "defaultMessage": "编辑後的作品即再版發佈至分佈式網絡。编辑前請自行保留上一版本備份" + }, "9EABqX": { "defaultMessage": "喜欢我的作品吗?别忘了给予支持与赞赏,让我知道在创作的路上有你陪伴,一起延续这份热忱!" }, @@ -606,6 +628,9 @@ "defaultMessage": "主理", "description": "src/views/TagDetail/Owner/index.tsx" }, + "AQuumI": { + "defaultMessage": "查看编辑作品" + }, "AVpR3Q": { "defaultMessage": "已绑定钱包", "description": "src/components/UserProfile/WalletLabel/index.tsx" @@ -1036,7 +1061,7 @@ "description": "src/components/Comment/DropdownActions/PinButton.tsx" }, "KWDSxB": { - "defaultMessage": "保存修订" + "defaultMessage": "保存编辑" }, "KgVypx": { "defaultMessage": "标签", @@ -1148,6 +1173,10 @@ "defaultMessage": "人", "description": "src/views/Circle/Analytics/FollowerAnalytics/index.tsx" }, + "MIA5xy": { + "defaultMessage": "编辑须知", + "description": "src/components/Dialogs/ReviseArticleDialog/index.tsx" + }, "MP6xe/": { "defaultMessage": "Billboard 是一个公开且可付费租借的链上 NFT 广告协议。租借成功后,可以进行14天的内容投放。租借费用基于哈柏格税概念计算,产生的租借收入将以二次方配捐方式回馈给社区创作者。更多详情请查看{announcements}。", "description": "src/components/Dialogs/BillboardDialog/Content.tsx" @@ -1156,6 +1185,9 @@ "defaultMessage": "操作失败,请稍候重试", "description": "ACTION_FAILED" }, + "MV0JlP": { + "defaultMessage": "吸引更多人为你拍手!" + }, "Me4s4Q": { "defaultMessage": "请先绑定邮箱", "description": "src/components/Dialogs/BindEmailHintDialog/index.tsx" @@ -1284,7 +1316,7 @@ "defaultMessage": "正在发布,马上就好" }, "PkUihI": { - "defaultMessage": "修订已保存", + "defaultMessage": "编辑已保存", "description": "src/views/ArticleDetail/Edit/Header/index.tsx" }, "PliM8z": { @@ -1332,6 +1364,10 @@ "defaultMessage": "围炉营收", "description": "src/components/Transaction/index.tsx" }, + "REQGgU": { + "defaultMessage": "發布须知", + "description": "src/views/Me/DraftDetail/SettingsButton/ConfirmPublishDialogContent/index.tsx" + }, "RFzVUD": { "defaultMessage": "取消置顶", "description": "src/components/Comment/DropdownActions/PinButton.tsx" @@ -1415,6 +1451,9 @@ "SuRTsQ": { "defaultMessage": "注册 ISCN" }, + "SwoXPI": { + "defaultMessage": "指纹与节点随之公开可见,皆可用于分享作品。" + }, "Szd1tH": { "defaultMessage": "登出失败,再来一次" }, @@ -1436,6 +1475,9 @@ "TF1OhT": { "defaultMessage": "临时密码已过期,请尝试重新发送" }, + "TInwt3": { + "defaultMessage": "关闭回应" + }, "TKsfIS": { "defaultMessage": "流星号" }, @@ -1571,7 +1613,7 @@ "description": "src/views/Me/Settings/Notifications/GeneralSettings/index.tsx" }, "Wjmng6": { - "defaultMessage": "正文及作品管理剩 {revisionCountLeft} 次修订" + "defaultMessage": "正文及作品管理剩 {revisionCountLeft} 次编辑" }, "WpvsPu": { "defaultMessage": "订阅", @@ -1711,6 +1753,9 @@ "ZEMcZ6": { "defaultMessage": "作品管理" }, + "ZOW313": { + "defaultMessage": "首次发布作品后有四次正文编辑机会,你也可以封存原文重新发布作品。" + }, "ZUPQzl": { "defaultMessage": "回复了你", "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx" @@ -1914,6 +1959,9 @@ "e3qUqn": { "defaultMessage": "涉及未成年人的色情" }, + "eIlMHB": { + "defaultMessage": "允许读者回应本文(开启后无法关闭)" + }, "eKVBm/": { "defaultMessage": "Optimism 是独立运行的区块链,若你在其他链上已有 USDT 货币,需要将它们转移到 Optimism 网络才能使用,详情参考{link}。" }, @@ -1946,12 +1994,18 @@ "ezYuE2": { "defaultMessage": "支持作者" }, + "fBzH+2": { + "defaultMessage": "不允许读者回应本文(可通过编辑打开回应功能)" + }, "fDdcbi": { "defaultMessage": "{type}已被原作者删除" }, "fK6ptv": { "defaultMessage": "送出失败,请稍后再试" }, + "fKkBPz": { + "defaultMessage": "再次支持" + }, "fPcF7H": { "defaultMessage": "添加适合标签,帮助读者找到你的作品" }, @@ -1962,6 +2016,9 @@ "fsB/4p": { "defaultMessage": "保存成功" }, + "fxhue9": { + "defaultMessage": "作品将发布至 IPFS,无法被他人删改,创作权归你所有。" + }, "g5pX+a": { "defaultMessage": "关于" }, @@ -1970,9 +2027,12 @@ "description": "src/components/Dialogs/RssFeedDialog/Content.tsx" }, "gN4jLB": { - "defaultMessage": "你的修订作品 {articleTitle} 已发布到分布式网络", + "defaultMessage": "你的编辑作品 {articleTitle} 已发布到分布式网络", "description": "src/components/Notice/ArticleNotice/RevisedArticlePublishedNotice.tsx" }, + "gS1u3d": { + "defaultMessage": "你还可以编辑 {left} 版" + }, "gW/KWu": { "defaultMessage": "评论被精选", "description": "src/views/Me/Settings/Notifications/GeneralSettings/index.tsx" @@ -1981,6 +2041,9 @@ "defaultMessage": "支付金额无效,请重新输入", "description": "PAYMENT_AMOUNT_INVALID" }, + "gz0EGC": { + "defaultMessage": "编辑作品已发布" + }, "h+punE": { "defaultMessage": "{date}更新", "description": "src/views/User/CollectionDetail/Content.tsx" @@ -2044,6 +2107,9 @@ "defaultMessage": "月色之下,梦想即将实现。月之梦徽章纪念你曾参与「游牧者计划」。", "description": "src/views/User/UserProfile/BadgeNomadLabel/index.tsx" }, + "iYk6P9": { + "defaultMessage": "不好意思,什么都没搜到" + }, "icdrwy": { "defaultMessage": "追踪了你", "description": "src/components/Buttons/FollowUser/FollowState.tsx" @@ -2193,7 +2259,7 @@ "defaultMessage": "热门" }, "lsccVJ": { - "defaultMessage": "正文及作品管理修订次数已达上限" + "defaultMessage": "正文及作品管理编辑次数已达上限" }, "m/Wg7b": { "defaultMessage": "围炉描述", @@ -2399,6 +2465,10 @@ "defaultMessage": "追踪", "description": "src/components/Buttons/FollowUser/Follow.tsx" }, + "rJqgwV": { + "defaultMessage": "开始编辑", + "description": "src/components/Dialogs/ReviseArticleDialog/index.tsx" + }, "rLlTQ9": { "defaultMessage": "标签名称" }, @@ -2675,7 +2745,7 @@ "description": "src/views/Me/Settings/Notifications/Circle/index.tsx" }, "xjHiYx": { - "defaultMessage": "作品修订次数超出上限", + "defaultMessage": "作品编辑次数超出上限", "description": "ARTICLE_REVISION_REACH_LIMIT" }, "xkr+zo": { @@ -2755,6 +2825,9 @@ "defaultMessage": "设置", "description": "src/views/Me/Settings/Notifications/index.tsx" }, + "z1ucgb": { + "defaultMessage": "作品已添加至围炉" + }, "z3uIHQ": { "defaultMessage": "取消点赞" }, @@ -2776,6 +2849,9 @@ "zQvVDJ": { "defaultMessage": "全部" }, + "zWXgmM": { + "defaultMessage": "请回到原页面继续操作" + }, "zaY8Cu": { "defaultMessage": "输入交易密码", "description": "src/components/Forms/PaymentForm/PayTo/Confirm/index.tsx" diff --git a/lang/zh-Hant.json b/lang/zh-Hant.json index 889cc1ee14..7771bf0877 100644 --- a/lang/zh-Hant.json +++ b/lang/zh-Hant.json @@ -1,4 +1,7 @@ { + "+12veD": { + "defaultMessage": "開啟回應" + }, "+51DoZ": { "defaultMessage": "請先驗證郵箱", "description": "src/views/Me/Settings/Settings/Password/index.tsx" @@ -17,6 +20,9 @@ "+7SAix": { "defaultMessage": "2-12 個字元" }, + "+GAaxB": { + "defaultMessage": "作品因違反社區約章被封存" + }, "+OStJM": { "defaultMessage": "重置交易密碼" }, @@ -106,6 +112,9 @@ "06XHBC": { "defaultMessage": "加入圍爐" }, + "09AywK": { + "defaultMessage": "編輯作品發佈成功,快把作品分享到不同渠道," + }, "0Azlrb": { "defaultMessage": "管理" }, @@ -154,6 +163,9 @@ "defaultMessage": "失敗", "description": "src/components/Transaction/State/index.tsx" }, + "1DNHwi": { + "defaultMessage": "你的作品即將存儲在星際文件系統(IPFS)分佈式節點中。在 IPFS 的存儲費用目前由 Matters 平台支付。" + }, "1PORwh": { "defaultMessage": "僅作者本人可見封存作品,", "description": "src/views/ArticleDetail/StickyTopBanner/index.tsx" @@ -174,6 +186,9 @@ "defaultMessage": "尚無閱讀紀錄", "description": "src/views/Me/History/index.tsx" }, + "1exrSw": { + "defaultMessage": "歡迎上船!" + }, "1hyiZ8": { "defaultMessage": "確認 Matters ID", "description": "src/components/Dialogs/SetUserNameDialog/Content.tsx" @@ -206,7 +221,7 @@ "description": "src/components/Editor/Sidebar/Response/index.tsx" }, "24jhEp": { - "defaultMessage": "你的修訂作品 {articleTitle} 發布失敗", + "defaultMessage": "你的編輯作品 {articleTitle} 發布失敗", "description": "src/components/Notice/ArticleNotice/RevisedArticleNotPublishedNotice.tsx" }, "25oM9Q": { @@ -389,6 +404,10 @@ "69+D96": { "defaultMessage": "開始創作" }, + "6B+QXo": { + "defaultMessage": "回應設置", + "description": "src/components/Editor/ToggleResponse/index.tsx" + }, "6BXcdo": { "defaultMessage": "設定圍爐門檻(每月)", "description": "src/components/Forms/CreateCircleForm/Init.tsx" @@ -536,6 +555,9 @@ "99OtWT": { "defaultMessage": "寫入中…" }, + "9Dwh/Z": { + "defaultMessage": "編輯後的作品即再版發佈至分佈式網絡。編輯前請自行保留上一版本備份" + }, "9EABqX": { "defaultMessage": "喜歡我的作品嗎?別忘了給予支持與讚賞,讓我知道在創作的路上有你陪伴,一起延續這份熱忱!" }, @@ -606,6 +628,9 @@ "defaultMessage": "主理", "description": "src/views/TagDetail/Owner/index.tsx" }, + "AQuumI": { + "defaultMessage": "查看編輯作品" + }, "AVpR3Q": { "defaultMessage": "已綁定錢包", "description": "src/components/UserProfile/WalletLabel/index.tsx" @@ -1036,7 +1061,7 @@ "description": "src/components/Comment/DropdownActions/PinButton.tsx" }, "KWDSxB": { - "defaultMessage": "保存修訂" + "defaultMessage": "保存編輯" }, "KgVypx": { "defaultMessage": "標籤", @@ -1148,6 +1173,10 @@ "defaultMessage": "人", "description": "src/views/Circle/Analytics/FollowerAnalytics/index.tsx" }, + "MIA5xy": { + "defaultMessage": "編輯須知", + "description": "src/components/Dialogs/ReviseArticleDialog/index.tsx" + }, "MP6xe/": { "defaultMessage": "Billboard 是一個公開且可付費租借的鏈上 NFT 廣告協議。租借成功後,可進行 14 天的內容投放。租借費用基於哈柏格稅概念計算,產生的租借收入將以二次方配捐方式回饋給社區創作者。更多詳情請查看{announcements}。", "description": "src/components/Dialogs/BillboardDialog/Content.tsx" @@ -1156,6 +1185,9 @@ "defaultMessage": "操作失敗,請稍候重試", "description": "ACTION_FAILED" }, + "MV0JlP": { + "defaultMessage": "吸引更多人為你拍手!" + }, "Me4s4Q": { "defaultMessage": "請先綁定電子郵件", "description": "src/components/Dialogs/BindEmailHintDialog/index.tsx" @@ -1284,7 +1316,7 @@ "defaultMessage": "正在發布,馬上就好" }, "PkUihI": { - "defaultMessage": "修訂已保存", + "defaultMessage": "編輯已保存", "description": "src/views/ArticleDetail/Edit/Header/index.tsx" }, "PliM8z": { @@ -1332,6 +1364,10 @@ "defaultMessage": "圍爐營收", "description": "src/components/Transaction/index.tsx" }, + "REQGgU": { + "defaultMessage": "發布須知", + "description": "src/views/Me/DraftDetail/SettingsButton/ConfirmPublishDialogContent/index.tsx" + }, "RFzVUD": { "defaultMessage": "取消置頂", "description": "src/components/Comment/DropdownActions/PinButton.tsx" @@ -1415,6 +1451,9 @@ "SuRTsQ": { "defaultMessage": "註冊 ISCN" }, + "SwoXPI": { + "defaultMessage": "指紋與節點隨之公開可見,皆可用於分享作品。" + }, "Szd1tH": { "defaultMessage": "登出失敗,請重試" }, @@ -1436,6 +1475,9 @@ "TF1OhT": { "defaultMessage": "臨時密碼已過期,請嘗試重新發送" }, + "TInwt3": { + "defaultMessage": "關閉回應" + }, "TKsfIS": { "defaultMessage": "流星號" }, @@ -1571,7 +1613,7 @@ "description": "src/views/Me/Settings/Notifications/GeneralSettings/index.tsx" }, "Wjmng6": { - "defaultMessage": "正文及作品管理剩 {revisionCountLeft} 版修訂" + "defaultMessage": "正文及作品管理剩 {revisionCountLeft} 版編輯" }, "WpvsPu": { "defaultMessage": "訂閱", @@ -1711,6 +1753,9 @@ "ZEMcZ6": { "defaultMessage": "作品管理" }, + "ZOW313": { + "defaultMessage": "首次發布作品後有四次正文編輯機會,你也可以歸檔原文重新發布作品。" + }, "ZUPQzl": { "defaultMessage": "回覆了你", "description": "src/components/Notice/CommentCommentNotice/CommentNewReplyNotice.tsx" @@ -1914,6 +1959,9 @@ "e3qUqn": { "defaultMessage": "涉及未成年人的色情" }, + "eIlMHB": { + "defaultMessage": "允許讀者回應本文(開啟後無法關閉)" + }, "eKVBm/": { "defaultMessage": "Optimism 是獨立運行的區塊鏈,若你在其他鏈上已有 USDT 貨幣,需要將它們轉移到 Optimism 網絡才能使用,詳情參考{link}。" }, @@ -1946,12 +1994,18 @@ "ezYuE2": { "defaultMessage": "支持作者" }, + "fBzH+2": { + "defaultMessage": "不允許讀者回應本文(可通過編輯打開回應功能)" + }, "fDdcbi": { "defaultMessage": "{type}已被原作者刪除" }, "fK6ptv": { "defaultMessage": "送出失敗,請稍後再試" }, + "fKkBPz": { + "defaultMessage": "再次支持" + }, "fPcF7H": { "defaultMessage": "添加合適標籤,讓站內外讀者找到你的作品" }, @@ -1962,6 +2016,9 @@ "fsB/4p": { "defaultMessage": "儲存成功" }, + "fxhue9": { + "defaultMessage": "作品將發布至 IPFS,無法被他人刪改,創作權歸你所有。" + }, "g5pX+a": { "defaultMessage": "關於" }, @@ -1970,9 +2027,12 @@ "description": "src/components/Dialogs/RssFeedDialog/Content.tsx" }, "gN4jLB": { - "defaultMessage": "你的修訂作品 {articleTitle} 已發布到分佈式網絡", + "defaultMessage": "你的編輯作品 {articleTitle} 已發布到分佈式網絡", "description": "src/components/Notice/ArticleNotice/RevisedArticlePublishedNotice.tsx" }, + "gS1u3d": { + "defaultMessage": "你還可以編輯 {left} 版" + }, "gW/KWu": { "defaultMessage": "評論被精選", "description": "src/views/Me/Settings/Notifications/GeneralSettings/index.tsx" @@ -1981,6 +2041,9 @@ "defaultMessage": "支付金額無效,請重新輸入", "description": "PAYMENT_AMOUNT_INVALID" }, + "gz0EGC": { + "defaultMessage": "編輯作品已發佈" + }, "h+punE": { "defaultMessage": "{date}更新", "description": "src/views/User/CollectionDetail/Content.tsx" @@ -2044,6 +2107,9 @@ "defaultMessage": "月色之下,夢想即將實現。月之夢徽章紀念你曾參與「遊牧者計畫」。", "description": "src/views/User/UserProfile/BadgeNomadLabel/index.tsx" }, + "iYk6P9": { + "defaultMessage": "不好意思,什麼都沒搜到" + }, "icdrwy": { "defaultMessage": "追蹤了你", "description": "src/components/Buttons/FollowUser/FollowState.tsx" @@ -2193,7 +2259,7 @@ "defaultMessage": "熱門" }, "lsccVJ": { - "defaultMessage": "正文及作品管理修訂次數已達上限" + "defaultMessage": "正文及作品管理編輯次數已達上限" }, "m/Wg7b": { "defaultMessage": "圍爐描述", @@ -2399,6 +2465,10 @@ "defaultMessage": "追蹤", "description": "src/components/Buttons/FollowUser/Follow.tsx" }, + "rJqgwV": { + "defaultMessage": "開始編輯", + "description": "src/components/Dialogs/ReviseArticleDialog/index.tsx" + }, "rLlTQ9": { "defaultMessage": "標籤名稱" }, @@ -2675,7 +2745,7 @@ "description": "src/views/Me/Settings/Notifications/Circle/index.tsx" }, "xjHiYx": { - "defaultMessage": "作品修訂次數超出上限", + "defaultMessage": "作品編輯次數超出上限", "description": "ARTICLE_REVISION_REACH_LIMIT" }, "xkr+zo": { @@ -2755,6 +2825,9 @@ "defaultMessage": "設定", "description": "src/views/Me/Settings/Notifications/index.tsx" }, + "z1ucgb": { + "defaultMessage": "作品已添加至圍爐" + }, "z3uIHQ": { "defaultMessage": "取消點讚" }, @@ -2776,6 +2849,9 @@ "zQvVDJ": { "defaultMessage": "全部" }, + "zWXgmM": { + "defaultMessage": "請回到原頁面繼續操作" + }, "zaY8Cu": { "defaultMessage": "輸入交易密碼", "description": "src/components/Forms/PaymentForm/PayTo/Confirm/index.tsx" diff --git a/src/common/enums/oauth.ts b/src/common/enums/oauth.ts index d4f97b8f0d..7089cb9ada 100644 --- a/src/common/enums/oauth.ts +++ b/src/common/enums/oauth.ts @@ -203,8 +203,8 @@ export const OAUTH_SCOPE_TREE = { }, putComment: { _t: { - zh_hant: '發布和修訂評論', - zh_hans: '发布和修订评论', + zh_hant: '發布和編輯評論', + zh_hans: '发布和编辑评论', }, }, deleteComment: { @@ -239,8 +239,8 @@ export const OAUTH_SCOPE_TREE = { }, editArticle: { _t: { - zh_hant: '修訂作品', - zh_hans: '修订作品', + zh_hant: '編輯作品', + zh_hans: '编辑作品', }, }, appreciateArticle: { diff --git a/src/common/enums/text.ts b/src/common/enums/text.ts index ed1fcb1b8b..67600dfaff 100644 --- a/src/common/enums/text.ts +++ b/src/common/enums/text.ts @@ -3,60 +3,30 @@ export type TextId = keyof typeof TEXT.zh_hant export const TEXT = { zh_hant: { about: '關於我們', - addedArticleCircle: '作品已添加至圍爐', - addToCircle: '加入圍爐', agree: '同意', - agreeAndContinue: '同意並繼續', all: '全部', - allowResponses: '開啟回應', - allowResponsesHint: '允許讀者回應本文(開啟後無法關閉)', likesReceived: '讚賞我的', likesSent: '我讚賞的', article: '作品', articles: '作品', - articleBanned: '作品因違反社區約章被封存', - articleResponse: '回應設置', bookmark: '收藏', - callbackClose: '請回到原頁面繼續操作', - collectedOnly: '只看衍生作品', community: '社區共建基地', confirm: '確認', - confirmPush: '確認開啟', - confirmSubscribe: '立即訂閱', - connectWallet: '連接加密錢包', - loginWithWallet: '使用加密錢包登入', continue: '繼續', copy: '複製', cover: '封面', create: '創建', - createTag: '新增標籤', days: '天', delete: '刪除', - deleteArticleTag: '作品已移除標籤', - disableResponses: '關閉回應', - disableResponsesHint: '不允許讀者回應本文(可通過修訂打開回應功能)', - disagree: '我不同意', discover: '發現', displayName: '姓名', donation: '支持作者', - donationAgain: '再次支持', done: '完成', - downloadApp: '下載應用', draft: '草稿', edit: '編輯', - editArticle: '修訂作品', - editCircle: '編輯圍爐', - editTag: '編輯標籤', email: '電子信箱', - emptySearchResults: '不好意思,什麼都沒搜到', - enterCustomAmount: '輸入金額', - enterDisplayName: '請輸入姓名', enterEmail: '請輸入電子信箱', - enterNewEmail: '請輸入新電子信箱', - enterNewPassword: '請輸入新密碼', - enterNewPasswordAgain: '請再次輸入新密碼', enterPassword: '請輸入密碼', - enterPasswordAgain: '請再次輸入密碼', enterRegisteredEmail: '請輸入你的註冊電子信箱', enterUserDescription: '請輸入個人簡介', enterUserName: '請輸入新的 Matters ID', @@ -166,15 +136,6 @@ export const TEXT = { successSetSupportSetting: '支持反饋設置成功', successUnblock: '已取消封鎖。該用戶現在可以評論你的作品和圍爐。', successUploadImage: '圖片上傳成功', - supportRequestDescription: - '喜歡我的創作嗎?創作並不容易,別忘了給予支持與讚賞,讓我知道在創作的路上有你陪伴。', - supportResponseDescription: - '感謝支持,創作這條路不容易,有你的支持我將能夠蓄積更多能量創作。', - supportResponseTitle: '試試輸入「#」以代稱支持者名稱', - supporterRankingList: '支持排行榜', - analyticsNoArticle: - '由於你尚未發布任何作品,這裡還沒有任何數據能與你分享哦!發布第一篇作品來介紹你自己,以此開啟你的創作之旅吧!', - analyticsNoSupporter: '尚無支持數據', tag: '標籤', tags: '標籤', tagAddArticle: '添加我的作品', @@ -190,7 +151,6 @@ export const TEXT = { toYourIPNSPage: '指向到你的 IPNS 頁面', understood: '我知道了', unfollow: '取消追蹤', - unknownAddress: '你似乎遨遊到了一個未知空間,請返回重試', unpinArticle: '取消置頂', untitle: '未命名', uploadCover: '上傳封面', @@ -214,60 +174,30 @@ export const TEXT = { }, zh_hans: { about: '关于我们', - addedArticleCircle: '作品已添加至围炉', - addToCircle: '加入围炉', agree: '同意', - agreeAndContinue: '同意并继续', all: '全部', - allowResponses: '开启回应', - allowResponsesHint: '允许读者回应本文(开启后无法关闭)', likesReceived: '赞赏我的', likesSent: '我赞赏的', article: '作品', articles: '作品', - articleBanned: '作品因违反社区约章被歸檔', - articleResponse: '回应设置', bookmark: '收藏', - callbackClose: '请回到原页面继续操作', - collectedOnly: '只看衍生作品', community: '社区共建基地', confirm: '确认', - confirmPush: '确认开启', - confirmSubscribe: '立即订阅', - connectWallet: '连接加密钱包', - loginWithWallet: '使用加密钱包登入', continue: '继续', copy: '复制', cover: '封面', create: '创建', - createTag: '新建标签', days: '天', delete: '删除', - deleteArticleTag: '作品已移除标签', - disableResponses: '关闭回应', - disableResponsesHint: '不允许读者回应本文(可通过编辑打开回应功能)', - disagree: '我不同意', discover: '发现', displayName: '姓名', donation: '支持作者', - donationAgain: '再次支持', done: '完成', - downloadApp: '下载应用', draft: '草稿', edit: '编辑', - editArticle: '修订作品', - editCircle: '编辑围炉', - editTag: '编辑标签', email: '邮箱', - emptySearchResults: '不好意思,什么都没搜到', - enterCustomAmount: '输入金额', - enterDisplayName: '请输入姓名', enterEmail: '请输入邮箱', - enterNewEmail: '请输入新邮箱', - enterNewPassword: '请输入新密码', - enterNewPasswordAgain: '请再次输入新密码', enterPassword: '请输入密码', - enterPasswordAgain: '请再次输入密码', enterRegisteredEmail: '请输入你的注册邮箱', enterUserDescription: '请输入个人简介', enterUserName: '请输入新的 Matters ID', @@ -377,15 +307,6 @@ export const TEXT = { successSetSupportSetting: '支持反馈设置成功', successUnblock: '已取消屏蔽。该用户现在可以评论你的作品和围炉。', successUploadImage: '图片上传成功', - supportRequestDescription: - '喜欢我的创作吗?创作并不容易,别忘了给予支持与赞赏,让我知道在创作的路上有你陪伴。', - supportResponseDescription: - '感謝支持,創作這條路不容易,有你的支持我將能夠蓄積更多能量創作。', - supportResponseTitle: '试试输入「#」以代称支持者名称', - supporterRankingList: '支持排行榜', - analyticsNoArticle: - '由于你尚未发布任何作品,这裡还没有任何数据能与你分享哦!发布第一篇作品来介绍你自己,以此开启你的创作之旅吧!', - analyticsNoSupporter: '尚无支持数据', tag: '标签', tags: '标签', tagAddArticle: '添加我的作品', @@ -401,7 +322,6 @@ export const TEXT = { toYourIPNSPage: '指向到你的 IPNS 页面', understood: '我知道了', unfollow: '取消追踪', - unknownAddress: '你似乎遨游到了一个未知空间,请返回重试', unpinArticle: '取消置顶', untitle: '未命名', uploadCover: '上传封面', @@ -425,68 +345,35 @@ export const TEXT = { }, en: { about: 'About Us', - addedArticleCircle: 'Articles Added', - addToCircle: 'Add to Circle', agree: 'Agree', - agreeAndContinue: 'Agree and continue', all: 'All time', - allowResponses: 'Allow Responses', - allowResponsesHint: - 'Allow readers to respond to this article (can NOT be disabled afterwards)', likesReceived: 'Likes Received', likesSent: 'Likes Given', article: 'Article', articles: 'Articles', - articleBanned: 'The article has been archived due to violation of terms', - articleResponse: 'Response', bookmark: 'Bookmark', - callbackClose: 'Return and continue', collapseComment: 'Collapse response', - collectedOnly: 'Articles Only', commentBlocked: 'You have blocked the user.', commentCollapsed: 'Comment collapsed by author.', commentDeleted: 'Comment deleted by author.', commentPlaceholder: 'Write a response...', community: 'Matters Community', confirm: 'Confirm', - confirmPush: 'Allow Notifications', - confirmSubscribe: 'Subscribe', - connectWallet: 'Connect Wallet', - loginWithWallet: 'Connect Wallet', continue: 'Continue', copy: 'Copy', cover: 'Cover', create: 'Create', - createTag: 'Create Tags', days: 'days', delete: 'Delete', - deleteArticleTag: 'Tag Removed', - deleteComment: 'Delete', - disableResponses: 'Disable Responses', - disableResponsesHint: - 'Disallow readers to respond to this article (you can enable responses later by editing this article)', - disagree: 'Disagree', discover: 'Discover', displayName: 'Display Name', donation: 'Support Author', - donationAgain: 'Support Again', done: 'Done', - downloadApp: 'Download App', draft: 'Draft', edit: 'Edit', - editArticle: 'Edit', - editCircle: 'Edit', - editTag: 'Edit', email: 'Email', - emptySearchResults: 'Result not found', - enterCustomAmount: 'Enter a custom amount', - enterDisplayName: 'Display Name', enterEmail: 'Email', - enterNewEmail: 'New Email', - enterNewPassword: 'New Password', - enterNewPasswordAgain: 'Enter new password again', enterPassword: 'Password', - enterPasswordAgain: 'Enter password again', enterRegisteredEmail: 'Enter Email', enterUserDescription: 'Enter Bio', enterUserName: 'Enter Matters ID', @@ -603,15 +490,6 @@ export const TEXT = { successSetSupportSetting: 'Support setting updated', successUnblock: 'User unblocked. User can now comment on your articles.', successUploadImage: 'Image uploaded', - supportRequestDescription: - 'Don’t forget to support or like, so I know you are with me.', - supportResponseDescription: - 'Thanks for your support. The way isn’t always easy being a creator. With your generous support, I can accumulate more energy to go on.', - supportResponseTitle: 'Try entering # to substitute the supporter.', - supporterRankingList: 'Top Supporters', - analyticsNoArticle: - 'You haven‘t published any articles yet, so there is no data available. Create one now to introduce yourself!', - analyticsNoSupporter: 'No data yet.', tag: 'Tag', tags: 'Tags', tagAddArticle: 'Add Article', @@ -626,12 +504,8 @@ export const TEXT = { thinkAboutIt: 'Maybe later', topic: 'Topic', toYourIPNSPage: 'to your IPNS page', - unblockSuccess: 'User unblocked and can reply your articles now.', - uncollapseComment: 'Unfold', understood: 'I see', unfollow: 'Unfollow', - unknownAddress: - "It seems you've come to an unknown space, please go back and retry", unpin: 'Unselected', unpinArticle: 'Unpin', untitle: 'Untitled', diff --git a/src/components/ArticleDigest/Title/index.tsx b/src/components/ArticleDigest/Title/index.tsx index b0fcfee5d7..bd9939640b 100644 --- a/src/components/ArticleDigest/Title/index.tsx +++ b/src/components/ArticleDigest/Title/index.tsx @@ -1,9 +1,10 @@ import classNames from 'classnames' import gql from 'graphql-tag' +import { FormattedMessage } from 'react-intl' import { TEST_ID } from '~/common/enums' import { capitalizeFirstLetter, toPath, UtmParams } from '~/common/utils' -import { LinkWrapper, LinkWrapperProps, Translate } from '~/components' +import { LinkWrapper, LinkWrapperProps } from '~/components' import { ArticleDigestTitleArticleFragment } from '~/gql/graphql' import styles from './styles.module.css' @@ -68,7 +69,14 @@ export const ArticleDigestTitle = ({ utm_medium, }) const isBanned = state === 'banned' - const title = isBanned ? : article.title + const title = isBanned ? ( + + ) : ( + article.title + ) const titleClasses = classNames({ [styles.title]: true, [styles[`text${textSize}`]]: !!textSize, diff --git a/src/components/Buttons/DonationButton/index.tsx b/src/components/Buttons/DonationButton/index.tsx index 5798a8b576..f145191a1c 100644 --- a/src/components/Buttons/DonationButton/index.tsx +++ b/src/components/Buttons/DonationButton/index.tsx @@ -1,4 +1,5 @@ import { useContext } from 'react' +import { FormattedMessage, useIntl } from 'react-intl' import { ReactComponent as IconMoney } from '@/public/static/icons/24px/money.svg' import { TEST_ID } from '~/common/enums' @@ -23,6 +24,7 @@ const DonationButton = ({ width = '19.5rem', }: DonationButtonProps) => { const { lang } = useContext(LanguageContext) + const intl = useIntl() if (supported) { return ( @@ -30,7 +32,10 @@ const DonationButton = ({ size={[width, '2.5rem']} bgColor="gold" aria-haspopup="dialog" - aria-label={translate({ id: 'donationAgain', lang })} + aria-label={intl.formatMessage({ + defaultMessage: 'Support Again', + id: 'fKkBPz', + })} onClick={() => { if (onClick) { onClick() @@ -43,7 +48,7 @@ const DonationButton = ({ color="white" size={16} > - + ) diff --git a/src/components/Dialogs/ReviseArticleDialog/index.tsx b/src/components/Dialogs/ReviseArticleDialog/index.tsx index d0ca3e5a54..6d8c56577b 100644 --- a/src/components/Dialogs/ReviseArticleDialog/index.tsx +++ b/src/components/Dialogs/ReviseArticleDialog/index.tsx @@ -1,4 +1,6 @@ -import { Dialog, Translate, useDialogSwitch } from '~/components' +import { FormattedMessage } from 'react-intl' + +import { Dialog, useDialogSwitch } from '~/components' import styles from './styles.module.css' @@ -17,32 +19,33 @@ export const ReviseArticleDialog = ({ children, revisionCountLeft }: Props) => { + } />

- {' '} 📃

- - {revisionCountLeft} - {revisionCountLeft} + ), + }} />

@@ -53,7 +56,11 @@ export const ReviseArticleDialog = ({ children, revisionCountLeft }: Props) => { btns={ + } onClick={closeDialog} /> @@ -61,7 +68,11 @@ export const ReviseArticleDialog = ({ children, revisionCountLeft }: Props) => { smUpBtns={ + } onClick={closeDialog} /> diff --git a/src/components/Editor/ToggleResponse/index.tsx b/src/components/Editor/ToggleResponse/index.tsx index dd4f3086e3..b48923bef4 100644 --- a/src/components/Editor/ToggleResponse/index.tsx +++ b/src/components/Editor/ToggleResponse/index.tsx @@ -1,10 +1,11 @@ import classNames from 'classnames' +import { FormattedMessage } from 'react-intl' import { ReactComponent as IconChecked } from '@/public/static/icons/checked.svg' import { ReactComponent as IconUnChecked } from '@/public/static/icons/unchecked.svg' import { ReactComponent as IconUnCheckedGrey } from '@/public/static/icons/uncheckedGrey.svg' import { TEST_ID } from '~/common/enums' -import { Icon, Translate } from '~/components' +import { Icon } from '~/components' import styles from './styles.module.css' @@ -50,10 +51,13 @@ const ToggleResponse = ({ >

- +

- +

@@ -79,10 +83,16 @@ const ToggleResponse = ({ >

- +

- +

@@ -104,7 +114,11 @@ const ToggleResponse = ({ return (

- +

- +

- +

@@ -147,10 +164,16 @@ const ToggleResponse = ({ >

- +

- +

diff --git a/src/components/Empty/EmptySearch.tsx b/src/components/Empty/EmptySearch.tsx index 57a10a7443..c426016b03 100644 --- a/src/components/Empty/EmptySearch.tsx +++ b/src/components/Empty/EmptySearch.tsx @@ -1,5 +1,7 @@ +import { FormattedMessage } from 'react-intl' + import { ReactComponent as IconNavSearch } from '@/public/static/icons/24px/nav-search.svg' -import { Empty, Icon, Translate } from '~/components' +import { Empty, Icon } from '~/components' export const EmptySearch = ({ description, @@ -8,6 +10,10 @@ export const EmptySearch = ({ }) => ( } - description={description || } + description={ + description || ( + + ) + } /> ) diff --git a/src/stories/components/Button/Buttons.tsx b/src/stories/components/Button/Buttons.tsx index 2c7a6070a6..e043e98acb 100644 --- a/src/stories/components/Button/Buttons.tsx +++ b/src/stories/components/Button/Buttons.tsx @@ -51,18 +51,6 @@ const Buttons = () => ( active /> - - {/*
  • - - - - - - - - - -
  • */}
    ) diff --git a/src/views/ArticleDetail/Edit/Header/ConfirmRevisedPublishDialogContent/index.tsx b/src/views/ArticleDetail/Edit/Header/ConfirmRevisedPublishDialogContent/index.tsx index 71564b82b6..c8c1edb587 100644 --- a/src/views/ArticleDetail/Edit/Header/ConfirmRevisedPublishDialogContent/index.tsx +++ b/src/views/ArticleDetail/Edit/Header/ConfirmRevisedPublishDialogContent/index.tsx @@ -50,14 +50,14 @@ const ConfirmRevisedPublishDialogContent = ({
    diff --git a/src/views/ArticleDetail/Edit/PublishState/PublishedState.tsx b/src/views/ArticleDetail/Edit/PublishState/PublishedState.tsx index 74ad40304c..c10e4956ad 100644 --- a/src/views/ArticleDetail/Edit/PublishState/PublishedState.tsx +++ b/src/views/ArticleDetail/Edit/PublishState/PublishedState.tsx @@ -1,7 +1,8 @@ import { useEffect } from 'react' +import { FormattedMessage } from 'react-intl' import { toPath } from '~/common/utils' -import { Dialog, ShareDialog, Translate } from '~/components' +import { Dialog, ShareDialog } from '~/components' import { LatestVersionArticleQuery } from '~/gql/graphql' interface PublishedStateProps { article: NonNullable< @@ -32,35 +33,28 @@ const PublishedState = ({ article }: PublishedStateProps) => { description={ <>

    -

    -

    } headerTitle={ - + } btns={ } onClick={() => { @@ -71,10 +65,9 @@ const PublishedState = ({ article }: PublishedStateProps) => { smUpBtns={ } onClick={() => { diff --git a/src/views/Circle/Profile/AddCircleArticle/Dialog/index.tsx b/src/views/Circle/Profile/AddCircleArticle/Dialog/index.tsx index 7bca2e7c8a..ec3868b76d 100644 --- a/src/views/Circle/Profile/AddCircleArticle/Dialog/index.tsx +++ b/src/views/Circle/Profile/AddCircleArticle/Dialog/index.tsx @@ -1,12 +1,10 @@ import dynamic from 'next/dynamic' import { useContext, useState } from 'react' -import { FormattedMessage } from 'react-intl' +import { FormattedMessage, useIntl } from 'react-intl' import { REFETCH_CIRCLE_DETAIL_ARTICLES } from '~/common/enums' -import { translate } from '~/common/utils' import { Dialog, - LanguageContext, SpinnerBlock, toast, useDialogSwitch, @@ -58,7 +56,7 @@ const AddCircleArticleDialog = ({ const isConfirm = currStep === 'confirm' const viewer = useContext(ViewerContext) - const { lang } = useContext(LanguageContext) + const intl = useIntl() const [articles, setArticles] = useState([]) const [add, { loading }] = @@ -82,7 +80,10 @@ const AddCircleArticleDialog = ({ }) toast.success({ - message: translate({ id: 'addedArticleCircle', lang }), + message: intl.formatMessage({ + defaultMessage: 'Articles added ', + id: 'z1ucgb', + }), }) window.dispatchEvent(new CustomEvent(REFETCH_CIRCLE_DETAIL_ARTICLES)) diff --git a/src/views/Me/DraftDetail/SettingsButton/ConfirmPublishDialogContent/index.tsx b/src/views/Me/DraftDetail/SettingsButton/ConfirmPublishDialogContent/index.tsx index f3a5d834c2..c2ec56fd18 100644 --- a/src/views/Me/DraftDetail/SettingsButton/ConfirmPublishDialogContent/index.tsx +++ b/src/views/Me/DraftDetail/SettingsButton/ConfirmPublishDialogContent/index.tsx @@ -66,7 +66,13 @@ const ConfirmPublishDialogContent: React.FC< return ( <> } + title={ + + } leftBtn={ } @@ -86,39 +92,31 @@ const ConfirmPublishDialogContent: React.FC<

    - +

    -

    • -
    • -
    • -
    diff --git a/src/views/OAuth/Callback/Success/index.tsx b/src/views/OAuth/Callback/Success/index.tsx index 11c91e0622..5e88060158 100644 --- a/src/views/OAuth/Callback/Success/index.tsx +++ b/src/views/OAuth/Callback/Success/index.tsx @@ -52,7 +52,10 @@ const OAuthCallbackSuccess = () => {

    - +

    diff --git a/src/views/Pay/Callback/Success/index.tsx b/src/views/Pay/Callback/Success/index.tsx index 8f9281f5a4..064b989499 100644 --- a/src/views/Pay/Callback/Success/index.tsx +++ b/src/views/Pay/Callback/Success/index.tsx @@ -44,7 +44,10 @@ const PayCallbackSuccess = () => {

    - +

    From f20bdd68aabb98f97a22b188879a7d77407fa8f3 Mon Sep 17 00:00:00 2001 From: robertu <4065233+robertu7@users.noreply.github.com> Date: Fri, 3 May 2024 10:47:53 +0800 Subject: [PATCH 2/6] fix: disable republish button if there is nothing changed refs: - 2024-05-dev-1#ZK-002 --- src/views/ArticleDetail/Edit/Header/index.tsx | 42 +++++++++++++------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/src/views/ArticleDetail/Edit/Header/index.tsx b/src/views/ArticleDetail/Edit/Header/index.tsx index f756303994..16aa7e554c 100644 --- a/src/views/ArticleDetail/Edit/Header/index.tsx +++ b/src/views/ArticleDetail/Edit/Header/index.tsx @@ -81,6 +81,17 @@ const EditModeHeader = ({ const isCoverRevised = article.cover ? revision.cover?.path !== article.cover : !!revision.cover?.path + const isRequestForDonationRevised = + revision.requestForDonation !== article.requestForDonation + const isReplyToDonatorRevised = + revision.replyToDonator !== article.replyToDonator + const isCircleRevised = circle?.id !== article.access.circle?.id + const isAccessRevised = accessType !== article.access.type + const isLicenseRevised = license !== article.license + const isCanCommentRevised = restProps.canComment !== article.canComment + const isSensitiveRevised = + restProps.contentSensitive !== article.sensitiveByAuthor + const needRepublish = isTitleRevised || isSummaryRevised || @@ -89,6 +100,17 @@ const EditModeHeader = ({ isCollectionRevised || isCoverRevised + const isRevised = + needRepublish || + isRequestForDonationRevised || + isReplyToDonatorRevised || + isCircleRevised || + isAccessRevised || + isLicenseRevised || + isCanCommentRevised || + isSensitiveRevised || + restProps.iscnPublish + const onSave = async () => { // check content length const contentCount = revision.content?.length || 0 @@ -121,24 +143,20 @@ const EditModeHeader = ({ ? { collection: collection.map(({ id }) => id) } : {}), ...(isCoverRevised ? { cover: revision.cover?.id || null } : {}), - ...(revision.requestForDonation !== article.requestForDonation + ...(isRequestForDonationRevised ? { requestForDonation: revision.requestForDonation } : {}), - ...(revision.replyToDonator !== article.replyToDonator + ...(isReplyToDonatorRevised ? { replyToDonator: revision.replyToDonator } : {}), - ...(circle?.id !== article.access.circle?.id - ? { circle: circle?.id || null } - : {}), - ...(accessType !== article.access.type ? { accessType } : {}), - ...(license !== article.license ? { license } : {}), + ...(isCircleRevised ? { circle: circle?.id || null } : {}), + ...(isAccessRevised ? { accessType } : {}), + ...(isLicenseRevised ? { license } : {}), ...(restProps.iscnPublish ? { iscnPublish: restProps.iscnPublish } : {}), - ...(restProps.canComment !== article.canComment - ? { canComment: restProps.canComment } - : {}), - ...(restProps.contentSensitive !== article.sensitiveByAuthor + ...(isCanCommentRevised ? { canComment: restProps.canComment } : {}), + ...(isSensitiveRevised ? { sensitive: restProps.contentSensitive } : {}), }, @@ -203,7 +221,7 @@ const EditModeHeader = ({ requestForDonation: revision.requestForDonation, }} saving={loading} - disabled={loading} + disabled={!isRevised || loading} confirmButtonText={ needRepublish ? ( From 1e37667ba38cc37d31833fe28debc91aea5c4382 Mon Sep 17 00:00:00 2001 From: robertu <4065233+robertu7@users.noreply.github.com> Date: Fri, 3 May 2024 10:58:29 +0800 Subject: [PATCH 3/6] fix: fix text wrap on ipfs gateways refs: - 2024-05-dev-1#ZK-003 --- src/views/ArticleDetail/History/InfoHeader/index.tsx | 2 +- src/views/ArticleDetail/History/InfoHeader/styles.module.css | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/ArticleDetail/History/InfoHeader/index.tsx b/src/views/ArticleDetail/History/InfoHeader/index.tsx index b74708d6fa..0626f1b91f 100644 --- a/src/views/ArticleDetail/History/InfoHeader/index.tsx +++ b/src/views/ArticleDetail/History/InfoHeader/index.tsx @@ -182,7 +182,7 @@ const InfoHeader = ({ key={url} className={styles.gatewayUrl} > - {hostname} + {truncate(hostname, 4, 5)} ) })} diff --git a/src/views/ArticleDetail/History/InfoHeader/styles.module.css b/src/views/ArticleDetail/History/InfoHeader/styles.module.css index 8b8ce26134..e11278d0b3 100644 --- a/src/views/ArticleDetail/History/InfoHeader/styles.module.css +++ b/src/views/ArticleDetail/History/InfoHeader/styles.module.css @@ -33,6 +33,7 @@ line-height: 1.125rem; & .name { + flex-shrink: 0; margin-right: var(--sp8); font-weight: var(--font-medium); } @@ -40,10 +41,14 @@ & .content { @mixin inline-flex-center-all; + flex-wrap: wrap; + justify-content: flex-start; color: var(--color-grey-darker); & a { @mixin inline-flex-center-all; + + flex-shrink: 0; } } From 57841c64296597aaf3b6ae1c25135b6299485de7 Mon Sep 17 00:00:00 2001 From: robertu <4065233+robertu7@users.noreply.github.com> Date: Fri, 3 May 2024 11:03:29 +0800 Subject: [PATCH 4/6] fix: fix incorrect icon on error toast refs: - 2024-05-dev-1#ZK-005 --- src/components/Toast/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Toast/index.tsx b/src/components/Toast/index.tsx index cc5d5f1ce5..81a6734f3f 100644 --- a/src/components/Toast/index.tsx +++ b/src/components/Toast/index.tsx @@ -4,7 +4,7 @@ import type { Toast as ToastType } from 'react-hot-toast' import baseToast, { Toaster as BaseToaster } from 'react-hot-toast' import { useIntl } from 'react-intl' -import { ReactComponent as IconMinus } from '@/public/static/icons/24px/minus.svg' +import { ReactComponent as IconTimes } from '@/public/static/icons/24px/times.svg' import { ReactComponent as IconWarn } from '@/public/static/icons/24px/warn.svg' import { Button, ButtonProps, Icon, TextIcon } from '~/components' @@ -58,7 +58,7 @@ const ToastActions: React.FC = ({ })} > From 3c67b0f156d246330eea0f2a8aa9ae067b0c7874 Mon Sep 17 00:00:00 2001 From: robertu <4065233+robertu7@users.noreply.github.com> Date: Fri, 3 May 2024 11:22:47 +0800 Subject: [PATCH 5/6] fix: correct article URL matching on search box refs: - 2024-05-dev-1#RB-001 --- .../SearchingArea/EditorSearchingArea.tsx | 45 +++++++------------ .../SearchSelect/SearchingArea/gql.ts | 8 ++-- .../SearchSelect/SearchingArea/index.tsx | 30 +++++-------- 3 files changed, 31 insertions(+), 52 deletions(-) diff --git a/src/components/SearchSelect/SearchingArea/EditorSearchingArea.tsx b/src/components/SearchSelect/SearchingArea/EditorSearchingArea.tsx index 8cf25ede09..86db8ca63f 100644 --- a/src/components/SearchSelect/SearchingArea/EditorSearchingArea.tsx +++ b/src/components/SearchSelect/SearchingArea/EditorSearchingArea.tsx @@ -9,7 +9,6 @@ import { mergeConnections, normalizeTag, parseURL, - toGlobalId, } from '~/common/utils' import { EmptySearch, @@ -174,20 +173,16 @@ const EditorSearchingArea: React.FC = ({ const listNodeIds = listNode.map((n) => n.id).join(',') const search = (key: string) => { // Used to match links of the format like👇 - // https://matters.town/@az/12-来自matters的第一封信-致好朋友-zdpuAnuMKxNv6SUj7kTRzgrWRdp9q4aMMKHJ6TGtn8tp4FwX2 + // https://matters.town/a/{shortHash} const regex = new RegExp( - `^https://${process.env.NEXT_PUBLIC_SITE_DOMAIN}/@\\w+/\\d+.*$` + `^https://${process.env.NEXT_PUBLIC_SITE_DOMAIN}/a/[a-zA-Z0-9]+$` ) if (searchType === 'Article' && isUrl(key) && regex.test(key)) { const urlObj = parseURL(key) - const paths = urlObj.pathname.split('-') - const subPaths = paths[0].split('/') - const articleId = subPaths?.[subPaths.length - 1] + const shortHash = urlObj.pathname.split('/a/')[1].split('?')[0] setMode('article_url') lazyArticleUrlQuery({ - variables: { - id: toGlobalId({ type: 'Article', id: articleId }), - }, + variables: { shortHash }, }) } else { const type = searchType @@ -253,7 +248,7 @@ const EditorSearchingArea: React.FC = ({ const hasNodes = searchNodes.length > 0 const haslistNode = listNode.length > 0 - const hasArticle = !!articleUrlData?.node + const hasArticle = !!articleUrlData?.article const canCreateTag = isTag && searchKey && @@ -343,24 +338,18 @@ const EditorSearchingArea: React.FC = ({ {/* URL Search */} {isArticleUrlMode && !searching && !hasArticle && } - {isArticleUrlMode && - !searching && - hasArticle && - articleUrlData?.node?.__typename === 'Article' && ( - - sn.node.id === - (articleUrlData.node?.__typename === 'Article' && - articleUrlData.node.id) - ) !== -1 - } - inSearchingArea - /> - )} + {isArticleUrlMode && !searching && hasArticle && ( + sn.node.id === articleUrlData.article?.id + ) !== -1 + } + inSearchingArea + /> + )} )}
    diff --git a/src/components/SearchSelect/SearchingArea/gql.ts b/src/components/SearchSelect/SearchingArea/gql.ts index 3a57fc2300..48e02e4821 100644 --- a/src/components/SearchSelect/SearchingArea/gql.ts +++ b/src/components/SearchSelect/SearchingArea/gql.ts @@ -76,11 +76,9 @@ export const LIST_VIEWER_ARTICLES = gql` ` export const ARTICLE_URL_QUERY = gql` - query ArticleUrlQuery($id: ID!) { - node(input: { id: $id }) { - ... on Article { - ...ArticleDigestDropdownArticle - } + query ArticleUrlQuery($shortHash: String!) { + article(input: { shortHash: $shortHash }) { + ...ArticleDigestDropdownArticle } } ${ArticleDigestDropdown.fragments.article} diff --git a/src/components/SearchSelect/SearchingArea/index.tsx b/src/components/SearchSelect/SearchingArea/index.tsx index 47667e6f49..3e3fac299e 100644 --- a/src/components/SearchSelect/SearchingArea/index.tsx +++ b/src/components/SearchSelect/SearchingArea/index.tsx @@ -10,7 +10,6 @@ import { mergeConnections, normalizeTag, parseURL, - toGlobalId, // stripTagAllPunct, // stripPunctPrefixSuffix, } from '~/common/utils' import { EmptySearch, @@ -174,20 +173,16 @@ const SearchingArea: React.FC = ({ const listNodeIds = listNode.map((n) => n.id).join(',') const search = (key: string) => { // Used to match links of the format like👇 - // https://matters.town/@az/12-来自matters的第一封信-致好朋友-zdpuAnuMKxNv6SUj7kTRzgrWRdp9q4aMMKHJ6TGtn8tp4FwX2 + // https://matters.town/a/{shortHash} const regex = new RegExp( - `^https://${process.env.NEXT_PUBLIC_SITE_DOMAIN}/@\\w+/\\d+.*$` + `^https://${process.env.NEXT_PUBLIC_SITE_DOMAIN}/a/[a-zA-Z0-9]+$` ) if (searchType === 'Article' && isUrl(key) && regex.test(key)) { const urlObj = parseURL(key) - const paths = urlObj.pathname.split('-') - const subPaths = paths[0].split('/') - const articleId = subPaths?.[subPaths.length - 1] + const shortHash = urlObj.pathname.split('/a/')[1].split('?')[0] setMode('article_url') lazyArticleUrlQuery({ - variables: { - id: toGlobalId({ type: 'Article', id: articleId }), - }, + variables: { shortHash }, }) } else { const type = searchType === 'Invitee' ? 'User' : searchType @@ -281,7 +276,7 @@ const SearchingArea: React.FC = ({ const hasNodes = searchNodes.length > 0 const haslistNode = listNode.length > 0 - const hasArticle = !!articleUrlData?.node + const hasArticle = !!articleUrlData?.article const canCreateTag = isTag && searchKey && @@ -380,15 +375,12 @@ const SearchingArea: React.FC = ({ {/* URL Search */} {isArticleUrlMode && !searching && !hasArticle && } - {isArticleUrlMode && - !searching && - hasArticle && - articleUrlData?.node?.__typename === 'Article' && ( - - )} + {isArticleUrlMode && !searching && hasArticle && ( + + )}
    )}
    From 6f3dee9e620a0cb688400508f216ec52af3936e5 Mon Sep 17 00:00:00 2001 From: robertu <4065233+robertu7@users.noreply.github.com> Date: Fri, 3 May 2024 11:48:36 +0800 Subject: [PATCH 6/6] fix: disable republish button if there is nothing changed on edit article; refs: - 2024-05-dev-1#ZK-002 --- src/views/ArticleDetail/Edit/Header/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/ArticleDetail/Edit/Header/index.tsx b/src/views/ArticleDetail/Edit/Header/index.tsx index 16aa7e554c..cd0f7f803c 100644 --- a/src/views/ArticleDetail/Edit/Header/index.tsx +++ b/src/views/ArticleDetail/Edit/Header/index.tsx @@ -242,7 +242,7 @@ const EditModeHeader = ({ bgColor="green" onClick={openEditorSettingsDialog} aria-haspopup="dialog" - disabled={isEditDisabled} + disabled={!isRevised || isEditDisabled} >