瀏覽代碼

Updates copy info with parltcipant name info if available.

master
damencho 6 年之前
父節點
當前提交
9bde673397
共有 2 個檔案被更改,包括 19 行新增4 行删除
  1. 3
    1
      lang/main.json
  2. 16
    3
      react/features/invite/components/info-dialog/web/InfoDialog.js

+ 3
- 1
lang/main.json 查看文件

@@ -357,7 +357,9 @@
357 357
         "inviteLiveStream": "To view the live stream of this meeting, click this link: __url__",
358 358
         "invitePhone": "One tap audio Dial In: __number__,,__conferenceID__#",
359 359
         "invitePhoneAlternatives": "Looking for a different dial in number? Please see: __url__",
360
-        "inviteURL": "You are invited to join a meeting.\n__moreInfo__\nJoin meeting: __url__\n",
360
+        "inviteURLFirstPartGeneral": "You are invited to join a meeting.",
361
+        "inviteURLFirstPartPersonal": "__name__ is inviting you to a meeting.",
362
+        "inviteURLSecondPart": "\n__moreInfo__\nJoin meeting: __url__\n",
361 363
         "inviteURLMoreInfo": "Meeting ID: __conferenceID__#\n",
362 364
         "liveStreamURL": "Live stream:",
363 365
         "moreNumbers": "More numbers",

+ 16
- 3
react/features/invite/components/info-dialog/web/InfoDialog.js 查看文件

@@ -8,7 +8,10 @@ import { getInviteURL } from '../../../../base/connection';
8 8
 import { Dialog } from '../../../../base/dialog';
9 9
 import { translate } from '../../../../base/i18n';
10 10
 import { connect } from '../../../../base/redux';
11
-import { isLocalParticipantModerator } from '../../../../base/participants';
11
+import {
12
+    isLocalParticipantModerator,
13
+    getLocalParticipant
14
+} from '../../../../base/participants';
12 15
 
13 16
 import { _getDefaultPhoneNumber, getDialInfoPageURL } from '../../../functions';
14 17
 import DialInNumber from './DialInNumber';
@@ -42,6 +45,11 @@ type Props = {
42 45
      */
43 46
     _inviteURL: string,
44 47
 
48
+    /**
49
+     * The redux representation of the local participant.
50
+     */
51
+    _localParticipant: Object,
52
+
45 53
     /**
46 54
      * The current location url of the conference.
47 55
      */
@@ -293,14 +301,18 @@ class InfoDialog extends Component<Props, State> {
293 301
      * @returns {string}
294 302
      */
295 303
     _getTextToCopy() {
296
-        const { liveStreamViewURL, t } = this.props;
304
+        const { _localParticipant, liveStreamViewURL, t } = this.props;
297 305
         const shouldDisplayDialIn = this._shouldDisplayDialIn();
298 306
         const moreInfo
299 307
             = shouldDisplayDialIn
300 308
                 ? t('info.inviteURLMoreInfo', { conferenceID: this.props.dialIn.conferenceID })
301 309
                 : '';
302 310
 
303
-        let invite = t('info.inviteURL', {
311
+        let invite = _localParticipant && _localParticipant.name
312
+            ? t('info.inviteURLFirstPartPersonal', { name: _localParticipant.name })
313
+            : t('info.inviteURLFirstPartGeneral');
314
+
315
+        invite += t('info.inviteURLSecondPart', {
304 316
             url: this.props._inviteURL,
305 317
             moreInfo
306 318
         });
@@ -580,6 +592,7 @@ function _mapStateToProps(state) {
580 592
         _conference: conference,
581 593
         _conferenceName: room,
582 594
         _inviteURL: getInviteURL(state),
595
+        _localParticipant: getLocalParticipant(state),
583 596
         _locationURL: state['features/base/connection'].locationURL,
584 597
         _locked: locked,
585 598
         _password: password

Loading…
取消
儲存