diff options
Diffstat (limited to 'src/features/workspaces')
-rw-r--r-- | src/features/workspaces/components/WorkspaceSwitchingIndicator.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/features/workspaces/components/WorkspaceSwitchingIndicator.js b/src/features/workspaces/components/WorkspaceSwitchingIndicator.js index f68ac1b00..68ce6fd87 100644 --- a/src/features/workspaces/components/WorkspaceSwitchingIndicator.js +++ b/src/features/workspaces/components/WorkspaceSwitchingIndicator.js | |||
@@ -3,9 +3,18 @@ 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 classnames from 'classnames'; | 5 | import classnames from 'classnames'; |
6 | import { defineMessages, intlShape } from 'react-intl'; | ||
7 | |||
6 | import { workspacesState } from '../state'; | 8 | import { workspacesState } from '../state'; |
7 | import LoaderComponent from '../../../components/ui/Loader'; | 9 | import LoaderComponent from '../../../components/ui/Loader'; |
8 | 10 | ||
11 | const messages = defineMessages({ | ||
12 | switchingTo: { | ||
13 | id: 'workspaces.switchingIndicator.switchingTo', | ||
14 | defaultMessage: '!!!Switching to', | ||
15 | }, | ||
16 | }); | ||
17 | |||
9 | const styles = theme => ({ | 18 | const styles = theme => ({ |
10 | wrapper: { | 19 | wrapper: { |
11 | display: 'flex', | 20 | display: 'flex', |
@@ -40,8 +49,13 @@ class WorkspaceSwitchingIndicator extends Component { | |||
40 | classes: PropTypes.object.isRequired, | 49 | classes: PropTypes.object.isRequired, |
41 | }; | 50 | }; |
42 | 51 | ||
52 | static contextTypes = { | ||
53 | intl: intlShape, | ||
54 | }; | ||
55 | |||
43 | render() { | 56 | render() { |
44 | const { classes } = this.props; | 57 | const { classes } = this.props; |
58 | const { intl } = this.context; | ||
45 | const { isSwitchingWorkspace, isWorkspaceDrawerOpen, nextWorkspace } = workspacesState; | 59 | const { isSwitchingWorkspace, isWorkspaceDrawerOpen, nextWorkspace } = workspacesState; |
46 | if (!isSwitchingWorkspace) return null; | 60 | if (!isSwitchingWorkspace) return null; |
47 | const nextWorkspaceName = nextWorkspace ? nextWorkspace.name : 'All services'; | 61 | const nextWorkspaceName = nextWorkspace ? nextWorkspace.name : 'All services'; |
@@ -54,7 +68,7 @@ class WorkspaceSwitchingIndicator extends Component { | |||
54 | > | 68 | > |
55 | <div className={classes.component}> | 69 | <div className={classes.component}> |
56 | <h1 className={classes.name}> | 70 | <h1 className={classes.name}> |
57 | {`Switching to ${nextWorkspaceName}`} | 71 | {`${intl.formatMessage(messages.switchingTo)} ${nextWorkspaceName}`} |
58 | </h1> | 72 | </h1> |
59 | <LoaderComponent /> | 73 | <LoaderComponent /> |
60 | </div> | 74 | </div> |