Invite link text

This commit is contained in:
Christian Pauly 2020-02-10 18:41:43 +01:00
parent b3c7deed88
commit bb07a2d389
6 changed files with 148 additions and 119 deletions

View File

@ -328,6 +328,12 @@ class I18n {
String get invited => Intl.message("Invited"); String get invited => Intl.message("Invited");
String inviteText(String username, String link) => Intl.message(
"$username invited you to FluffyChat. \n1. Install FluffyChat: http://fluffy.chat \n2. Sign up or sign in \n3. Open the invite link: $link",
name: "inviteText",
args: [username, link],
);
String invitedUser(String username, String targetName) => Intl.message( String invitedUser(String username, String targetName) => Intl.message(
"$username invited $targetName", "$username invited $targetName",
name: "invitedUser", name: "invitedUser",

View File

@ -474,6 +474,14 @@
"type": "text", "type": "text",
"placeholders": {} "placeholders": {}
}, },
"inviteText": "{username} hat Dich zu FluffyChat eingeladen. \n1. Installiere FluffyChat: http://fluffy.chat \n2. Melde Dich in der App an \n3. Öffne den Einladungslink: {link}",
"@inviteText": {
"type": "text",
"placeholders": {
"username": {},
"link": {}
}
},
"invitedUser": "{username} hat {targetName} eingeladen", "invitedUser": "{username} hat {targetName} eingeladen",
"@invitedUser": { "@invitedUser": {
"type": "text", "type": "text",

View File

@ -1,5 +1,5 @@
{ {
"@@last_modified": "2020-02-09T15:11:56.012667", "@@last_modified": "2020-02-10T18:38:37.519607",
"About": "About", "About": "About",
"@About": { "@About": {
"type": "text", "type": "text",
@ -474,6 +474,14 @@
"type": "text", "type": "text",
"placeholders": {} "placeholders": {}
}, },
"inviteText": "{username} invited you to FluffyChat. \n1. Install FluffyChat: http://fluffy.chat \n2. Sign up or sign in \n3. Open the invite link: {link}",
"@inviteText": {
"type": "text",
"placeholders": {
"username": {},
"link": {}
}
},
"invitedUser": "{username} invited {targetName}", "invitedUser": "{username} invited {targetName}",
"@invitedUser": { "@invitedUser": {
"type": "text", "type": "text",

View File

@ -71,63 +71,65 @@ class MessageLookup extends MessageLookupByLibrary {
static m25(groupName) => "Kontakt zu ${groupName} einladen"; static m25(groupName) => "Kontakt zu ${groupName} einladen";
static m26(username, targetName) => "${username} hat ${targetName} eingeladen"; static m26(username, link) => "${username} hat Dich zu FluffyChat eingeladen. \n1. Installiere FluffyChat: http://fluffy.chat \n2. Melde Dich in der App an \n3. Öffne den Einladungslink: ${link}";
static m27(username) => "${username} ist dem Chat beigetreten"; static m27(username, targetName) => "${username} hat ${targetName} eingeladen";
static m28(username, targetName) => "${username} hat ${targetName} hinausgeworfen"; static m28(username) => "${username} ist dem Chat beigetreten";
static m29(username, targetName) => "${username} hat ${targetName} hinausgeworfen und verbannt"; static m29(username, targetName) => "${username} hat ${targetName} hinausgeworfen";
static m30(count) => "${count} weitere Teilnehmer laden"; static m30(username, targetName) => "${username} hat ${targetName} hinausgeworfen und verbannt";
static m31(number) => "${number} ausgewählt"; static m31(count) => "${count} weitere Teilnehmer laden";
static m32(fileName) => "Play ${fileName}"; static m32(number) => "${number} ausgewählt";
static m33(username) => "${username} hat ein Event enternt"; static m33(fileName) => "Play ${fileName}";
static m34(username) => "${username} hat die Einladung abgelehnt"; static m34(username) => "${username} hat ein Event enternt";
static m35(username) => "Entfernt von ${username}"; static m35(username) => "${username} hat die Einladung abgelehnt";
static m36(username) => "Gelesen von ${username}"; static m36(username) => "Entfernt von ${username}";
static m37(username, count) => "Gelesen von ${username} und ${count} anderen"; static m37(username) => "Gelesen von ${username}";
static m38(username, username2) => "Gelesen von ${username} und ${username2}"; static m38(username, count) => "Gelesen von ${username} und ${count} anderen";
static m39(username) => "${username} hat eine Datei gesendet"; static m39(username, username2) => "Gelesen von ${username} und ${username2}";
static m40(username) => "${username} hat ein Bild gesendet"; static m40(username) => "${username} hat eine Datei gesendet";
static m41(username) => "${username} hat einen Sticker gesendet"; static m41(username) => "${username} hat ein Bild gesendet";
static m42(username) => "${username} hat ein Video gesendet"; static m42(username) => "${username} hat einen Sticker gesendet";
static m43(username) => "${username} hat eine Audio-Datei gesendet"; static m43(username) => "${username} hat ein Video gesendet";
static m44(username) => "${username} hat den Standort geteilt"; static m44(username) => "${username} hat eine Audio-Datei gesendet";
static m45(hours12, hours24, minutes, suffix) => "${hours24}:${minutes}"; static m45(username) => "${username} hat den Standort geteilt";
static m46(username, targetName) => "${username} hat die Verbannung von ${targetName} aufgehoben"; static m46(hours12, hours24, minutes, suffix) => "${hours24}:${minutes}";
static m47(type) => "Unbekanntes Event \'${type}\'"; static m47(username, targetName) => "${username} hat die Verbannung von ${targetName} aufgehoben";
static m48(unreadEvents) => "${unreadEvents} ungelesene Nachrichten"; static m48(type) => "Unbekanntes Event \'${type}\'";
static m49(unreadEvents, unreadChats) => "${unreadEvents} ungelesene Nachrichten in ${unreadChats} Chats"; static m49(unreadEvents) => "${unreadEvents} ungelesene Nachrichten";
static m50(username, count) => "${username} und ${count} andere schreiben ..."; static m50(unreadEvents, unreadChats) => "${unreadEvents} ungelesene Nachrichten in ${unreadChats} Chats";
static m51(username, username2) => "${username} und ${username2} schreiben ..."; static m51(username, count) => "${username} und ${count} andere schreiben ...";
static m52(username) => "${username} schreibt ..."; static m52(username, username2) => "${username} und ${username2} schreiben ...";
static m53(username) => "${username} hat den Chat verlassen"; static m53(username) => "${username} schreibt ...";
static m54(username, type) => "${username} hat ${type} Event gesendet"; static m54(username) => "${username} hat den Chat verlassen";
static m55(username, type) => "${username} hat ${type} Event gesendet";
final messages = _notInlinedMessages(_notInlinedMessages); final messages = _notInlinedMessages(_notInlinedMessages);
static _notInlinedMessages(_) => <String, Function> { static _notInlinedMessages(_) => <String, Function> {
@ -285,36 +287,37 @@ class MessageLookup extends MessageLookupByLibrary {
"groupWith" : m23, "groupWith" : m23,
"hasWithdrawnTheInvitationFor" : m24, "hasWithdrawnTheInvitationFor" : m24,
"inviteContactToGroup" : m25, "inviteContactToGroup" : m25,
"invitedUser" : m26, "inviteText" : m26,
"invitedUser" : m27,
"is typing..." : MessageLookupByLibrary.simpleMessage("schreibt..."), "is typing..." : MessageLookupByLibrary.simpleMessage("schreibt..."),
"joinedTheChat" : m27, "joinedTheChat" : m28,
"kicked" : m28, "kicked" : m29,
"kickedAndBanned" : m29, "kickedAndBanned" : m30,
"loadCountMoreParticipants" : m30, "loadCountMoreParticipants" : m31,
"numberSelected" : m31, "numberSelected" : m32,
"play" : m32, "play" : m33,
"redactedAnEvent" : m33, "redactedAnEvent" : m34,
"rejectedTheInvitation" : m34, "rejectedTheInvitation" : m35,
"removedBy" : m35, "removedBy" : m36,
"seenByUser" : m36, "seenByUser" : m37,
"seenByUserAndCountOthers" : m37, "seenByUserAndCountOthers" : m38,
"seenByUserAndUser" : m38, "seenByUserAndUser" : m39,
"sentAFile" : m39, "sentAFile" : m40,
"sentAPicture" : m40, "sentAPicture" : m41,
"sentASticker" : m41, "sentASticker" : m42,
"sentAVideo" : m42, "sentAVideo" : m43,
"sentAnAudio" : m43, "sentAnAudio" : m44,
"sharedTheLocation" : m44, "sharedTheLocation" : m45,
"timeOfDay" : m45, "timeOfDay" : m46,
"title" : MessageLookupByLibrary.simpleMessage("FluffyChat"), "title" : MessageLookupByLibrary.simpleMessage("FluffyChat"),
"unbannedUser" : m46, "unbannedUser" : m47,
"unknownEvent" : m47, "unknownEvent" : m48,
"unreadMessages" : m48, "unreadMessages" : m49,
"unreadMessagesInChats" : m49, "unreadMessagesInChats" : m50,
"userAndOthersAreTyping" : m50, "userAndOthersAreTyping" : m51,
"userAndUserAreTyping" : m51, "userAndUserAreTyping" : m52,
"userIsTyping" : m52, "userIsTyping" : m53,
"userLeftTheChat" : m53, "userLeftTheChat" : m54,
"userSentUnknownEvent" : m54 "userSentUnknownEvent" : m55
}; };
} }

View File

@ -71,63 +71,65 @@ class MessageLookup extends MessageLookupByLibrary {
static m25(groupName) => "Invite contact to ${groupName}"; static m25(groupName) => "Invite contact to ${groupName}";
static m26(username, targetName) => "${username} invited ${targetName}"; static m26(username, link) => "${username} invited you to FluffyChat. \n1. Install FluffyChat: http://fluffy.chat \n2. Sign up or sign in \n3. Open the invite link: ${link}";
static m27(username) => "${username} joined the chat"; static m27(username, targetName) => "${username} invited ${targetName}";
static m28(username, targetName) => "${username} kicked ${targetName}"; static m28(username) => "${username} joined the chat";
static m29(username, targetName) => "${username} kicked and banned ${targetName}"; static m29(username, targetName) => "${username} kicked ${targetName}";
static m30(count) => "Load ${count} more participants"; static m30(username, targetName) => "${username} kicked and banned ${targetName}";
static m31(number) => "${number} selected"; static m31(count) => "Load ${count} more participants";
static m32(fileName) => "Play ${fileName}"; static m32(number) => "${number} selected";
static m33(username) => "${username} redacted an event"; static m33(fileName) => "Play ${fileName}";
static m34(username) => "${username} rejected the invitation"; static m34(username) => "${username} redacted an event";
static m35(username) => "Removed by ${username}"; static m35(username) => "${username} rejected the invitation";
static m36(username) => "Seen by ${username}"; static m36(username) => "Removed by ${username}";
static m37(username, count) => "Seen by ${username} and ${count} others"; static m37(username) => "Seen by ${username}";
static m38(username, username2) => "Seen by ${username} and ${username2}"; static m38(username, count) => "Seen by ${username} and ${count} others";
static m39(username) => "${username} sent a file"; static m39(username, username2) => "Seen by ${username} and ${username2}";
static m40(username) => "${username} sent a picture"; static m40(username) => "${username} sent a file";
static m41(username) => "${username} sent a sticker"; static m41(username) => "${username} sent a picture";
static m42(username) => "${username} sent a video"; static m42(username) => "${username} sent a sticker";
static m43(username) => "${username} sent an audio"; static m43(username) => "${username} sent a video";
static m44(username) => "${username} shared the location"; static m44(username) => "${username} sent an audio";
static m45(hours12, hours24, minutes, suffix) => "${hours12}:${minutes} ${suffix}"; static m45(username) => "${username} shared the location";
static m46(username, targetName) => "${username} unbanned ${targetName}"; static m46(hours12, hours24, minutes, suffix) => "${hours12}:${minutes} ${suffix}";
static m47(type) => "Unknown event \'${type}\'"; static m47(username, targetName) => "${username} unbanned ${targetName}";
static m48(unreadEvents) => "${unreadEvents} unread messages"; static m48(type) => "Unknown event \'${type}\'";
static m49(unreadEvents, unreadChats) => "${unreadEvents} unread messages in ${unreadChats} chats"; static m49(unreadEvents) => "${unreadEvents} unread messages";
static m50(username, count) => "${username} and ${count} others are typing..."; static m50(unreadEvents, unreadChats) => "${unreadEvents} unread messages in ${unreadChats} chats";
static m51(username, username2) => "${username} and ${username2} are typing..."; static m51(username, count) => "${username} and ${count} others are typing...";
static m52(username) => "${username} is typing..."; static m52(username, username2) => "${username} and ${username2} are typing...";
static m53(username) => "${username} left the chat"; static m53(username) => "${username} is typing...";
static m54(username, type) => "${username} sent a ${type} event"; static m54(username) => "${username} left the chat";
static m55(username, type) => "${username} sent a ${type} event";
final messages = _notInlinedMessages(_notInlinedMessages); final messages = _notInlinedMessages(_notInlinedMessages);
static _notInlinedMessages(_) => <String, Function> { static _notInlinedMessages(_) => <String, Function> {
@ -285,36 +287,37 @@ class MessageLookup extends MessageLookupByLibrary {
"groupWith" : m23, "groupWith" : m23,
"hasWithdrawnTheInvitationFor" : m24, "hasWithdrawnTheInvitationFor" : m24,
"inviteContactToGroup" : m25, "inviteContactToGroup" : m25,
"invitedUser" : m26, "inviteText" : m26,
"invitedUser" : m27,
"is typing..." : MessageLookupByLibrary.simpleMessage("is typing..."), "is typing..." : MessageLookupByLibrary.simpleMessage("is typing..."),
"joinedTheChat" : m27, "joinedTheChat" : m28,
"kicked" : m28, "kicked" : m29,
"kickedAndBanned" : m29, "kickedAndBanned" : m30,
"loadCountMoreParticipants" : m30, "loadCountMoreParticipants" : m31,
"numberSelected" : m31, "numberSelected" : m32,
"play" : m32, "play" : m33,
"redactedAnEvent" : m33, "redactedAnEvent" : m34,
"rejectedTheInvitation" : m34, "rejectedTheInvitation" : m35,
"removedBy" : m35, "removedBy" : m36,
"seenByUser" : m36, "seenByUser" : m37,
"seenByUserAndCountOthers" : m37, "seenByUserAndCountOthers" : m38,
"seenByUserAndUser" : m38, "seenByUserAndUser" : m39,
"sentAFile" : m39, "sentAFile" : m40,
"sentAPicture" : m40, "sentAPicture" : m41,
"sentASticker" : m41, "sentASticker" : m42,
"sentAVideo" : m42, "sentAVideo" : m43,
"sentAnAudio" : m43, "sentAnAudio" : m44,
"sharedTheLocation" : m44, "sharedTheLocation" : m45,
"timeOfDay" : m45, "timeOfDay" : m46,
"title" : MessageLookupByLibrary.simpleMessage("FluffyChat"), "title" : MessageLookupByLibrary.simpleMessage("FluffyChat"),
"unbannedUser" : m46, "unbannedUser" : m47,
"unknownEvent" : m47, "unknownEvent" : m48,
"unreadMessages" : m48, "unreadMessages" : m49,
"unreadMessagesInChats" : m49, "unreadMessagesInChats" : m50,
"userAndOthersAreTyping" : m50, "userAndOthersAreTyping" : m51,
"userAndUserAreTyping" : m51, "userAndUserAreTyping" : m52,
"userIsTyping" : m52, "userIsTyping" : m53,
"userLeftTheChat" : m53, "userLeftTheChat" : m54,
"userSentUnknownEvent" : m54 "userSentUnknownEvent" : m55
}; };
} }

View File

@ -211,8 +211,9 @@ class _NewPrivateChatState extends State<_NewPrivateChat> {
Icons.share, Icons.share,
size: 16, size: 16,
), ),
onTap: () => Share.share( onTap: () => Share.share(I18n.of(context).inviteText(
"https://matrix.to/#/${Matrix.of(context).client.userID}"), Matrix.of(context).client.userID,
"https://matrix.to/#/${Matrix.of(context).client.userID}")),
title: Text( title: Text(
"${I18n.of(context).yourOwnUsername}:", "${I18n.of(context).yourOwnUsername}:",
style: TextStyle( style: TextStyle(