adding missing strings

pull/1023/head
Ryan ZHAO 1 year ago
parent 1e7ccf6c36
commit d9a73bea95

@ -900,7 +900,7 @@ extension ConversationVC:
guard cellViewModel.variant != .infoDisappearingMessagesUpdate else {
let messageDisappearingConfig = cellViewModel.messageDisappearingConfiguration()
let expirationTimerString: String = floor(messageDisappearingConfig.durationSeconds).formatted(format: .long)
let expirationTypeString: String = (messageDisappearingConfig.type == .disappearAfterRead ? "DISAPPEARING_MESSAGE_STATE_READ".localized() : "DISAPPEARING_MESSAGE_STATE_SENT".localized())
let expirationTypeString: String = (messageDisappearingConfig.type == .disappearAfterRead ? "read".localized().lowercased() : "disappearingMessagesSent".localized().lowercased())
let modalBodyString: String = (
messageDisappearingConfig.isEnabled ?
String(
@ -910,7 +910,7 @@ extension ConversationVC:
) :
"FOLLOW_SETTING_EXPLAINATION_TURNING_OFF".localized()
)
let modalConfirmTitle: String = messageDisappearingConfig.isEnabled ? "DISAPPERING_MESSAGES_SAVE_TITLE".localized() : "CONFIRM_BUTTON_TITLE".localized()
let modalConfirmTitle: String = messageDisappearingConfig.isEnabled ? "set".localized() : "CONFIRM_BUTTON_TITLE".localized()
let confirmationModal: ConfirmationModal = ConfirmationModal(
info: ConfirmationModal.Info(
title: "FOLLOW_SETTING_TITLE".localized(),
@ -926,7 +926,7 @@ extension ConversationVC:
)
.adding(
attributes: [ .font: UIFont.boldSystemFont(ofSize: Values.smallFontSize) ],
range: (modalBodyString as NSString).range(of: "DISAPPEARING_MESSAGES_OFF".localized().lowercased())
range: (modalBodyString as NSString).range(of: "off".localized().lowercased())
)
),
accessibility: Accessibility(identifier: "Follow setting dialog"),

@ -748,7 +748,7 @@ final class ConversationVC: BaseVC, SessionUtilRespondingViewController, Convers
"conversationsEmpty".localized()
)
default: return "CONVERSATION_EMPTY_STATE".localized()
default: return "groupNoMessages".localized()
}
}(),
threadData.displayName

