Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…y#1117)

- Final copy
  • Loading branch information
LukasKorba committed Mar 19, 2024
1 parent 1bf484c commit c67323d
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public enum SupportDataGenerator {
public enum Constants {
public static let email = "[email protected]"
public static let subject = "Zashi"
public static let subjectPPE = "Zashi - transaction error"
public static let subjectPPE = L10n.ProposalPartial.mailSubject
}

public static func generate() -> SupportData {
Expand All @@ -48,22 +48,14 @@ public enum SupportDataGenerator {
public static func generatePartialProposalError(txIds: [String]) -> SupportData {
let data = SupportDataGenerator.generate()

let idsString = txIds.map { id in
"- ID: \(id)"
}
.joined(separator: "\n")

let message =
"""
Hi Zashi Team,
\(L10n.ProposalPartial.mailPart1)
While sending a transaction, I encountered an error state.
\(L10n.ProposalPartial.mailPart2)
This is the list of the transaction IDs:
\(idsString.description)
\(L10n.ProposalPartial.mailPart3)
Thanks for your support.
\(data.message)
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,20 @@ public struct PartialProposalErrorView: View {
Group {
Text(L10n.ProposalPartial.message1)
Text(L10n.ProposalPartial.message2)
Text(L10n.ProposalPartial.message3)
}
.font(.custom(FontFamily.Inter.medium.name, size: 14))
.multilineTextAlignment(.center)
.padding(.bottom, 10)

Text("Transaction Ids".uppercased())
Text(L10n.ProposalPartial.transactionIds.uppercased())
.font(.custom(FontFamily.Inter.bold.name, size: 14))
.padding(.top, 30)
.padding(.bottom, 3)

ForEach(store.txIds, id: \.self) { txId in
Text("ID: \(txId)")
Text(txId)
.font(.custom(FontFamily.Inter.regular.name, size: 13))
.lineLimit(1)
.truncationMode(.middle)
.padding(.bottom, 3)
}

Button(L10n.ProposalPartial.contactSupport.uppercased()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ public struct TransactionFeeView: View {
balance: fee,
fontName: FontFamily.Inter.bold.name,
mostSignificantFontSize: 13,
isFee: true
isFee: false,
leastSignificantFontSize: 7,
format: .expanded
)
.foregroundColor(Asset.Colors.shade47.color)
.fixedSize()
}

Color.clear
Expand Down
20 changes: 14 additions & 6 deletions modules/Sources/Generated/L10n.swift
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,22 @@ public enum L10n {
public enum ProposalPartial {
/// Contact Support
public static let contactSupport = L10n.tr("Localizable", "proposalPartial.contactSupport", fallback: "Contact Support")
/// Sending to this recipient required multiple transactions but only some of them succeeded.
public static let message1 = L10n.tr("Localizable", "proposalPartial.message1", fallback: "Sending to this recipient required multiple transactions but only some of them succeeded.")
/// Your funds are safe but need to be recovered with assistance from our side.
public static let message2 = L10n.tr("Localizable", "proposalPartial.message2", fallback: "Your funds are safe but need to be recovered with assistance from our side.")
/// Please use the button below to contact us. It automatically prepares all the data we need to help you recover your funds.
public static let message3 = L10n.tr("Localizable", "proposalPartial.message3", fallback: "Please use the button below to contact us. It automatically prepares all the data we need to help you recover your funds.")
/// Hi Zashi Team,
public static let mailPart1 = L10n.tr("Localizable", "proposalPartial.mailPart1", fallback: "Hi Zashi Team,")
/// While sending a transaction to a TEX address, I encountered an error state. I'm reaching out to get guidance on how to recover my funds.
public static let mailPart2 = L10n.tr("Localizable", "proposalPartial.mailPart2", fallback: "While sending a transaction to a TEX address, I encountered an error state. I'm reaching out to get guidance on how to recover my funds.")
/// Thank you.
public static let mailPart3 = L10n.tr("Localizable", "proposalPartial.mailPart3", fallback: "Thank you.")
/// TEX Transaction Error
public static let mailSubject = L10n.tr("Localizable", "proposalPartial.mailSubject", fallback: "TEX Transaction Error")
/// Sending to this recipient required multiple transactions, but only some of them succeeded. Your funds are safe, but they need to be recovered with the help of Zashi team support.
public static let message1 = L10n.tr("Localizable", "proposalPartial.message1", fallback: "Sending to this recipient required multiple transactions, but only some of them succeeded. Your funds are safe, but they need to be recovered with the help of Zashi team support.")
/// Please use the button below to contact us and recover your funds. Your message to us will be pre-populated with all the data we need to resolve this issue.
public static let message2 = L10n.tr("Localizable", "proposalPartial.message2", fallback: "Please use the button below to contact us and recover your funds. Your message to us will be pre-populated with all the data we need to resolve this issue.")
/// Transaction Error
public static let title = L10n.tr("Localizable", "proposalPartial.title", fallback: "Transaction Error")
/// Transaction Ids
public static let transactionIds = L10n.tr("Localizable", "proposalPartial.transactionIds", fallback: "Transaction Ids")
}
public enum ReceiveZec {
/// Your Address
Expand Down
10 changes: 7 additions & 3 deletions modules/Sources/Generated/Resources/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,14 @@

// MARK: - Proposal Partial Error
"proposalPartial.title" = "Transaction Error";
"proposalPartial.message1" = "Sending to this recipient required multiple transactions but only some of them succeeded.";
"proposalPartial.message2" = "Your funds are safe but need to be recovered with assistance from our side.";
"proposalPartial.message3" = "Please use the button below to contact us. It automatically prepares all the data we need to help you recover your funds.";
"proposalPartial.message1" = "Sending to this recipient required multiple transactions, but only some of them succeeded. Your funds are safe, but they need to be recovered with the help of Zashi team support.";
"proposalPartial.message2" = "Please use the button below to contact us and recover your funds. Your message to us will be pre-populated with all the data we need to resolve this issue.";
"proposalPartial.transactionIds" = "Transaction Ids";
"proposalPartial.contactSupport" = "Contact Support";
"proposalPartial.mailSubject" = "TEX Transaction Error";
"proposalPartial.mailPart1" = "Hi Zashi Team,";
"proposalPartial.mailPart2" = "While sending a transaction to a TEX address, I encountered an error state. I'm reaching out to get guidance on how to recover my funds.";
"proposalPartial.mailPart3" = "Thank you.";

// MARK: - Import Wallet Screen
"importWallet.title" = "Wallet Import";
Expand Down

0 comments on commit c67323d

Please sign in to comment.