From 62af0aa9075d09cb2c26b4bd2c16846264f8facb Mon Sep 17 00:00:00 2001 From: Ryan ZHAO <> Date: Thu, 11 Apr 2024 13:37:32 +1000 Subject: [PATCH] update more localized strings --- .../Views & Modals/CallMissedTipsModal.swift | 2 +- Session/Closed Groups/EditClosedGroupVC.swift | 4 ++-- Session/Closed Groups/NewClosedGroupVC.swift | 4 ++-- .../ConversationVC+Interaction.swift | 22 +++++++++---------- Session/Conversations/ConversationVC.swift | 2 +- .../VoiceMessageRecordingView.swift | 2 +- Session/Home/HomeVC.swift | 2 +- Session/Home/New Conversation/NewDMVC.swift | 6 ++--- .../GIFs/GifPickerViewController.swift | 2 +- .../SendMediaNavigationController.swift | 4 ++-- Session/Meta/AppDelegate.swift | 2 +- .../Translations/en.lproj/Localizable.strings | 8 +++---- Session/Onboarding/DisplayNameVC.swift | 2 +- Session/Onboarding/LinkDeviceVC.swift | 4 ++-- Session/Onboarding/RestoreVC.swift | 2 +- Session/Open Groups/JoinOpenGroupVC.swift | 2 +- Session/Settings/NukeDataModal.swift | 4 ++-- .../Settings/PrivacySettingsViewModel.swift | 2 +- Session/Settings/QRCodeVC.swift | 2 +- Session/Settings/SettingsViewModel.swift | 8 +++---- Session/Shared/FullConversationCell.swift | 6 ++++- Session/Shared/ScreenLockUI.swift | 2 +- .../Shared/SessionTableViewController.swift | 2 +- .../Attachments/SignalAttachment.swift | 2 +- .../SAEScreenLockViewController.swift | 2 +- .../ShareNavController.swift | 2 +- .../General/Localization.swift | 3 +++ 27 files changed, 56 insertions(+), 49 deletions(-) diff --git a/Session/Calls/Views & Modals/CallMissedTipsModal.swift b/Session/Calls/Views & Modals/CallMissedTipsModal.swift index f4f717348..bfe42023d 100644 --- a/Session/Calls/Views & Modals/CallMissedTipsModal.swift +++ b/Session/Calls/Views & Modals/CallMissedTipsModal.swift @@ -86,7 +86,7 @@ final class CallMissedTipsModal: Modal { } override func populateContentView() { - cancelButton.setTitle("BUTTON_OK".localized(), for: .normal) + cancelButton.setTitle("okay".localized(), for: .normal) contentView.addSubview(mainStackView) tipsIconContainerView.addSubview(tipsIconImageView) diff --git a/Session/Closed Groups/EditClosedGroupVC.swift b/Session/Closed Groups/EditClosedGroupVC.swift index fe47802c8..a5b92e445 100644 --- a/Session/Closed Groups/EditClosedGroupVC.swift +++ b/Session/Closed Groups/EditClosedGroupVC.swift @@ -173,7 +173,7 @@ final class EditClosedGroupVC: BaseVC, UITableViewDataSource, UITableViewDelegat let membersLabel = UILabel() membersLabel.font = .systemFont(ofSize: Values.mediumFontSize) membersLabel.themeTextColor = .textPrimary - membersLabel.text = "GROUP_TITLE_MEMBERS".localized() + membersLabel.text = "groupMembers".localized() addMembersButton.isEnabled = self.hasContactsToAdd @@ -510,7 +510,7 @@ final class EditClosedGroupVC: BaseVC, UITableViewDataSource, UITableViewDelegat info: ConfirmationModal.Info( title: title, body: .text(message), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) diff --git a/Session/Closed Groups/NewClosedGroupVC.swift b/Session/Closed Groups/NewClosedGroupVC.swift index e1c015412..976635d96 100644 --- a/Session/Closed Groups/NewClosedGroupVC.swift +++ b/Session/Closed Groups/NewClosedGroupVC.swift @@ -307,7 +307,7 @@ final class NewClosedGroupVC: BaseVC, UITableViewDataSource, UITableViewDelegate info: ConfirmationModal.Info( title: title, body: .text(message), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) @@ -348,7 +348,7 @@ final class NewClosedGroupVC: BaseVC, UITableViewDataSource, UITableViewDelegate info: ConfirmationModal.Info( title: "GROUP_CREATION_ERROR_TITLE".localized(), body: .text("GROUP_CREATION_ERROR_MESSAGE".localized()), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) diff --git a/Session/Conversations/ConversationVC+Interaction.swift b/Session/Conversations/ConversationVC+Interaction.swift index e66d5d693..6b9ccf166 100644 --- a/Session/Conversations/ConversationVC+Interaction.swift +++ b/Session/Conversations/ConversationVC+Interaction.swift @@ -356,7 +356,7 @@ extension ConversationVC: info: ConfirmationModal.Info( title: "attachmentsErrorNotSupported".localized(), body: .text("attachmentsErrorSize".localized()), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) @@ -1718,7 +1718,7 @@ extension ConversationVC: let errorModal: ConfirmationModal = ConfirmationModal( info: ConfirmationModal.Info( title: "COMMUNITY_ERROR_GENERIC".localized(), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) @@ -1768,7 +1768,7 @@ extension ConversationVC: info: ConfirmationModal.Info( title: "COMMUNITY_ERROR_GENERIC".localized(), body: .text(error.localizedDescription), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) @@ -1824,7 +1824,7 @@ extension ConversationVC: info: ConfirmationModal.Info( title: "error".localized(), body: .text("FAILED_TO_STORE_OUTGOING_MESSAGE".localized()), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) @@ -2287,7 +2287,7 @@ extension ConversationVC: info: ConfirmationModal.Info( title: "sessionMessenger".localized(), body: .text("This will ban the selected user from this room. It won't ban them from other rooms."), - confirmTitle: "BUTTON_OK".localized(), + confirmTitle: "okay".localized(), cancelStyle: .alert_text, onConfirm: { [weak self] _ in Storage.shared @@ -2317,7 +2317,7 @@ extension ConversationVC: info: ConfirmationModal.Info( title: "error".localized(), body: .text("context_menu_ban_user_error_alert_message".localized()), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) @@ -2343,7 +2343,7 @@ extension ConversationVC: info: ConfirmationModal.Info( title: "sessionMessenger".localized(), body: .text("This will ban the selected user from this room and delete all messages sent by them. It won't ban them from other rooms or delete the messages they sent there."), - confirmTitle: "BUTTON_OK".localized(), + confirmTitle: "okay".localized(), cancelStyle: .alert_text, onConfirm: { [weak self] _ in Storage.shared @@ -2373,7 +2373,7 @@ extension ConversationVC: info: ConfirmationModal.Info( title: "error".localized(), body: .text("context_menu_ban_user_error_alert_message".localized()), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) @@ -2459,7 +2459,7 @@ extension ConversationVC: info: ConfirmationModal.Info( title: "error".localized(), body: .text("audioUnableToRecord".localized()), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) @@ -2497,7 +2497,7 @@ extension ConversationVC: info: ConfirmationModal.Info( title: "messageVoice".localized(), body: .text("messageVoiceErrorShort".localized()), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) @@ -2578,7 +2578,7 @@ extension ConversationVC: info: ConfirmationModal.Info( title: "attachmentsErrorSending".localized(), body: .text(attachment.localizedErrorDescription ?? SignalAttachment.missingDataErrorMessage), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) diff --git a/Session/Conversations/ConversationVC.swift b/Session/Conversations/ConversationVC.swift index 09ad37424..58bfe9fc9 100644 --- a/Session/Conversations/ConversationVC.swift +++ b/Session/Conversations/ConversationVC.swift @@ -1634,7 +1634,7 @@ final class ConversationVC: BaseVC, SessionUtilRespondingViewController, Convers info: ConfirmationModal.Info( title: "error".localized(), body: .text("audioUnableToPlay".localized()), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) diff --git a/Session/Conversations/Input View/VoiceMessageRecordingView.swift b/Session/Conversations/Input View/VoiceMessageRecordingView.swift index ac36581f3..6a115a9a4 100644 --- a/Session/Conversations/Input View/VoiceMessageRecordingView.swift +++ b/Session/Conversations/Input View/VoiceMessageRecordingView.swift @@ -80,7 +80,7 @@ final class VoiceMessageRecordingView: UIView { private lazy var slideToCancelLabel: UILabel = { let result: UILabel = UILabel() result.font = .systemFont(ofSize: Values.smallFontSize) - result.text = "vc_conversation_voice_message_cancel_message".localized() + result.text = "messageVoiceSlideToCancel".localized() result.themeTextColor = .textPrimary result.alpha = Values.mediumOpacity diff --git a/Session/Home/HomeVC.swift b/Session/Home/HomeVC.swift index abc18de93..fee79fa6b 100644 --- a/Session/Home/HomeVC.swift +++ b/Session/Home/HomeVC.swift @@ -758,7 +758,7 @@ final class HomeVC: BaseVC, SessionUtilRespondingViewController, UITableViewData info: ConfirmationModal.Info( title: "error".localized(), body: .text("LOAD_RECOVERY_PASSWORD_ERROR".localized()), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) diff --git a/Session/Home/New Conversation/NewDMVC.swift b/Session/Home/New Conversation/NewDMVC.swift index 922846786..15b5a0fda 100644 --- a/Session/Home/New Conversation/NewDMVC.swift +++ b/Session/Home/New Conversation/NewDMVC.swift @@ -185,7 +185,7 @@ final class NewDMVC: BaseVC, UIPageViewControllerDataSource, UIPageViewControlle info: ConfirmationModal.Info( title: "error".localized(), body: .text("DM_ERROR_DIRECT_BLINDED_ID".localized()), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text, afterClosed: onError ) @@ -198,7 +198,7 @@ final class NewDMVC: BaseVC, UIPageViewControllerDataSource, UIPageViewControlle info: ConfirmationModal.Info( title: "error".localized(), body: .text("DM_ERROR_INVALID".localized()), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text, afterClosed: onError ) @@ -245,7 +245,7 @@ final class NewDMVC: BaseVC, UIPageViewControllerDataSource, UIPageViewControlle info: ConfirmationModal.Info( title: "error".localized(), body: .text(message), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text, afterClosed: onError ) diff --git a/Session/Media Viewing & Editing/GIFs/GifPickerViewController.swift b/Session/Media Viewing & Editing/GIFs/GifPickerViewController.swift index 76ff3689f..ee9532a8c 100644 --- a/Session/Media Viewing & Editing/GIFs/GifPickerViewController.swift +++ b/Session/Media Viewing & Editing/GIFs/GifPickerViewController.swift @@ -464,7 +464,7 @@ class GifPickerViewController: OWSViewController, UISearchBarDelegate, UICollect info: ConfirmationModal.Info( title: "error".localized(), body: .text("searchEnter".localized()), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) diff --git a/Session/Media Viewing & Editing/SendMediaNavigationController.swift b/Session/Media Viewing & Editing/SendMediaNavigationController.swift index c2e840502..457e0dd0a 100644 --- a/Session/Media Viewing & Editing/SendMediaNavigationController.swift +++ b/Session/Media Viewing & Editing/SendMediaNavigationController.swift @@ -330,7 +330,7 @@ extension SendMediaNavigationController: ImagePickerGridControllerDelegate { targetView: self?.view, info: ConfirmationModal.Info( title: "IMAGE_PICKER_FAILED_TO_PROCESS_ATTACHMENTS".localized(), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) @@ -387,7 +387,7 @@ extension SendMediaNavigationController: ImagePickerGridControllerDelegate { targetView: self.view, info: ConfirmationModal.Info( title: "IMAGE_PICKER_FAILED_TO_PROCESS_ATTACHMENTS".localized(), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) diff --git a/Session/Meta/AppDelegate.swift b/Session/Meta/AppDelegate.swift index de8cf47da..e00a1bfc0 100644 --- a/Session/Meta/AppDelegate.swift +++ b/Session/Meta/AppDelegate.swift @@ -895,7 +895,7 @@ private enum StartupError: Error { return "DATABASE_STARTUP_FAILED".localized() case .databaseError(StorageError.migrationNoLongerSupported): - return "DATABASE_UNSUPPORTED_MIGRATION".localized() + return "databaseErrorUpdate".localized() case .failedToRestore: return "DATABASE_RESTORE_FAILED".localized() case .databaseError: return "DATABASE_MIGRATION_FAILED".localized() diff --git a/Session/Meta/Translations/en.lproj/Localizable.strings b/Session/Meta/Translations/en.lproj/Localizable.strings index ee045f250..935bba18d 100644 --- a/Session/Meta/Translations/en.lproj/Localizable.strings +++ b/Session/Meta/Translations/en.lproj/Localizable.strings @@ -635,23 +635,23 @@ "contentDescriptionMediaMessage" = "Media message"; "attachmentsErrorLoad" = "Error attaching file"; "document" = "Document"; +"unknown" = "Unknown"; +"databaseErrorUpdate" = "Your app database is incompatible with this version of Session. Restore your account to generate a new database and continue using Session.

Warning: Restoring will result in the loss of all messages, attachments, and account data older than two weeks."; +"okay" = "Okay"; +"messageVoiceSlideToCancel" = "Slide to Cancel"; // NOT IN THE LIST YET "APP_STARTUP_EXIT" = "Exit"; -"DATABASE_UNSUPPORTED_MIGRATION" = "You are trying to updated from a version which no longer supports upgrading\n\nIn order to continue to use session you need to restore your device\n\nWarning: Restoring your device will result in loss of any data older than two weeks"; "DATABASE_STARTUP_FAILED" = "An error occurred when opening the database\n\nYou can export your application logs to share for troubleshooting or you can try to restore your device\n\nWarning: Restoring your device will result in loss of any data older than two weeks"; "DATABASE_RESTORE_FAILED" = "An error occurred when opening the restored database\n\nYou can export your application logs to share for troubleshooting but to continue to use Session you may need to reinstall"; "APP_STARTUP_TIMEOUT" = "The app is taking a long time to start\n\nYou can continue to wait for the app to start, export your application logs to share for troubleshooting or you can try to open the app again"; -"BUTTON_OK" = "OK"; "GROUP_CREATION_PLEASE_WAIT" = "Please wait while the group is created..."; "GROUP_CREATION_ERROR_TITLE" = "Couldn't Create Group"; "GROUP_CREATION_ERROR_MESSAGE" = "Please check your internet connection and try again."; "GROUP_TITLE_FALLBACK" = "Group"; -"GROUP_TITLE_MEMBERS" = "Members"; "vc_conversation_settings_invite_button_title" = "Add Members"; "GROUP_UPDATE_ERROR_MESSAGE" = "Can't leave while adding or removing other members."; "GROUP_UPDATE_ERROR_TITLE" = "Couldn't Update Group"; -"vc_conversation_voice_message_cancel_message" = "Slide to Cancel"; "MEDIA_GALLERY_MORE_ITEMS_FORMAT" = "+%@"; "context_menu_resync" = "Resync"; "context_menu_ban_and_delete_all" = "Ban and Delete All"; diff --git a/Session/Onboarding/DisplayNameVC.swift b/Session/Onboarding/DisplayNameVC.swift index f8d68bf38..f670feec4 100644 --- a/Session/Onboarding/DisplayNameVC.swift +++ b/Session/Onboarding/DisplayNameVC.swift @@ -173,7 +173,7 @@ final class DisplayNameVC: BaseVC { info: ConfirmationModal.Info( title: title, body: .text(message), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) diff --git a/Session/Onboarding/LinkDeviceVC.swift b/Session/Onboarding/LinkDeviceVC.swift index 8daefe8cc..29f798f13 100644 --- a/Session/Onboarding/LinkDeviceVC.swift +++ b/Session/Onboarding/LinkDeviceVC.swift @@ -141,7 +141,7 @@ final class LinkDeviceVC: BaseVC, UIPageViewControllerDataSource, UIPageViewCont info: ConfirmationModal.Info( title: "recoveryPasswordErrorTitle".localized(), body: .text("recoveryPasswordErrorMessageGeneric".localized()), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text, afterClosed: onError ) @@ -302,7 +302,7 @@ private final class RecoveryPhraseVC: UIViewController { info: ConfirmationModal.Info( title: title, body: .text(message), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) diff --git a/Session/Onboarding/RestoreVC.swift b/Session/Onboarding/RestoreVC.swift index 247a7ed12..91eddc48f 100644 --- a/Session/Onboarding/RestoreVC.swift +++ b/Session/Onboarding/RestoreVC.swift @@ -184,7 +184,7 @@ final class RestoreVC: BaseVC { info: ConfirmationModal.Info( title: title, body: .text(message), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) diff --git a/Session/Open Groups/JoinOpenGroupVC.swift b/Session/Open Groups/JoinOpenGroupVC.swift index 9e7222569..ce26c0780 100644 --- a/Session/Open Groups/JoinOpenGroupVC.swift +++ b/Session/Open Groups/JoinOpenGroupVC.swift @@ -239,7 +239,7 @@ final class JoinOpenGroupVC: BaseVC, UIPageViewControllerDataSource, UIPageViewC info: ConfirmationModal.Info( title: title, body: .text(message), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text, afterClosed: onError ) diff --git a/Session/Settings/NukeDataModal.swift b/Session/Settings/NukeDataModal.swift index cb6e69276..68b1873bb 100644 --- a/Session/Settings/NukeDataModal.swift +++ b/Session/Settings/NukeDataModal.swift @@ -208,7 +208,7 @@ final class NukeDataModal: Modal { info: ConfirmationModal.Info( title: "clearDataError".localized(), body: .text(error.localizedDescription), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) @@ -244,7 +244,7 @@ final class NukeDataModal: Modal { info: ConfirmationModal.Info( title: "clearDataError".localized(), body: .text(message), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) diff --git a/Session/Settings/PrivacySettingsViewModel.swift b/Session/Settings/PrivacySettingsViewModel.swift index 73c0a9e4a..0e83d81d3 100644 --- a/Session/Settings/PrivacySettingsViewModel.swift +++ b/Session/Settings/PrivacySettingsViewModel.swift @@ -124,7 +124,7 @@ class PrivacySettingsViewModel: SessionTableViewModel, NavigationItemSource, Nav ConfirmationModal( info: ConfirmationModal.Info( title: "lockAppEnablePasscode".localized(), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ), diff --git a/Session/Settings/QRCodeVC.swift b/Session/Settings/QRCodeVC.swift index f00d9d786..9aebcdf9a 100644 --- a/Session/Settings/QRCodeVC.swift +++ b/Session/Settings/QRCodeVC.swift @@ -131,7 +131,7 @@ final class QRCodeVC : BaseVC, UIPageViewControllerDataSource, UIPageViewControl info: ConfirmationModal.Info( title: "invalid_session_id".localized(), body: .text("INVALID_SESSION_ID_MESSAGE".localized()), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text, afterClosed: onError ) diff --git a/Session/Settings/SettingsViewModel.swift b/Session/Settings/SettingsViewModel.swift index 0037043ad..ea24b0afd 100644 --- a/Session/Settings/SettingsViewModel.swift +++ b/Session/Settings/SettingsViewModel.swift @@ -180,7 +180,7 @@ class SettingsViewModel: SessionTableViewModel, NavigationItemSource, Navigatabl ConfirmationModal( info: ConfirmationModal.Info( title: "displayNameErrorDescription".localized(), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ), @@ -193,7 +193,7 @@ class SettingsViewModel: SessionTableViewModel, NavigationItemSource, Navigatabl ConfirmationModal( info: ConfirmationModal.Info( title: "displayNameErrorDescriptionShorter".localized(), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ), @@ -434,7 +434,7 @@ class SettingsViewModel: SessionTableViewModel, NavigationItemSource, Navigatabl info: ConfirmationModal.Info( title: "error".localized(), body: .text("LOAD_RECOVERY_PASSWORD_ERROR".localized()), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) @@ -613,7 +613,7 @@ class SettingsViewModel: SessionTableViewModel, NavigationItemSource, Navigatabl info: ConfirmationModal.Info( title: title, body: (message.map { .text($0) } ?? .none), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text, dismissType: .single ) diff --git a/Session/Shared/FullConversationCell.swift b/Session/Shared/FullConversationCell.swift index e001ef348..aedbc0d26 100644 --- a/Session/Shared/FullConversationCell.swift +++ b/Session/Shared/FullConversationCell.swift @@ -585,7 +585,11 @@ public final class FullConversationCell: UITableViewCell, SwipeActionOptimisticC } let previewText: String = { - if cellViewModel.interactionVariant == .infoClosedGroupCurrentUserErrorLeaving { return "group_leave_error".localized() } + if cellViewModel.interactionVariant == .infoClosedGroupCurrentUserErrorLeaving { + return "groupLeaveErrorFailed" + .put(key: "groupname", value: cellViewModel.displayName) + .localized() + } return Interaction.previewText( variant: (cellViewModel.interactionVariant ?? .standardIncoming), body: cellViewModel.interactionBody, diff --git a/Session/Shared/ScreenLockUI.swift b/Session/Shared/ScreenLockUI.swift index 4a65b1f85..0e2976fce 100644 --- a/Session/Shared/ScreenLockUI.swift +++ b/Session/Shared/ScreenLockUI.swift @@ -274,7 +274,7 @@ class ScreenLockUI { info: ConfirmationModal.Info( title: "authenticateFailed".localized(), body: .text(message), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text, afterClosed: { [weak self] in self?.ensureUI() } // After the alert, update the UI ) diff --git a/Session/Shared/SessionTableViewController.swift b/Session/Shared/SessionTableViewController.swift index fb0491008..319397a94 100644 --- a/Session/Shared/SessionTableViewController.swift +++ b/Session/Shared/SessionTableViewController.swift @@ -214,7 +214,7 @@ class SessionTableViewController: BaseVC, UITableViewDataSource, UITa receiveCompletion: { [weak self] result in switch result { case .failure(let error): - let title: String = (self?.viewModel.title ?? "unknown") + let title: String = (self?.viewModel.title ?? "unknown".localized()) // If we got an error then try to restart the stream once, otherwise log the error guard self?.dataStreamJustFailed == false else { diff --git a/SessionMessagingKit/Sending & Receiving/Attachments/SignalAttachment.swift b/SessionMessagingKit/Sending & Receiving/Attachments/SignalAttachment.swift index f6b54acc5..c85867320 100644 --- a/SessionMessagingKit/Sending & Receiving/Attachments/SignalAttachment.swift +++ b/SessionMessagingKit/Sending & Receiving/Attachments/SignalAttachment.swift @@ -338,7 +338,7 @@ public class SignalAttachment: Equatable, Hashable { } } if dataUTI == kUnknownTestAttachmentUTI { - return "unknown" + return "unknown".localized() } guard let fileExtension = MIMETypeUtil.fileExtension(forUTIType: dataUTI) else { return nil diff --git a/SessionShareExtension/SAEScreenLockViewController.swift b/SessionShareExtension/SAEScreenLockViewController.swift index 2c218924e..345be529f 100644 --- a/SessionShareExtension/SAEScreenLockViewController.swift +++ b/SessionShareExtension/SAEScreenLockViewController.swift @@ -164,7 +164,7 @@ final class SAEScreenLockViewController: ScreenLockViewController { info: ConfirmationModal.Info( title: "authenticateFailed".localized(), body: .text(message), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text, afterClosed: { [weak self] in self?.ensureUI() } // After the alert, update the UI ) diff --git a/SessionShareExtension/ShareNavController.swift b/SessionShareExtension/ShareNavController.swift index 1dc10a8d1..89906802b 100644 --- a/SessionShareExtension/ShareNavController.swift +++ b/SessionShareExtension/ShareNavController.swift @@ -246,7 +246,7 @@ final class ShareNavController: UINavigationController, ShareViewDelegate { info: ConfirmationModal.Info( title: "sessionMessenger".localized(), body: .text(error.localizedDescription), - cancelTitle: "BUTTON_OK".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text, afterClosed: { [weak self] in self?.extensionContext?.cancelRequest(withError: error) } ) diff --git a/SessionUtilitiesKit/General/Localization.swift b/SessionUtilitiesKit/General/Localization.swift index 4f00a1351..dccec2215 100644 --- a/SessionUtilitiesKit/General/Localization.swift +++ b/SessionUtilitiesKit/General/Localization.swift @@ -202,6 +202,9 @@ final public class LocalizationHelper: CustomStringConvertible { for (key, value) in replacements { localizedString = localizedString.replacingOccurrences(of: tokenize(key), with: value) } + + // Replace html tag "
" with "\n" + localizedString = localizedString.replacingOccurrences(of: "
", with: "\n") return localizedString }