Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(shared-video) make placeholder translatable

Saúl Ibarra Corretgéb92c1f52d55d
diff --git a/lang/main.json b/lang/main.json
index 19475a8a78..b51fb032b3 100644
--- a/lang/main.json
+++ b/lang/main.json
@@ -333,6 +333,7 @@
"shareScreenWarningH1": "If you want to share just 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.",
+ "sharedVideoLinkPlaceholder": "YouTube link or direct video link",
"stopLiveStreaming": "Stop live stream",
"stopRecording": "Stop recording",
"stopRecordingWarning": "Are you sure you would like to stop the recording?",
diff --git a/react/features/shared-video/components/native/SharedVideoDialog.js b/react/features/shared-video/components/native/SharedVideoDialog.js
index 1fdf3ae206..62655d6f0b 100644
--- a/react/features/shared-video/components/native/SharedVideoDialog.js
+++ b/react/features/shared-video/components/native/SharedVideoDialog.js
@@ -3,9 +3,9 @@
import React from 'react';
import { InputDialog } from '../../../base/dialog';
+import { translate } from '../../../base/i18n';
import { connect } from '../../../base/redux';
import { ColorPalette } from '../../../base/styles';
-import { defaultSharedVideoLink } from '../../constants';
import AbstractSharedVideoDialog from '../AbstractSharedVideoDialog';
/**
@@ -41,16 +41,20 @@ class SharedVideoDialog extends AbstractSharedVideoDialog<*> {
* @inheritdoc
*/
render() {
+ const { t } = this.props;
+
return (
<InputDialog
contentKey = 'dialog.shareVideoTitle'
onSubmit = { this._onSubmitValue }
textInputProps = {{
- placeholder: defaultSharedVideoLink,
+ autoCapitalize: 'none',
+ autoCorrect: false,
+ placeholder: t('dialog.sharedVideoLinkPlaceholder'),
placeholderTextColor: ColorPalette.lightGrey
}} />
);
}
}
-export default connect()(SharedVideoDialog);
+export default translate(connect()(SharedVideoDialog));
diff --git a/react/features/shared-video/components/web/SharedVideoDialog.js b/react/features/shared-video/components/web/SharedVideoDialog.js
index 992dc383b0..6c16c51bc8 100644
--- a/react/features/shared-video/components/web/SharedVideoDialog.js
+++ b/react/features/shared-video/components/web/SharedVideoDialog.js
@@ -7,7 +7,6 @@ import { Dialog } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
import { getFieldValue } from '../../../base/react';
import { connect } from '../../../base/redux';
-import { defaultSharedVideoLink } from '../../constants';
import AbstractSharedVideoDialog from '../AbstractSharedVideoDialog';
/**
@@ -85,7 +84,7 @@ class SharedVideoDialog extends AbstractSharedVideoDialog<*> {
label = { t('dialog.videoLink') }
name = 'sharedVideoUrl'
onChange = { this._onChange }
- placeholder = { defaultSharedVideoLink }
+ placeholder = { t('dialog.sharedVideoLinkPlaceholder') }
shouldFitContainer = { true }
type = 'text'
value = { this.state.value } />
diff --git a/react/features/shared-video/constants.js b/react/features/shared-video/constants.js
index 9ca62014bf..0b12360df4 100644
--- a/react/features/shared-video/constants.js
+++ b/react/features/shared-video/constants.js
@@ -1,11 +1,5 @@
// @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.
* @type {string}