From 70cfe93fc1ce3752e247747d20cb3b77a91cdd93 Mon Sep 17 00:00:00 2001 From: ovari123 <ovari123@zoho.com> Date: Tue, 26 Nov 2024 17:06:06 -0400 Subject: [PATCH] misc: unify terminology MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit {can't, couldn't, could not, won't} → unable to trust request → conversation invitation Change-Id: I76bd0d9459fbe64c7f9a5346c075671f916f2f24 GitLab: #382 https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/1886 --- Ring/.swiftlint.yml | 2 +- Ring/Ring/AppDelegate.swift | 6 +-- .../Bridging/AccountCreation/AccountAdapter.h | 2 +- Ring/Ring/Constants/Generated/Strings.swift | 40 +++++++++---------- Ring/Ring/Models/AccountConfigModel.swift | 4 +- .../Resources/en.lproj/Localizable.strings | 20 +++++----- Ring/Ring/Services/AccountsService.swift | 2 +- Ring/Ring/Services/ContactsService.swift | 6 +-- Ring/Ring/Services/ConversationsManager.swift | 2 +- Ring/Ring/Services/ConversationsService.swift | 2 +- Ring/Ring/Services/DaemonService.swift | 4 +- Ring/Ring/Services/DataTransferService.swift | 6 +-- Ring/Ring/Services/NameService.swift | 2 +- Ring/Ring/Services/VideoService.swift | 2 +- Ring/jamiNotificationExtension/Adapter.mm | 2 +- 15 files changed, 51 insertions(+), 51 deletions(-) diff --git a/Ring/.swiftlint.yml b/Ring/.swiftlint.yml index 4bae0da68..971294f76 100644 --- a/Ring/.swiftlint.yml +++ b/Ring/.swiftlint.yml @@ -11,7 +11,7 @@ opt_in_rules: # some rules are only opt-in - explicit_self - modifier_order - toggle_bool - - empty_count # can't be autocorrected + - empty_count # unable to autocorrect - multiline_function_chains - closing_brace_spacing - closure_body_length diff --git a/Ring/Ring/AppDelegate.swift b/Ring/Ring/AppDelegate.swift index b4ef7325a..a4f48abe0 100644 --- a/Ring/Ring/AppDelegate.swift +++ b/Ring/Ring/AppDelegate.swift @@ -139,8 +139,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD if !self.moveDataToGroupContainer() { self.window?.rootViewController = self.appCoordinator.rootViewController self.window?.makeKeyAndVisible() - let alertController = UIAlertController(title: "There was an error starting Jami", message: "Please try again", preferredStyle: .alert) - let okAction = UIAlertAction(title: "Ok", style: UIAlertAction.Style.default) + let alertController = UIAlertController(title: "Unable to start Jami", message: "An error occurred while attempting to start Jami. Please try again.", preferredStyle: .alert) + let okAction = UIAlertAction(title: "OK", style: UIAlertAction.Style.default) alertController.addAction(okAction) self.window?.rootViewController?.present(alertController, animated: true, completion: nil) return true @@ -321,7 +321,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD self.accountService.currentAccount = account } guard let currentAccount = self.accountService.currentAccount else { - self.log.error("Can't get current account!") + self.log.error("Unable to get current account!") return } DispatchQueue.global(qos: .background).async {[weak self] in diff --git a/Ring/Ring/Bridging/AccountCreation/AccountAdapter.h b/Ring/Ring/Bridging/AccountCreation/AccountAdapter.h index 4109aefc4..6ed30a61d 100644 --- a/Ring/Ring/Bridging/AccountCreation/AccountAdapter.h +++ b/Ring/Ring/Bridging/AccountCreation/AccountAdapter.h @@ -23,7 +23,7 @@ /** Forward declaration of the Swift delegate. - We have to do this because the Ring-Swift.h generated file can't be imported from a .h file. + This is done because the Ring-Swift.h generated file is unable to be imported from a .h file. The plain import is done in the .mm file. */ @protocol AccountAdapterDelegate; diff --git a/Ring/Ring/Constants/Generated/Strings.swift b/Ring/Ring/Constants/Generated/Strings.swift index 584c02672..bd1e2f4bc 100644 --- a/Ring/Ring/Constants/Generated/Strings.swift +++ b/Ring/Ring/Constants/Generated/Strings.swift @@ -457,33 +457,33 @@ internal enum L10n { internal static let explanationReceivingLocationFrom = L10n.tr("Localizable", "conversation.explanationReceivingLocationFrom", fallback: "You are currently receiving a live location from ") /// You are currently sharing your location with internal static let explanationSendingLocationTo = L10n.tr("Localizable", "conversation.explanationSendingLocationTo", fallback: "You are currently sharing your location with ") - /// Sent you a request for a conversation. - internal static let incomingRequest = L10n.tr("Localizable", "conversation.incomingRequest", fallback: "Sent you a request for a conversation.") + /// Sent you a conversation invitation. + internal static let incomingRequest = L10n.tr("Localizable", "conversation.incomingRequest", fallback: "Sent you a conversation invitation.") /// In reply to internal static let inReplyTo = L10n.tr("Localizable", "conversation.inReplyTo", fallback: "In reply to") /// Write to internal static let messagePlaceholder = L10n.tr("Localizable", "conversation.messagePlaceholder", fallback: "Write to") /// is not in your contact list internal static let notContactLabel = L10n.tr("Localizable", "conversation.notContactLabel", fallback: "is not in your contact list") - /// %@ sent you a request for a conversation. + /// %@ sent you a conversation invitation. internal static func receivedRequest(_ p1: Any) -> String { - return L10n.tr("Localizable", "conversation.receivedRequest", String(describing: p1), fallback: "%@ sent you a request for a conversation.") + return L10n.tr("Localizable", "conversation.receivedRequest", String(describing: p1), fallback: "%@ sent you a conversation invitation.") } /// replied to internal static let repliedTo = L10n.tr("Localizable", "conversation.repliedTo", fallback: "replied to") /// Hello, /// Would you like to join the conversation? internal static let requestMessage = L10n.tr("Localizable", "conversation.requestMessage", fallback: "Hello,\nWould you like to join the conversation?") - /// Send him/her a contact request to be able to exchange together - internal static let sendRequest = L10n.tr("Localizable", "conversation.sendRequest", fallback: "Send him/her a contact request to be able to exchange together") - /// Send Contact Request - internal static let sendRequestTitle = L10n.tr("Localizable", "conversation.sendRequestTitle", fallback: "Send Contact Request") + /// Send them an invitation to be able converse. + internal static let sendRequest = L10n.tr("Localizable", "conversation.sendRequest", fallback: "Send them an invitation to be able converse.") + /// Send conversation invitation + internal static let sendRequestTitle = L10n.tr("Localizable", "conversation.sendRequestTitle", fallback: "Send conversation invitation") /// We are waiting for %@ connects to synchronize the conversation. internal static func synchronizationMessage(_ p1: Any) -> String { return L10n.tr("Localizable", "conversation.synchronizationMessage", String(describing: p1), fallback: "We are waiting for %@ connects to synchronize the conversation.") } - /// You have accepted the conversation request. - internal static let synchronizationTitle = L10n.tr("Localizable", "conversation.synchronizationTitle", fallback: "You have accepted the conversation request.") + /// You have accepted the conversation invitation. + internal static let synchronizationTitle = L10n.tr("Localizable", "conversation.synchronizationTitle", fallback: "You have accepted the conversation invitation.") /// yourself internal static let yourself = L10n.tr("Localizable", "conversation.yourself", fallback: "yourself") } @@ -598,16 +598,16 @@ internal enum L10n { internal enum GeneratedMessage { /// Invitation received internal static let contactAdded = L10n.tr("Localizable", "generatedMessage.contactAdded", fallback: "Invitation received") - /// was kicked from the conversation - internal static let contactBlocked = L10n.tr("Localizable", "generatedMessage.contactBlocked", fallback: "was kicked from the conversation") + /// was kicked from the conversation. + internal static let contactBlocked = L10n.tr("Localizable", "generatedMessage.contactBlocked", fallback: "was kicked from the conversation.") /// left the conversation internal static let contactLeftConversation = L10n.tr("Localizable", "generatedMessage.contactLeftConversation", fallback: "left the conversation") - /// rejoined the conversation - internal static let contactUnblocked = L10n.tr("Localizable", "generatedMessage.contactUnblocked", fallback: "rejoined the conversation") - /// joined the conversation - internal static let invitationAccepted = L10n.tr("Localizable", "generatedMessage.invitationAccepted", fallback: "joined the conversation") - /// was invited to join the conversation - internal static let invitationReceived = L10n.tr("Localizable", "generatedMessage.invitationReceived", fallback: "was invited to join the conversation") + /// rejoined the conversation. + internal static let contactUnblocked = L10n.tr("Localizable", "generatedMessage.contactUnblocked", fallback: "rejoined the conversation.") + /// joined the conversation. + internal static let invitationAccepted = L10n.tr("Localizable", "generatedMessage.invitationAccepted", fallback: "joined the conversation.") + /// was invited to join the conversation. + internal static let invitationReceived = L10n.tr("Localizable", "generatedMessage.invitationReceived", fallback: "was invited to join the conversation.") /// Live location sharing internal static let liveLocationSharing = L10n.tr("Localizable", "generatedMessage.liveLocationSharing", fallback: "Live location sharing") /// Missed incoming call @@ -618,8 +618,8 @@ internal enum L10n { internal static let outgoingCall = L10n.tr("Localizable", "generatedMessage.outgoingCall", fallback: "Outgoing call") /// Conversation created internal static let swarmCreated = L10n.tr("Localizable", "generatedMessage.swarmCreated", fallback: "Conversation created") - /// You joined the conversation - internal static let youJoined = L10n.tr("Localizable", "generatedMessage.youJoined", fallback: "You joined the conversation") + /// You joined the conversation. + internal static let youJoined = L10n.tr("Localizable", "generatedMessage.youJoined", fallback: "You joined the conversation.") } internal enum Global { /// Accept diff --git a/Ring/Ring/Models/AccountConfigModel.swift b/Ring/Ring/Models/AccountConfigModel.swift index e4f95cec4..7191b9e93 100644 --- a/Ring/Ring/Models/AccountConfigModel.swift +++ b/Ring/Ring/Models/AccountConfigModel.swift @@ -105,7 +105,7 @@ class AccountConfigModel { configValues.updateValue(value, forKey: configKeyModel) } else { // ~ The key given in parameter is not known from Ring. - log.warning("Can't find key: \(key)") + log.warning("Unable to find key: \(key)") } } } @@ -162,7 +162,7 @@ class AccountConfigModel { configValues.updateValue(value, forKey: configKeyModel) } else { // ~ The key given in parameter is not known from Ring. - log.warning("Can't find key: \(key)") + log.warning("Unable to find key: \(key)") } } } diff --git a/Ring/Ring/Resources/en.lproj/Localizable.strings b/Ring/Ring/Resources/en.lproj/Localizable.strings index a7d1cea42..64a827cf8 100644 --- a/Ring/Ring/Resources/en.lproj/Localizable.strings +++ b/Ring/Ring/Resources/en.lproj/Localizable.strings @@ -132,12 +132,12 @@ "conversation.explanationSendingLocationTo" = "You are currently sharing your location with "; "conversation.explanationReceivingLocationFrom" = "You are currently receiving a live location from "; "conversation.errorSavingImage" = "An error occurred while saving image to gallery."; -"conversation.receivedRequest" = "%@ sent you a request for a conversation."; -"conversation.incomingRequest" = "Sent you a request for a conversation."; +"conversation.receivedRequest" = "%@ sent you a conversation invitation."; +"conversation.incomingRequest" = "Sent you a conversation invitation."; "conversation.requestMessage" = "Hello,\nWould you like to join the conversation?"; -"conversation.sendRequest" = "Send him/her a contact request to be able to exchange together"; -"conversation.sendRequestTitle" = "Send Contact Request"; -"conversation.synchronizationTitle" = "You have accepted the conversation request."; +"conversation.sendRequest" = "Send them an invitation to be able converse."; +"conversation.sendRequestTitle" = "Send conversation invitation"; +"conversation.synchronizationTitle" = "You have accepted the conversation invitation."; "conversation.synchronizationMessage" = "We are waiting for %@ connects to synchronize the conversation."; "conversation.inReplyTo" = "In reply to"; "conversation.repliedTo" = "replied to"; @@ -467,11 +467,11 @@ // Generated Message "generatedMessage.contactAdded" = "Invitation received"; "generatedMessage.swarmCreated" = "Conversation created"; -"generatedMessage.invitationReceived" = "was invited to join the conversation"; -"generatedMessage.invitationAccepted" = "joined the conversation"; -"generatedMessage.youJoined" = "You joined the conversation"; -"generatedMessage.contactBlocked" = "was kicked from the conversation"; -"generatedMessage.contactUnblocked" = "rejoined the conversation"; +"generatedMessage.invitationReceived" = "was invited to join the conversation."; +"generatedMessage.invitationAccepted" = "joined the conversation."; +"generatedMessage.youJoined" = "You joined the conversation."; +"generatedMessage.contactBlocked" = "was kicked from the conversation."; +"generatedMessage.contactUnblocked" = "rejoined the conversation."; "generatedMessage.outgoingCall" = "Outgoing call"; "generatedMessage.missedOutgoingCall" = "Missed outgoing call"; "generatedMessage.missedIncomingCall" = "Missed incoming call"; diff --git a/Ring/Ring/Services/AccountsService.swift b/Ring/Ring/Services/AccountsService.swift index a7ea0a809..cc39d44c9 100644 --- a/Ring/Ring/Services/AccountsService.swift +++ b/Ring/Ring/Services/AccountsService.swift @@ -69,7 +69,7 @@ class AccountsService: AccountAdapterDelegate { /** private Accounts list. - Can be used for all the operations, but won't be accessed from outside this file. + Can be used for all the operations, but is unable to be accessed from outside this file. - SeeAlso: `accounts` */ diff --git a/Ring/Ring/Services/ContactsService.swift b/Ring/Ring/Services/ContactsService.swift index c895ca6a9..9c409b60b 100644 --- a/Ring/Ring/Services/ContactsService.swift +++ b/Ring/Ring/Services/ContactsService.swift @@ -75,7 +75,7 @@ class ContactsService { var values = self.contacts.value values.append(contact) self.contacts.accept(values) - self.log.debug("contact: \(String(describing: contact.userName))") + self.log.debug("Contact: \(String(describing: contact.userName))") } } private func loadAndSaveJamiContacts(withAccount account: AccountModel) { @@ -215,7 +215,7 @@ extension ContactsService: ContactsAdapterDelegate { serviceEvent.addEventInput(.peerUri, value: uri) serviceEvent.addEventInput(.conversationId, value: conversationId) self.responseStream.onNext(serviceEvent) - log.debug("Contact added :\(uri)") + log.debug("Contact added: \(uri)") } func contactRemoved(contact uri: String, withAccountId accountId: String, banned: Bool) { @@ -240,7 +240,7 @@ extension ContactsService: ContactsAdapterDelegate { serviceEvent.addEventInput(.peerUri, value: uri) serviceEvent.addEventInput(.conversationId, value: contactToRemove.conversationId) self.responseStream.onNext(serviceEvent) - log.debug("Contact removed :\(uri)") + log.debug("Contact removed: \(uri)") } } diff --git a/Ring/Ring/Services/ConversationsManager.swift b/Ring/Ring/Services/ConversationsManager.swift index e41c8558d..cf93496e0 100644 --- a/Ring/Ring/Services/ConversationsManager.swift +++ b/Ring/Ring/Services/ConversationsManager.swift @@ -410,7 +410,7 @@ class ConversationsManager { let messageId: String = event.getEventInput(ServiceEventInput.messageId), let transferInfo = self.dataTransferService.dataTransferInfo(withId: transferId, accountId: accountId, conversationId: conversationId, isSwarm: !conversationId.isEmpty), let currentAccount = self.accountsService.currentAccount else { - self.log.error("ConversationsManager: can't find transferInfo") + self.log.error("ConversationsManager: unable to find transferInfo") return } switch event.eventType { diff --git a/Ring/Ring/Services/ConversationsService.swift b/Ring/Ring/Services/ConversationsService.swift index 18d513c0b..514b60568 100644 --- a/Ring/Ring/Services/ConversationsService.swift +++ b/Ring/Ring/Services/ConversationsService.swift @@ -660,7 +660,7 @@ class ConversationsService { func createSipConversation(uri: String, accountId: String) { /// create db. Return if opening db failed do { - /// return false if could not open database connection + /// return false if unable to open database connection if try !dbManager.createDatabaseForAccount(accountId: accountId) { return } diff --git a/Ring/Ring/Services/DaemonService.swift b/Ring/Ring/Services/DaemonService.swift index 0e599b380..8500e4bc7 100644 --- a/Ring/Ring/Services/DaemonService.swift +++ b/Ring/Ring/Services/DaemonService.swift @@ -83,7 +83,7 @@ class DaemonService { throw StartDaemonError.daemonAlreadyRunning } - log.debug("Starting daemon...") + log.debug("Starting daemon…") if self.dRingAdaptor.initDaemon() { log.debug("Daemon initialized.") if self.dRingAdaptor.startDaemon() { @@ -107,7 +107,7 @@ class DaemonService { throw StopDaemonError.daemonNotRunning } - log.debug("Stopping daemon...") + log.debug("Stopping daemon…") self.dRingAdaptor.fini() self.daemonStarted = false log.debug("Daemon stopped.") diff --git a/Ring/Ring/Services/DataTransferService.swift b/Ring/Ring/Services/DataTransferService.swift index bc891d996..13d66f7e4 100644 --- a/Ring/Ring/Services/DataTransferService.swift +++ b/Ring/Ring/Services/DataTransferService.swift @@ -145,7 +145,7 @@ public final class DataTransferService: DataTransferAdapterDelegate { func cancelTransfer(withId transferId: String, accountId: String, conversationId: String) -> NSDataTransferError { let err = self.dataTransferAdapter.cancelDataTransfer(withId: transferId, accountId: accountId, conversationId: conversationId) if err != .success { - self.log.error("couldn't cancel transfer with id: \(transferId)") + self.log.error("Unable to cancel transfer with id: \(transferId)") } return err } @@ -171,7 +171,7 @@ public final class DataTransferService: DataTransferAdapterDelegate { do { try imageData.write(to: URL(fileURLWithPath: imagePath.path), options: .atomic) } catch { - self.log.error("couldn't copy image to cache") + self.log.error("Unable to copy image to cache") } self.sendFile(conversation: conversation, filePath: imagePath.path, displayName: displayName, localIdentifier: nil) } @@ -314,7 +314,7 @@ public final class DataTransferService: DataTransferAdapterDelegate { func dataTransferEvent(withFileId transferId: String, withEventCode eventCode: Int, accountId: String, conversationId: String, interactionId: String) { guard let event = NSDataTransferEventCode(rawValue: UInt32(eventCode)) else { - self.log.error("DataTransferService: can't get transfer code") + self.log.error("DataTransferService: unable to get transfer code") return } diff --git a/Ring/Ring/Services/NameService.swift b/Ring/Ring/Services/NameService.swift index 5bf5800bb..ae9557c57 100644 --- a/Ring/Ring/Services/NameService.swift +++ b/Ring/Ring/Services/NameService.swift @@ -172,7 +172,7 @@ extension NameService: NameRegistrationAdapterDelegate { } registeredNames[response.accountId] = response.name UserDefaults.standard.set(registeredNames, forKey: registeredNamesKey) - log.debug("Registered name : \(response.name ?? "no name")") + log.debug("Registered name: \(response.name ?? "no name")") } else { log.debug("Name Registration failed. State = \(response.state.rawValue)") } diff --git a/Ring/Ring/Services/VideoService.swift b/Ring/Ring/Services/VideoService.swift index 3ef9ceb2e..86aa7324b 100644 --- a/Ring/Ring/Services/VideoService.swift +++ b/Ring/Ring/Services/VideoService.swift @@ -633,7 +633,7 @@ extension VideoService: VideoAdapterDelegate { } func startCapture(withDevice device: String) { - self.log.debug("Capture started...") + self.log.debug("Capture started…") if device == camera.highResolutionCamera && self.camera.quality == AVCaptureSession.Preset.medium { self.camera.setQuality(quality: AVCaptureSession.Preset.high) } else if device == camera.mediumCamera && self.camera.quality == AVCaptureSession.Preset.high { diff --git a/Ring/jamiNotificationExtension/Adapter.mm b/Ring/jamiNotificationExtension/Adapter.mm index 837151e23..eb4c56b53 100644 --- a/Ring/jamiNotificationExtension/Adapter.mm +++ b/Ring/jamiNotificationExtension/Adapter.mm @@ -379,7 +379,7 @@ std::string getNameServer(std::string accountId) { * Check whether a Unicode (5.2) char is in a valid range. * * The first check comes from the Unicode guarantee to never encode - * a point above 0x0010ffff, since UTF-16 couldn't represent it. + * a point above 0x0010ffff, since UTF-16 is unable to represent it. * * The second check covers surrogate pairs (category Cs). * -- GitLab