Skip to content

Commit

Permalink
strings: updates based on translations file
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Vaccaro <[email protected]>
  • Loading branch information
lvaccaro committed Sep 25, 2024
1 parent 7a34d48 commit fefc676
Show file tree
Hide file tree
Showing 29 changed files with 86 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ class VerifyOnDeviceViewController: UIViewController {

func setContent() {
copyView.isHidden = false
lblTitle.text = "Verify on Device".localized
lblTitle.text = "id_verify_on_device".localized
if viewModel.isRedeposit {
lblTitle.text = "Verify redeposit address".localized
copyView.isHidden = true
}
lblHint.text = "Please verify that the address shown on your hardware wallet matches the one on your phone.".localized
lblHint.text = "id_please_verify_that_the_address".localized
btnCopy.setTitle("id_copy".localized, for: .normal)
}

Expand Down
2 changes: 1 addition & 1 deletion gaios/Home/Controllers/LoginViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class LoginViewController: UIViewController {
}

func setContent() {
lblTitle.text = account.isDerivedLightning ? "Lightning Shortcut".localized : "id_enter_pin".localized
lblTitle.text = account.isDerivedLightning ? "id_lightning_shortcut".localized : "id_enter_pin".localized
lblWalletLockHint1.text = "\("id_youve_entered_an_invalid_pin".localized)\n\("id_youll_need_your_recovery_phrase".localized)"
lblWalletLockHint2.isHidden = true
btnWalletLock.setTitle("id_restore_with_recovery_phrase".localized, for: .normal)
Expand Down
6 changes: 3 additions & 3 deletions gaios/LTFlow/Controllers/LTRemoveShortcutViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ class LTRemoveShortcutViewController: UIViewController {
}

func setContent() {
lblTitle.text = "Payments Will Fail!".localized
lblHint.text = "You will stop receiving push notifications for this lightning account, but they are necessary for your lightning account to receive and send reliably.".localized
lblTitle.text = "id_payments_will_fail".localized
lblHint.text = "id_you_will_stop_receiving_push.".localized
btnCancel.setTitle("id_cancel".localized, for: .normal)
btnRemove.setTitle("Remove Shortcut".localized, for: .normal)
btnRemove.setTitle("id_remove_lightning_shortcut".localized, for: .normal)
}

func setStyle() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class LTShortcutViewController: UIViewController {
btnLearnMore.setTitle(vm.btnMore, for: .normal)
btnMain.setTitle(vm.btnMain, for: .normal)
lblJadeExtraNote.isHidden = true
lblJadeExtraNote.text = "You will need to export the account from Jade at your next login.".localized
lblJadeExtraNote.text = "id_you_will_need_to_export_the".localized
switch vm.action {
case .addFromAccount:
DrawerAnimationManager.shared.accountId = vm.account.id
Expand Down
2 changes: 1 addition & 1 deletion gaios/Menu/PopoverMenuHomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ extension PopoverMenuHomeViewController: UITableViewDataSource, UITableViewDeleg
case .edit:
cell.textLabel?.text = "id_rename_wallet".localized
case .delete:
cell.textLabel?.text = isDerivedLightning ? "Remove Lightning Shortcut".localized : "id_remove_wallet".localized
cell.textLabel?.text = isDerivedLightning ? "id_remove_lightning_shortcut".localized : "id_remove_wallet".localized
}
return cell
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class HowToSecureViewController: UIViewController {

func setContent() {

lblTitle.text = "How do you want to secure your funds?".localized
lblTitle.text = "id_how_do_you_want_to_secure_your".localized
btnWatchOnly.setTitle(NSLocalizedString("id_watchonly", comment: ""), for: .normal)
}

Expand All @@ -40,7 +40,7 @@ class HowToSecureViewController: UIViewController {
let storyboard = UIStoryboard(name: "Dialogs", bundle: nil)
if let vc = storyboard.instantiateViewController(withIdentifier: "DialogListViewController") as? DialogListViewController {
vc.delegate = self
vc.viewModel = DialogListViewModel(title: "Select Network", type: .networkPrefs, items: NetworkPrefs.getItems())
vc.viewModel = DialogListViewModel(title: "id_select_network".localized, type: .networkPrefs, items: NetworkPrefs.getItems())
vc.modalPresentationStyle = .overFullScreen
present(vc, animated: false, completion: nil)
}
Expand Down
12 changes: 6 additions & 6 deletions gaios/OnBoard/Controllers/WalletSettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ class WalletSettingsViewController: KeyboardViewController {
lblAnalyticsTitle.text = NSLocalizedString("id_help_green_improve", comment: "")
lblAnalyticsHint.text = NSLocalizedString("id_enable_limited_usage_data", comment: "")
btnAnalytics.setTitle(NSLocalizedString("id_more_info", comment: ""), for: .normal)
lblExperimentalTitle.text = "Enable experimental features"
lblExperimentalHint.text = "Experimental features might change, break, or be discontinued at any time, so you agree to use them at your own risk."
lblExperimentalTitle.text = "id_enable_experimental_features".localized
lblExperimentalHint.text = "id_experimental_features_might".localized
lblProxyTitle.text = NSLocalizedString("id_connect_through_a_proxy", comment: "")
lblProxyHint.text = ""
fieldProxyIp.placeholder = NSLocalizedString("id_server_ip_and_port_ipport", comment: "")
lblRememberHWTitle.text = "Remember hardware devices".localized
lblRememberHWTitle.text = "id_remember_hardware_devices".localized
lblRememberHWHint.text = ""
lblSPVTitle.text = NSLocalizedString("id_custom_servers_and_validation", comment: "")
lblSPVPersonalNodeTitle.text = NSLocalizedString("id_personal_electrum_server", comment: "")
Expand All @@ -141,16 +141,16 @@ class WalletSettingsViewController: KeyboardViewController {
lblSPVliquidServer.text = NSLocalizedString("id_liquid_electrum_server", comment: "")
lblSPVliquidTestnetServer.text = NSLocalizedString("id_liquid_testnet_electrum_server", comment: "")
lblSPVtestnetServer.text = NSLocalizedString("id_testnet_electrum_server", comment: "")
lblElectrumGapLimit.text = NSLocalizedString("Electrum server gap limit", comment: "")
lblElectrumGapLimit.text = NSLocalizedString("id_electrum_server_gap_limit", comment: "")
fieldSPVbtcServer.placeholder = NSLocalizedString("id_server_ip_and_port_ipport", comment: "")
fieldSPVliquidServer.placeholder = NSLocalizedString("id_server_ip_and_port_ipport", comment: "")
fieldSPVtestnetServer.placeholder = NSLocalizedString("id_server_ip_and_port_ipport", comment: "")
lblElectrumTls.text = NSLocalizedString("Enable TLS", comment: "")
lblElectrumTls.text = NSLocalizedString("id_enable_tls", comment: "")
lblTxCheckTitle.text = NSLocalizedString("id_spv_verification", comment: "")
lblTxCheckHint.text = NSLocalizedString("id_verify_your_bitcoin", comment: "")
lblMultiTitle.text = NSLocalizedString("id_multiserver_validation", comment: "")
lblMultiHint.text = NSLocalizedString("id_double_check_spv_with_other", comment: "")
lblDescElectrumGapLimit.text = "Number of consecutive empty addresses to monitor".localized
lblDescElectrumGapLimit.text = "id_number_of_consecutive_empty".localized
btnCancel.setTitle(NSLocalizedString("id_cancel", comment: ""), for: .normal)
btnSave.setTitle(NSLocalizedString("id_save", comment: ""), for: .normal)
fieldSPVbtcServer.placeholder = GdkSettings.btcElectrumSrvDefaultEndPoint
Expand Down
4 changes: 2 additions & 2 deletions gaios/Receive/Cells/ReceiveAddressCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class ReceiveAddressCell: UITableViewCell {
envelopeBorderView.borderWidth = 5.0
envelopeBorderView.borderColor = UIColor.gGreenMatrix()
envelopeBorderView.cornerRadius = 20.0
btnMagnify.setTitle("Increase QR Size".localized, for: .normal)
btnCopyAddress.setTitle("Copy Address".localized, for: .normal)
btnMagnify.setTitle("id_increase_qr_size".localized, for: .normal)
btnCopyAddress.setTitle("id_copy_address".localized, for: .normal)
[btnMagnify, btnCopyAddress].forEach {
$0.setStyle(.blackWithImg)
}
Expand Down
2 changes: 1 addition & 1 deletion gaios/Sendflow/Controllers/SendFailViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class SendFailViewController: UIViewController {
}

func setContent() {
lblTitle.text = "Transaction failed".localized
lblTitle.text = "id_transaction_failed".localized
errorTextView.text = error.description()?.localized
btnAgain.setTitle("id_try_again".localized, for: .normal)
btnSupport.setTitle("Contact Support".localized, for: .normal)
Expand Down
14 changes: 7 additions & 7 deletions gaios/Sendflow/Controllers/SendTxConfirmViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ class SendTxConfirmViewController: UIViewController {

func setContent() {
if viewModel.isWithdraw {
title = "Confirm Withdraw".localized
title = "id_withdraw".localized
} else {
title = "id_confirm_transaction".localized
}

lblAssetTitle.text = "Asset & Account".localized
lblAssetTitle.text = "id_account__asset".localized
lblAddressTitle.text = viewModel.addressTitle.localized
lblAmountTitle.text = viewModel.amountTitle.localized
lblAmountValue.text = ""
Expand All @@ -81,14 +81,14 @@ class SendTxConfirmViewController: UIViewController {

lblSumFeeKey.text = "id_network_fee".localized
lblSumFeeValue.text = ""
lblSumAmountKey.text = "Recipient Receives"
lblSumAmountKey.text = "Recipient Receives".localized
lblSumAmountValue.text = ""
lblSumTotalKey.text = "Total Spent"
lblSumTotalKey.text = "id_total_spent".localized
lblSumTotalValue.text = ""
lblNoteTitle.text = "Notes"
lblNoteTitle.text = "id_my_notes".localized
lblNoteTxt.text = ""

lblPayRequestByTitle.text = "Payment requested by".localized
lblPayRequestByTitle.text = "id_payment_requested_by_s".localized
lblPayRequestByValue.text = ""
lblPayRequestByHint.text = ""
payRequestByStack.isHidden = true
Expand Down Expand Up @@ -140,7 +140,7 @@ class SendTxConfirmViewController: UIViewController {
case .verified:
btnVerifyAddress.isUserInteractionEnabled = false
btnVerifyAddress.borderColor = .gray
btnVerifyAddress.setTitle("Address verified!".localized, for: .normal)
btnVerifyAddress.setTitle("id_address_verified".localized, for: .normal)
btnVerifyAddress.setImage(UIImage(named: "ic_check_circle")?.maskWithColor(color: .white), for: .normal)
}
}
Expand Down
4 changes: 2 additions & 2 deletions gaios/Shared/Models/AccountPrefs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ enum AccountPrefs {
case .enhanceSecurity:
return "id_enhance_security".localized
case .nodeInfo:
return "Node Info".localized
return "id_node_info".localized
case .shortcut:
return "Lightning shortcut".localized
return "id_lightning_shortcut".localized
case .logout:
return "id_logout".localized
case .settings:
Expand Down
2 changes: 1 addition & 1 deletion gaios/Shared/Models/MoreOptPrefs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ enum MoreOptPrefs: Int, CaseIterable {
case .sweep:
return "id_sweep_from_paper_wallet".localized
case .addressAuth:
return "List of Addresses"
return "id_list_of_addresses".localized
}
}

Expand Down
4 changes: 2 additions & 2 deletions gaios/Shared/Models/RedeemPrefs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ enum RedeemPrefs: Int, CaseIterable {
var name: String {
switch self {
case .scan:
return "Scan QR Code"
return "id_scan_qr_code".localized
case .type:
return "Enter Code"
return "id_enter_your_code".localized
}
}

Expand Down
2 changes: 1 addition & 1 deletion gaios/Shared/Models/WalletPrefs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ enum WalletPrefs: Int, CaseIterable {
case .logout:
return "id_logout".localized
case .denominations:
return "Denominations".localized
return "id_denomination".localized
case .rename:
return "id_rename".localized
case .refresh:
Expand Down
16 changes: 8 additions & 8 deletions gaios/TxDetails/Cells/TxDetailsStatusCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,36 +56,36 @@ class TxDetailsStatusCell: UITableViewCell {
let isLightning = model.transaction.subaccountItem?.gdkNetwork.lightning ?? false

if model.transaction.isRefundableSwap ?? false {
lblStateTitle.text = "Transaction Failed".localized
lblStateInfo.text = "Your transactions failed".localized
lblStateStatus.text = NSLocalizedString("Failed", comment: "")
lblStateTitle.text = "id_transaction_failed".localized
lblStateInfo.text = String(format: "id_your_transaction_failed_s".localized, "")
lblStateStatus.text = NSLocalizedString("id_failed", comment: "")
applyColor(UIColor.gRedTx())
stateIcon.image = UIImage(named: "ic_tx_failed")!
} else if model.transaction.isUnconfirmed(block: model.blockHeight) {
lblStateTitle.text = "Transaction Unconfirmed".localized + " 0/6"
lblStateTitle.text = String(format: "id_transaction_unconfirmed_ss".localized, "0", "6")
lblStateStatus.text = model.txUnconfirmedStatus
applyColor(UIColor.gOrangeTx())
setPendingIcon()
} else if !isLightning && model.transaction.isLiquid && model.blockHeight < model.transaction.blockHeight + 1 {
step = Int(model.blockHeight) - Int(model.transaction.blockHeight) + 1
lblStateTitle.text = "Transaction Unconfirmed".localized + " \(step)/\(steps)"
lblStateTitle.text = String(format: "id_transaction_unconfirmed_ss".localized, "\(step)", "\(steps)")
lblStateStatus.text = model.txStatus
applyColor(UIColor.gOrangeTx())
setPendingIcon()
} else if !isLightning && !model.transaction.isLiquid && model.blockHeight < model.transaction.blockHeight + 5 {
if model.blockHeight >= model.transaction.blockHeight {
step = Int(model.blockHeight) - Int(model.transaction.blockHeight) + 1
lblStateTitle.text = "Transaction Confirmed".localized + " \(step)/\(steps)"
lblStateTitle.text = String(format: "id_transaction_confirmed_ss".localized, "\(step)", "\(steps)")
lblStateStatus.text = model.txStatus
applyColor(UIColor.gGreenTx())
stateIcon.image = UIImage(named: "ic_tx_confirmed")!
}
} else {
applyColor(UIColor.gGreenTx())
lblStateTitle.text = "Transaction Completed".localized
lblStateTitle.text = "id_transaction_completed".localized
lblStateStatus.text = model.txStatus
if isLightning && !(model.transaction.closingTxid?.isEmpty ?? true) {
lblStateStatus.text = "Closed Channel".localized
lblStateStatus.text = "id_close_channel".localized
}
stateIcon.image = UIImage(named: "ic_tx_confirmed")!
}
Expand Down
9 changes: 4 additions & 5 deletions gaios/TxDetails/Cells/TxDetailsStatusCellModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,15 @@ class TxDetailsStatusCellModel {

var txStatusExtended: String {

let str = "Your transaction was successfully" + " "
switch transaction.type {
case .redeposit:
return str + "id_redeposited".localized.lowercased()
return "id_your_transaction_was".localized
case .incoming:
return str + "id_received".localized.lowercased()
return "id_the_transaction_was".localized
case .outgoing:
return str + "id_sent".localized.lowercased()
return "id_your_transaction_was".localized
case .mixed:
return str + "id_swapped".localized.lowercased()
return "id_your_transaction_was".localized
}
}

Expand Down
2 changes: 1 addition & 1 deletion gaios/TxDetails/Cells/TxDetailsTotalsCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class TxDetailsTotalsCell: UITableViewCell {
func setContent() {
lblSumFeeKey.text = "id_network_fee".localized
lblSumAmountKey.text = "Recipient Receives".localized
lblSumTotalKey.text = "Total Spent".localized
lblSumTotalKey.text = "id_total_spent".localized
}

func setStyle() {
Expand Down
18 changes: 9 additions & 9 deletions gaios/TxDetails/TxDetailsViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ class TxDetailsViewModel {
var title = ""
switch transaction.type {
case .redeposit:
title = "Redeposited to".localized
title = "id_redeposited".localized
case .incoming:
title = "id_received_on".localized
case .outgoing:
title = "id_sent_to".localized
case .mixed:
title = "Swapped to".localized
title = "id_swapped".localized
}

let hint = address
Expand All @@ -134,7 +134,7 @@ class TxDetailsViewModel {
let (fiat, fiatCurrency) = balance.toFiat()
let str = "\(amount) \(denom)\(fiat) \(fiatCurrency)"

items.append(TxDetailsInfoCellModel(title: "Network fees".localized, hint: str, type: .fee, hideBalance: hideBalance))
items.append(TxDetailsInfoCellModel(title: "id_network_fees".localized, hint: str, type: .fee, hideBalance: hideBalance))
}

// fee rate
Expand All @@ -161,7 +161,7 @@ class TxDetailsViewModel {

// message
if transaction.isLightning && transaction.message != nil {
items.append(TxDetailsInfoCellModel(title: "Message".localized,
items.append(TxDetailsInfoCellModel(title: "id_message".localized,
hint: transaction.message ?? "",
type: .message,
hideBalance: hideBalance))
Expand Down Expand Up @@ -193,7 +193,7 @@ class TxDetailsViewModel {
if showBumpFee() {
models.append(
TxDetailsActionCellModel(icon: UIImage(named: "ic_tx_action_speed")!,
title: "Speed up Transaction".localized,
title: "id_speed_up_transaction".localized,
action: .speedUp)
)
}
Expand All @@ -207,30 +207,30 @@ class TxDetailsViewModel {
if (transaction.isLightning) {} else {
models.append(
TxDetailsActionCellModel(icon: UIImage(named: "ic_tx_action_explorer")!.maskWithColor(color: UIColor.gGreenMatrix()),
title: "View in Explorer".localized,
title: "id_view_in_explorer".localized,
action: .explorer)
)
}
if transaction.isLightning {} else {
models.append(
TxDetailsActionCellModel(icon: UIImage(named: "ic_tx_action_share")!,
title: "Share Transaction".localized,
title: "id_share_transaction".localized,
action: .shareTx)
)
}

if transaction.isLightning && !(transaction.isRefundableSwap ?? false) {
models.append(
TxDetailsActionCellModel(icon: UIImage(named: "ic_tx_action_more")!,
title: "More Details".localized,
title: "id_more_details".localized,
action: .more)
)
}

if transaction.isLightning && transaction.isRefundableSwap ?? false {
models.append(
TxDetailsActionCellModel(icon: UIImage(named: "ic_tx_action_revert")!.maskWithColor(color: UIColor.gGreenMatrix()),
title: "Initiate Refund".localized,
title: "id_initiate_refund".localized,
action: .refund)
)
}
Expand Down
2 changes: 1 addition & 1 deletion gaios/UserSettings/Models/UserSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ enum USSection: String, Codable, CaseIterable {

enum USItem: String, Codable, CaseIterable {
case Logout = "id_logout"
case UnifiedDenominationExchange = "Denomination & Exchange Rate"
case UnifiedDenominationExchange = "id_denomination__exchange_rate"
case ArchievedAccounts = "id_archived_accounts"
case WatchOnly = "id_watchonly"
case ChangePin = "id_change_pin"
Expand Down
Loading

0 comments on commit fefc676

Please sign in to comment.