Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(campaign): revise copy and show label on featured feed #4912

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lang/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -1737,6 +1737,10 @@
"Rc4Oij": {
"defaultMessage": "Firebolt"
},
"RkyEBL": {
"defaultMessage": "Featured",
"description": "src/views/CampaignDetail/ArticleFeeds/Tabs/index.tsx"
},
"RnKPVm": {
"defaultMessage": "{articleCount} articles"
},
Expand Down
4 changes: 4 additions & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1737,6 +1737,10 @@
"Rc4Oij": {
"defaultMessage": "Firebolt"
},
"RkyEBL": {
"defaultMessage": "Featured",
"description": "src/views/CampaignDetail/ArticleFeeds/Tabs/index.tsx"
},
"RnKPVm": {
"defaultMessage": "{articleCount} articles"
},
Expand Down
8 changes: 6 additions & 2 deletions lang/zh-Hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -1737,6 +1737,10 @@
"Rc4Oij": {
"defaultMessage": "火闪电"
},
"RkyEBL": {
"defaultMessage": "精华",
"description": "src/views/CampaignDetail/ArticleFeeds/Tabs/index.tsx"
},
"RnKPVm": {
"defaultMessage": "{articleCount} 篇文章"
},
Expand Down Expand Up @@ -2175,7 +2179,7 @@
"defaultMessage": "作品管理"
},
"ZN1IzT": {
"defaultMessage": "从自由写精选中移除"
"defaultMessage": "从自由写精华中移除"
},
"ZNK0I9": {
"defaultMessage": "喜欢你的评论"
Expand Down Expand Up @@ -2679,7 +2683,7 @@
"description": "type:apply"
},
"jXDxa6": {
"defaultMessage": "作品已从自由写精选中移除"
"defaultMessage": "作品已从自由写精华中移除"
},
"jiB0Z2": {
"defaultMessage": "无法绑定钱包",
Expand Down
12 changes: 8 additions & 4 deletions lang/zh-Hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@
"description": "src/components/Notice/MomentNotice/MomentLiked.tsx"
},
"5SgH7l": {
"defaultMessage": "作品已添加至自由寫精選"
"defaultMessage": "作品已添加至自由寫精華"
},
"5UglrB": {
"defaultMessage": "送出成功"
Expand Down Expand Up @@ -1663,7 +1663,7 @@
"defaultMessage": "描述"
},
"QFCfA7": {
"defaultMessage": "添加到自由寫精選"
"defaultMessage": "添加到自由寫精華"
},
"QQSdHP": {
"defaultMessage": "查看更多"
Expand Down Expand Up @@ -1737,6 +1737,10 @@
"Rc4Oij": {
"defaultMessage": "火閃電"
},
"RkyEBL": {
"defaultMessage": "精華",
"description": "src/views/CampaignDetail/ArticleFeeds/Tabs/index.tsx"
},
"RnKPVm": {
"defaultMessage": "{articleCount} 篇文章"
},
Expand Down Expand Up @@ -2175,7 +2179,7 @@
"defaultMessage": "作品管理"
},
"ZN1IzT": {
"defaultMessage": "从自由寫精選中移除"
"defaultMessage": "从自由寫精華中移除"
},
"ZNK0I9": {
"defaultMessage": "喜歡你的評論"
Expand Down Expand Up @@ -2679,7 +2683,7 @@
"description": "type:apply"
},
"jXDxa6": {
"defaultMessage": "作品已從自由寫精選中移除"
"defaultMessage": "作品已從自由寫精華中移除"
},
"jiB0Z2": {
"defaultMessage": "無法綁定錢包",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const RecommendArticleButton: React.FC<RecommendArticleButtonProps> = ({
: article.oss.inRecommendHottest && article.oss.inRecommendNewest

const texts = {
icymi: ['選為精華', '撤銷精華'],
icymi: ['設為首頁精選', '撤銷首頁精選'],
hottestAndNewest: ['撤銷移出', '移出熱門與最新'],
}
const icons = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ const ToggleRecommendArticleDialog = ({
useMutation<ToggleRecommendArticleMutation>(TOGGLE_RECOMMEND_ARTICLE)

const title = {
icymi: ['選為精華', '撤銷精華'],
icymi: ['設為首頁精選', '撤銷首頁精選'],
hottestAndNewest: ['撤銷移出', '移出熱門與最新'],
}
const description = {
icymi: [
`確認要将「<span class="u-highlight">${article.title}</span>」選為精華嗎?`,
`確認要将「<span class="u-highlight">${article.title}</span>」撤銷精華嗎?`,
`確認要将「<span class="u-highlight">${article.title}</span>」設為首頁精選嗎?`,
`確認要将「<span class="u-highlight">${article.title}</span>」撤銷首頁精選嗎?`,
],
hottestAndNewest: [
`作品「<span class="u-highlight">${article.title}</span>」將可能出現在熱門和最新的文章列表中。`,
Expand Down
4 changes: 2 additions & 2 deletions src/views/CampaignDetail/ArticleFeeds/MainFeed/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ const MainFeed = ({ feedType, camapign }: MainFeedProps) => {
<ArticleDigestFeed
article={node}
label={
isAll && (
(isAll || isFeatured) && (
<>
<span
className={[
Expand All @@ -223,7 +223,7 @@ const MainFeed = ({ feedType, camapign }: MainFeedProps) => {
{getArticleStageName(node, lang)}
</span>

{featured && (
{isAll && featured && (
<TextIcon
icon={
<Icon
Expand Down
4 changes: 3 additions & 1 deletion src/views/CampaignDetail/ArticleFeeds/Tabs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ const ArticleFeedsTabs = ({
}}
title={intl.formatMessage({
defaultMessage: 'Featured',
id: 'CnPG8j',
id: 'RkyEBL',
description:
'src/views/CampaignDetail/ArticleFeeds/Tabs/index.tsx',
})}
theme="green"
/>
Expand Down
Loading