Add text for invite_timeout and fix message for ice_failed.

This commit is contained in:
Will Hunt 2017-06-11 07:19:19 +01:00
parent 2bfad52b40
commit cbcca78c40
3 changed files with 12 additions and 8 deletions

View file

@ -145,13 +145,15 @@ function textForCallHangupEvent(event) {
const eventContent = event.getContent();
let reason = "";
if(!MatrixClientPeg.get().supportsVoip()) {
reason = _t('(not supported by this browser)');
reason = _t('(not supported by this browser)');
} else if(eventContent.reason) {
if (eventContent.reason === "ice_failed") {
reason = _t('(call failed to connect)');
} else {
reason = _t('(unknown failure: %(reason)s)', {reason: eventContent.reason});
}
if (eventContent.reason === "ice_failed") {
reason = _t('(could not connect media)');
} else if (eventContent.reason === "invite_timeout") {
reason = _t('(no answer)');
} else {
reason = _t('(unknown failure: %(reason)s)', {reason: eventContent.reason});
}
}
return _t('%(senderName)s ended the call.', {senderName}) + ' ' + reason;
}

View file

@ -637,7 +637,8 @@
"VoIP conference finished.": "VoIP conference finished.",
"VoIP conference started.": "VoIP conference started.",
"VoIP is unsupported": "VoIP is unsupported",
"(call failed to connect)": "(call failed to connect)",
"(could not connect media)": "(could not connect media)",
"(no answer)": "(no answer)",
"(unknown failure: %(reason)s)": "(unknown failure: %(reason)s)",
"(warning: cannot be disabled again!)": "(warning: cannot be disabled again!)",
"Warning!": "Warning!",

View file

@ -576,7 +576,8 @@
"VoIP conference finished.": "VoIP conference finished.",
"VoIP conference started.": "VoIP conference started.",
"VoIP is unsupported": "VoIP is unsupported",
"(call failed to connect)": "(call failed to connect)",
"(could not connect media)": "(could not connect media)",
"(no answer)": "(no answer)",
"(unknown failure: %(reason)s)": "(unknown failure: %(reason)s)",
"(warning: cannot be disabled again!)": "(warning: cannot be disabled again!)",
"Warning!": "Warning!",