diff options
Diffstat (limited to 'src/components/AppUpdateInfoBar.js')
-rw-r--r-- | src/components/AppUpdateInfoBar.js | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/components/AppUpdateInfoBar.js b/src/components/AppUpdateInfoBar.js index 30804262a..9dc86bd1d 100644 --- a/src/components/AppUpdateInfoBar.js +++ b/src/components/AppUpdateInfoBar.js | |||
@@ -1,6 +1,6 @@ | |||
1 | import React, { Component } from 'react'; | 1 | import React, { Component } from 'react'; |
2 | import PropTypes from 'prop-types'; | 2 | import PropTypes from 'prop-types'; |
3 | import { defineMessages, intlShape } from 'react-intl'; | 3 | import { defineMessages, injectIntl } from 'react-intl'; |
4 | 4 | ||
5 | import InfoBar from './ui/InfoBar'; | 5 | import InfoBar from './ui/InfoBar'; |
6 | import { GITHUB_FERDI_URL } from '../config'; | 6 | import { GITHUB_FERDI_URL } from '../config'; |
@@ -9,15 +9,15 @@ import { openExternalUrl } from '../helpers/url-helpers'; | |||
9 | const messages = defineMessages({ | 9 | const messages = defineMessages({ |
10 | updateAvailable: { | 10 | updateAvailable: { |
11 | id: 'infobar.updateAvailable', | 11 | id: 'infobar.updateAvailable', |
12 | defaultMessage: '!!!A new update for Ferdi is available.', | 12 | defaultMessage: 'A new update for Ferdi is available.', |
13 | }, | 13 | }, |
14 | changelog: { | 14 | changelog: { |
15 | id: 'infobar.buttonChangelog', | 15 | id: 'infobar.buttonChangelog', |
16 | defaultMessage: '!!!Changelog', | 16 | defaultMessage: 'Changelog', |
17 | }, | 17 | }, |
18 | buttonInstallUpdate: { | 18 | buttonInstallUpdate: { |
19 | id: 'infobar.buttonInstallUpdate', | 19 | id: 'infobar.buttonInstallUpdate', |
20 | defaultMessage: '!!!Restart & install update', | 20 | defaultMessage: 'Restart & install update', |
21 | }, | 21 | }, |
22 | }); | 22 | }); |
23 | 23 | ||
@@ -27,12 +27,8 @@ class AppUpdateInfoBar extends Component { | |||
27 | onHide: PropTypes.func.isRequired, | 27 | onHide: PropTypes.func.isRequired, |
28 | }; | 28 | }; |
29 | 29 | ||
30 | static contextTypes = { | ||
31 | intl: intlShape, | ||
32 | }; | ||
33 | |||
34 | render() { | 30 | render() { |
35 | const { intl } = this.context; | 31 | const { intl } = this.props; |
36 | const { onInstallUpdate, onHide } = this.props; | 32 | const { onInstallUpdate, onHide } = this.props; |
37 | 33 | ||
38 | return ( | 34 | return ( |
@@ -61,4 +57,4 @@ class AppUpdateInfoBar extends Component { | |||
61 | } | 57 | } |
62 | } | 58 | } |
63 | 59 | ||
64 | export default AppUpdateInfoBar; | 60 | export default injectIntl(AppUpdateInfoBar); |