Updated the code to use the localised copy for the deprecation UI

pull/894/head
Morgan Pretty 2 months ago
parent 6830c68c31
commit 45a9586318

@ -2735,8 +2735,8 @@ extension ConversationVC {
let closedGroupName: String? = self.viewModel.threadData.closedGroupName
let confirmationModal: ConfirmationModal = ConfirmationModal(
info: ConfirmationModal.Info(
title: "Recreate Group",//.localized(),
body: .text("Chat history will not be transferred to the new group. You can still view all chat history in your old group."/*.localized()*/),
title: "recreateGroup".localized(),
body: .text("legacyGroupChatHistory".localized()),
confirmTitle: "theContinue".localized(),
confirmStyle: .danger,
cancelStyle: .alert_text

@ -69,10 +69,10 @@ public class ConversationViewModel: OWSAudioPlayerDelegate, NavigatableStateHold
let localizationKey: String
switch (dependencies[feature: .legacyGroupsDeprecated], threadData.currentUserIsClosedGroupAdmin == true) {
case (false, false): localizationKey = "groupLegacyBanner"
case (false, true): localizationKey = "groupLegacyBanner"
case (true, false): localizationKey = "groupLegacyBanner"
case (true, true): localizationKey = "groupLegacyBanner"
case (false, false): localizationKey = "legacyGroupBeforeDeprecationMember"
case (false, true): localizationKey = "legacyGroupBeforeDeprecationAdmin"
case (true, false): localizationKey = "legacyGroupAfterDeprecationMember"
case (true, true): localizationKey = "legacyGroupAfterDeprecationAdmin"
}
// FIXME: Strings should be updated in Crowdin to include the {icon}

@ -65,7 +65,9 @@ final class ThreadPickerVC: UIViewController, UITableViewDataSource, UITableView
private lazy var noAccountErrorLabel: UILabel = {
let result: UILabel = UILabel()
result.font = .systemFont(ofSize: Values.mediumFontSize)
result.text = "Oops! Looks like you don't have a \(Constants.app_name) account yet.\n\nYou'll need to create one in the \(Constants.app_name) app before you can share."//.localized()
result.text = "shareExtensionNoAccountError"
.put(key: "app_name", value: Constants.app_name)
.localized()
result.textAlignment = .center
result.themeTextColor = .textPrimary
result.numberOfLines = 0

@ -898,56 +898,52 @@ public extension Publisher where Failure == Error {
// MARK: - CallInfo
private extension Storage {
// MARK: - CallInfo
private extension Storage {
class CallInfo {
enum Behaviour {
case syncRead
case asyncRead
case syncWrite
case asyncWrite
}
weak var storage: Storage?
let file: String
let function: String
let line: Int
let behaviour: Behaviour
var callInfo: String {
let fileInfo: String = (file.components(separatedBy: "/").last.map { "\($0):\(line) - " } ?? "")
return "\(fileInfo)\(function)"
}
class CallInfo {
enum Behaviour {
case syncRead
case asyncRead
case syncWrite
case asyncWrite
}
weak var storage: Storage?
let file: String
let function: String
let line: Int
let behaviour: Behaviour
var callInfo: String {
let fileInfo: String = (file.components(separatedBy: "/").last.map { "\($0):\(line) - " } ?? "")
var isWrite: Bool {
switch behaviour {
case .syncWrite, .asyncWrite: return true
case .syncRead, .asyncRead: return false
}
}
var isAsync: Bool {
switch behaviour {
case .asyncRead, .asyncWrite: return true
case .syncRead, .syncWrite: return false
}
return "\(fileInfo)\(function)"
}
var isWrite: Bool {
switch behaviour {
case .syncWrite, .asyncWrite: return true
case .syncRead, .asyncRead: return false
}
init(
_ storage: Storage?,
_ file: String,
_ function: String,
_ line: Int,
_ behaviour: Behaviour
) {
self.storage = storage
self.file = file
self.function = function
self.line = line
self.behaviour = behaviour
}
var isAsync: Bool {
switch behaviour {
case .asyncRead, .asyncWrite: return true
case .syncRead, .syncWrite: return false
}
}
init(
_ storage: Storage?,
_ file: String,
_ function: String,
_ line: Int,
_ behaviour: Behaviour
) {
self.storage = storage
self.file = file
self.function = function
self.line = line
self.behaviour = behaviour
}
}
}

Loading…
Cancel
Save