Procházet zdrojové kódy

fix(shared-video) make placeholder translatable

Also fix capitalization.
master
Saúl Ibarra Corretgé před 4 roky
rodič
revize
b92c1f52d5

+ 1
- 0
lang/main.json Zobrazit soubor

333
         "shareScreenWarningH1": "If you want to share just your screen:",
333
         "shareScreenWarningH1": "If you want to share just your screen:",
334
         "shareScreenWarningD1": "you need to stop audio sharing before sharing your screen.",
334
         "shareScreenWarningD1": "you need to stop audio sharing before sharing your screen.",
335
         "shareScreenWarningD2": "you need to stop audio sharing, start screen sharing and check the \"share audio\" option.",
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
         "stopLiveStreaming": "Stop live stream",
337
         "stopLiveStreaming": "Stop live stream",
337
         "stopRecording": "Stop recording",
338
         "stopRecording": "Stop recording",
338
         "stopRecordingWarning": "Are you sure you would like to stop the recording?",
339
         "stopRecordingWarning": "Are you sure you would like to stop the recording?",

+ 7
- 3
react/features/shared-video/components/native/SharedVideoDialog.js Zobrazit soubor

3
 import React from 'react';
3
 import React from 'react';
4
 
4
 
5
 import { InputDialog } from '../../../base/dialog';
5
 import { InputDialog } from '../../../base/dialog';
6
+import { translate } from '../../../base/i18n';
6
 import { connect } from '../../../base/redux';
7
 import { connect } from '../../../base/redux';
7
 import { ColorPalette } from '../../../base/styles';
8
 import { ColorPalette } from '../../../base/styles';
8
-import { defaultSharedVideoLink } from '../../constants';
9
 import AbstractSharedVideoDialog from '../AbstractSharedVideoDialog';
9
 import AbstractSharedVideoDialog from '../AbstractSharedVideoDialog';
10
 
10
 
11
 /**
11
 /**
41
      * @inheritdoc
41
      * @inheritdoc
42
      */
42
      */
43
     render() {
43
     render() {
44
+        const { t } = this.props;
45
+
44
         return (
46
         return (
45
             <InputDialog
47
             <InputDialog
46
                 contentKey = 'dialog.shareVideoTitle'
48
                 contentKey = 'dialog.shareVideoTitle'
47
                 onSubmit = { this._onSubmitValue }
49
                 onSubmit = { this._onSubmitValue }
48
                 textInputProps = {{
50
                 textInputProps = {{
49
-                    placeholder: defaultSharedVideoLink,
51
+                    autoCapitalize: 'none',
52
+                    autoCorrect: false,
53
+                    placeholder: t('dialog.sharedVideoLinkPlaceholder'),
50
                     placeholderTextColor: ColorPalette.lightGrey
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 Zobrazit soubor

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

+ 0
- 6
react/features/shared-video/constants.js Zobrazit soubor

1
 // @flow
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
  * Fixed name of the video player fake participant.
4
  * Fixed name of the video player fake participant.
11
  * @type {string}
5
  * @type {string}

Načítá se…
Zrušit
Uložit