update more localized strings

pull/1023/head
Ryan ZHAO 1 year ago
parent cdb9282313
commit 62af0aa907

@ -86,7 +86,7 @@ final class CallMissedTipsModal: Modal {
} }
override func populateContentView() { override func populateContentView() {
cancelButton.setTitle("BUTTON_OK".localized(), for: .normal) cancelButton.setTitle("okay".localized(), for: .normal)
contentView.addSubview(mainStackView) contentView.addSubview(mainStackView)
tipsIconContainerView.addSubview(tipsIconImageView) tipsIconContainerView.addSubview(tipsIconImageView)

@ -173,7 +173,7 @@ final class EditClosedGroupVC: BaseVC, UITableViewDataSource, UITableViewDelegat
let membersLabel = UILabel() let membersLabel = UILabel()
membersLabel.font = .systemFont(ofSize: Values.mediumFontSize) membersLabel.font = .systemFont(ofSize: Values.mediumFontSize)
membersLabel.themeTextColor = .textPrimary membersLabel.themeTextColor = .textPrimary
membersLabel.text = "GROUP_TITLE_MEMBERS".localized() membersLabel.text = "groupMembers".localized()
addMembersButton.isEnabled = self.hasContactsToAdd addMembersButton.isEnabled = self.hasContactsToAdd
@ -510,7 +510,7 @@ final class EditClosedGroupVC: BaseVC, UITableViewDataSource, UITableViewDelegat
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: title, title: title,
body: .text(message), body: .text(message),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )

@ -307,7 +307,7 @@ final class NewClosedGroupVC: BaseVC, UITableViewDataSource, UITableViewDelegate
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: title, title: title,
body: .text(message), body: .text(message),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
@ -348,7 +348,7 @@ final class NewClosedGroupVC: BaseVC, UITableViewDataSource, UITableViewDelegate
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "GROUP_CREATION_ERROR_TITLE".localized(), title: "GROUP_CREATION_ERROR_TITLE".localized(),
body: .text("GROUP_CREATION_ERROR_MESSAGE".localized()), body: .text("GROUP_CREATION_ERROR_MESSAGE".localized()),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )

@ -356,7 +356,7 @@ extension ConversationVC:
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "attachmentsErrorNotSupported".localized(), title: "attachmentsErrorNotSupported".localized(),
body: .text("attachmentsErrorSize".localized()), body: .text("attachmentsErrorSize".localized()),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )
@ -1718,7 +1718,7 @@ extension ConversationVC:
let errorModal: ConfirmationModal = ConfirmationModal( let errorModal: ConfirmationModal = ConfirmationModal(
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "COMMUNITY_ERROR_GENERIC".localized(), title: "COMMUNITY_ERROR_GENERIC".localized(),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )
@ -1768,7 +1768,7 @@ extension ConversationVC:
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "COMMUNITY_ERROR_GENERIC".localized(), title: "COMMUNITY_ERROR_GENERIC".localized(),
body: .text(error.localizedDescription), body: .text(error.localizedDescription),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )
@ -1824,7 +1824,7 @@ extension ConversationVC:
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "error".localized(), title: "error".localized(),
body: .text("FAILED_TO_STORE_OUTGOING_MESSAGE".localized()), body: .text("FAILED_TO_STORE_OUTGOING_MESSAGE".localized()),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )
@ -2287,7 +2287,7 @@ extension ConversationVC:
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "sessionMessenger".localized(), title: "sessionMessenger".localized(),
body: .text("This will ban the selected user from this room. It won't ban them from other rooms."), 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, cancelStyle: .alert_text,
onConfirm: { [weak self] _ in onConfirm: { [weak self] _ in
Storage.shared Storage.shared
@ -2317,7 +2317,7 @@ extension ConversationVC:
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "error".localized(), title: "error".localized(),
body: .text("context_menu_ban_user_error_alert_message".localized()), body: .text("context_menu_ban_user_error_alert_message".localized()),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )
@ -2343,7 +2343,7 @@ extension ConversationVC:
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "sessionMessenger".localized(), 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."), 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, cancelStyle: .alert_text,
onConfirm: { [weak self] _ in onConfirm: { [weak self] _ in
Storage.shared Storage.shared
@ -2373,7 +2373,7 @@ extension ConversationVC:
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "error".localized(), title: "error".localized(),
body: .text("context_menu_ban_user_error_alert_message".localized()), body: .text("context_menu_ban_user_error_alert_message".localized()),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )
@ -2459,7 +2459,7 @@ extension ConversationVC:
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "error".localized(), title: "error".localized(),
body: .text("audioUnableToRecord".localized()), body: .text("audioUnableToRecord".localized()),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )
@ -2497,7 +2497,7 @@ extension ConversationVC:
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "messageVoice".localized(), title: "messageVoice".localized(),
body: .text("messageVoiceErrorShort".localized()), body: .text("messageVoiceErrorShort".localized()),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )
@ -2578,7 +2578,7 @@ extension ConversationVC:
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "attachmentsErrorSending".localized(), title: "attachmentsErrorSending".localized(),
body: .text(attachment.localizedErrorDescription ?? SignalAttachment.missingDataErrorMessage), body: .text(attachment.localizedErrorDescription ?? SignalAttachment.missingDataErrorMessage),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )

@ -1634,7 +1634,7 @@ final class ConversationVC: BaseVC, SessionUtilRespondingViewController, Convers
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "error".localized(), title: "error".localized(),
body: .text("audioUnableToPlay".localized()), body: .text("audioUnableToPlay".localized()),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )

@ -80,7 +80,7 @@ final class VoiceMessageRecordingView: UIView {
private lazy var slideToCancelLabel: UILabel = { private lazy var slideToCancelLabel: UILabel = {
let result: UILabel = UILabel() let result: UILabel = UILabel()
result.font = .systemFont(ofSize: Values.smallFontSize) result.font = .systemFont(ofSize: Values.smallFontSize)
result.text = "vc_conversation_voice_message_cancel_message".localized() result.text = "messageVoiceSlideToCancel".localized()
result.themeTextColor = .textPrimary result.themeTextColor = .textPrimary
result.alpha = Values.mediumOpacity result.alpha = Values.mediumOpacity

@ -758,7 +758,7 @@ final class HomeVC: BaseVC, SessionUtilRespondingViewController, UITableViewData
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "error".localized(), title: "error".localized(),
body: .text("LOAD_RECOVERY_PASSWORD_ERROR".localized()), body: .text("LOAD_RECOVERY_PASSWORD_ERROR".localized()),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )

@ -185,7 +185,7 @@ final class NewDMVC: BaseVC, UIPageViewControllerDataSource, UIPageViewControlle
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "error".localized(), title: "error".localized(),
body: .text("DM_ERROR_DIRECT_BLINDED_ID".localized()), body: .text("DM_ERROR_DIRECT_BLINDED_ID".localized()),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text, cancelStyle: .alert_text,
afterClosed: onError afterClosed: onError
) )
@ -198,7 +198,7 @@ final class NewDMVC: BaseVC, UIPageViewControllerDataSource, UIPageViewControlle
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "error".localized(), title: "error".localized(),
body: .text("DM_ERROR_INVALID".localized()), body: .text("DM_ERROR_INVALID".localized()),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text, cancelStyle: .alert_text,
afterClosed: onError afterClosed: onError
) )
@ -245,7 +245,7 @@ final class NewDMVC: BaseVC, UIPageViewControllerDataSource, UIPageViewControlle
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "error".localized(), title: "error".localized(),
body: .text(message), body: .text(message),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text, cancelStyle: .alert_text,
afterClosed: onError afterClosed: onError
) )

@ -464,7 +464,7 @@ class GifPickerViewController: OWSViewController, UISearchBarDelegate, UICollect
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "error".localized(), title: "error".localized(),
body: .text("searchEnter".localized()), body: .text("searchEnter".localized()),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )

@ -330,7 +330,7 @@ extension SendMediaNavigationController: ImagePickerGridControllerDelegate {
targetView: self?.view, targetView: self?.view,
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "IMAGE_PICKER_FAILED_TO_PROCESS_ATTACHMENTS".localized(), title: "IMAGE_PICKER_FAILED_TO_PROCESS_ATTACHMENTS".localized(),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )
@ -387,7 +387,7 @@ extension SendMediaNavigationController: ImagePickerGridControllerDelegate {
targetView: self.view, targetView: self.view,
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "IMAGE_PICKER_FAILED_TO_PROCESS_ATTACHMENTS".localized(), title: "IMAGE_PICKER_FAILED_TO_PROCESS_ATTACHMENTS".localized(),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )

