Skip to content

Commit

Permalink
Merge pull request #4497 from thematters/chore/fix-various-copy-issues
Browse files Browse the repository at this point in the history
chore(notice-comment): fix various copy issues
  • Loading branch information
byhow authored May 31, 2024
2 parents d611381 + 7ccea3a commit a29a29d
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 61 deletions.
24 changes: 12 additions & 12 deletions lang/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@
"06XHBC": {
"defaultMessage": "Add to Circle"
},
"09AywK": {
"defaultMessage": "Your work has been republished. Share it on different platforms"
},
"0Azlrb": {
"defaultMessage": "Manage"
},
Expand Down Expand Up @@ -173,6 +170,9 @@
"0tHLRn": {
"defaultMessage": "Insufficient Balance"
},
"0tRUjd": {
"defaultMessage": "This comment has been hidden due to violation of community terms of services"
},
"0zZd0T": {
"defaultMessage": "Article successfully published. Share it on different platforms to receive more likes and donations!",
"description": "src/views/Me/DraftDetail/PublishState/PublishedState.tsx"
Expand Down Expand Up @@ -704,9 +704,6 @@
"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"
Expand Down Expand Up @@ -987,6 +984,9 @@
"defaultMessage": "Wallet",
"description": "src/components/Forms/SelectAuthMethodForm/AuthTabs.tsx"
},
"GRrsEH": {
"defaultMessage": "View published article"
},
"GRtGnZ": {
"defaultMessage": "Resign From Maintainer",
"description": "src/views/TagDetail/DropdownActions/index.tsx"
Expand Down Expand Up @@ -1869,9 +1869,6 @@
"XOEFDf": {
"defaultMessage": "{total} articles"
},
"XP1Vto": {
"defaultMessage": "Oops! This comment has been forcibly hidden"
},
"XQTBu6": {
"defaultMessage": "mentioned you in your circle broadcast comment",
"description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
Expand Down Expand Up @@ -2329,9 +2326,6 @@
"gluNT8": {
"defaultMessage": "Enter URL"
},
"gz0EGC": {
"defaultMessage": "Article republished"
},
"gzJEFb": {
"defaultMessage": "Verify your Liker ID through like.co"
},
Expand Down Expand Up @@ -2949,6 +2943,9 @@
"defaultMessage": "The comment has been forcibly hidden",
"description": "src/components/CommentBeta/Content/index.tsx"
},
"tqEGfa": {
"defaultMessage": "Your work has been published. Share it on different platforms"
},
"tzq2+W": {
"defaultMessage": "Send",
"description": "src/views/Circle/Settings/ManageInvitation/AddInvitationDialog/PreSend.tsx"
Expand Down Expand Up @@ -2982,6 +2979,9 @@
"uVCg1l": {
"defaultMessage": "Explore Matters"
},
"uYwH7j": {
"defaultMessage": "Article published"
},
"uaFED8": {
"defaultMessage": "After binding, in addition to the original login method, a wallet login channel will be added.",
"description": "src/components/Forms/PaymentForm/BindWallet/index.tsx"
Expand Down
24 changes: 12 additions & 12 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@
"06XHBC": {
"defaultMessage": "Add to Circle"
},
"09AywK": {
"defaultMessage": "Your work has been republished. Share it on different platforms"
},
"0Azlrb": {
"defaultMessage": "Manage"
},
Expand Down Expand Up @@ -173,6 +170,9 @@
"0tHLRn": {
"defaultMessage": "Insufficient Balance"
},
"0tRUjd": {
"defaultMessage": "This comment has been hidden due to violation of community terms of services"
},
"0zZd0T": {
"defaultMessage": "Article successfully published. Share it on different platforms to receive more likes and donations!",
"description": "src/views/Me/DraftDetail/PublishState/PublishedState.tsx"
Expand Down Expand Up @@ -704,9 +704,6 @@
"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"
Expand Down Expand Up @@ -987,6 +984,9 @@
"defaultMessage": "Wallet",
"description": "src/components/Forms/SelectAuthMethodForm/AuthTabs.tsx"
},
"GRrsEH": {
"defaultMessage": "View published article"
},
"GRtGnZ": {
"defaultMessage": "Resign From Maintainer",
"description": "src/views/TagDetail/DropdownActions/index.tsx"
Expand Down Expand Up @@ -1869,9 +1869,6 @@
"XOEFDf": {
"defaultMessage": "{total} articles"
},
"XP1Vto": {
"defaultMessage": "Oops! This comment has been forcibly hidden"
},
"XQTBu6": {
"defaultMessage": "mentioned you in your circle broadcast comment",
"description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
Expand Down Expand Up @@ -2329,9 +2326,6 @@
"gluNT8": {
"defaultMessage": "Enter URL"
},
"gz0EGC": {
"defaultMessage": "Article republished"
},
"gzJEFb": {
"defaultMessage": "Verify your Liker ID through like.co"
},
Expand Down Expand Up @@ -2949,6 +2943,9 @@
"defaultMessage": "The comment has been forcibly hidden",
"description": "src/components/CommentBeta/Content/index.tsx"
},
"tqEGfa": {
"defaultMessage": "Your work has been published. Share it on different platforms"
},
"tzq2+W": {
"defaultMessage": "Send",
"description": "src/views/Circle/Settings/ManageInvitation/AddInvitationDialog/PreSend.tsx"
Expand Down Expand Up @@ -2982,6 +2979,9 @@
"uVCg1l": {
"defaultMessage": "Explore Matters"
},
"uYwH7j": {
"defaultMessage": "Article published"
},
"uaFED8": {
"defaultMessage": "After binding, in addition to the original login method, a wallet login channel will be added.",
"description": "src/components/Forms/PaymentForm/BindWallet/index.tsx"
Expand Down
24 changes: 12 additions & 12 deletions lang/zh-Hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@
"06XHBC": {
"defaultMessage": "加入围炉"
},
"09AywK": {
"defaultMessage": "编辑作品发布成功,快把作品分享到不同渠道,"
},
"0Azlrb": {
"defaultMessage": "管理"
},
Expand Down Expand Up @@ -173,6 +170,9 @@
"0tHLRn": {
"defaultMessage": "钱包余额不足"
},
"0tRUjd": {
"defaultMessage": "因违反社区规定,评论已被隐藏"
},
"0zZd0T": {
"defaultMessage": "作品发布成功,快把作品分享到不同渠道,吸引更多人为你拍手!",
"description": "src/views/Me/DraftDetail/PublishState/PublishedState.tsx"
Expand Down Expand Up @@ -704,9 +704,6 @@
"defaultMessage": "主理",
"description": "src/views/TagDetail/Owner/index.tsx"
},
"AQuumI": {
"defaultMessage": "查看编辑作品"
},
"AVpR3Q": {
"defaultMessage": "已绑定钱包",
"description": "src/components/UserProfile/WalletLabel/index.tsx"
Expand Down Expand Up @@ -987,6 +984,9 @@
"defaultMessage": "数字钱包",
"description": "src/components/Forms/SelectAuthMethodForm/AuthTabs.tsx"
},
"GRrsEH": {
"defaultMessage": "查看作品"
},
"GRtGnZ": {
"defaultMessage": "辞去权限",
"description": "src/views/TagDetail/DropdownActions/index.tsx"
Expand Down Expand Up @@ -1869,9 +1869,6 @@
"XOEFDf": {
"defaultMessage": "{total} 篇作品"
},
"XP1Vto": {
"defaultMessage": "Oops!该评论已被强制隐藏"
},
"XQTBu6": {
"defaultMessage": "在你的围炉广播中留言提及你",
"description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
Expand Down Expand Up @@ -2329,9 +2326,6 @@
"gluNT8": {
"defaultMessage": "输入链接地址"
},
"gz0EGC": {
"defaultMessage": "编辑作品已发布"
},
"gzJEFb": {
"defaultMessage": "跳转到 like.co 验证已有 Liker ID"
},
Expand Down Expand Up @@ -2949,6 +2943,9 @@
"defaultMessage": "评论已被强制隐藏",
"description": "src/components/CommentBeta/Content/index.tsx"
},
"tqEGfa": {
"defaultMessage": "作品发布成功,快把作品分享到不同渠道,"
},
"tzq2+W": {
"defaultMessage": "寄出邀请",
"description": "src/views/Circle/Settings/ManageInvitation/AddInvitationDialog/PreSend.tsx"
Expand Down Expand Up @@ -2982,6 +2979,9 @@
"uVCg1l": {
"defaultMessage": "玩转 Matters 实用指南"
},
"uYwH7j": {
"defaultMessage": "作品已发布"
},
"uaFED8": {
"defaultMessage": "绑定后除原有登入方式,增加钱包登入管道",
"description": "src/components/Forms/PaymentForm/BindWallet/index.tsx"
Expand Down
26 changes: 13 additions & 13 deletions lang/zh-Hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@
"06XHBC": {
"defaultMessage": "加入圍爐"
},
"09AywK": {
"defaultMessage": "編輯作品發佈成功,快把作品分享到不同渠道,"
},
"0Azlrb": {
"defaultMessage": "管理"
},
Expand Down Expand Up @@ -173,6 +170,9 @@
"0tHLRn": {
"defaultMessage": "錢包餘額不足"
},
"0tRUjd": {
"defaultMessage": "因違反社區約章,評論已被隱藏"
},
"0zZd0T": {
"defaultMessage": "作品發布成功,快把作品分享到不同渠道,吸引更多人為你拍手!",
"description": "src/views/Me/DraftDetail/PublishState/PublishedState.tsx"
Expand Down Expand Up @@ -704,9 +704,6 @@
"defaultMessage": "主理",
"description": "src/views/TagDetail/Owner/index.tsx"
},
"AQuumI": {
"defaultMessage": "查看編輯作品"
},
"AVpR3Q": {
"defaultMessage": "已綁定錢包",
"description": "src/components/UserProfile/WalletLabel/index.tsx"
Expand Down Expand Up @@ -987,6 +984,9 @@
"defaultMessage": "數字錢包",
"description": "src/components/Forms/SelectAuthMethodForm/AuthTabs.tsx"
},
"GRrsEH": {
"defaultMessage": "查看作品"
},
"GRtGnZ": {
"defaultMessage": "辭去權限",
"description": "src/views/TagDetail/DropdownActions/index.tsx"
Expand Down Expand Up @@ -1869,9 +1869,6 @@
"XOEFDf": {
"defaultMessage": "{total} 篇作品"
},
"XP1Vto": {
"defaultMessage": "Oops!該評論已被強制隱藏"
},
"XQTBu6": {
"defaultMessage": "在你的圍爐廣播中留言提及你",
"description": "src/components/Notice/CircleNotice/CircleNewBroadcastComments.tsx"
Expand Down Expand Up @@ -2329,9 +2326,6 @@
"gluNT8": {
"defaultMessage": "輸入連結地址"
},
"gz0EGC": {
"defaultMessage": "編輯作品已發佈"
},
"gzJEFb": {
"defaultMessage": "跳轉到 like.co 驗證已有 Liker ID"
},
Expand Down Expand Up @@ -2946,9 +2940,12 @@
"description": "TOO_MANY_TAGS_FOR_ARTICLE"
},
"tnWWrj": {
"defaultMessage": "評論已被強制隱藏",
"defaultMessage": "因違反社區約章,評論已被隱藏",
"description": "src/components/CommentBeta/Content/index.tsx"
},
"tqEGfa": {
"defaultMessage": "作品發佈成功,快把作品分享到不同渠道,"
},
"tzq2+W": {
"defaultMessage": "寄出邀請",
"description": "src/views/Circle/Settings/ManageInvitation/AddInvitationDialog/PreSend.tsx"
Expand Down Expand Up @@ -2982,6 +2979,9 @@
"uVCg1l": {
"defaultMessage": "玩轉 Matters 實用指南"
},
"uYwH7j": {
"defaultMessage": "作品已發佈"
},
"uaFED8": {
"defaultMessage": "綁定後除原有登入方式,增加錢包登入管道",
"description": "src/components/Forms/PaymentForm/BindWallet/index.tsx"
Expand Down
9 changes: 6 additions & 3 deletions src/components/Notice/NoticeActorName.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import gql from 'graphql-tag'
import Link from 'next/link'

import { TEST_ID } from '~/common/enums'
import { toPath } from '~/common/utils'
import { MAX_USER_DISPLAY_NAME_LENGTH, TEST_ID } from '~/common/enums'
import { toPath, truncate } from '~/common/utils'
import { NoticeActorNameUserFragment } from '~/gql/graphql'

import styles from './styles.module.css'
Expand All @@ -27,7 +27,10 @@ const NoticeActorName = ({
className={styles.displayName}
data-test-id={TEST_ID.NOTICE_USER_DISPLAY_NAME}
>
{user.displayName}
{user.displayName &&
user.displayName.length > MAX_USER_DISPLAY_NAME_LENGTH
? truncate(user.displayName, 8, 8)
: user.displayName}
</a>
</Link>
)
Expand Down
4 changes: 2 additions & 2 deletions src/components/Notice/NoticeComment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ const NoticeComment = ({
toast.success({
message: (
<FormattedMessage
defaultMessage="Oops! This comment has been forcibly hidden"
id="XP1Vto"
defaultMessage="This comment has been hidden due to violation of community terms of services"
id="0tRUjd"
/>
),
})
Expand Down
14 changes: 7 additions & 7 deletions src/views/ArticleDetail/Edit/PublishState/PublishedState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ const PublishedState = ({ article }: PublishedStateProps) => {
<>
<p>
<FormattedMessage
defaultMessage="Your work has been republished. Share it on different platforms "
id="09AywK"
defaultMessage="Your work has been published. Share it on different platforms "
id="tqEGfa"
/>
</p>
<p>
Expand All @@ -47,14 +47,14 @@ const PublishedState = ({ article }: PublishedStateProps) => {
</>
}
headerTitle={
<FormattedMessage defaultMessage="Article republished" id="gz0EGC" />
<FormattedMessage defaultMessage="Article published" id="uYwH7j" />
}
btns={
<Dialog.RoundedButton
text={
<FormattedMessage
defaultMessage="View republished article"
id="AQuumI"
defaultMessage="View published article"
id="GRrsEH"
/>
}
onClick={() => {
Expand All @@ -66,8 +66,8 @@ const PublishedState = ({ article }: PublishedStateProps) => {
<Dialog.TextButton
text={
<FormattedMessage
defaultMessage="View republished article"
id="AQuumI"
defaultMessage="View published article"
id="GRrsEH"
/>
}
onClick={() => {
Expand Down

0 comments on commit a29a29d

Please sign in to comment.