Commit b9135dc5 authored by Wilko Manger's avatar Wilko Manger

Rename member change localization methods

parent 17969371
......@@ -47,13 +47,13 @@ List<TextSpan> spanFor(BuildContext context, MemberChangeEvent event,
text = l(context).changedTheirNameTo(oldName, newName);
} else if (event is JoinEvent) {
text = l(context).hasJoined(subject);
text = l(context).joined(subject);
} else if (event is LeaveEvent) {
text = l(context).hasLeft(subject);
text = l(context).left(subject);
} else if (event is InviteEvent) {
text = l(context).hasBeenInvited(subject, sender);
text = l(context).wasInvitedBy(subject, sender);
} else if (event is BanEvent) {
text = l(context).hasBeenBanned(subject, sender);
text = l(context).wasBannedBy(subject, sender);
}
return text;
......
......@@ -78,20 +78,20 @@ class Strings {
List<TextSpan> changedTheirNameTo(TextSpan oldName, TextSpan newName)
=> [oldName, TextSpan(text: ' changed their name to '), newName];
List<TextSpan> hasJoined(TextSpan name)
List<TextSpan> joined(TextSpan name)
=> [name, TextSpan(text: ' joined')];
List<TextSpan> hasLeft(TextSpan name)
List<TextSpan> left(TextSpan name)
=> [name, TextSpan(text: ' left')];
List<TextSpan> hasBeenBanned(TextSpan banee, TextSpan banner)
List<TextSpan> wasBannedBy(TextSpan banee, TextSpan banner)
=> [
banee,
TextSpan(text: ' was banned by '),
banner
];
List<TextSpan> hasBeenInvited(TextSpan invitee, TextSpan inviter)
List<TextSpan> wasInvitedBy(TextSpan invitee, TextSpan inviter)
=> [
invitee,
TextSpan(text: ' was invited by '),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment