Skip to content
Snippets Groups Projects
Commit bc4a4a94 authored by Bruno Muniz's avatar Bruno Muniz :apple:
Browse files

Fixed localization for contact delete

parent f753a6be
No related branches found
No related tags found
2 merge requests!40v1.1.2b166,!39Fixing QA bugs before releasing
...@@ -263,7 +263,7 @@ public final class ContactController: UIViewController { ...@@ -263,7 +263,7 @@ public final class ContactController: UIViewController {
let deleteButton = RowButton() let deleteButton = RowButton()
deleteButton.setup( deleteButton.setup(
title: "Delete Connection", title: Localized.Contact.Delete.Info.title,
icon: Asset.settingsDelete.image, icon: Asset.settingsDelete.image,
style: .delete, style: .delete,
separator: false separator: false
...@@ -411,22 +411,23 @@ extension ContactController { ...@@ -411,22 +411,23 @@ extension ContactController {
private func presentDeleteInfo() { private func presentDeleteInfo() {
let actionButton = DrawerCapsuleButton(model: .init( let actionButton = DrawerCapsuleButton(model: .init(
title: "Delete Connection", title: Localized.Contact.Delete.Info.title,
style: .red style: .red
)) ))
let drawer = DrawerController(with: [ let drawer = DrawerController(with: [
DrawerText( DrawerText(
font: Fonts.Mulish.bold.font(size: 26.0), font: Fonts.Mulish.bold.font(size: 26.0),
text: "Delete Connection?", text: Localized.Contact.Delete.Drawer.title,
color: Asset.neutralActive.color, color: Asset.neutralActive.color,
alignment: .left, alignment: .left,
spacingAfter: 19 spacingAfter: 19
), ),
DrawerText( DrawerText(
text: "This is a silent deletion, \(viewModel.contact.username) will not know you deleted them. This action will remove all information on your phone about this user, including your communications. You #cannot undo this step, and cannot re-add them unless they delete you as a connection as well.#", text: Localized.Contact.Delete.Drawer.description(viewModel.contact.username ?? ""),
spacingAfter: 37 spacingAfter: 37,
), customAttributes: [.font: Fonts.Mulish.bold.font(size: 16.0)]
),
actionButton actionButton
]) ])
......
...@@ -455,6 +455,20 @@ public enum Localized { ...@@ -455,6 +455,20 @@ public enum Localized {
/// Send message /// Send message
public static let send = Localized.tr("Localizable", "contact.confirmed.send") public static let send = Localized.tr("Localizable", "contact.confirmed.send")
} }
public enum Delete {
public enum Drawer {
/// This is a silent deletion, %@ will not know you deleted them. This action will remove all information on your phone about this user, including your communications. You #cannot undo this step, and cannot re-add them unless they delete you as a connection as well.#
public static func description(_ p1: Any) -> String {
return Localized.tr("Localizable", "contact.delete.drawer.description", String(describing: p1))
}
/// Delete Connection?
public static let title = Localized.tr("Localizable", "contact.delete.drawer.title")
}
public enum Info {
/// Delete Connection
public static let title = Localized.tr("Localizable", "contact.delete.info.title")
}
}
public enum Inprogress { public enum Inprogress {
/// Your request failed to send /// Your request failed to send
public static let failed = Localized.tr("Localizable", "contact.inprogress.failed") public static let failed = Localized.tr("Localizable", "contact.inprogress.failed")
......
...@@ -230,6 +230,15 @@ ...@@ -230,6 +230,15 @@
"contact.nickname" "contact.nickname"
= "Nickname"; = "Nickname";
// ContactFeature - Delete
"contact.delete.info.title"
= "Delete Connection";
"contact.delete.drawer.title"
= "Delete Connection?";
"contact.delete.drawer.description"
= "This is a silent deletion, %@ will not know you deleted them. This action will remove all information on your phone about this user, including your communications. You #cannot undo this step, and cannot re-add them unless they delete you as a connection as well.#";
// ContactFeature - Confirmed // ContactFeature - Confirmed
"contact.confirmed.clear" "contact.confirmed.clear"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment