diff --git a/App/Modules/WalletRename/RenameViewController.swift b/App/Modules/WalletRename/RenameViewController.swift
index 6a3bc25c..cc781f61 100644
--- a/App/Modules/WalletRename/RenameViewController.swift
+++ b/App/Modules/WalletRename/RenameViewController.swift
@@ -15,7 +15,9 @@ protocol RenameViewControllerDelegate:class {
class RenameViewController: BaseViewController {
- @IBOutlet weak var nameWalletTF:UITextField!
+ @IBOutlet var nameLabel: UILabel!
+ @IBOutlet var nameWalletTF: UITextField!
+ @IBOutlet var saveBarButtonItem: UIBarButtonItem!
var selectedWalletName:String!
let service = HDWalletServiceImplementation()
@@ -34,17 +36,14 @@ class RenameViewController: BaseViewController {
override func viewDidLoad() {
super.viewDidLoad()
- let rightBarButton = UIBarButtonItem(title: NSLocalizedString("Save", comment: ""), style: .plain, target: self, action: #selector(self.saveWalletName))
- navigationItem.setRightBarButton(rightBarButton, animated: false)
+
+ title = LocalizedStrings.title
+ nameLabel.text = LocalizedStrings.nameLabelTitle
+ nameWalletTF.placeholder = LocalizedStrings.nameTextFieldPlaceholder
}
func addCancelButtonIfNeed() {
- let cancel = UIButton(type: .system)
- cancel.setTitle("Cancel", for: .normal)
- cancel.setTitleColor(UIColor.mainColor, for: .normal)
- cancel.titleLabel?.font = UIFont.systemFont(ofSize: 17)
- cancel.addTarget(self, action: #selector(fadeOut), for: .touchUpInside)
- navigationItem.leftBarButtonItem = UIBarButtonItem(customView: cancel)
+ navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(fadeOut))
}
@objc func fadeOut() {
@@ -95,3 +94,13 @@ class RenameViewController: BaseViewController {
}
}
+
+private extension RenameViewController {
+
+ struct LocalizedStrings {
+ static let title = NSLocalizedString("Title", tableName: "WalletRename", comment: "")
+ static let nameLabelTitle = NSLocalizedString("WalletNameLabelTitle", tableName: "WalletRename", comment: "")
+ static let nameTextFieldPlaceholder = NSLocalizedString("WalletNameTextFieldPlaceholder", tableName: "WalletRename", comment: "")
+ }
+
+}
diff --git a/App/Modules/WalletRename/WalletRename.storyboard b/App/Modules/WalletRename/WalletRename.storyboard
index 522a7a2a..44a7583f 100644
--- a/App/Modules/WalletRename/WalletRename.storyboard
+++ b/App/Modules/WalletRename/WalletRename.storyboard
@@ -4,6 +4,7 @@
+
@@ -12,49 +13,56 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/App/Modules/WalletRename/WalletRename.strings b/App/Modules/WalletRename/WalletRename.strings
new file mode 100644
index 00000000..d3db91f5
--- /dev/null
+++ b/App/Modules/WalletRename/WalletRename.strings
@@ -0,0 +1,12 @@
+/*
+ WalletRename.strings
+ BankexWallet
+
+ Created by Oleg Kolomyitsev on 10/01/2019.
+ Copyright © 2019 BANKEX Foundation. All rights reserved.
+*/
+
+"Title" = "Rename Wallet";
+"WalletNameLabelTitle" = "Name";
+"WalletNameTextFieldPlaceholder" = "Wallet Name";
+
diff --git a/BankexWallet.xcodeproj/project.pbxproj b/BankexWallet.xcodeproj/project.pbxproj
index b58434fa..bbd960fe 100644
--- a/BankexWallet.xcodeproj/project.pbxproj
+++ b/BankexWallet.xcodeproj/project.pbxproj
@@ -248,6 +248,7 @@
92BCEDEA21D0D805002264FE /* TransactionDetailsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92BCEDE921D0D805002264FE /* TransactionDetailsService.swift */; };
92BCEDEC21D0E23D002264FE /* TransactionDetails.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92BCEDEB21D0E23D002264FE /* TransactionDetails.swift */; };
92DF231521D3D65C00AF00A0 /* SFSafariViewController+AssetManagement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92DF231421D3D65C00AF00A0 /* SFSafariViewController+AssetManagement.swift */; };
+ 92E27B1321E7402B0033D214 /* WalletRename.strings in Resources */ = {isa = PBXBuildFile; fileRef = 92E27B1221E7402B0033D214 /* WalletRename.strings */; };
B81B598E56469045FD5A9424 /* Pods_BankexWalletUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 64A16C3A5FF4B56B886DA004 /* Pods_BankexWalletUITests.framework */; };
BC001E220296F73719F0697F /* Pods_Wallet_Widget.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1C33ADE69F5E6B37793B41AB /* Pods_Wallet_Widget.framework */; };
C7B75CCA6F60C9EB0D8D5C74 /* Pods_BankexWallet.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D481374BDCC0F5EA10FEDC13 /* Pods_BankexWallet.framework */; };
@@ -580,6 +581,7 @@
92BCEDE921D0D805002264FE /* TransactionDetailsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransactionDetailsService.swift; sourceTree = ""; };
92BCEDEB21D0E23D002264FE /* TransactionDetails.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransactionDetails.swift; sourceTree = ""; };
92DF231421D3D65C00AF00A0 /* SFSafariViewController+AssetManagement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SFSafariViewController+AssetManagement.swift"; sourceTree = ""; };
+ 92E27B1221E7402B0033D214 /* WalletRename.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = WalletRename.strings; sourceTree = ""; };
BD1E76CD13960E44B2411D0D /* Pods-BankexWalletUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BankexWalletUITests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BankexWalletUITests/Pods-BankexWalletUITests.debug.xcconfig"; sourceTree = ""; };
CD8DBF0DC86534920BCAE980 /* Pods-BankexWalletTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BankexWalletTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-BankexWalletTests/Pods-BankexWalletTests.release.xcconfig"; sourceTree = ""; };
CE3C7F6D77310F0641F1B97E /* Pods-Wallet Widget.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Wallet Widget.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Wallet Widget/Pods-Wallet Widget.debug.xcconfig"; sourceTree = ""; };
@@ -1046,6 +1048,7 @@
isa = PBXGroup;
children = (
71EB27A421D4CBEF00B9EE30 /* WalletRename.storyboard */,
+ 92E27B1221E7402B0033D214 /* WalletRename.strings */,
86BE227D2161895C00C1B18D /* RenameViewController.swift */,
);
path = WalletRename;
@@ -1861,6 +1864,7 @@
71155E7421B4F3F700ED7B4E /* AssetManagementEthFailure.xcassets in Resources */,
71EB27A821D5001B00B9EE30 /* NetworkAdd.storyboard in Resources */,
86D7FB8721495AA0008245DE /* PlaceholderCell.xib in Resources */,
+ 92E27B1321E7402B0033D214 /* WalletRename.strings in Resources */,
7185063021E61A1B00CA204F /* TransactionProcessing.storyboard in Resources */,
714B5ADB21CBBBD400CA729A /* TransactionDetails.strings in Resources */,
71EB27B421D5FAB200B9EE30 /* ContactAdd.storyboard in Resources */,