Skip to content

Commit b1f3751

Browse files
committed
Add Intl to Crash Message Component.
1 parent f9fd7c9 commit b1f3751

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

src/components/crash-message/crash-message.jsx

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
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-
71
import PropTypes from 'prop-types';
82
import React from 'react';
93
import Box from '../box/box.jsx';
4+
import {FormattedMessage} from 'react-intl';
105

116
import styles from './crash-message.css';
127
import 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

Comments
 (0)