Add call state localizations
This commit is contained in:
parent
61b32e0bd9
commit
a288216e03
|
@ -584,6 +584,18 @@ class Event extends MatrixEvent {
|
|||
localizedBody += '. ' + i18n.needPantalaimonWarning;
|
||||
}
|
||||
break;
|
||||
case EventTypes.CallAnswer:
|
||||
localizedBody = i18n.answeredTheCall(senderName);
|
||||
break;
|
||||
case EventTypes.CallHangup:
|
||||
localizedBody = i18n.endedTheCall(senderName);
|
||||
break;
|
||||
case EventTypes.CallInvite:
|
||||
localizedBody = i18n.startedACall(senderName);
|
||||
break;
|
||||
case EventTypes.CallCandidates:
|
||||
localizedBody = i18n.sentCallInformations(senderName);
|
||||
break;
|
||||
case EventTypes.Encrypted:
|
||||
case EventTypes.Message:
|
||||
switch (messageType) {
|
||||
|
|
|
@ -109,6 +109,14 @@ abstract class MatrixLocalizations {
|
|||
String couldNotDecryptMessage(String errorText);
|
||||
|
||||
String unknownEvent(String typeKey);
|
||||
|
||||
String startedACall(String senderName);
|
||||
|
||||
String endedTheCall(String senderName);
|
||||
|
||||
String answeredTheCall(String senderName);
|
||||
|
||||
String sentCallInformations(String senderName);
|
||||
}
|
||||
|
||||
extension HistoryVisibilityDisplayString on HistoryVisibility {
|
||||
|
|
|
@ -306,4 +306,28 @@ class FakeMatrixLocalizations extends MatrixLocalizations {
|
|||
@override
|
||||
// TODO: implement you
|
||||
String get you => null;
|
||||
|
||||
@override
|
||||
String answeredTheCall(String senderName) {
|
||||
// TODO: implement answeredTheCall
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
String endedTheCall(String senderName) {
|
||||
// TODO: implement endedTheCall
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
String sentCallInformations(String senderName) {
|
||||
// TODO: implement sentCallInformations
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
String startedACall(String senderName) {
|
||||
// TODO: implement startedACall
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -205,4 +205,24 @@ class MatrixDefaultLocalizations extends MatrixLocalizations {
|
|||
|
||||
@override
|
||||
String get you => 'You';
|
||||
|
||||
@override
|
||||
String answeredTheCall(String senderName) {
|
||||
return 'answeredTheCall';
|
||||
}
|
||||
|
||||
@override
|
||||
String endedTheCall(String senderName) {
|
||||
return 'endedTheCall';
|
||||
}
|
||||
|
||||
@override
|
||||
String sentCallInformations(String senderName) {
|
||||
return 'sentCallInformations';
|
||||
}
|
||||
|
||||
@override
|
||||
String startedACall(String senderName) {
|
||||
return 'startedACall';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue