diff options
author | 2019-03-21 16:07:17 +0100 | |
---|---|---|
committer | 2019-03-21 16:08:11 +0100 | |
commit | 22400d97f5b85fa7e20721df73dba5dff0f57ad4 (patch) | |
tree | 49318b57189359ea53bf450cda130bb9f767907f /src/components | |
parent | improve workspace drawer layout (diff) | |
download | ferdium-app-22400d97f5b85fa7e20721df73dba5dff0f57ad4.tar.gz ferdium-app-22400d97f5b85fa7e20721df73dba5dff0f57ad4.tar.zst ferdium-app-22400d97f5b85fa7e20721df73dba5dff0f57ad4.zip |
add i18n messages for service loading and workspace switching
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/layout/AppLayout.js | 1 | ||||
-rw-r--r-- | src/components/ui/WebviewLoader/index.js | 16 |
2 files changed, 14 insertions, 3 deletions
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index 4e897e623..4dd5ff686 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js | |||
@@ -15,7 +15,6 @@ import ErrorBoundary from '../util/ErrorBoundary'; | |||
15 | 15 | ||
16 | import { isWindows } from '../../environment'; | 16 | import { isWindows } from '../../environment'; |
17 | import { workspacesState } from '../../features/workspaces/state'; | 17 | import { workspacesState } from '../../features/workspaces/state'; |
18 | import FullscreenLoader from '../ui/FullscreenLoader'; | ||
19 | import WorkspaceSwitchingIndicator from '../../features/workspaces/components/WorkspaceSwitchingIndicator'; | 18 | import WorkspaceSwitchingIndicator from '../../features/workspaces/components/WorkspaceSwitchingIndicator'; |
20 | 19 | ||
21 | function createMarkup(HTMLString) { | 20 | function createMarkup(HTMLString) { |
diff --git a/src/components/ui/WebviewLoader/index.js b/src/components/ui/WebviewLoader/index.js index d200b8193..58b6b6f1b 100644 --- a/src/components/ui/WebviewLoader/index.js +++ b/src/components/ui/WebviewLoader/index.js | |||
@@ -2,23 +2,35 @@ import React, { Component } from 'react'; | |||
2 | import PropTypes from 'prop-types'; | 2 | import PropTypes from 'prop-types'; |
3 | import { observer } from 'mobx-react'; | 3 | import { observer } from 'mobx-react'; |
4 | import injectSheet from 'react-jss'; | 4 | import injectSheet from 'react-jss'; |
5 | import { defineMessages, intlShape } from 'react-intl'; | ||
5 | 6 | ||
6 | import FullscreenLoader from '../FullscreenLoader'; | 7 | import FullscreenLoader from '../FullscreenLoader'; |
7 | |||
8 | import styles from './styles'; | 8 | import styles from './styles'; |
9 | 9 | ||
10 | const messages = defineMessages({ | ||
11 | loading: { | ||
12 | id: 'service.webviewLoader.loading', | ||
13 | defaultMessage: '!!!Loading', | ||
14 | }, | ||
15 | }); | ||
16 | |||
10 | export default @observer @injectSheet(styles) class WebviewLoader extends Component { | 17 | export default @observer @injectSheet(styles) class WebviewLoader extends Component { |
11 | static propTypes = { | 18 | static propTypes = { |
12 | name: PropTypes.string.isRequired, | 19 | name: PropTypes.string.isRequired, |
13 | classes: PropTypes.object.isRequired, | 20 | classes: PropTypes.object.isRequired, |
14 | }; | 21 | }; |
15 | 22 | ||
23 | static contextTypes = { | ||
24 | intl: intlShape, | ||
25 | }; | ||
26 | |||
16 | render() { | 27 | render() { |
17 | const { classes, name } = this.props; | 28 | const { classes, name } = this.props; |
29 | const { intl } = this.context; | ||
18 | return ( | 30 | return ( |
19 | <FullscreenLoader | 31 | <FullscreenLoader |
20 | className={classes.component} | 32 | className={classes.component} |
21 | title={`Loading ${name}`} | 33 | title={`${intl.formatMessage(messages.loading)} ${name}`} |
22 | /> | 34 | /> |
23 | ); | 35 | ); |
24 | } | 36 | } |