mirror of
https://github.com/lil-org/tokenary.git
synced 2024-12-03 06:25:10 +03:00
Update Strings
This commit is contained in:
parent
7ca27c2335
commit
a07161aa9f
@ -161,8 +161,8 @@ class Agent: NSObject {
|
|||||||
alert.messageText = "Quit Encrypted Ink?"
|
alert.messageText = "Quit Encrypted Ink?"
|
||||||
alert.informativeText = "You won't be able to sign requests."
|
alert.informativeText = "You won't be able to sign requests."
|
||||||
alert.alertStyle = .warning
|
alert.alertStyle = .warning
|
||||||
alert.addButton(withTitle: "OK")
|
alert.addButton(withTitle: Strings.ok)
|
||||||
alert.addButton(withTitle: "Cancel")
|
alert.addButton(withTitle: Strings.cancel)
|
||||||
if alert.runModal() == .alertFirstButtonReturn {
|
if alert.runModal() == .alertFirstButtonReturn {
|
||||||
NSApp.terminate(nil)
|
NSApp.terminate(nil)
|
||||||
}
|
}
|
||||||
@ -268,7 +268,7 @@ class Agent: NSObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if canDoLocalAuthentication {
|
if canDoLocalAuthentication {
|
||||||
context.localizedCancelTitle = "Cancel"
|
context.localizedCancelTitle = Strings.cancel
|
||||||
didStartInitialLAEvaluation = true
|
didStartInitialLAEvaluation = true
|
||||||
context.evaluatePolicy(.deviceOwnerAuthentication, localizedReason: reason.title) { [weak self] success, _ in
|
context.evaluatePolicy(.deviceOwnerAuthentication, localizedReason: reason.title) { [weak self] success, _ in
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
|
@ -162,8 +162,8 @@ class AccountsListViewController: NSViewController {
|
|||||||
alert.messageText = "Back up new account."
|
alert.messageText = "Back up new account."
|
||||||
alert.informativeText = "You will see 12 secret words."
|
alert.informativeText = "You will see 12 secret words."
|
||||||
alert.alertStyle = .critical
|
alert.alertStyle = .critical
|
||||||
alert.addButton(withTitle: "OK")
|
alert.addButton(withTitle: Strings.ok)
|
||||||
alert.addButton(withTitle: "Cancel")
|
alert.addButton(withTitle: Strings.cancel)
|
||||||
if alert.runModal() == .alertFirstButtonReturn {
|
if alert.runModal() == .alertFirstButtonReturn {
|
||||||
createNewAccountAndShowSecretWords()
|
createNewAccountAndShowSecretWords()
|
||||||
}
|
}
|
||||||
@ -214,7 +214,7 @@ class AccountsListViewController: NSViewController {
|
|||||||
alert.messageText = "Removed accounts can't be recovered."
|
alert.messageText = "Removed accounts can't be recovered."
|
||||||
alert.alertStyle = .critical
|
alert.alertStyle = .critical
|
||||||
alert.addButton(withTitle: "Remove anyway")
|
alert.addButton(withTitle: "Remove anyway")
|
||||||
alert.addButton(withTitle: "Cancel")
|
alert.addButton(withTitle: Strings.cancel)
|
||||||
if alert.runModal() == .alertFirstButtonReturn {
|
if alert.runModal() == .alertFirstButtonReturn {
|
||||||
agent.askAuthentication(on: view.window, getBackTo: self, onStart: false, reason: .removeAccount) { [weak self] allowed in
|
agent.askAuthentication(on: view.window, getBackTo: self, onStart: false, reason: .removeAccount) { [weak self] allowed in
|
||||||
Window.activateWindow(self?.view.window)
|
Window.activateWindow(self?.view.window)
|
||||||
@ -234,7 +234,7 @@ class AccountsListViewController: NSViewController {
|
|||||||
alert.messageText = "\(isMnemonic ? "Secret words give" : "Private key gives") full access to your funds."
|
alert.messageText = "\(isMnemonic ? "Secret words give" : "Private key gives") full access to your funds."
|
||||||
alert.alertStyle = .critical
|
alert.alertStyle = .critical
|
||||||
alert.addButton(withTitle: "I understand the risks")
|
alert.addButton(withTitle: "I understand the risks")
|
||||||
alert.addButton(withTitle: "Cancel")
|
alert.addButton(withTitle: Strings.cancel)
|
||||||
if alert.runModal() == .alertFirstButtonReturn {
|
if alert.runModal() == .alertFirstButtonReturn {
|
||||||
let reason: AuthenticationReason = isMnemonic ? .showSecretWords : .showPrivateKey
|
let reason: AuthenticationReason = isMnemonic ? .showSecretWords : .showPrivateKey
|
||||||
agent.askAuthentication(on: view.window, getBackTo: self, onStart: false, reason: reason) { [weak self] allowed in
|
agent.askAuthentication(on: view.window, getBackTo: self, onStart: false, reason: reason) { [weak self] allowed in
|
||||||
@ -264,7 +264,7 @@ class AccountsListViewController: NSViewController {
|
|||||||
alert.messageText = mnemonic ? "Secret words" : "Private key"
|
alert.messageText = mnemonic ? "Secret words" : "Private key"
|
||||||
alert.informativeText = secret
|
alert.informativeText = secret
|
||||||
alert.alertStyle = .informational
|
alert.alertStyle = .informational
|
||||||
alert.addButton(withTitle: "OK")
|
alert.addButton(withTitle: Strings.ok)
|
||||||
alert.addButton(withTitle: "Copy")
|
alert.addButton(withTitle: "Copy")
|
||||||
if alert.runModal() != .alertFirstButtonReturn {
|
if alert.runModal() != .alertFirstButtonReturn {
|
||||||
NSPasteboard.general.clearAndSetString(secret)
|
NSPasteboard.general.clearAndSetString(secret)
|
||||||
|
@ -32,8 +32,8 @@ class ImportViewController: NSViewController {
|
|||||||
let alert = Alert()
|
let alert = Alert()
|
||||||
alert.messageText = "Enter keystore password."
|
alert.messageText = "Enter keystore password."
|
||||||
alert.alertStyle = .informational
|
alert.alertStyle = .informational
|
||||||
alert.addButton(withTitle: "OK")
|
alert.addButton(withTitle: Strings.ok)
|
||||||
alert.addButton(withTitle: "Cancel")
|
alert.addButton(withTitle: Strings.cancel)
|
||||||
|
|
||||||
let passwordTextField = NSSecureTextField(frame: NSRect(x: 0, y: 0, width: 160, height: 20))
|
let passwordTextField = NSSecureTextField(frame: NSRect(x: 0, y: 0, width: 160, height: 20))
|
||||||
passwordTextField.bezelStyle = .roundedBezel
|
passwordTextField.bezelStyle = .roundedBezel
|
||||||
|
@ -8,5 +8,7 @@ struct Strings {
|
|||||||
static let signMessage = "Sign Message"
|
static let signMessage = "Sign Message"
|
||||||
static let signPersonalMessage = "Sign Personal Message"
|
static let signPersonalMessage = "Sign Personal Message"
|
||||||
static let signTypedData = "Sign Typed Data"
|
static let signTypedData = "Sign Typed Data"
|
||||||
|
static let cancel = "Cancel"
|
||||||
|
static let ok = "OK"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ class Alert: NSAlert {
|
|||||||
let alert = Alert()
|
let alert = Alert()
|
||||||
alert.messageText = message
|
alert.messageText = message
|
||||||
alert.alertStyle = style
|
alert.alertStyle = style
|
||||||
alert.addButton(withTitle: "OK")
|
alert.addButton(withTitle: Strings.ok)
|
||||||
_ = alert.runModal()
|
_ = alert.runModal()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user