Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions PasscodeLock/Functions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import Foundation
func localizedStringFor(key: String, comment: String) -> String {

let name = "PasscodeLock"
let bundle = bundleForResource(name, ofType: "strings")
let defaultString = NSLocalizedString(key, tableName: name, bundle: NSBundle(forClass: PasscodeLock.self), comment: comment)

return NSLocalizedString(key, tableName: name, bundle: bundle, comment: comment)
return NSLocalizedString(key, value: defaultString, tableName: name, bundle: NSBundle.mainBundle(), comment: comment)
}

func bundleForResource(name: String, ofType type: String) -> NSBundle {
Expand Down
3 changes: 3 additions & 0 deletions PasscodeLock/PasscodeLockViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ public class PasscodeLockViewController: UIViewController, PasscodeLockTypeDeleg
super.viewDidLoad()

updatePasscodeView()

cancelButton?.setTitle(localizedStringFor("PasscodeLockCancelButtonTitle", comment: "Cancel Button Title"), forState: .Normal)
deleteSignButton?.setTitle(localizedStringFor("PasscodeLockDeleteButtonTitle", comment: "Delete Button Title"), forState: .Normal)
deleteSignButton?.enabled = false

setupEvents()
Expand Down
6 changes: 6 additions & 0 deletions PasscodeLock/en.lproj/PasscodeLock.strings
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
"PasscodeLockMismatchTitle" = "Try again";
"PasscodeLockMismatchDescription" = "Passcodes didn\'t match.";

/* Cancel Button Title */
"PasscodeLockCancelButtonTitle" = "Cancel";

/* Delete Button Title */
"PasscodeLockDeleteButtonTitle" = "Delete";

/* Touch ID Reason */
"PasscodeLockTouchIDReason" = "Authentication required to proceed";

Expand Down