mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 01:25:52 -05:00
Extract strings for localizing the preview page
This commit is contained in:
parent
fdeab4de05
commit
f4887008a5
10 changed files with 49 additions and 27 deletions
|
@ -55,7 +55,7 @@ const DeleteModal = ({
|
|||
type="button"
|
||||
onClick={onReport}
|
||||
>
|
||||
<FormattedMessage id="comments.report" />
|
||||
<FormattedMessage id="general.report" />
|
||||
</Button>
|
||||
<Button
|
||||
className="action-button submit-button"
|
||||
|
|
|
@ -61,7 +61,7 @@ const ReportModal = ({
|
|||
onClick={onReport}
|
||||
>
|
||||
<div className="action-button-text">
|
||||
<FormattedMessage id="comments.report" />
|
||||
<FormattedMessage id="general.report" />
|
||||
</div>
|
||||
</Button>
|
||||
)}
|
||||
|
|
|
@ -84,6 +84,8 @@
|
|||
"general.website": "Website",
|
||||
"general.whatsHappening": "What's Happening?",
|
||||
"general.wiki": "Scratch Wiki",
|
||||
"general.copyLink": "Copy Link",
|
||||
"general.report": "Report",
|
||||
|
||||
"general.all": "All",
|
||||
"general.animations": "Animations",
|
||||
|
@ -204,7 +206,6 @@
|
|||
"report.sending": "Sending...",
|
||||
"report.textMissing": "Please tell us why you are reporting this project",
|
||||
|
||||
"comments.report": "Report",
|
||||
"comments.delete": "Delete",
|
||||
"comments.restore": "Restore",
|
||||
"comments.reportModal.title": "Report Comment",
|
||||
|
|
|
@ -19,7 +19,7 @@ const ExtensionChip = props => (
|
|||
}
|
||||
{props.hasStatus && (
|
||||
<div className="extension-status">
|
||||
Needs Connection
|
||||
<FormattedMessage id="preview.needsConnection" />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
@ -1,15 +1,24 @@
|
|||
{
|
||||
"addToStudio.title": "Add to Studio",
|
||||
"addToStudio.finishing": "Finishing up...",
|
||||
"addToStudio.inviteUser": "Invite user to add to studio",
|
||||
"preview.titleMaxLength": "Title is too long",
|
||||
"preview.musicExtensionChip": "Music",
|
||||
"preview.penExtensionChip": "Pen",
|
||||
"preview.speechExtensionChip": "Google Speech",
|
||||
"preview.translateExtensionChip": "Google Translate",
|
||||
"preview.videoMotionChip": "Video Motion",
|
||||
"preview.needsConnection": "Needs Connection",
|
||||
"preview.comments.header": "Comments",
|
||||
"preview.comments.turnOff": "Turn off commenting",
|
||||
"preview.comments.turnedOff": "Sorry, comment posting has been turned off for this project.",
|
||||
"preview.share.notShared": "This project is not shared — so only you can see it. Click share to let everyone see it!",
|
||||
"preview.share.shareButton": "Share"
|
||||
"preview.share.shareButton": "Share",
|
||||
"preview.seeInsideButton": "See inside",
|
||||
"preview.remixButton": "Remix",
|
||||
"preview.remixes": "Remixes",
|
||||
"preview.inviteToRemix": "Invite user to remix",
|
||||
"preview.instructionsLabel": "Instructions",
|
||||
"preview.notesAndCreditsLabel": "Notes and Credits",
|
||||
"preview.credit": "Thanks to {userLink} for the original project {projectLink}."
|
||||
}
|
||||
|
|
|
@ -140,14 +140,14 @@ const PreviewPresentation = ({
|
|||
{/* TODO: Hide Remix button for now until implemented */}
|
||||
{(!userOwnsProject && false) &&
|
||||
<Button className="button remix-button">
|
||||
Remix
|
||||
<FormattedMessage id="preview.remixButton" />
|
||||
</Button>
|
||||
}
|
||||
<Button
|
||||
className="button see-inside-button"
|
||||
onClick={onSeeInside}
|
||||
>
|
||||
See Inside
|
||||
<FormattedMessage id="preview.seeInsideButton" />
|
||||
</Button>
|
||||
</div>
|
||||
</MediaQuery>
|
||||
|
@ -213,7 +213,7 @@ const PreviewPresentation = ({
|
|||
</MediaQuery>
|
||||
<FlexRow className="description-block">
|
||||
<div className="project-textlabel">
|
||||
Instructions
|
||||
<FormattedMessage id="preview.instructionsLabel" />
|
||||
</div>
|
||||
{editable ?
|
||||
<InplaceInput
|
||||
|
@ -244,7 +244,7 @@ const PreviewPresentation = ({
|
|||
</FlexRow>
|
||||
<FlexRow className="description-block">
|
||||
<div className="project-textlabel">
|
||||
Notes and Credits
|
||||
<FormattedMessage id="preview.notesAndCreditsLabel" />
|
||||
</div>
|
||||
{editable ?
|
||||
<InplaceInput
|
||||
|
@ -386,7 +386,7 @@ const PreviewPresentation = ({
|
|||
className="button load-more-button"
|
||||
onClick={onLoadMore}
|
||||
>
|
||||
Load More
|
||||
<FormattedMessage id="general.loadMore" />
|
||||
</Button>
|
||||
}
|
||||
</FlexRow>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const React = require('react');
|
||||
const FormattedMessage = require('react-intl').FormattedMessage;
|
||||
const FlexRow = require('../../components/flex-row/flex-row.jsx');
|
||||
const Avatar = require('../../components/avatar/avatar.jsx');
|
||||
const projectShape = require('./projectshape.jsx').projectShape;
|
||||
|
@ -13,16 +14,24 @@ const RemixCredit = props => {
|
|||
src={`https://cdn2.scratch.mit.edu/get_image/user/${projectInfo.author.id}_48x48.png`}
|
||||
/>
|
||||
<div className="credit-text">
|
||||
Thanks to <a
|
||||
href={`/users/${projectInfo.author.username}`}
|
||||
>
|
||||
{projectInfo.author.username}
|
||||
</a> for the original project <a
|
||||
href={`/preview/${projectInfo.id}`}
|
||||
title={projectInfo.title}
|
||||
>
|
||||
{projectInfo.title}
|
||||
</a>.
|
||||
<FormattedMessage
|
||||
id="preview.credit"
|
||||
values={{
|
||||
userLink: (
|
||||
<a href={`/users/${projectInfo.author.username}`}>
|
||||
{projectInfo.author.username}
|
||||
</a>
|
||||
),
|
||||
projectLink: (
|
||||
<a
|
||||
href={`/preview/${projectInfo.id}`}
|
||||
title={projectInfo.title}
|
||||
>
|
||||
{projectInfo.title}
|
||||
</a>
|
||||
)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</FlexRow>
|
||||
);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
const React = require('react');
|
||||
const PropTypes = require('prop-types');
|
||||
const FormattedMessage = require('react-intl').FormattedMessage;
|
||||
const FlexRow = require('../../components/flex-row/flex-row.jsx');
|
||||
const ThumbnailColumn = require('../../components/thumbnailcolumn/thumbnailcolumn.jsx');
|
||||
const projectShape = require('./projectshape.jsx').projectShape;
|
||||
|
@ -10,11 +11,11 @@ const RemixList = props => {
|
|||
return (
|
||||
<FlexRow className="remix-list">
|
||||
<div className="list-title">
|
||||
Remixes
|
||||
<FormattedMessage id="preview.remixes" />
|
||||
</div>
|
||||
{remixes.length === 0 ? (
|
||||
// TODO: style remix invitation
|
||||
<span>Invite user to remix</span>
|
||||
<FormattedMessage id="preview.inviteToRemix" />
|
||||
) : (
|
||||
<ThumbnailColumn
|
||||
cards
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
const React = require('react');
|
||||
const PropTypes = require('prop-types');
|
||||
const FormattedMessage = require('react-intl').FormattedMessage;
|
||||
const FlexRow = require('../../components/flex-row/flex-row.jsx');
|
||||
const ThumbnailColumn = require('../../components/thumbnailcolumn/thumbnailcolumn.jsx');
|
||||
const projectShape = require('./projectshape.jsx').projectShape;
|
||||
|
@ -10,11 +11,11 @@ const StudioList = props => {
|
|||
return (
|
||||
<FlexRow className="studio-list">
|
||||
<div className="list-title">
|
||||
Studios
|
||||
<FormattedMessage id="general.studios" />
|
||||
</div>
|
||||
{studios.length === 0 ? (
|
||||
// TODO: style remix invitation
|
||||
<span>Invite user to add to studio</span>
|
||||
<FormattedMessage id="addToStudio.inviteUser" />
|
||||
) : (
|
||||
<ThumbnailColumn
|
||||
cards
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const FormattedDate = require('react-intl').FormattedDate;
|
||||
const FormattedMessage = require('react-intl').FormattedMessage;
|
||||
const PropTypes = require('prop-types');
|
||||
const React = require('react');
|
||||
const FlexRow = require('../../components/flex-row/flex-row.jsx');
|
||||
|
@ -34,7 +35,7 @@ const Subactions = props => (
|
|||
key="add-to-studio-button"
|
||||
onClick={props.onAddToStudioClicked}
|
||||
>
|
||||
Add to Studio
|
||||
<FormattedMessage id="addToStudio.title" />
|
||||
</Button>
|
||||
{props.addToStudioOpen && (
|
||||
<AddToStudioModal
|
||||
|
@ -47,7 +48,7 @@ const Subactions = props => (
|
|||
</React.Fragment>
|
||||
}
|
||||
<Button className="action-button copy-link-button">
|
||||
Copy Link
|
||||
<FormattedMessage id="general.copyLink" />
|
||||
</Button>
|
||||
{(props.canReport) &&
|
||||
<React.Fragment>
|
||||
|
@ -56,7 +57,7 @@ const Subactions = props => (
|
|||
key="report-button"
|
||||
onClick={props.onReportClicked}
|
||||
>
|
||||
Report
|
||||
<FormattedMessage id="general.report" />
|
||||
</Button>
|
||||
{props.reportOpen && (
|
||||
<ReportModal
|
||||
|
|
Loading…
Reference in a new issue