@ -895,7 +895,7 @@ private enum StartupError: Error {
return "DATABASE_STARTUP_FAILED".localized() return "DATABASE_STARTUP_FAILED".localized()
case .databaseError(StorageError.migrationNoLongerSupported): case .databaseError(StorageError.migrationNoLongerSupported):
return "DATABASE_UNSUPPORTED_MIGRATION".localized() return "databaseErrorUpdate".localized()
case .failedToRestore: return "DATABASE_RESTORE_FAILED".localized() case .failedToRestore: return "DATABASE_RESTORE_FAILED".localized()
case .databaseError: return "DATABASE_MIGRATION_FAILED".localized() case .databaseError: return "DATABASE_MIGRATION_FAILED".localized()

@ -635,23 +635,23 @@
"contentDescriptionMediaMessage" = "Media message"; "contentDescriptionMediaMessage" = "Media message";
"attachmentsErrorLoad" = "Error attaching file"; "attachmentsErrorLoad" = "Error attaching file";
"document" = "Document"; "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.<br/><br/>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 // NOT IN THE LIST YET
"APP_STARTUP_EXIT" = "Exit"; "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_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"; "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"; "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_PLEASE_WAIT" = "Please wait while the group is created...";
"GROUP_CREATION_ERROR_TITLE" = "Couldn't Create Group"; "GROUP_CREATION_ERROR_TITLE" = "Couldn't Create Group";
"GROUP_CREATION_ERROR_MESSAGE" = "Please check your internet connection and try again."; "GROUP_CREATION_ERROR_MESSAGE" = "Please check your internet connection and try again.";
"GROUP_TITLE_FALLBACK" = "Group"; "GROUP_TITLE_FALLBACK" = "Group";
"GROUP_TITLE_MEMBERS" = "Members";
"vc_conversation_settings_invite_button_title" = "Add 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_MESSAGE" = "Can't leave while adding or removing other members.";
"GROUP_UPDATE_ERROR_TITLE" = "Couldn't Update Group"; "GROUP_UPDATE_ERROR_TITLE" = "Couldn't Update Group";
"vc_conversation_voice_message_cancel_message" = "Slide to Cancel";
"MEDIA_GALLERY_MORE_ITEMS_FORMAT" = "+%@"; "MEDIA_GALLERY_MORE_ITEMS_FORMAT" = "+%@";
"context_menu_resync" = "Resync"; "context_menu_resync" = "Resync";
"context_menu_ban_and_delete_all" = "Ban and Delete All"; "context_menu_ban_and_delete_all" = "Ban and Delete All";

@ -173,7 +173,7 @@ final class DisplayNameVC: BaseVC {
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: title, title: title,
body: .text(message), body: .text(message),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )

@ -141,7 +141,7 @@ final class LinkDeviceVC: BaseVC, UIPageViewControllerDataSource, UIPageViewCont
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "recoveryPasswordErrorTitle".localized(), title: "recoveryPasswordErrorTitle".localized(),
body: .text("recoveryPasswordErrorMessageGeneric".localized()), body: .text("recoveryPasswordErrorMessageGeneric".localized()),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text, cancelStyle: .alert_text,
afterClosed: onError afterClosed: onError
) )
@ -302,7 +302,7 @@ private final class RecoveryPhraseVC: UIViewController {
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: title, title: title,
body: .text(message), body: .text(message),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )

@ -184,7 +184,7 @@ final class RestoreVC: BaseVC {
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: title, title: title,
body: .text(message), body: .text(message),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )

@ -239,7 +239,7 @@ final class JoinOpenGroupVC: BaseVC, UIPageViewControllerDataSource, UIPageViewC
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: title, title: title,
body: .text(message), body: .text(message),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text, cancelStyle: .alert_text,
afterClosed: onError afterClosed: onError
) )

@ -208,7 +208,7 @@ final class NukeDataModal: Modal {
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "clearDataError".localized(), title: "clearDataError".localized(),
body: .text(error.localizedDescription), body: .text(error.localizedDescription),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )
@ -244,7 +244,7 @@ final class NukeDataModal: Modal {
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "clearDataError".localized(), title: "clearDataError".localized(),
body: .text(message), body: .text(message),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )

@ -124,7 +124,7 @@ class PrivacySettingsViewModel: SessionTableViewModel, NavigationItemSource, Nav
ConfirmationModal( ConfirmationModal(
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "lockAppEnablePasscode".localized(), title: "lockAppEnablePasscode".localized(),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
), ),

@ -131,7 +131,7 @@ final class QRCodeVC : BaseVC, UIPageViewControllerDataSource, UIPageViewControl
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "invalid_session_id".localized(), title: "invalid_session_id".localized(),
body: .text("INVALID_SESSION_ID_MESSAGE".localized()), body: .text("INVALID_SESSION_ID_MESSAGE".localized()),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text, cancelStyle: .alert_text,
afterClosed: onError afterClosed: onError
) )

