From 1dca577ca81063af279f568ca5a57df2d321af5e Mon Sep 17 00:00:00 2001
From: JRoberts <8711996+jr-simplex@users.noreply.github.com>
Date: Sat, 22 Oct 2022 14:23:23 +0400
Subject: [PATCH] mobile: invited via group link chat item (#1239)
---
.../java/chat/simplex/app/model/ChatModel.kt | 3 +++
.../app/src/main/res/values-de/strings.xml | 1 +
.../app/src/main/res/values-ru/strings.xml | 1 +
.../app/src/main/res/values/strings.xml | 1 +
.../de.xcloc/Localized Contents/de.xliff | 20 +++++++++----------
.../en.xcloc/Localized Contents/en.xliff | 20 +++++++++----------
.../ru.xcloc/Localized Contents/ru.xliff | 20 +++++++++----------
apps/ios/SimpleXChat/ChatTypes.swift | 3 +++
apps/ios/de.lproj/Localizable.strings | 12 +++++------
apps/ios/ru.lproj/Localizable.strings | 12 +++++------
10 files changed, 51 insertions(+), 42 deletions(-)
diff --git a/apps/android/app/src/main/java/chat/simplex/app/model/ChatModel.kt b/apps/android/app/src/main/java/chat/simplex/app/model/ChatModel.kt
index 61edae444..083de8548 100644
--- a/apps/android/app/src/main/java/chat/simplex/app/model/ChatModel.kt
+++ b/apps/android/app/src/main/java/chat/simplex/app/model/ChatModel.kt
@@ -1040,6 +1040,7 @@ data class ChatItem (
is RcvGroupEvent.MemberRole -> true
is RcvGroupEvent.UserRole -> false
is RcvGroupEvent.MemberDeleted -> false
+ is RcvGroupEvent.InvitedViaGroupLink -> false
}
is CIContent.SndGroupEventContent -> true
else -> false
@@ -1547,6 +1548,7 @@ sealed class RcvGroupEvent() {
@Serializable @SerialName("userDeleted") class UserDeleted(): RcvGroupEvent()
@Serializable @SerialName("groupDeleted") class GroupDeleted(): RcvGroupEvent()
@Serializable @SerialName("groupUpdated") class GroupUpdated(val groupProfile: GroupProfile): RcvGroupEvent()
+ @Serializable @SerialName("invitedViaGroupLink") class InvitedViaGroupLink(): RcvGroupEvent()
val text: String get() = when (this) {
is MemberAdded -> String.format(generalGetString(R.string.rcv_group_event_member_added), profile.profileViewName)
@@ -1558,6 +1560,7 @@ sealed class RcvGroupEvent() {
is UserDeleted -> generalGetString(R.string.rcv_group_event_user_deleted)
is GroupDeleted -> generalGetString(R.string.rcv_group_event_group_deleted)
is GroupUpdated -> generalGetString(R.string.rcv_group_event_updated_group_profile)
+ is InvitedViaGroupLink -> generalGetString(R.string.rcv_group_event_invited_via_your_group_link)
}
}
diff --git a/apps/android/app/src/main/res/values-de/strings.xml b/apps/android/app/src/main/res/values-de/strings.xml
index 98c0bd4a5..85a72f333 100644
--- a/apps/android/app/src/main/res/values-de/strings.xml
+++ b/apps/android/app/src/main/res/values-de/strings.xml
@@ -713,6 +713,7 @@
hat Sie entferntGruppe gelöschtaktualisiertes Gruppenprofil
+ ***invited via your group linkSie haben %1$s entfernt.Sie haben verlassenGruppenprofil aktualisiert
diff --git a/apps/android/app/src/main/res/values-ru/strings.xml b/apps/android/app/src/main/res/values-ru/strings.xml
index d7f8a27c6..79bea5718 100644
--- a/apps/android/app/src/main/res/values-ru/strings.xml
+++ b/apps/android/app/src/main/res/values-ru/strings.xml
@@ -713,6 +713,7 @@
удалил(а) вас из группыудалил(а) группуобновил(а) профиль группы
+ приглашен(а) через вашу ссылку группывы удалили %1$sвы покинули группупрофиль группы обновлен
diff --git a/apps/android/app/src/main/res/values/strings.xml b/apps/android/app/src/main/res/values/strings.xml
index 02bde2e1b..670f22860 100644
--- a/apps/android/app/src/main/res/values/strings.xml
+++ b/apps/android/app/src/main/res/values/strings.xml
@@ -713,6 +713,7 @@
removed youdeleted groupupdated group profile
+ invited via your group linkyou removed %1$syou leftgroup profile updated
diff --git a/apps/ios/SimpleX Localizations/de.xcloc/Localized Contents/de.xliff b/apps/ios/SimpleX Localizations/de.xcloc/Localized Contents/de.xliff
index a2fd55db9..178324f9b 100644
--- a/apps/ios/SimpleX Localizations/de.xcloc/Localized Contents/de.xliff
+++ b/apps/ios/SimpleX Localizations/de.xcloc/Localized Contents/de.xliff
@@ -328,11 +328,6 @@
AnrufeNo comment provided by engineer.
-
- Can't delete contact!
- Der Kontakt kann nicht gelöscht werden!
- No comment provided by engineer.
- Can't invite contact!Kontakt kann nicht eingeladen werden!
@@ -538,11 +533,6 @@
VerbindungszeitüberschreitungNo comment provided by engineer.
-
- Contact %@ cannot be deleted, they are a member of the group(s) %@.
- Der Kontakt mit %@ kann nicht gelöscht werden, da er Mitglied einer oder mehrerer dieser Gruppen ist %@.
- No comment provided by engineer.
- Contact already existsDer Kontakt ist bereits vorhanden
@@ -2447,6 +2437,11 @@ Bitten Sie Ihren Kontakt darum einen weiteren Verbindungs-Link zu erzeugen, um s
Stummschaltung aufhebenNo comment provided by engineer.
+
+ Unread
+ ***Unread
+ No comment provided by engineer.
+ UpdateAktualisieren
@@ -3036,6 +3031,11 @@ SimpleX-Server können Ihr Profil nicht einsehen.
Für eine Verbindung eingeladenchat list item title
+
+ invited via your group link
+ ***invited via your group link
+ rcv group event chat item
+ italickursiv
diff --git a/apps/ios/SimpleX Localizations/en.xcloc/Localized Contents/en.xliff b/apps/ios/SimpleX Localizations/en.xcloc/Localized Contents/en.xliff
index 171468155..506423baa 100644
--- a/apps/ios/SimpleX Localizations/en.xcloc/Localized Contents/en.xliff
+++ b/apps/ios/SimpleX Localizations/en.xcloc/Localized Contents/en.xliff
@@ -328,11 +328,6 @@
CallsNo comment provided by engineer.
-
- Can't delete contact!
- Can't delete contact!
- No comment provided by engineer.
- Can't invite contact!Can't invite contact!
@@ -538,11 +533,6 @@
Connection timeoutNo comment provided by engineer.
-
- Contact %@ cannot be deleted, they are a member of the group(s) %@.
- Contact %@ cannot be deleted, they are a member of the group(s) %@.
- No comment provided by engineer.
- Contact already existsContact already exists
@@ -2447,6 +2437,11 @@ To connect, please ask your contact to create another connection link and check
UnmuteNo comment provided by engineer.
+
+ Unread
+ Unread
+ No comment provided by engineer.
+ UpdateUpdate
@@ -3036,6 +3031,11 @@ SimpleX servers cannot see your profile.
invited to connectchat list item title
+
+ invited via your group link
+ invited via your group link
+ rcv group event chat item
+ italicitalic
diff --git a/apps/ios/SimpleX Localizations/ru.xcloc/Localized Contents/ru.xliff b/apps/ios/SimpleX Localizations/ru.xcloc/Localized Contents/ru.xliff
index 93a31426f..3a64b907c 100644
--- a/apps/ios/SimpleX Localizations/ru.xcloc/Localized Contents/ru.xliff
+++ b/apps/ios/SimpleX Localizations/ru.xcloc/Localized Contents/ru.xliff
@@ -328,11 +328,6 @@
ЗвонкиNo comment provided by engineer.
-
- Can't delete contact!
- Невозможно удалить контакт!
- No comment provided by engineer.
- Can't invite contact!Нельзя пригласить контакт!
@@ -538,11 +533,6 @@
Превышено время соединенияNo comment provided by engineer.
-
- Contact %@ cannot be deleted, they are a member of the group(s) %@.
- Контакт %@ не может быть удален, так как является членом групп(ы) %@.
- No comment provided by engineer.
- Contact already existsСуществующий контакт
@@ -2447,6 +2437,11 @@ To connect, please ask your contact to create another connection link and check
УведомлятьNo comment provided by engineer.
+
+ Unread
+ Не прочитано
+ No comment provided by engineer.
+ UpdateОбновить
@@ -3036,6 +3031,11 @@ SimpleX серверы не могут получить доступ к ваше
приглашениеchat list item title
+
+ invited via your group link
+ приглашен(а) через вашу ссылку группы
+ rcv group event chat item
+ italicкурсив
diff --git a/apps/ios/SimpleXChat/ChatTypes.swift b/apps/ios/SimpleXChat/ChatTypes.swift
index 38edb6033..cef37098d 100644
--- a/apps/ios/SimpleXChat/ChatTypes.swift
+++ b/apps/ios/SimpleXChat/ChatTypes.swift
@@ -915,6 +915,7 @@ public struct ChatItem: Identifiable, Decodable {
case .memberAdded: return false
case .memberLeft: return false
case .memberDeleted: return false
+ case .invitedViaGroupLink: return false
}
case .sndGroupEvent: return true
default: return false
@@ -1448,6 +1449,7 @@ public enum RcvGroupEvent: Decodable {
case userDeleted
case groupDeleted
case groupUpdated(groupProfile: GroupProfile)
+ case invitedViaGroupLink
var text: String {
switch self {
@@ -1464,6 +1466,7 @@ public enum RcvGroupEvent: Decodable {
case .userDeleted: return NSLocalizedString("removed you", comment: "rcv group event chat item")
case .groupDeleted: return NSLocalizedString("deleted group", comment: "rcv group event chat item")
case .groupUpdated: return NSLocalizedString("updated group profile", comment: "rcv group event chat item")
+ case .invitedViaGroupLink: return NSLocalizedString("invited via your group link", comment: "rcv group event chat item")
}
}
}
diff --git a/apps/ios/de.lproj/Localizable.strings b/apps/ios/de.lproj/Localizable.strings
index 4a62cf8d0..41a134710 100644
--- a/apps/ios/de.lproj/Localizable.strings
+++ b/apps/ios/de.lproj/Localizable.strings
@@ -233,9 +233,6 @@
/* No comment provided by engineer. */
"Calls" = "Anrufe";
-/* No comment provided by engineer. */
-"Can't delete contact!" = "Der Kontakt kann nicht gelöscht werden!";
-
/* No comment provided by engineer. */
"Can't invite contact!" = "Kontakt kann nicht eingeladen werden!";
@@ -398,9 +395,6 @@
/* connection information */
"connection:%@" = "Verbindung:%@";
-/* No comment provided by engineer. */
-"Contact %@ cannot be deleted, they are a member of the group(s) %@." = "Der Kontakt mit %@ kann nicht gelöscht werden, da er Mitglied einer oder mehrerer dieser Gruppen ist %@.";
-
/* No comment provided by engineer. */
"Contact already exists" = "Der Kontakt ist bereits vorhanden";
@@ -983,6 +977,9 @@
/* chat list item title */
"invited to connect" = "Für eine Verbindung eingeladen";
+/* rcv group event chat item */
+"invited via your group link" = "***invited via your group link";
+
/* No comment provided by engineer. */
"iOS Keychain is used to securely store passphrase - it allows receiving push notifications." = "Für die sichere Speicherung des Passworts wird der iOS Schlüsselbund verwendet - dies erlaubt den Empfang von Push-Benachrichtigungen.";
@@ -1674,6 +1671,9 @@
/* No comment provided by engineer. */
"Unmute" = "Stummschaltung aufheben";
+/* No comment provided by engineer. */
+"Unread" = "***Unread";
+
/* No comment provided by engineer. */
"Update" = "Aktualisieren";
diff --git a/apps/ios/ru.lproj/Localizable.strings b/apps/ios/ru.lproj/Localizable.strings
index 9dae0cfaf..81681901d 100644
--- a/apps/ios/ru.lproj/Localizable.strings
+++ b/apps/ios/ru.lproj/Localizable.strings
@@ -233,9 +233,6 @@
/* No comment provided by engineer. */
"Calls" = "Звонки";
-/* No comment provided by engineer. */
-"Can't delete contact!" = "Невозможно удалить контакт!";
-
/* No comment provided by engineer. */
"Can't invite contact!" = "Нельзя пригласить контакт!";
@@ -398,9 +395,6 @@
/* connection information */
"connection:%@" = "connection:%@";
-/* No comment provided by engineer. */
-"Contact %@ cannot be deleted, they are a member of the group(s) %@." = "Контакт %@ не может быть удален, так как является членом групп(ы) %@.";
-
/* No comment provided by engineer. */
"Contact already exists" = "Существующий контакт";
@@ -983,6 +977,9 @@
/* chat list item title */
"invited to connect" = "приглашение";
+/* rcv group event chat item */
+"invited via your group link" = "приглашен(а) через вашу ссылку группы";
+
/* No comment provided by engineer. */
"iOS Keychain is used to securely store passphrase - it allows receiving push notifications." = "iOS Keychain используется для безопасного хранения пароля - это позволяет получать мгновенные уведомления.";
@@ -1674,6 +1671,9 @@
/* No comment provided by engineer. */
"Unmute" = "Уведомлять";
+/* No comment provided by engineer. */
+"Unread" = "Не прочитано";
+
/* No comment provided by engineer. */
"Update" = "Обновить";