Skip to content
Snippets Groups Projects
Commit b1f3751e authored by Warao Gil's avatar Warao Gil
Browse files

Add Intl to Crash Message Component.

parent f9fd7c90
No related branches found
No related tags found
No related merge requests found
/* eslint-disable react/jsx-no-literals */
/*
@todo Rule is disabled because this component is rendered outside the
intl provider right now so cannot be translated.
*/
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import React from 'react'; import React from 'react';
import Box from '../box/box.jsx'; import Box from '../box/box.jsx';
import {FormattedMessage} from 'react-intl';
import styles from './crash-message.css'; import styles from './crash-message.css';
import reloadIcon from './reload.svg'; import reloadIcon from './reload.svg';
...@@ -19,19 +14,30 @@ const CrashMessage = props => ( ...@@ -19,19 +14,30 @@ const CrashMessage = props => (
src={reloadIcon} src={reloadIcon}
/> />
<h2> <h2>
Oops! Something went wrong. <FormattedMessage
defaultMessage="Oops! Something went wrong."
description="Crash Message title"
id="gui.crashMessage.label"
/>
</h2> </h2>
<p> <p>
We are so sorry, but it looks like Scratch has crashed. This bug has been <FormattedMessage
automatically reported to the Scratch Team. Please refresh your page to try defaultMessage="We are so sorry, but it looks like Scratch has crashed. This bug has been
again. automatically reported to the Scratch Team. Please refresh your page to try
again."
description="Message to inform the user that page has crashed."
id="gui.crashMessage.description"
/>
</p> </p>
<button <button
className={styles.reloadButton} className={styles.reloadButton}
onClick={props.onReload} onClick={props.onReload}
> >
Reload <FormattedMessage
defaultMessage="Reload"
description="Button to reload the page when page crashes"
id="gui.crashMessage.reload"
/>
</button> </button>
</Box> </Box>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment