From 2dfb107c57d8424277664bb76dcda7c5ecc52545 Mon Sep 17 00:00:00 2001 From: Radium Zheng Date: Tue, 10 Jul 2018 23:52:44 +1000 Subject: [PATCH] UI strings: durationNA and moderater's finish message --- lang/main.json | 4 +++- .../components/LocalRecordingInfoDialog.js | 10 ++++++++-- .../local-recording/controller/RecordingController.js | 6 ++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/lang/main.json b/lang/main.json index 0fbad4cd8..9f8172fd2 100644 --- a/lang/main.json +++ b/lang/main.json @@ -674,8 +674,9 @@ "start": "Start", "stop": "Stop", "moderator": "Moderator", - "localUser": "Local user", + "me": "Me", "duration": "Duration", + "durationNA": "N/A", "encoding": "Encoding", "participantStats": "Participant Stats", "clientState": { @@ -686,6 +687,7 @@ "messages": { "engaged": "Local recording engaged.", "finished": "Recording session __token__ finished. Please send the recorded file to the moderator.", + "finishedModerator": "Recording session __token__ finished. The recording of the local track has been saved. Please ask the other participants to submit their recordings.", "notModerator": "You are not the moderator. You cannot start or stop local recording." }, "yes": "Yes", diff --git a/react/features/local-recording/components/LocalRecordingInfoDialog.js b/react/features/local-recording/components/LocalRecordingInfoDialog.js index 4651d8b29..1a1d47e15 100644 --- a/react/features/local-recording/components/LocalRecordingInfoDialog.js +++ b/react/features/local-recording/components/LocalRecordingInfoDialog.js @@ -90,7 +90,7 @@ class LocalRecordingInfoDialog extends Component { constructor() { super(); this.state = { - durationString: 'N/A' + durationString: '' }; } @@ -211,7 +211,9 @@ class LocalRecordingInfoDialog extends Component {   - { durationString } + { durationString === '' + ? t('localRecording.durationNA') + : durationString } } @@ -267,6 +269,10 @@ class LocalRecordingInfoDialog extends Component { * @returns {string} */ _getDuration(now, prev) { + if (prev === null || prev === undefined) { + return ''; + } + // Still a hack, as moment.js does not support formatting of duration // (i.e. TimeDelta). Only works if total duration < 24 hours. // But who is going to have a 24-hour long conference? diff --git a/react/features/local-recording/controller/RecordingController.js b/react/features/local-recording/controller/RecordingController.js index 915d880e9..a750fa8a7 100644 --- a/react/features/local-recording/controller/RecordingController.js +++ b/react/features/local-recording/controller/RecordingController.js @@ -336,7 +336,7 @@ class RecordingController { result[localId] = { id: localId, - displayName: i18next.t('localRecording.localUser'), + displayName: i18next.t('localRecording.me'), recordingStats: this.getLocalStats(), isSelf: true }; @@ -507,7 +507,9 @@ class RecordingController { this.downloadRecordedData(token); const message - = i18next.t('localRecording.messages.finished', + = i18next.t(this._conference.isModerator() + ? 'localRecording.messages.finishedModerator' + : 'localRecording.messages.finished', { token });