mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
added autocensor-specific banner message
This commit is contained in:
parent
ddf6793362
commit
971b3dc2d1
3 changed files with 37 additions and 22 deletions
|
@ -29,6 +29,8 @@
|
|||
"project.credit": "Thanks to {userLink} for the original project {projectLink}.",
|
||||
"project.deletedBanner": "Note: This project is in the trash folder",
|
||||
"project.defaultCensoredMessage": "This project was removed by the Scratch Team because it was disrespectful, inappropriate for all ages, or otherwise breaks the Scratch community guidelines.",
|
||||
"project.communityCensoredMessage": "Your project has been temporarily un-shared because multiple people reported it as inappropriate.",
|
||||
"project.willReviewCensoredMessage": "The Scratch Team will review the project based on the {communityGuidelinesLink}, and either restore the project or confirm the censorship.",
|
||||
"project.tempCensoredMessage": "Please read the {communityGuidelinesLink} and be sure to edit the project to make sure it's respectful before resharing it.",
|
||||
"project.permCensoredMessage": "It cannot be reshared at any time in the future.",
|
||||
"project.communityGuidelines": "community guidelines",
|
||||
|
|
|
@ -148,6 +148,24 @@ const PreviewPresentation = ({
|
|||
if (visibilityInfo.message) { // if message is present, set innerHTML with it
|
||||
censoredMessage = embedCensorMessage(visibilityInfo.message);
|
||||
} else { // if message is blank or missing, use default
|
||||
const communityGuidelinesLink = (
|
||||
<a href="/community_guidelines/">
|
||||
<FormattedMessage id="project.communityGuidelines" />
|
||||
</a>
|
||||
);
|
||||
if (visibilityInfo.censoredByCommunity) {
|
||||
censoredMessage = (
|
||||
<React.Fragment>
|
||||
<FormattedMessage id="project.communityCensoredMessage" />
|
||||
<br />
|
||||
<br />
|
||||
<FormattedMessage
|
||||
id="project.willReviewCensoredMessage"
|
||||
values={{communityGuidelinesLink: communityGuidelinesLink}}
|
||||
/>
|
||||
</React.Fragment>
|
||||
);
|
||||
} else {
|
||||
censoredMessage = (
|
||||
<React.Fragment>
|
||||
<FormattedMessage id="project.defaultCensoredMessage" />
|
||||
|
@ -156,13 +174,7 @@ const PreviewPresentation = ({
|
|||
{visibilityInfo.reshareable ? (
|
||||
<FormattedMessage
|
||||
id="project.tempCensoredMessage"
|
||||
values={{
|
||||
communityGuidelinesLink: (
|
||||
<a href="/community_guidelines/">
|
||||
<FormattedMessage id="project.communityGuidelines" />
|
||||
</a>
|
||||
)
|
||||
}}
|
||||
values={{communityGuidelinesLink: communityGuidelinesLink}}
|
||||
/>
|
||||
) : (
|
||||
<FormattedMessage id="project.permCensoredMessage" />
|
||||
|
@ -170,6 +182,7 @@ const PreviewPresentation = ({
|
|||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
banner = (<Banner
|
||||
className="banner-danger"
|
||||
message={censoredMessage}
|
||||
|
|
Loading…
Reference in a new issue