UI strings: durationNA and moderater's finish message

This commit is contained in:
Radium Zheng 2018-07-10 23:52:44 +10:00
parent f8c01646c7
commit 2dfb107c57
3 changed files with 15 additions and 5 deletions

View File

@ -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",

View File

@ -90,7 +90,7 @@ class LocalRecordingInfoDialog extends Component<Props, State> {
constructor() {
super();
this.state = {
durationString: 'N/A'
durationString: ''
};
}
@ -211,7 +211,9 @@ class LocalRecordingInfoDialog extends Component<Props, State> {
</span>
<span className = 'spacer'>&nbsp;</span>
<span className = 'info-value'>
{ durationString }
{ durationString === ''
? t('localRecording.durationNA')
: durationString }
</span>
</div>
}
@ -267,6 +269,10 @@ class LocalRecordingInfoDialog extends Component<Props, State> {
* @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?

View File

@ -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
});