|
@@ -85,15 +85,11 @@ private var passwordInputWindow_private: KMPasswordInputWindow?
|
|
|
|
|
|
let ps = NSMutableParagraphStyle()
|
|
|
ps.lineSpacing = 5
|
|
|
-// ps.lineBreakMode = .byTruncatingTail
|
|
|
-// if (newValue == .open) {
|
|
|
-// despLabel!.stringValue = "\"\(fileName)\"\(NSLocalizedString("is protected, please enter a Document Open Password.", comment: ""))"
|
|
|
-// despLabel!.attributedStringValue = NSAttributedString(string: despLabel!.stringValue, attributes: [.foregroundColor : NSColor.titleColor(), .font : NSFont.SFProTextRegularFont(14), .paragraphStyle : ps])
|
|
|
-// } else {
|
|
|
- despLabel!.stringValue = "\"\(fileName)\"\(NSLocalizedString("is protected, please enter the password to unlock it.", comment: ""))"
|
|
|
+
|
|
|
+ despLabel!.stringValue = "\"\(fileName)\"\(NSLocalizedString("This PDF is password protected. Please enter the password below to access this PDF.", comment: ""))"
|
|
|
despLabel!.attributedStringValue = NSAttributedString(string: despLabel!.stringValue, attributes: [.foregroundColor : NSColor.titleColor(), .font : NSFont.SFProTextRegularFont(14), .paragraphStyle : ps])
|
|
|
-// }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -121,7 +117,7 @@ private var passwordInputWindow_private: KMPasswordInputWindow?
|
|
|
}
|
|
|
|
|
|
if despLabel != nil {
|
|
|
- despLabel.stringValue = NSLocalizedString("is protected, please enter the password to unlock it.", comment: "")
|
|
|
+ despLabel.stringValue = NSLocalizedString("This PDF is password protected. Please enter the password below to access this PDF.", comment: "")
|
|
|
self.despLabel.textColor = NSColor.titleColor()
|
|
|
despLabel.font = NSFont.SFProTextRegularFont(14)
|
|
|
despLabel.isSelectable = false
|
|
@@ -191,7 +187,7 @@ private var passwordInputWindow_private: KMPasswordInputWindow?
|
|
|
}
|
|
|
|
|
|
if passwordErrorLabel != nil {
|
|
|
- passwordErrorLabel.stringValue = NSLocalizedString("Password error", comment: "")
|
|
|
+ passwordErrorLabel.stringValue = NSLocalizedString("Incorrect password. Please try again.", comment: "")
|
|
|
passwordErrorLabel.font = NSFont.systemFont(ofSize: 12)
|
|
|
passwordErrorLabel.wantsLayer = true
|
|
|
passwordErrorLabel.textColor = NSColor.km_init(hex: "#F3465B")
|
|
@@ -304,6 +300,7 @@ private var passwordInputWindow_private: KMPasswordInputWindow?
|
|
|
} else { /// 密码错误
|
|
|
if passwordErrorLabel != nil {
|
|
|
passwordErrorLabel.isHidden = false
|
|
|
+ passwordErrorLabel.stringValue = NSLocalizedString("Incorrect password. Please try again.", comment: "")
|
|
|
}
|
|
|
if secureTextFiled != nil {
|
|
|
secureTextFiled.backgroundView.layer?.borderColor = NSColor.km_init(hex: "#F3465B").cgColor
|
|
@@ -329,6 +326,7 @@ private var passwordInputWindow_private: KMPasswordInputWindow?
|
|
|
} else { /// 密码错误
|
|
|
if passwordErrorLabel != nil {
|
|
|
passwordErrorLabel.isHidden = false
|
|
|
+ passwordErrorLabel.stringValue = NSLocalizedString("Incorrect password. Please try again.", comment: "")
|
|
|
}
|
|
|
if secureTextFiled != nil {
|
|
|
secureTextFiled.backgroundView.layer?.borderColor = NSColor.km_init(hex: "#F3465B").cgColor
|
|
@@ -348,6 +346,7 @@ private var passwordInputWindow_private: KMPasswordInputWindow?
|
|
|
} else { /// 密码错误
|
|
|
if passwordErrorLabel != nil {
|
|
|
passwordErrorLabel.isHidden = false
|
|
|
+ passwordErrorLabel.stringValue = NSLocalizedString("Incorrect password. Please try again.", comment: "")
|
|
|
}
|
|
|
if secureTextFiled != nil {
|
|
|
secureTextFiled.backgroundView.layer?.borderColor = NSColor.km_init(hex: "#F3465B").cgColor
|