|
@@ -70,19 +70,19 @@ class KMSignUpView: KMBaseXibView {
|
|
|
// MARK: Private Method
|
|
|
|
|
|
private func languageLocalized() -> Void {
|
|
|
- signUpLabel.stringValue = NSLocalizedString("Sign Up", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
- verificationCodeButton.title = NSLocalizedString("Verification code", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
+ signUpLabel.stringValue = NSLocalizedString("Sign in(titile)", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
+ verificationCodeButton.title = NSLocalizedString("Verification Code", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
passwordButton.title = NSLocalizedString("Password", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
- stayLabel.stringValue = NSLocalizedString("Stay logged in", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
- forgetButton.title = NSLocalizedString("Forget Password?", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
- signUpButton.title = NSLocalizedString("Sign Up", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
- emailErrorLabel.stringValue = String(format: "*%@", NSLocalizedString("Please enter right Address", tableName: "MemberCenterLocalizable", comment: ""))
|
|
|
- passwordErrorLabel.stringValue = String(format: "*%@", NSLocalizedString("Please enter right Verification code", tableName: "MemberCenterLocalizable", comment: ""))
|
|
|
- emailTextField.placeholderString = NSLocalizedString("Please enter Email", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
- verifficationTextField.placeholderString = NSLocalizedString("Enter Verification code", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
- passwordTextField.placeholderString = NSLocalizedString("Password", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
- passwordTextField1.placeholderString = NSLocalizedString("Password", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
- privacyCheckButton.toolTip = NSLocalizedString("Please first agree and check the above agreement.", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
+ stayLabel.stringValue = NSLocalizedString("Stay signed in", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
+ forgetButton.title = NSLocalizedString("Forgot password?", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
+ signUpButton.title = NSLocalizedString("Sign in(button)", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
+ emailErrorLabel.stringValue = String(format: "*%@", NSLocalizedString("Email format error. Please enter the correct email.", tableName: "MemberCenterLocalizable", comment: ""))
|
|
|
+ passwordErrorLabel.stringValue = String(format: "*%@", NSLocalizedString("Verification code error.", tableName: "MemberCenterLocalizable", comment: ""))
|
|
|
+ emailTextField.placeholderString = NSLocalizedString("Please enter email address", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
+ verifficationTextField.placeholderString = NSLocalizedString("Please enter code", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
+ passwordTextField.placeholderString = NSLocalizedString("Please enter password", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
+ passwordTextField1.placeholderString = NSLocalizedString("Please enter password", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
+ privacyCheckButton.toolTip = NSLocalizedString("Please agree and check the above agreement first.", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
emailTextField.stringValue = viewModel.email
|
|
|
verifficationTextField.stringValue = viewModel.verificationCode
|
|
|
passwordTextField.stringValue = viewModel.password
|
|
@@ -127,9 +127,9 @@ class KMSignUpView: KMBaseXibView {
|
|
|
privacyLabel.allowsEditingTextAttributes = true
|
|
|
privacyLabel.textColor = NSColor.black
|
|
|
privacyLabel.font = NSFont.SFProTextRegularFont(16.0)
|
|
|
- let tipsString = NSLocalizedString("I have read and agree to the %@ and %@, and an account will be automatically created after I log in to an unregistered email address", comment: "")
|
|
|
- let specialOffer = NSLocalizedString("User Agreement", comment: "")
|
|
|
- let contactsUs = NSLocalizedString("Privacy Policy", comment: "")
|
|
|
+ let tipsString = NSLocalizedString("I have read and agreed to the %@ and %@. An account will be automatically created after signing in with an unregistered email address.", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
+ let specialOffer = NSLocalizedString("Terms of Service", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
+ let contactsUs = NSLocalizedString("Privacy Policy", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
let fullString = String(format: tipsString, specialOffer, contactsUs)
|
|
|
let attributedString = NSMutableAttributedString(string: fullString)
|
|
|
// 定义链接的范围
|
|
@@ -190,7 +190,7 @@ class KMSignUpView: KMBaseXibView {
|
|
|
passwordButton.setTitleColor(color: NSColor(named: "42464D") ?? NSColor.black, font: NSFont.SFProTextRegularFont(14))
|
|
|
verifficationView.isHidden = false
|
|
|
passwordView.isHidden = true
|
|
|
- verifficationTextField.placeholderString = NSLocalizedString("Enter Verification code", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
+ verifficationTextField.placeholderString = NSLocalizedString("Please enter code", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
forgetButton.isHidden = true
|
|
|
} else if viewModel.signUpState == .password {
|
|
|
selectBox1.isHidden = true
|
|
@@ -199,8 +199,8 @@ class KMSignUpView: KMBaseXibView {
|
|
|
passwordButton.setTitleColor(color: NSColor(named: "4982E6") ?? NSColor.black, font: NSFont.SFProTextRegularFont(14))
|
|
|
verifficationView.isHidden = true
|
|
|
passwordView.isHidden = false
|
|
|
- passwordTextField.placeholderString = NSLocalizedString("Password", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
- passwordTextField1.placeholderString = NSLocalizedString("Password", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
+ passwordTextField.placeholderString = NSLocalizedString("Please enter password", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
+ passwordTextField1.placeholderString = NSLocalizedString("Please enter password", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
forgetButton.isHidden = false
|
|
|
}
|
|
|
}
|
|
@@ -342,7 +342,7 @@ class KMSignUpView: KMBaseXibView {
|
|
|
if newValue.count <= 6 && newValue.count >= 0 {
|
|
|
self?.viewModel.passwordErrorMessage = ""
|
|
|
} else {
|
|
|
- self?.viewModel.passwordErrorMessage = NSLocalizedString("*Please enter right Verification code", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
+ self?.viewModel.passwordErrorMessage = NSLocalizedString("Verification code error.", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
}
|
|
|
}
|
|
|
.store(in: &cancellables)
|
|
@@ -352,7 +352,7 @@ class KMSignUpView: KMBaseXibView {
|
|
|
if newValue.count <= 30 && newValue.count >= 0 {
|
|
|
self?.viewModel.passwordErrorMessage = ""
|
|
|
} else {
|
|
|
- self?.viewModel.passwordErrorMessage = NSLocalizedString("*Please enter right Password code", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
+ self?.viewModel.passwordErrorMessage = NSLocalizedString("Account or password error.", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
}
|
|
|
}
|
|
|
.store(in: &cancellables)
|