Browse Source

fix(shared-video) make placeholder translatable

Also fix capitalization.
master
Saúl Ibarra Corretgé 4 years ago
parent
commit
b92c1f52d5

+ 1
- 0
lang/main.json View File

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

+ 7
- 3
react/features/shared-video/components/native/SharedVideoDialog.js View File

@@ -3,9 +3,9 @@
3 3
 import React from 'react';
4 4
 
5 5
 import { InputDialog } from '../../../base/dialog';
6
+import { translate } from '../../../base/i18n';
6 7
 import { connect } from '../../../base/redux';
7 8
 import { ColorPalette } from '../../../base/styles';
8
-import { defaultSharedVideoLink } from '../../constants';
9 9
 import AbstractSharedVideoDialog from '../AbstractSharedVideoDialog';
10 10
 
11 11
 /**
@@ -41,16 +41,20 @@ class SharedVideoDialog extends AbstractSharedVideoDialog<*> {
41 41
      * @inheritdoc
42 42
      */
43 43
     render() {
44
+        const { t } = this.props;
45
+
44 46
         return (
45 47
             <InputDialog
46 48
                 contentKey = 'dialog.shareVideoTitle'
47 49
                 onSubmit = { this._onSubmitValue }
48 50
                 textInputProps = {{
49
-                    placeholder: defaultSharedVideoLink,
51
+                    autoCapitalize: 'none',
52
+                    autoCorrect: false,
53
+                    placeholder: t('dialog.sharedVideoLinkPlaceholder'),
50 54
                     placeholderTextColor: ColorPalette.lightGrey
51 55
                 }} />
52 56
         );
53 57
     }
54 58
 }
55 59
 
56
-export default connect()(SharedVideoDialog);
60
+export default translate(connect()(SharedVideoDialog));

+ 1
- 2
react/features/shared-video/components/web/SharedVideoDialog.js View File

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

+ 0
- 6
react/features/shared-video/constants.js View File

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

Loading…
Cancel
Save