@ -128,7 +128,7 @@ final class InfoMessageCell: MessageCell {
)
.adding(
attributes: [ .font: UIFont.boldSystemFont(ofSize: Values.verySmallFontSize) ],
range: (body as NSString).range(of: "vc_path_device_row_title".localized())
range: (body as NSString).range(of: "onionRoutingPathYou".localized())
)
.adding(
attributes: [ .font: UIFont.boldSystemFont(ofSize: Values.verySmallFontSize) ],
@ -136,15 +136,15 @@ final class InfoMessageCell: MessageCell {
)
.adding(
attributes: [ .font: UIFont.boldSystemFont(ofSize: Values.verySmallFontSize) ],
range: (body as NSString).range(of: "DISAPPEARING_MESSAGE_STATE_READ".localized())
range: (body as NSString).range(of: "read".localized().lowercased())
)
.adding(
attributes: [ .font: UIFont.boldSystemFont(ofSize: Values.verySmallFontSize) ],
range: (body as NSString).range(of: "DISAPPEARING_MESSAGE_STATE_SENT".localized())
range: (body as NSString).range(of: "disappearingMessagesSent".localized().lowercased())
)
.adding(
attributes: [ .font: UIFont.boldSystemFont(ofSize: Values.verySmallFontSize) ],
range: (body as NSString).range(of: "DISAPPEARING_MESSAGES_OFF".localized().lowercased())
range: (body as NSString).range(of: "off".localized().lowercased())
)
if cellViewModel.canDoFollowingSetting() {

@ -63,11 +63,11 @@ class ThreadDisappearingMessagesSettingsViewModel: SessionTableViewModel, Naviga
var title: String? {
switch self {
case .type: return "DISAPPERING_MESSAGES_TYPE_TITLE".localized()
case .type: return "disappearingMessagesDeleteType".localized()
// We need to keep these although the titles of them are the same
// because we need them to trigger timer section to refresh when
// the user selects different disappearing messages type
case .timerLegacy, .timerDisappearAfterSend, .timerDisappearAfterRead: return "DISAPPERING_MESSAGES_TIMER_TITLE".localized()
case .timerLegacy, .timerDisappearAfterSend, .timerDisappearAfterRead: return "disappearingMessagesTimer".localized()
case .noteToSelf: return nil
case .group: return nil
}
@ -77,7 +77,7 @@ class ThreadDisappearingMessagesSettingsViewModel: SessionTableViewModel, Naviga
var footer: String? {
switch self {
case .group: return "DISAPPERING_MESSAGES_GROUP_WARNING_ADMIN_ONLY".localized()
case .group: return "disappearingMessagesOnlyAdmins".localized()
default: return nil
}
}
@ -85,17 +85,17 @@ class ThreadDisappearingMessagesSettingsViewModel: SessionTableViewModel, Naviga
// MARK: - Content
let title: String = "DISAPPEARING_MESSAGES".localized()
let title: String = "disappearingMessages".localized()
lazy var subtitle: String? = {
guard Features.useNewDisappearingMessagesConfig else {
return (isNoteToSelf ? nil : "DISAPPERING_MESSAGES_SUBTITLE_LEGACY".localized())
return (isNoteToSelf ? nil : "disappearingMessagesDescription".localized())
}
if threadVariant == .contact && !isNoteToSelf {
return "DISAPPERING_MESSAGES_SUBTITLE_CONTACTS".localized()
}
return "DISAPPERING_MESSAGES_SUBTITLE_GROUPS".localized()
return "disappearingMessagesDisappearAfterSendDescription".localized()
}()
lazy var footerButtonInfo: AnyPublisher<SessionButton.Info?, Never> = shouldShowConfirmButton
@ -105,7 +105,7 @@ class ThreadDisappearingMessagesSettingsViewModel: SessionTableViewModel, Naviga
return SessionButton.Info(
style: .bordered,
title: "DISAPPERING_MESSAGES_SAVE_TITLE".localized(),
title: "set".localized(),
isEnabled: true,
accessibility: Accessibility(
identifier: "Set button",
@ -178,9 +178,9 @@ class ThreadDisappearingMessagesSettingsViewModel: SessionTableViewModel, Naviga
)
),
SessionCell.Info(
id: "DISAPPERING_MESSAGES_TYPE_AFTER_READ_TITLE".localized(),
title: "DISAPPERING_MESSAGES_TYPE_AFTER_READ_TITLE".localized(),
subtitle: "DISAPPERING_MESSAGES_TYPE_AFTER_READ_DESCRIPTION".localized(),
id: "disappearingMessagesDisappearAfterRead".localized(),
title: "disappearingMessagesDisappearAfterRead".localized(),
subtitle: "disappearingMessagesDisappearAfterReadDescription".localized(),
rightAccessory: .radio(
isSelected: {
(self?.currentSelection.value.isEnabled == true) &&
@ -216,9 +216,9 @@ class ThreadDisappearingMessagesSettingsViewModel: SessionTableViewModel, Naviga
}
),
SessionCell.Info(
id: "DISAPPERING_MESSAGES_TYPE_AFTER_SEND_TITLE".localized(),
title: "DISAPPERING_MESSAGES_TYPE_AFTER_SEND_TITLE".localized(),
subtitle: "DISAPPERING_MESSAGES_TYPE_AFTER_SEND_DESCRIPTION".localized(),
id: "disappearingMessagesDisappearAfterSend".localized(),
title: "disappearingMessagesDisappearAfterSend".localized(),
subtitle: "disappearingMessagesDisappearAfterSendDescription".localized(),
rightAccessory: .radio(
isSelected: {
(self?.currentSelection.value.isEnabled == true) &&
@ -305,8 +305,8 @@ class ThreadDisappearingMessagesSettingsViewModel: SessionTableViewModel, Naviga
model: .type,
elements: [
SessionCell.Info(
id: "DISAPPEARING_MESSAGES_OFF".localized(),
title: "DISAPPEARING_MESSAGES_OFF".localized(),
id: "off".localized(),
title: "off".localized(),
rightAccessory: .radio(
isSelected: { (self?.currentSelection.value.isEnabled == false) }
),
@ -359,9 +359,9 @@ class ThreadDisappearingMessagesSettingsViewModel: SessionTableViewModel, Naviga
}
),
SessionCell.Info(
id: "DISAPPERING_MESSAGES_TYPE_AFTER_SEND_TITLE".localized(),
title: "DISAPPERING_MESSAGES_TYPE_AFTER_SEND_TITLE".localized(),
subtitle: "DISAPPERING_MESSAGES_TYPE_AFTER_SEND_DESCRIPTION".localized(),
id: "disappearingMessagesDisappearAfterSend".localized(),
title: "disappearingMessagesDisappearAfterSend".localized(),
subtitle: "disappearingMessagesDisappearAfterSendDescription".localized(),
rightAccessory: .radio(isSelected: { false }),
styling: SessionCell.StyleInfo(tintColor: .disabled),
isEnabled: false
@ -384,8 +384,8 @@ class ThreadDisappearingMessagesSettingsViewModel: SessionTableViewModel, Naviga
elements: [
(!Features.useNewDisappearingMessagesConfig ? nil :
SessionCell.Info(
id: "DISAPPEARING_MESSAGES_OFF".localized(),
title: "DISAPPEARING_MESSAGES_OFF".localized(),
id: "off".localized(),
title: "off".localized(),
rightAccessory: .radio(
isSelected: { (self?.currentSelection.value.isEnabled == false) }
),

@ -447,22 +447,24 @@ class ThreadSettingsViewModel: SessionTableViewModel, NavigationItemSource, Navi
UIImage(systemName: "timer")?
.withRenderingMode(.alwaysTemplate)
),
title: "DISAPPEARING_MESSAGES".localized(),
title: "disappearingMessages".localized(),
subtitle: {
guard current.disappearingMessagesConfig.isEnabled else {
return "off".localized()
}
guard Features.useNewDisappearingMessagesConfig else {
return String(
format: "DISAPPEARING_MESSAGES_SUBTITLE_DISAPPEAR_AFTER_LEGACY".localized(),
format: "disappearingMessagesDisappear".localized(),
"",
current.disappearingMessagesConfig.durationString
)
}
return String(
format: (current.disappearingMessagesConfig.type == .disappearAfterRead ?
"DISAPPEARING_MESSAGES_SUBTITLE_DISAPPEAR_AFTER_READ".localized() :
"DISAPPEARING_MESSAGES_SUBTITLE_DISAPPEAR_AFTER_SEND".localized()
format: "disappearingMessagesDisappear".localized(),
(current.disappearingMessagesConfig.type == .disappearAfterRead ?
"read".localized() :
"disappearingMessagesSent".localized()
),
current.disappearingMessagesConfig.durationString
)
@ -517,7 +519,7 @@ class ThreadSettingsViewModel: SessionTableViewModel, NavigationItemSource, Navi
UIImage(named: "table_ic_group_leave")?
.withRenderingMode(.alwaysTemplate)
),
title: "LEAVE_GROUP_ACTION".localized(),
title: "groupLeave".localized(),
accessibility: Accessibility(
identifier: "Leave group",
label: "Leave group"

@ -233,7 +233,8 @@ final class ConversationTitleView: UIView {
return NSAttributedString(attachment: imageAttachment)
.appending(string: " ")
.appending(string: String(
format: "DISAPPERING_MESSAGES_SUMMARY_LEGACY".localized(),
format: "disappearingMessagesDisappear".localized(),
"",
floor(config.durationSeconds).formatted(format: .short)
))
}
@ -241,10 +242,8 @@ final class ConversationTitleView: UIView {
return NSAttributedString(attachment: imageAttachment)
.appending(string: " ")
.appending(string: String(
format: (config.type == .disappearAfterRead ?
"DISAPPERING_MESSAGES_SUMMARY_READ".localized() :
"DISAPPERING_MESSAGES_SUMMARY_SEND".localized()
),
format: "disappearingMessagesDisappear".localized(),
(config.type == .disappearAfterRead ? "read".localized() : "disappearingMessagesSent".localized()),
floor(config.durationSeconds).formatted(format: .short)
))
}()

@ -65,7 +65,7 @@ final class NewConversationVC: BaseVC, ThemedNavigation, UITableViewDelegate, UI
result.font = .systemFont(ofSize: Values.mediumFontSize)
result.text = (newConversationViewModel.sectionData.isEmpty ?
"conversationsNone".localized() :
"NEW_CONVERSATION_CONTACTS_SECTION_TITLE".localized()
"contactContacts".localized()
)
result.themeTextColor = (newConversationViewModel.sectionData.isEmpty ?
.textSecondary :

@ -89,7 +89,7 @@ extension MediaInfoVC {
let fileIdTitleLabel: UILabel = {
let result = UILabel()
result.font = .boldSystemFont(ofSize: Values.mediumFontSize)
result.text = "attachmentsFileId".localized() + ":"
result.text = "attachmentsFileId".localized()
result.themeTextColor = .textPrimary
return result
@ -104,7 +104,7 @@ extension MediaInfoVC {
let fileTypeTitleLabel: UILabel = {
let result = UILabel()
result.font = .boldSystemFont(ofSize: Values.mediumFontSize)
result.text = "ATTACHMENT_INFO_FILE_TYPE".localized() + ":"
result.text = "attachmentsFileType".localized()
result.themeTextColor = .textPrimary
return result
@ -120,7 +120,7 @@ extension MediaInfoVC {
let fileSizeTitleLabel: UILabel = {
let result = UILabel()
result.font = .boldSystemFont(ofSize: Values.mediumFontSize)
result.text = "ATTACHMENT_INFO_FILE_SIZE".localized() + ":"
result.text = "attachmentsFileSize".localized()
result.themeTextColor = .textPrimary
return result
@ -137,7 +137,7 @@ extension MediaInfoVC {
let resolutionTitleLabel: UILabel = {
let result = UILabel()
result.font = .boldSystemFont(ofSize: Values.mediumFontSize)
result.text = "attachmentsResolution".localized() + ":"
result.text = "attachmentsResolution".localized()
result.themeTextColor = .textPrimary
return result
@ -153,7 +153,7 @@ extension MediaInfoVC {
let durationTitleLabel: UILabel = {
let result = UILabel()
result.font = .boldSystemFont(ofSize: Values.mediumFontSize)
result.text = "attachmentsDuration".localized() + ":"
result.text = "attachmentsDuration".localized()
result.themeTextColor = .textPrimary
return result

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -36,7 +36,7 @@ final class PNModeVC: BaseVC, OptionViewDelegate {
private lazy var apnsOptionView: OptionView = {
let result: OptionView = OptionView(
title: "notificationsFastMode".localized(),
explanation: "fast_mode_explanation".localized(),
explanation: "notificationsFastModeDescriptionIos".localized(),
delegate: self,
isRecommended: true
)

@ -103,7 +103,7 @@ public class BlockedContactsViewModel: SessionTableViewModel, NavigatableStateHo
.map { selectedContactIds in
SessionButton.Info(
style: .destructive,
title: "CONVERSATION_SETTINGS_BLOCKED_CONTACTS_UNBLOCK".localized(),
title: "blockUnblock".localized(),
isEnabled: !selectedContactIds.isEmpty,
onTap: { [weak self] in self?.unblockTapped() }
)
@ -182,7 +182,7 @@ public class BlockedContactsViewModel: SessionTableViewModel, NavigatableStateHo
guard contactNames.count > 1 else {
// Show a single users name
return String(
format: "CONVERSATION_SETTINGS_BLOCKED_CONTACTS_UNBLOCK_CONFIRMATION_TITLE_SINGLE".localized(),
format: "blockUnblockDescription".localized(),
(
contactNames.first ??
"CONVERSATION_SETTINGS_BLOCKED_CONTACTS_UNBLOCK_CONFIRMATION_TITLE_FALLBACK".localized()
@ -196,7 +196,7 @@ public class BlockedContactsViewModel: SessionTableViewModel, NavigatableStateHo
return [
String(
format: "CONVERSATION_SETTINGS_BLOCKED_CONTACTS_UNBLOCK_CONFIRMATION_TITLE_MULTIPLE_1".localized(),
format: "blockUnblockDescription".localized(),
initialNames.joined(separator: ", ")
),
String(
@ -215,7 +215,7 @@ public class BlockedContactsViewModel: SessionTableViewModel, NavigatableStateHo
return [
String(
format: "CONVERSATION_SETTINGS_BLOCKED_CONTACTS_UNBLOCK_CONFIRMATION_TITLE_MULTIPLE_1".localized(),
format: "blockUnblockDescription".localized(),
initialNames.joined(separator: ", ")
),
String(
@ -229,7 +229,7 @@ public class BlockedContactsViewModel: SessionTableViewModel, NavigatableStateHo
let confirmationModal: ConfirmationModal = ConfirmationModal(
info: ConfirmationModal.Info(
title: confirmationTitle,
confirmTitle: "CONVERSATION_SETTINGS_BLOCKED_CONTACTS_UNBLOCK_CONFIRMATION_ACTON".localized(),
confirmTitle: "blockUnblock".localized(),
confirmStyle: .danger,
cancelStyle: .alert_text
) { [weak self] _ in

@ -51,7 +51,7 @@ class ConversationSettingsViewModel: SessionTableViewModel, NavigatableStateHold
let shouldAutoPlayConsecutiveAudioMessages: Bool
}
let title: String = "CONVERSATION_SETTINGS_TITLE".localized()
let title: String = "sessionConversations".localized()
lazy var observation: TargetObservation = ObservationBuilder
.databaseObservation(self) { [weak self] db -> State in

@ -59,7 +59,7 @@ class NotificationSettingsViewModel: SessionTableViewModel, NavigatableStateHold
let previewType: Preferences.NotificationPreviewType
}
let title: String = "NOTIFICATIONS_TITLE".localized()
let title: String = "sessionNotifications".localized()
lazy var observation: TargetObservation = ObservationBuilder
.databaseObservation(self) { db -> State in
@ -88,7 +88,7 @@ class NotificationSettingsViewModel: SessionTableViewModel, NavigatableStateHold
SessionCell.Info(
id: .strategyUseFastMode,
title: "useFastMode".localized(),
subtitle: "NOTIFICATIONS_STRATEGY_FAST_MODE_DESCRIPTION".localized(),
subtitle: "notificationsFastModeDescriptionIos".localized(),
rightAccessory: .toggle(
.boolValue(
current.isUsingFullAPNs,

@ -74,7 +74,7 @@ final class NukeDataModal: Modal {
private lazy var clearDataButton: UIButton = {
let result: UIButton = Modal.createButton(
title: "modal_clear_all_data_confirm".localized(),
title: "clear".localized(),
titleColor: .danger
)
result.addTarget(self, action: #selector(clearAllData), for: UIControl.Event.touchUpInside)
@ -139,7 +139,7 @@ final class NukeDataModal: Modal {
info: ConfirmationModal.Info(
title: "clearDataAll".localized(),
body: .text("clearDeviceAndNetworkConfirm".localized()),
confirmTitle: "modal_clear_all_data_confirm".localized(),
confirmTitle: "clear".localized(),
confirmStyle: .danger,
cancelStyle: .alert_text,
dismissOnConfirm: false

@ -41,7 +41,7 @@ class PrivacySettingsViewModel: SessionTableViewModel, NavigationItemSource, Nav
var title: String? {
switch self {
case .screenSecurity: return "screenSecurity".localized()
case .messageRequests: return "PRIVACY_SECTION_MESSAGE_REQUESTS".localized()
case .messageRequests: return "sessionMessageRequests".localized()
case .readReceipts: return "readReceipts".localized()
case .typingIndicators: return "typingIndicators".localized()
case .linkPreviews: return "linkPreviews".localized()
@ -87,7 +87,7 @@ class PrivacySettingsViewModel: SessionTableViewModel, NavigationItemSource, Nav
let areCallsEnabled: Bool
}
let title: String = "PRIVACY_TITLE".localized()
let title: String = "sessionPrivacy".localized()
lazy var observation: TargetObservation = ObservationBuilder
.databaseObservation(self) { [weak self] db -> State in

@ -367,7 +367,7 @@ class SettingsViewModel: SessionTableViewModel, NavigationItemSource, Navigatabl
UIImage(named: "icon_msg")?
.withRenderingMode(.alwaysTemplate)
),
title: "CONVERSATION_SETTINGS_TITLE".localized(),
title: "sessionConversations".localized(),
onTap: {
self?.transitionToScreen(
SessionTableViewController(viewModel: ConversationSettingsViewModel())
@ -482,7 +482,7 @@ class SettingsViewModel: SessionTableViewModel, NavigationItemSource, Navigatabl
let existingImageData: Data? = ProfileManager
.profileAvatar(id: self.userSessionId)
let editProfilePictureModalInfo: ConfirmationModal.Info = ConfirmationModal.Info(
title: "profileSetDisplayPicturel".localized(),
title: "profileSetDisplayPicture".localized(),
body: .image(
placeholderData: UIImage(named: "profile_placeholder")?.pngData(),
valueData: existingImageData,
@ -494,7 +494,7 @@ class SettingsViewModel: SessionTableViewModel, NavigationItemSource, Navigatabl
),
onClick: { [weak self] in self?.showPhotoLibraryForAvatar() }
),
confirmTitle: "update_profile_modal_save".localized(),
confirmTitle: "save".localized(),
confirmEnabled: false,
cancelTitle: "remove".localized(),
cancelEnabled: (existingImageData != nil),

@ -272,10 +272,7 @@ class ScreenLockUI {
let modal: ConfirmationModal = ConfirmationModal(
targetView: screenBlockingWindow.rootViewController?.view,
info: ConfirmationModal.Info(
title: "authenticateFailed
authenticateFailed
authenticateFailed
authenticateFailed".localized(),
title: "authenticateFailed".localized(),
body: .text(message),
cancelTitle: "BUTTON_OK".localized(),
cancelStyle: .alert_text,

@ -32,7 +32,7 @@ public enum Permissions {
"modal_permission_camera".localized()
)
),
confirmTitle: "modal_permission_settings_title".localized(),
confirmTitle: "sessionSettings".localized(),
dismissOnConfirm: false
) { [weak presentingViewController] _ in
presentingViewController?.dismiss(animated: true, completion: {
@ -75,7 +75,7 @@ public enum Permissions {
"permissionsMicrophoneAccessRequired".localized()
)
),
confirmTitle: "modal_permission_settings_title".localized(),
confirmTitle: "sessionSettings".localized(),
dismissOnConfirm: false,
onConfirm: { [weak presentingViewController] _ in
presentingViewController?.dismiss(animated: true, completion: {
@ -149,7 +149,7 @@ public enum Permissions {
"modal_permission_library".localized()
)
),
confirmTitle: "modal_permission_settings_title".localized(),
confirmTitle: "sessionSettings".localized(),
dismissOnConfirm: false
) { [weak presentingViewController] _ in
presentingViewController?.dismiss(animated: true, completion: {

@ -84,7 +84,7 @@ public extension UIContextualAction {
return UIContextualAction(
title: (isUnread ?
"MARK_AS_READ".localized() :
"messageMarkRead".localized() :
"messageMarkUnread".localized()
),
icon: (isUnread ?

@ -137,13 +137,13 @@ public extension DisappearingMessagesConfiguration {
guard let senderName: String = senderName else {
guard isEnabled, durationSeconds > 0 else {
return "YOU_DISAPPEARING_MESSAGES_INFO_DISABLE".localized()
return "disappearingMessagesTurnedOffYou".localized()
}
return String(
format: "YOU_DISAPPEARING_MESSAGES_INFO_ENABLE".localized(),
format: "disappearingMessagesSetYou".localized(),
floor(durationSeconds).formatted(format: .long),
(type == .disappearAfterRead ? "DISAPPEARING_MESSAGE_STATE_READ".localized() : "DISAPPEARING_MESSAGE_STATE_SENT".localized())
(type == .disappearAfterRead ? "read".localized().lowercased() : "disappearingMessagesSent".localized().lowercased())
)
}
@ -152,13 +152,14 @@ public extension DisappearingMessagesConfiguration {
}
return String(
format: "DISAPPERING_MESSAGES_INFO_ENABLE".localized(),
format: "disappearingMessagesSet".localized(),
senderName,
floor(durationSeconds).formatted(format: .long),
(type == .disappearAfterRead ? "DISAPPEARING_MESSAGE_STATE_READ".localized() : "DISAPPEARING_MESSAGE_STATE_SENT".localized())
(type == .disappearAfterRead ? "read".localized().lowercased() : "disappearingMessagesSent".localized().lowercased())
)
}
// TODO: Remove me
private var legacyPreviewText: String {
guard let senderName: String = senderName else {
// Changed by this device or via synced transcript

@ -71,27 +71,27 @@ public struct RecipientState: Codable, Equatable, FetchableRecord, PersistableRe
}
public func statusIconInfo(variant: Interaction.Variant, hasAtLeastOneReadReceipt: Bool) -> (image: UIImage?, text: String?, themeTintColor: ThemeValue) {
guard variant == .standardOutgoing else { return (nil, "MESSAGE_DELIVERY_STATUS_READ".localized(), .messageBubble_deliveryStatus) }
guard variant == .standardOutgoing else { return (nil, "read".localized(), .messageBubble_deliveryStatus) }
switch (self, hasAtLeastOneReadReceipt) {
case (.sending, _):
return (
UIImage(systemName: "ellipsis.circle"),
"MESSAGE_DELIVERY_STATUS_SENDING".localized(),
"sending".localized(),
.messageBubble_deliveryStatus
)
case (.sent, false), (.skipped, _):
return (
UIImage(systemName: "checkmark.circle"),
"MESSAGE_DELIVERY_STATUS_SENT".localized(),
"disappearingMessagesSent".localized(),
.messageBubble_deliveryStatus
)
case (.sent, true):
return (
UIImage(systemName: "eye.fill"),
"MESSAGE_DELIVERY_STATUS_READ".localized(),
"read".localized(),
.messageBubble_deliveryStatus
)

@ -41,23 +41,23 @@ extension SignalAttachmentError: LocalizedError {
public var errorDescription: String? {
switch self {
case .missingData:
return NSLocalizedString("ATTACHMENT_ERROR_MISSING_DATA", comment: "Attachment error message for attachments without any data")
return "ATTACHMENT_ERROR_MISSING_DATA".localized()
case .fileSizeTooLarge:
return NSLocalizedString("attachmentsErrorSize", comment: "Attachment error message for attachments whose data exceed file size limits")
return "attachmentsErrorSize".localized()
case .invalidData:
return NSLocalizedString("attachmentsErrorNotSupported", comment: "Attachment error message for attachments with invalid data")
return "attachmentsErrorNotSupported".localized()
case .couldNotParseImage:
return NSLocalizedString("ATTACHMENT_ERROR_COULD_NOT_PARSE_IMAGE", comment: "Attachment error message for image attachments which cannot be parsed")
return "ATTACHMENT_ERROR_COULD_NOT_PARSE_IMAGE".localized()
case .couldNotConvertToJpeg:
return NSLocalizedString("ATTACHMENT_ERROR_COULD_NOT_CONVERT_TO_JPEG", comment: "Attachment error message for image attachments which could not be converted to JPEG")
return "ATTACHMENT_ERROR_COULD_NOT_CONVERT_TO_JPEG".localized()
case .invalidFileFormat:
return NSLocalizedString("attachmentsErrorNotSupported", comment: "Attachment error message for attachments with an invalid file format")
return "attachmentsErrorNotSupported".localized()
case .couldNotConvertToMpeg4:
return NSLocalizedString("ATTACHMENT_ERROR_COULD_NOT_CONVERT_TO_MP4", comment: "Attachment error message for video attachments which could not be converted to MP4")
return "ATTACHMENT_ERROR_COULD_NOT_CONVERT_TO_MP4".localized()
case .couldNotRemoveMetadata:
return NSLocalizedString("attachmentsImageErrorMetadata", comment: "Attachment error message for image attachments in which metadata could not be removed")
return "attachmentsImageErrorMetadata".localized()
case .couldNotResizeImage:
return NSLocalizedString("ATTACHMENT_ERROR_COULD_NOT_RESIZE_IMAGE", comment: "Attachment error message for image attachments which could not be resized")
return "ATTACHMENT_ERROR_COULD_NOT_RESIZE_IMAGE".localized()
}
}
}

@ -1223,8 +1223,8 @@ public extension SessionThreadViewModel {
static func standardQuotes(_ term: String) -> String {
// Apple like to use the special '""' quote characters when typing so replace them with normal ones
return term
.replacingOccurrences(of: """, with: "\"")
.replacingOccurrences(of: """, with: "\"")
.replacingOccurrences(of: "", with: "\"")
.replacingOccurrences(of: "", with: "\"")
}
static func pattern(_ db: Database, searchTerm: String) throws -> FTS5Pattern {

@ -162,10 +162,7 @@ final class SAEScreenLockViewController: ScreenLockViewController {
let modal: ConfirmationModal = ConfirmationModal(
targetView: self.view,
info: ConfirmationModal.Info(
title: "authenticateFailed
authenticateFailed
authenticateFailed
authenticateFailed".localized(),
title: "authenticateFailed".localized(),
body: .text(message),
cancelTitle: "BUTTON_OK".localized(),
cancelStyle: .alert_text,

@ -172,10 +172,7 @@ public class ScreenLock {
switch laError.code {
case .authenticationFailed:
Logger.error("local authentication error: authenticationFailed.")
return .failure(error: "authenticateFailed
authenticateFailed
authenticateFailed
authenticateFailed".localized())
return .failure(error: "authenticateFailed".localized())
case .userCancel, .userFallback, .systemCancel, .appCancel:
Logger.info("local authentication cancelled.")

Loading…
Cancel
Save