@ -180,7 +180,7 @@ class SettingsViewModel: SessionTableViewModel, NavigationItemSource, Navigatabl
ConfirmationModal( ConfirmationModal(
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "displayNameErrorDescription".localized(), title: "displayNameErrorDescription".localized(),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
), ),
@ -193,7 +193,7 @@ class SettingsViewModel: SessionTableViewModel, NavigationItemSource, Navigatabl
ConfirmationModal( ConfirmationModal(
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "displayNameErrorDescriptionShorter".localized(), title: "displayNameErrorDescriptionShorter".localized(),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
), ),
@ -434,7 +434,7 @@ class SettingsViewModel: SessionTableViewModel, NavigationItemSource, Navigatabl
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "error".localized(), title: "error".localized(),
body: .text("LOAD_RECOVERY_PASSWORD_ERROR".localized()), body: .text("LOAD_RECOVERY_PASSWORD_ERROR".localized()),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text cancelStyle: .alert_text
) )
) )
@ -613,7 +613,7 @@ class SettingsViewModel: SessionTableViewModel, NavigationItemSource, Navigatabl
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: title, title: title,
body: (message.map { .text($0) } ?? .none), body: (message.map { .text($0) } ?? .none),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text, cancelStyle: .alert_text,
dismissType: .single dismissType: .single
) )

@ -585,7 +585,11 @@ public final class FullConversationCell: UITableViewCell, SwipeActionOptimisticC
} }
let previewText: String = { 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( return Interaction.previewText(
variant: (cellViewModel.interactionVariant ?? .standardIncoming), variant: (cellViewModel.interactionVariant ?? .standardIncoming),
body: cellViewModel.interactionBody, body: cellViewModel.interactionBody,

@ -274,7 +274,7 @@ class ScreenLockUI {
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "authenticateFailed".localized(), title: "authenticateFailed".localized(),
body: .text(message), body: .text(message),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text, cancelStyle: .alert_text,
afterClosed: { [weak self] in self?.ensureUI() } // After the alert, update the UI afterClosed: { [weak self] in self?.ensureUI() } // After the alert, update the UI
) )

@ -214,7 +214,7 @@ class SessionTableViewController<ViewModel>: BaseVC, UITableViewDataSource, UITa
receiveCompletion: { [weak self] result in receiveCompletion: { [weak self] result in
switch result { switch result {
case .failure(let error): 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 // If we got an error then try to restart the stream once, otherwise log the error
guard self?.dataStreamJustFailed == false else { guard self?.dataStreamJustFailed == false else {

@ -338,7 +338,7 @@ public class SignalAttachment: Equatable, Hashable {
} }
} }
if dataUTI == kUnknownTestAttachmentUTI { if dataUTI == kUnknownTestAttachmentUTI {
return "unknown" return "unknown".localized()
} }
guard let fileExtension = MIMETypeUtil.fileExtension(forUTIType: dataUTI) else { guard let fileExtension = MIMETypeUtil.fileExtension(forUTIType: dataUTI) else {
return nil return nil

@ -164,7 +164,7 @@ final class SAEScreenLockViewController: ScreenLockViewController {
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "authenticateFailed".localized(), title: "authenticateFailed".localized(),
body: .text(message), body: .text(message),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text, cancelStyle: .alert_text,
afterClosed: { [weak self] in self?.ensureUI() } // After the alert, update the UI afterClosed: { [weak self] in self?.ensureUI() } // After the alert, update the UI
) )

@ -246,7 +246,7 @@ final class ShareNavController: UINavigationController, ShareViewDelegate {
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: "sessionMessenger".localized(), title: "sessionMessenger".localized(),
body: .text(error.localizedDescription), body: .text(error.localizedDescription),
cancelTitle: "BUTTON_OK".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text, cancelStyle: .alert_text,
afterClosed: { [weak self] in self?.extensionContext?.cancelRequest(withError: error) } afterClosed: { [weak self] in self?.extensionContext?.cancelRequest(withError: error) }
) )

@ -202,6 +202,9 @@ final public class LocalizationHelper: CustomStringConvertible {
for (key, value) in replacements { for (key, value) in replacements {
localizedString = localizedString.replacingOccurrences(of: tokenize(key), with: value) localizedString = localizedString.replacingOccurrences(of: tokenize(key), with: value)
} }
// Replace html tag "<br/>" with "\n"
localizedString = localizedString.replacingOccurrences(of: "<br/>", with: "\n")
return localizedString return localizedString
} }

Loading…
Cancel
Save