mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-30 02:56:20 -05:00
Merge pull request #1589 from LLK/release/2.2.25
[Develop] Release 2.2.25
This commit is contained in:
commit
2830257b17
6 changed files with 20 additions and 129 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -22,3 +22,4 @@ ENV
|
||||||
# Test
|
# Test
|
||||||
/.nyc_output
|
/.nyc_output
|
||||||
/coverage
|
/coverage
|
||||||
|
/bin/lib/localized-urls.json
|
||||||
|
|
|
@ -1,113 +0,0 @@
|
||||||
{
|
|
||||||
"ar": {
|
|
||||||
"cards.Scratch2CardsLink": "https://resources.scratch.mit.edu/www/cards/ar/Scratch2Cards.pdf"
|
|
||||||
},
|
|
||||||
"ca": {
|
|
||||||
"cards.Scratch2CardsLink": "https://resources.scratch.mit.edu/www/cards/ca/Scratch2Cards.pdf",
|
|
||||||
"cards.ScratchCardsAllLink": "https://resources.scratch.mit.edu/www/cards/ca/ScratchCardsAll.pdf",
|
|
||||||
"cards.catchCardsLink": "https://resources.scratch.mit.edu/www/cards/ca/catchCards.pdf",
|
|
||||||
"cards.danceCardsLink": "https://resources.scratch.mit.edu/www/cards/ca/danceCards.pdf",
|
|
||||||
"cards.fashionCardsLink": "https://resources.scratch.mit.edu/www/cards/ca/fashionCards.pdf",
|
|
||||||
"cards.flyCardsLink": "https://resources.scratch.mit.edu/www/cards/ca/flyCards.pdf",
|
|
||||||
"cards.hide-seekCardsLink": "https://resources.scratch.mit.edu/www/cards/ca/hide-seekCards.pdf",
|
|
||||||
"cards.musicCardsLink": "https://resources.scratch.mit.edu/www/cards/ca/musicCards.pdf",
|
|
||||||
"cards.nameCardsLink": "https://resources.scratch.mit.edu/www/cards/ca/nameCards.pdf",
|
|
||||||
"cards.petCardsLink": "https://resources.scratch.mit.edu/www/cards/ca/petCards.pdf",
|
|
||||||
"cards.pongCardsLink": "https://resources.scratch.mit.edu/www/cards/ca/pongCards.pdf",
|
|
||||||
"cards.raceCardsLink": "https://resources.scratch.mit.edu/www/cards/ca/raceCards.pdf",
|
|
||||||
"cards.storyCardsLink": "https://resources.scratch.mit.edu/www/cards/ca/storyCards.pdf"
|
|
||||||
},
|
|
||||||
"cs": {
|
|
||||||
"cards.Scratch2CardsLink": "https://resources.scratch.mit.edu/www/cards/cs/Scratch2Cards.pdf"
|
|
||||||
},
|
|
||||||
"de": {
|
|
||||||
"cards.Scratch2CardsLink": "https://resources.scratch.mit.edu/www/cards/de/Scratch2Cards.pdf"
|
|
||||||
},
|
|
||||||
"en": {
|
|
||||||
"cards.Scratch2CardsLink": "https://resources.scratch.mit.edu/www/cards/en/Scratch2Cards.pdf",
|
|
||||||
"cards.ScratchCardsAllLink": "https://resources.scratch.mit.edu/www/cards/en/ScratchCardsAll.pdf",
|
|
||||||
"cards.catchCardsLink": "https://resources.scratch.mit.edu/www/cards/en/catchCards.pdf",
|
|
||||||
"cards.danceCardsLink": "https://resources.scratch.mit.edu/www/cards/en/danceCards.pdf",
|
|
||||||
"cards.dressupCardsLink": "https://resources.scratch.mit.edu/www/cards/en/dressupCards.pdf",
|
|
||||||
"cards.fashionCardsLink": "https://resources.scratch.mit.edu/www/cards/en/fashionCards.pdf",
|
|
||||||
"cards.flyCardsLink": "https://resources.scratch.mit.edu/www/cards/en/flyCards.pdf",
|
|
||||||
"cards.hide-seekCardsLink": "https://resources.scratch.mit.edu/www/cards/en/hide-seekCards.pdf",
|
|
||||||
"cards.musicCardsLink": "https://resources.scratch.mit.edu/www/cards/en/musicCards.pdf",
|
|
||||||
"cards.nameCardsLink": "https://resources.scratch.mit.edu/www/cards/en/nameCards.pdf",
|
|
||||||
"cards.petCardsLink": "https://resources.scratch.mit.edu/www/cards/en/petCards.pdf",
|
|
||||||
"cards.pongCardsLink": "https://resources.scratch.mit.edu/www/cards/en/pongCards.pdf",
|
|
||||||
"cards.raceCardsLink": "https://resources.scratch.mit.edu/www/cards/en/raceCards.pdf",
|
|
||||||
"cards.storyCardsLink": "https://resources.scratch.mit.edu/www/cards/en/storyCards.pdf",
|
|
||||||
"guides.AnimateYourNameGuideLink": "https://resources.scratch.mit.edu/www/guides/en/AnimateYourNameGuide.pdf",
|
|
||||||
"guides.CatchGuideLink": "https://resources.scratch.mit.edu/www/guides/en/CatchGuide.pdf",
|
|
||||||
"guides.DanceGuideLink": "https://resources.scratch.mit.edu/www/guides/en/DanceGuide.pdf",
|
|
||||||
"guides.FashionGuideLink": "https://resources.scratch.mit.edu/www/guides/en/FashionGuide.pdf",
|
|
||||||
"guides.FlyGuideLink": "https://resources.scratch.mit.edu/www/guides/en/FlyGuide.pdf",
|
|
||||||
"guides.Getting-Started-Guide-Scratch2Link": "https://resources.scratch.mit.edu/www/guides/en/Getting-Started-Guide-Scratch2.pdf",
|
|
||||||
"guides.HideandSeekGuideLink": "https://resources.scratch.mit.edu/www/guides/en/HideandSeekGuide.pdf",
|
|
||||||
"guides.MusicGuideLink": "https://resources.scratch.mit.edu/www/guides/en/MusicGuide.pdf",
|
|
||||||
"guides.NameGuideLink": "https://resources.scratch.mit.edu/www/guides/en/NameGuide.pdf",
|
|
||||||
"guides.PetGuideLink": "https://resources.scratch.mit.edu/www/guides/en/PetGuide.pdf",
|
|
||||||
"guides.PongGuideLink": "https://resources.scratch.mit.edu/www/guides/en/PongGuide.pdf",
|
|
||||||
"guides.RaceGuideLink": "https://resources.scratch.mit.edu/www/guides/en/RaceGuide.pdf",
|
|
||||||
"guides.StoryGuideLink": "https://resources.scratch.mit.edu/www/guides/en/StoryGuide.pdf"
|
|
||||||
},
|
|
||||||
"es": {
|
|
||||||
"cards.Scratch2CardsLink": "https://resources.scratch.mit.edu/www/cards/es/Scratch2Cards.pdf",
|
|
||||||
"cards.catchCardsLink": "https://resources.scratch.mit.edu/www/cards/es/catchCards.pdf",
|
|
||||||
"cards.danceCardsLink": "https://resources.scratch.mit.edu/www/cards/es/danceCards.pdf",
|
|
||||||
"cards.fashionCardsLink": "https://resources.scratch.mit.edu/www/cards/es/fashionCards.pdf",
|
|
||||||
"cards.flyCardsLink": "https://resources.scratch.mit.edu/www/cards/es/flyCards.pdf",
|
|
||||||
"cards.hide-seekCardsLink": "https://resources.scratch.mit.edu/www/cards/es/hide-seekCards.pdf",
|
|
||||||
"cards.musicCardsLink": "https://resources.scratch.mit.edu/www/cards/es/musicCards.pdf",
|
|
||||||
"cards.nameCardsLink": "https://resources.scratch.mit.edu/www/cards/es/nameCards.pdf",
|
|
||||||
"cards.petCardsLink": "https://resources.scratch.mit.edu/www/cards/es/petCards.pdf",
|
|
||||||
"cards.pongCardsLink": "https://resources.scratch.mit.edu/www/cards/es/pongCards.pdf",
|
|
||||||
"cards.raceCardsLink": "https://resources.scratch.mit.edu/www/cards/es/raceCards.pdf",
|
|
||||||
"cards.storyCardsLink": "https://resources.scratch.mit.edu/www/cards/es/storyCards.pdf"
|
|
||||||
},
|
|
||||||
"fr": {
|
|
||||||
"cards.Scratch2CardsLink": "https://resources.scratch.mit.edu/www/cards/fr/Scratch2Cards.pdf"
|
|
||||||
},
|
|
||||||
"hr": {
|
|
||||||
"cards.Scratch2CardsLink": "https://resources.scratch.mit.edu/www/cards/hr/Scratch2Cards.pdf"
|
|
||||||
},
|
|
||||||
"it": {
|
|
||||||
"cards.Scratch2CardsLink": "https://resources.scratch.mit.edu/www/cards/it/Scratch2Cards.pdf"
|
|
||||||
},
|
|
||||||
"ja": {
|
|
||||||
"cards.Scratch2CardsLink": "https://resources.scratch.mit.edu/www/cards/ja/Scratch2Cards.pdf"
|
|
||||||
},
|
|
||||||
"ja-hr": {
|
|
||||||
"cards.Scratch2CardsLink": "https://resources.scratch.mit.edu/www/cards/ja-hr/Scratch2Cards.pdf"
|
|
||||||
},
|
|
||||||
"ko": {
|
|
||||||
"cards.Scratch2CardsLink": "https://resources.scratch.mit.edu/www/cards/ko/Scratch2Cards.pdf"
|
|
||||||
},
|
|
||||||
"nl": {
|
|
||||||
"cards.Scratch2CardsLink": "https://resources.scratch.mit.edu/www/cards/nl/Scratch2Cards.pdf"
|
|
||||||
},
|
|
||||||
"pt-br": {
|
|
||||||
"cards.Scratch2CardsLink": "https://resources.scratch.mit.edu/www/cards/pt-br/Scratch2Cards.pdf"
|
|
||||||
},
|
|
||||||
"sl": {
|
|
||||||
"cards.Scratch2CardsLink": "https://resources.scratch.mit.edu/www/cards/sl/Scratch2Cards.pdf"
|
|
||||||
},
|
|
||||||
"sv": {
|
|
||||||
"cards.Scratch2CardsLink": "https://resources.scratch.mit.edu/www/cards/sv/Scratch2Cards.pdf"
|
|
||||||
},
|
|
||||||
"zh-tw": {
|
|
||||||
"cards.ScratchCardsAllLink": "https://resources.scratch.mit.edu/www/cards/zh-tw/ScratchCardsAll.pdf",
|
|
||||||
"cards.catchCardsLink": "https://resources.scratch.mit.edu/www/cards/zh-tw/catchCards.pdf",
|
|
||||||
"cards.danceCardsLink": "https://resources.scratch.mit.edu/www/cards/zh-tw/danceCards.pdf",
|
|
||||||
"cards.fashionCardsLink": "https://resources.scratch.mit.edu/www/cards/zh-tw/fashionCards.pdf",
|
|
||||||
"cards.flyCardsLink": "https://resources.scratch.mit.edu/www/cards/zh-tw/flyCards.pdf",
|
|
||||||
"cards.hide-seekCardsLink": "https://resources.scratch.mit.edu/www/cards/zh-tw/hide-seekCards.pdf",
|
|
||||||
"cards.musicCardsLink": "https://resources.scratch.mit.edu/www/cards/zh-tw/musicCards.pdf",
|
|
||||||
"cards.nameCardsLink": "https://resources.scratch.mit.edu/www/cards/zh-tw/nameCards.pdf",
|
|
||||||
"cards.petCardsLink": "https://resources.scratch.mit.edu/www/cards/zh-tw/petCards.pdf",
|
|
||||||
"cards.pongCardsLink": "https://resources.scratch.mit.edu/www/cards/zh-tw/pongCards.pdf",
|
|
||||||
"cards.raceCardsLink": "https://resources.scratch.mit.edu/www/cards/zh-tw/raceCards.pdf",
|
|
||||||
"cards.storyCardsLink": "https://resources.scratch.mit.edu/www/cards/zh-tw/storyCards.pdf"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -132,7 +132,9 @@ var Messages = React.createClass({
|
||||||
} else {
|
} else {
|
||||||
filteredMessages = messages;
|
filteredMessages = messages;
|
||||||
for (var j = 0; j < unreadCount; j++) {
|
for (var j = 0; j < unreadCount; j++) {
|
||||||
filteredMessages[j].unread = true;
|
if (typeof filteredMessages[j] !== 'undefined') {
|
||||||
|
filteredMessages[j].unread = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return filteredMessages;
|
return filteredMessages;
|
||||||
|
@ -143,10 +145,18 @@ var Messages = React.createClass({
|
||||||
loadMore = false;
|
loadMore = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var adminMessagesLength = this.props.adminMessages.length;
|
||||||
|
if (Object.keys(this.props.invite).length > 0) {
|
||||||
|
adminMessagesLength = adminMessagesLength + 1;
|
||||||
|
}
|
||||||
|
var numNewSocialMessages = this.props.numNewMessages - adminMessagesLength;
|
||||||
|
if (numNewSocialMessages < 0) {
|
||||||
|
numNewSocialMessages = 0;
|
||||||
|
}
|
||||||
var messages = this.filterMessages(
|
var messages = this.filterMessages(
|
||||||
this.props.messages,
|
this.props.messages,
|
||||||
this.state.filterValues,
|
this.state.filterValues,
|
||||||
this.props.numNewMessages
|
numNewSocialMessages
|
||||||
);
|
);
|
||||||
|
|
||||||
return(
|
return(
|
||||||
|
@ -156,7 +166,8 @@ var Messages = React.createClass({
|
||||||
messages={messages}
|
messages={messages}
|
||||||
adminMessages={this.props.adminMessages}
|
adminMessages={this.props.adminMessages}
|
||||||
scratcherInvite={this.props.invite}
|
scratcherInvite={this.props.invite}
|
||||||
numNewMessages={this.props.numNewMessages}
|
numNewMessages={numNewSocialMessages}
|
||||||
|
adminMessagesLength={adminMessagesLength}
|
||||||
handleFilterClick={this.handleFilterClick}
|
handleFilterClick={this.handleFilterClick}
|
||||||
handleAdminDismiss={this.handleMessageDismiss}
|
handleAdminDismiss={this.handleMessageDismiss}
|
||||||
loadMore={loadMore}
|
loadMore={loadMore}
|
||||||
|
|
|
@ -209,6 +209,7 @@ var MessagesPresentation = injectIntl(React.createClass({
|
||||||
adminMessages: React.PropTypes.array.isRequired,
|
adminMessages: React.PropTypes.array.isRequired,
|
||||||
scratcherInvite: React.PropTypes.object.isRequired,
|
scratcherInvite: React.PropTypes.object.isRequired,
|
||||||
numNewMessages: React.PropTypes.number,
|
numNewMessages: React.PropTypes.number,
|
||||||
|
adminMessagesLength: React.PropTypes.number,
|
||||||
handleFilterClick: React.PropTypes.func.isRequired,
|
handleFilterClick: React.PropTypes.func.isRequired,
|
||||||
handleAdminDismiss: React.PropTypes.func.isRequired,
|
handleAdminDismiss: React.PropTypes.func.isRequired,
|
||||||
loadMore: React.PropTypes.bool.isRequired,
|
loadMore: React.PropTypes.bool.isRequired,
|
||||||
|
@ -218,19 +219,11 @@ var MessagesPresentation = injectIntl(React.createClass({
|
||||||
getDefaultProps: function () {
|
getDefaultProps: function () {
|
||||||
return {
|
return {
|
||||||
numNewMessages: 0,
|
numNewMessages: 0,
|
||||||
|
adminMessagesLength: 0,
|
||||||
filterOpen: false
|
filterOpen: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
render: function () {
|
render: function () {
|
||||||
var adminMessageLength = this.props.adminMessages.length;
|
|
||||||
if (Object.keys(this.props.scratcherInvite).length > 0) {
|
|
||||||
adminMessageLength = adminMessageLength + 1;
|
|
||||||
}
|
|
||||||
var numNewSocialMessages = this.props.numNewMessages - adminMessageLength;
|
|
||||||
if (numNewSocialMessages < 0) {
|
|
||||||
numNewSocialMessages = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="messages">
|
<div className="messages">
|
||||||
<TitleBanner className="mod-messages">
|
<TitleBanner className="mod-messages">
|
||||||
|
@ -278,7 +271,7 @@ var MessagesPresentation = injectIntl(React.createClass({
|
||||||
<h4 className="messages-header">
|
<h4 className="messages-header">
|
||||||
<FormattedMessage id='messages.scratchTeamTitle' />
|
<FormattedMessage id='messages.scratchTeamTitle' />
|
||||||
<div className="messages-header-unread">
|
<div className="messages-header-unread">
|
||||||
<FormattedNumber value={adminMessageLength} />
|
<FormattedNumber value={this.props.adminMessagesLength} />
|
||||||
</div>
|
</div>
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
|
@ -318,7 +311,7 @@ var MessagesPresentation = injectIntl(React.createClass({
|
||||||
<SocialMessagesList
|
<SocialMessagesList
|
||||||
loadStatus={this.props.requestStatus.messages}
|
loadStatus={this.props.requestStatus.messages}
|
||||||
messages={this.props.messages}
|
messages={this.props.messages}
|
||||||
numNewMessages={numNewSocialMessages}
|
numNewMessages={this.props.numNewMessages}
|
||||||
loadMore={this.props.loadMore}
|
loadMore={this.props.loadMore}
|
||||||
loadMoreMethod={this.props.loadMoreMethod}
|
loadMoreMethod={this.props.loadMoreMethod}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
"cards.pongCardsLink": "https://resources.scratch.mit.edu/www/cards/en/pongCards.pdf",
|
"cards.pongCardsLink": "https://resources.scratch.mit.edu/www/cards/en/pongCards.pdf",
|
||||||
"cards.raceCardsLink": "https://resources.scratch.mit.edu/www/cards/en/raceCards.pdf",
|
"cards.raceCardsLink": "https://resources.scratch.mit.edu/www/cards/en/raceCards.pdf",
|
||||||
"cards.storyCardsLink": "https://resources.scratch.mit.edu/www/cards/en/storyCards.pdf",
|
"cards.storyCardsLink": "https://resources.scratch.mit.edu/www/cards/en/storyCards.pdf",
|
||||||
"guides.AnimateYourNameGuideLink": "https://resources.scratch.mit.edu/www/guides/en/NameGuide.pdf",
|
|
||||||
"guides.CatchGuideLink": "https://resources.scratch.mit.edu/www/guides/en/CatchGuide.pdf",
|
"guides.CatchGuideLink": "https://resources.scratch.mit.edu/www/guides/en/CatchGuide.pdf",
|
||||||
"guides.DanceGuideLink": "https://resources.scratch.mit.edu/www/guides/en/DanceGuide.pdf",
|
"guides.DanceGuideLink": "https://resources.scratch.mit.edu/www/guides/en/DanceGuide.pdf",
|
||||||
"guides.FashionGuideLink": "https://resources.scratch.mit.edu/www/guides/en/FashionGuide.pdf",
|
"guides.FashionGuideLink": "https://resources.scratch.mit.edu/www/guides/en/FashionGuide.pdf",
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"bannerUrl": "/images/ttt/animate-your-name-banner.jpg",
|
"bannerUrl": "/images/ttt/animate-your-name-banner.jpg",
|
||||||
"tutorialLoc": "/projects/editor/?tip_bar=name",
|
"tutorialLoc": "/projects/editor/?tip_bar=name",
|
||||||
"activityLoc": "cards.nameCardsLink",
|
"activityLoc": "cards.nameCardsLink",
|
||||||
"guideLoc": "guides.AnimateYourNameGuideLink"
|
"guideLoc": "guides.NameGuideLink"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "ttt.MakeItFlyTitle",
|
"title": "ttt.MakeItFlyTitle",
|
||||||
|
|
Loading…
Reference in a new issue