add YOU for disappearing messages info message

pull/941/head
Ryan Zhao 2 years ago
parent e54a37ead0
commit 3efba397ab

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ ناپدید‌شدن پیام ها را خاموش کرده است";
"MESSAGE_STATE_READ" = "خوانده شد";
"MESSAGE_STATE_SENT" = "ارسال شد";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -595,3 +595,6 @@
"DISAPPERING_MESSAGES_INFO_DISABLE" = "%@ has turned off disappearing messages";
"MESSAGE_STATE_READ" = "read";
"MESSAGE_STATE_SENT" = "sent";
"YOU_DISAPPERING_MESSAGES_INFO_ENABLE" = "You have set messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_UPDATE" = "You have changed messages to disappear %@ after they have been %@";
"YOU_DISAPPERING_MESSAGES_INFO_DISABLE" = "You have turned off disappearing messages";

@ -99,13 +99,23 @@ public extension DisappearingMessagesConfiguration {
var previewText: String {
guard let senderName: String = senderName else {
// TODO: "YOU"
// Changed by this device or via synced transcript
guard isEnabled, durationSeconds > 0 else { return "YOU_DISABLED_DISAPPEARING_MESSAGES_CONFIGURATION".localized() }
guard isEnabled, durationSeconds > 0 else {
return "YOU_DISAPPERING_MESSAGES_INFO_DISABLE".localized()
}
guard isPreviousOff == true else {
return String(
format: "YOU_DISAPPERING_MESSAGES_INFO_UPDATE".localized(),
floor(durationSeconds).formatted(format: .long),
(type == .disappearAfterRead ? "MESSAGE_STATE_READ".localized() : "MESSAGE_STATE_SENT".localized())
)
}
return String(
format: "YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION".localized(),
floor(durationSeconds).formatted(format: .long)
format: "YOU_DISAPPERING_MESSAGES_INFO_ENABLE".localized(),
floor(durationSeconds).formatted(format: .long),
(type == .disappearAfterRead ? "MESSAGE_STATE_READ".localized() : "MESSAGE_STATE_SENT".localized())
)
}

Loading…
Cancel
Save