1- /* eslint-disable react/jsx-no-literals */
2- /*
3- @todo Rule is disabled because this component is rendered outside the
4- intl provider right now so cannot be translated.
5- */
6-
71import PropTypes from 'prop-types' ;
82import React from 'react' ;
93import Box from '../box/box.jsx' ;
4+ import { FormattedMessage } from 'react-intl' ;
105
116import styles from './crash-message.css' ;
127import reloadIcon from './reload.svg' ;
@@ -19,19 +14,30 @@ const CrashMessage = props => (
1914 src = { reloadIcon }
2015 />
2116 < h2 >
22- Oops! Something went wrong.
17+ < FormattedMessage
18+ defaultMessage = "Oops! Something went wrong."
19+ description = "Crash Message title"
20+ id = "gui.crashMessage.label"
21+ />
2322 </ h2 >
2423 < p >
25- We are so sorry, but it looks like Scratch has crashed. This bug has been
26- automatically reported to the Scratch Team. Please refresh your page to try
27- again.
28-
24+ < FormattedMessage
25+ defaultMessage = "We are so sorry, but it looks like Scratch has crashed. This bug has been
26+ automatically reported to the Scratch Team. Please refresh your page to try
27+ again."
28+ description = "Message to inform the user that page has crashed."
29+ id = "gui.crashMessage.description"
30+ />
2931 </ p >
3032 < button
3133 className = { styles . reloadButton }
3234 onClick = { props . onReload }
3335 >
34- Reload
36+ < FormattedMessage
37+ defaultMessage = "Reload"
38+ description = "Button to reload the page when page crashes"
39+ id = "gui.crashMessage.reload"
40+ />
3541 </ button >
3642 </ Box >
3743 </ div >
0 commit comments