Localize import wallet screen

pull/2/head
Michael Scoff 7 years ago
parent 873566f795
commit 461689e9a0
  1. 21
      Trust/Wallet/ViewControllers/ImportWalletViewController.swift

@ -96,7 +96,7 @@ class ImportWalletViewController: FormViewController {
} }
<<< AppFormAppearance.textArea(tag: Values.keystore) { <<< AppFormAppearance.textArea(tag: Values.keystore) {
$0.placeholder = "Keystore JSON" $0.placeholder = NSLocalizedString("Keystore JSON", value: "Keystore JSON", comment: "")
$0.textAreaHeight = .fixed(cellHeight: 140) $0.textAreaHeight = .fixed(cellHeight: 140)
$0.add(rule: RuleRequired()) $0.add(rule: RuleRequired())
@ -106,7 +106,7 @@ class ImportWalletViewController: FormViewController {
} }
<<< AppFormAppearance.textArea(tag: Values.privateKey) { <<< AppFormAppearance.textArea(tag: Values.privateKey) {
$0.placeholder = "Private Key" $0.placeholder = NSLocalizedString("Private Key", value: "Private Key", comment: "")
$0.textAreaHeight = .fixed(cellHeight: 140) $0.textAreaHeight = .fixed(cellHeight: 140)
$0.add(rule: RuleRequired()) $0.add(rule: RuleRequired())
$0.add(rule: PrivateKeyRule()) $0.add(rule: PrivateKeyRule())
@ -123,12 +123,12 @@ class ImportWalletViewController: FormViewController {
}.cellUpdate { cell, _ in }.cellUpdate { cell, _ in
cell.textField.isSecureTextEntry = true cell.textField.isSecureTextEntry = true
cell.textField.textAlignment = .left cell.textField.textAlignment = .left
cell.textField.placeholder = "Password" cell.textField.placeholder = NSLocalizedString("Password", value: "Password", comment: "")
} }
+++ Section("") +++ Section("")
<<< ButtonRow("Import") { <<< ButtonRow(NSLocalizedString("importWallet.import.button.title", value: "Import", comment: "")) {
$0.title = $0.tag $0.title = $0.tag
}.onCellSelection { [unowned self] _, _ in }.onCellSelection { [unowned self] _, _ in
self.importWallet() self.importWallet()
@ -195,12 +195,19 @@ class ImportWalletViewController: FormViewController {
} }
@objc func importOptions(sender: UIBarButtonItem) { @objc func importOptions(sender: UIBarButtonItem) {
let alertController = UIAlertController(title: "Import Wallet Options", message: .none, preferredStyle: .actionSheet) let alertController = UIAlertController(
title: NSLocalizedString("importWallet.import.alertSheet.title", value: "Import Wallet Options", comment: ""),
message: .none,
preferredStyle: .actionSheet
)
alertController.popoverPresentationController?.barButtonItem = sender alertController.popoverPresentationController?.barButtonItem = sender
alertController.addAction(UIAlertAction(title: "iCloud/Dropbox/Google Drive", style: .default) { _ in alertController.addAction(UIAlertAction(
title: NSLocalizedString("importWallet.import.alertSheet.option.title", value: "iCloud/Dropbox/Google Drive", comment: ""),
style: .default
) { _ in
self.showDocumentPicker() self.showDocumentPicker()
}) })
alertController.addAction(UIAlertAction(title: "Cancel", style: .cancel) { _ in }) alertController.addAction(UIAlertAction(title: NSLocalizedString("Cancel", value: "Cancel", comment: ""), style: .cancel) { _ in })
present(alertController, animated: true) present(alertController, animated: true)
} }

Loading…
Cancel
Save