diff options
Diffstat (limited to 'app/features/welcome/components/Welcome.js')
-rw-r--r-- | app/features/welcome/components/Welcome.js | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/app/features/welcome/components/Welcome.js b/app/features/welcome/components/Welcome.js index f0bb138..7a7b7a4 100644 --- a/app/features/welcome/components/Welcome.js +++ b/app/features/welcome/components/Welcome.js @@ -8,6 +8,8 @@ import { AtlasKitThemeProvider } from '@atlaskit/theme'; import { generateRoomWithoutSeparator } from 'js-utils/random'; import React, { Component } from 'react'; +import { withTranslation } from 'react-i18next'; +import { compose } from 'redux'; import type { Dispatch } from 'redux'; import { connect } from 'react-redux'; import { push } from 'react-router-redux'; @@ -19,7 +21,6 @@ import { createConferenceObjectFromURL } from '../../utils'; import { Body, FieldWrapper, Form, Header, Label, Wrapper } from '../styled'; - type Props = { /** @@ -31,6 +32,11 @@ type Props = { * React Router location object. */ location: Object; + + /** + * I18next translate function. + */ + t: Function; }; type State = { @@ -252,12 +258,13 @@ class Welcome extends Component<Props, State> { _renderHeader() { const locationState = this.props.location.state; const locationError = locationState && locationState.error; + const { t } = this.props; return ( <Header> <SpotlightTarget name = 'conference-url'> <Form onSubmit = { this._onFormSubmit }> - <Label>{ 'Enter a name for your conference or a Jitsi URL' } </Label> + <Label>{ t('enterConferenceNameOrUrl') } </Label> <FieldWrapper> <FieldTextStateless autoFocus = { true } @@ -272,7 +279,7 @@ class Welcome extends Component<Props, State> { appearance = 'primary' onClick = { this._onJoin } type = 'button'> - GO + { t('go') } </Button> </FieldWrapper> </Form> @@ -306,4 +313,4 @@ class Welcome extends Component<Props, State> { } } -export default connect()(Welcome); +export default compose(connect(), withTranslation())(Welcome); |