fix(shared-video) make placeholder translatable

Also fix capitalization.
This commit is contained in:
Saúl Ibarra Corretgé 2021-09-14 12:22:45 +02:00 committed by Saúl Ibarra Corretgé
parent 8eaf99586e
commit b92c1f52d5
4 changed files with 9 additions and 11 deletions

View File

@ -333,6 +333,7 @@
"shareScreenWarningH1": "If you want to share just your screen:", "shareScreenWarningH1": "If you want to share just your screen:",
"shareScreenWarningD1": "you need to stop audio sharing before sharing your screen.", "shareScreenWarningD1": "you need to stop audio sharing before sharing your screen.",
"shareScreenWarningD2": "you need to stop audio sharing, start screen sharing and check the \"share audio\" option.", "shareScreenWarningD2": "you need to stop audio sharing, start screen sharing and check the \"share audio\" option.",
"sharedVideoLinkPlaceholder": "YouTube link or direct video link",
"stopLiveStreaming": "Stop live stream", "stopLiveStreaming": "Stop live stream",
"stopRecording": "Stop recording", "stopRecording": "Stop recording",
"stopRecordingWarning": "Are you sure you would like to stop the recording?", "stopRecordingWarning": "Are you sure you would like to stop the recording?",

View File

@ -3,9 +3,9 @@
import React from 'react'; import React from 'react';
import { InputDialog } from '../../../base/dialog'; import { InputDialog } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
import { connect } from '../../../base/redux'; import { connect } from '../../../base/redux';
import { ColorPalette } from '../../../base/styles'; import { ColorPalette } from '../../../base/styles';
import { defaultSharedVideoLink } from '../../constants';
import AbstractSharedVideoDialog from '../AbstractSharedVideoDialog'; import AbstractSharedVideoDialog from '../AbstractSharedVideoDialog';
/** /**
@ -41,16 +41,20 @@ class SharedVideoDialog extends AbstractSharedVideoDialog<*> {
* @inheritdoc * @inheritdoc
*/ */
render() { render() {
const { t } = this.props;
return ( return (
<InputDialog <InputDialog
contentKey = 'dialog.shareVideoTitle' contentKey = 'dialog.shareVideoTitle'
onSubmit = { this._onSubmitValue } onSubmit = { this._onSubmitValue }
textInputProps = {{ textInputProps = {{
placeholder: defaultSharedVideoLink, autoCapitalize: 'none',
autoCorrect: false,
placeholder: t('dialog.sharedVideoLinkPlaceholder'),
placeholderTextColor: ColorPalette.lightGrey placeholderTextColor: ColorPalette.lightGrey
}} /> }} />
); );
} }
} }
export default connect()(SharedVideoDialog); export default translate(connect()(SharedVideoDialog));

View File

@ -7,7 +7,6 @@ import { Dialog } from '../../../base/dialog';
import { translate } from '../../../base/i18n'; import { translate } from '../../../base/i18n';
import { getFieldValue } from '../../../base/react'; import { getFieldValue } from '../../../base/react';
import { connect } from '../../../base/redux'; import { connect } from '../../../base/redux';
import { defaultSharedVideoLink } from '../../constants';
import AbstractSharedVideoDialog from '../AbstractSharedVideoDialog'; import AbstractSharedVideoDialog from '../AbstractSharedVideoDialog';
/** /**
@ -85,7 +84,7 @@ class SharedVideoDialog extends AbstractSharedVideoDialog<*> {
label = { t('dialog.videoLink') } label = { t('dialog.videoLink') }
name = 'sharedVideoUrl' name = 'sharedVideoUrl'
onChange = { this._onChange } onChange = { this._onChange }
placeholder = { defaultSharedVideoLink } placeholder = { t('dialog.sharedVideoLinkPlaceholder') }
shouldFitContainer = { true } shouldFitContainer = { true }
type = 'text' type = 'text'
value = { this.state.value } /> value = { this.state.value } />

View File

@ -1,11 +1,5 @@
// @flow // @flow
/**
* Placeholder for web share video input.
* @type {string}
*/
export const defaultSharedVideoLink = 'Youtube link or direct video link';
/** /**
* Fixed name of the video player fake participant. * Fixed name of the video player fake participant.
* @type {string} * @type {string}