tangchao hace 3 meses
padre
commit
e89c16e518

+ 2 - 2
PDF Office/PDF Master/Class/Common/Tools/KMTools.swift

@@ -331,8 +331,8 @@ extension KMTools {
             return
         }
         
-        let version = KMTools.getAppVersion()
-        fileName.append(" v\(version).\(fileType)")
+        fileName = fileName.components(separatedBy: ".").first ?? NSLocalizedString("Quick Start Guide", comment: "")
+        fileName.append(".\(fileType)")
         
         let folderPath = NSSearchPathForDirectoriesInDomains(.applicationSupportDirectory, .userDomainMask, true).last?.appending("/\(Bundle.main.bundleIdentifier!)")
         if (FileManager.default.fileExists(atPath: folderPath!) == false) {

+ 2 - 1
PDF Office/PDF Master/MemberCenter/Assets/en.lproj/MemberCenterLocalizable.strings

@@ -19,6 +19,7 @@
 "Stay signed in" = "Stay signed in";
 "Sign in(button)" = "Sign in";
 "I have read and agreed to the %@ and %@. An account will be automatically created after signing in with an unregistered email address." = "I have read and agreed to the %@ and %@. An account will be automatically created after signing in with an unregistered email address.";
+"I have read and agreed to the %@ and %@." = "I have read and agreed to the %@ and %@.";
 "Terms of Service" = "Terms of Service";
 "Privacy Policy" = "Privacy Policy";
 "Please agree and check the agreement first." = "Please agree and check the agreement first.";
@@ -129,7 +130,7 @@
 "Mail send error." = "Mail send error.";
 "Code send too quickly!" = "Code send too quickly!";
 "This email is already associated with an account. please log in." = "This email is already associated with an account. please log in.";
-"The current account is not registered. Click Next and we will register an account for you." = "The current account is not registered. Click Next and we will register an account for you.";
+"The current account is not registered. Please sign up using the verification code directly." = "The current account is not registered. Please sign up using the verification code directly.";
 "The account is being removed and unable to log in. If you have any questions, please get in touch with customer service." = "The account is being removed and unable to log in. If you have any questions, please get in touch with customer service.";
 "Please enter the correct email format." = "Please enter the correct email format.";
 "Password is inconsistent, please re-enter." = "Password is inconsistent, please re-enter.";

+ 2 - 1
PDF Office/PDF Master/MemberCenter/Assets/zh-Hans.lproj/MemberCenterLocalizable.strings

@@ -17,6 +17,7 @@
 "Stay signed in" = "保持登录";
 "Sign in(button)" = "立即登录";
 "I have read and agreed to the %@ and %@. An account will be automatically created after signing in with an unregistered email address." = "我已阅读并同意%@和%@,未注册的邮箱登录后将自动创建账号。";
+"I have read and agreed to the %@ and %@." = "我已阅读并同意%@和%@。";
 "Terms of Service" = "用户协议";
 "Privacy Policy" = "隐私政策";
 "Please agree and check the agreement first." = "请先同意并勾选以下协议。";
@@ -125,7 +126,7 @@
 "Mail send error." = "邮件发送错误。";
 "Code send too quickly!" = "验证码发送频繁!";
 "This email is already associated with an account. please log in." = "该邮箱已有账号,请前往登录。";
-"The current account is not registered. Click Next and we will register an account for you." = "当前账号未注册,点击下一步我们将为您注册账号。";
+"The current account is not registered. Please sign up using the verification code directly." = "当前邮箱未注册。请通过验证码登录方式直接注册。";
 "The account is being removed and unable to log in. If you have any questions, please get in touch with customer service." = "账户注销中,无法登录,若有问题可联系客服。";
 "Please enter the correct email format." = "请输入正确的邮箱格式。";
 "Password is inconsistent, please re-enter." = "密码不一致,请重新输入。";

+ 2 - 1
PDF Office/PDF Master/MemberCenter/Assets/zh-Hant.lproj/MemberCenterLocalizable.strings

@@ -17,6 +17,7 @@
 "Stay signed in" = "保持登入";
 "Sign in(button)" = "立即登入";
 "I have read and agreed to the %@ and %@. An account will be automatically created after signing in with an unregistered email address." = "我已閱讀並同意%@和%@,未註冊的電子郵件登入後將自動建立帳戶。";
+"I have read and agreed to the %@ and %@." = "我已閱讀並同意%@和%@。";
 "Terms of Service" = "用戶協議";
 "Privacy Policy" = "隱私權政策";
 "Please agree and check the agreement first." = "請先同意並勾選以下協議。";
@@ -126,7 +127,7 @@
 "Mail send error." = "郵件發送錯誤。";
 "Code send too quickly!" = "驗證碼發送頻繁!";
 "This email is already associated with an account. please log in." = "信箱已有帳號,請前往登入。";
-"The current account is not registered. Click Next and we will register an account for you." = "目前帳號未註冊,點選下一步我們將為您註冊帳號。";
+"The current account is not registered. Please sign up using the verification code directly." = "目前郵箱未註冊。請透過驗證碼登入方式直接註冊。";
 "The account is being removed and unable to log in. If you have any questions, please get in touch with customer service." = "帳戶登出中,無法登入,若有問題可聯絡客服。";
 "Please enter the correct email format." = "請輸入正確的郵箱格式。";
 "Password is inconsistent, please re-enter." = "密碼不一致,請重新輸入。";

+ 1 - 1
PDF Office/PDF Master/MemberCenter/Model/KMMemberCenterManager.swift

@@ -1754,7 +1754,7 @@ class KMMemberCenterManager: NSObject {
             result = "This email is already associated with an account. please log in."
             break;
         case .EXCEPTION_MSG_EMAIL_NOT_REGISTER:
-            result = "The current account is not registered. Click Next and we will register an account for you."
+            result = "The current account is not registered. Please sign up using the verification code directly."
             break;
         case .EXCEPTION_MSG_EMAIL_LOGOUT_ING:
             result = "The account is being removed and unable to log in. If you have any questions, please get in touch with customer service."

+ 67 - 28
PDF Office/PDF Master/MemberCenter/View/KMSignUpView.swift

@@ -44,6 +44,62 @@ class KMSignUpView: KMBaseXibView {
     
     private var popOver_: NSPopover?
     
+    private lazy var codePrivacyAttri_: NSAttributedString = {
+        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)
+        // 定义链接的范围
+        let specialOfferRange = (fullString as NSString).range(of: specialOffer)
+        let contactsUsRange = (fullString as NSString).range(of: contactsUs)
+        let linkColor = NSColor(named: "4982E6") ?? NSColor.blue
+        let font = NSFont.SFProTextRegularFont(11.0) // 与普通文本相同的字体
+        attributedString.addAttributes([
+            .foregroundColor: NSColor(named: "0E1114") ?? NSColor.black as Any,
+            .font: font
+        ], range: (fullString as NSString).range(of: fullString))
+        attributedString.addAttributes([
+            .foregroundColor: linkColor,
+            .link: NSLocalizedString("https://www.pdfreaderpro.com/terms_of_service", comment: ""),
+            .font: font
+        ], range: specialOfferRange)
+        attributedString.addAttributes([
+            .foregroundColor: linkColor,
+            .link: NSLocalizedString("https://www.pdfreaderpro.com/privacy-policy", comment: ""),
+            .font: font
+        ], range: contactsUsRange)
+        return attributedString
+    }()
+    
+    private lazy var privacyAttri_: NSAttributedString = {
+        let tipsString = NSLocalizedString("I have read and agreed to the %@ and %@.", 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)
+        // 定义链接的范围
+        let specialOfferRange = (fullString as NSString).range(of: specialOffer)
+        let contactsUsRange = (fullString as NSString).range(of: contactsUs)
+        let linkColor = NSColor(named: "4982E6") ?? NSColor.blue
+        let font = NSFont.SFProTextRegularFont(11.0) // 与普通文本相同的字体
+        attributedString.addAttributes([
+            .foregroundColor: NSColor(named: "0E1114") ?? NSColor.black as Any,
+            .font: font
+        ], range: (fullString as NSString).range(of: fullString))
+        attributedString.addAttributes([
+            .foregroundColor: linkColor,
+            .link: NSLocalizedString("https://www.pdfreaderpro.com/terms_of_service", comment: ""),
+            .font: font
+        ], range: specialOfferRange)
+        attributedString.addAttributes([
+            .foregroundColor: linkColor,
+            .link: NSLocalizedString("https://www.pdfreaderpro.com/privacy-policy", comment: ""),
+            .font: font
+        ], range: contactsUsRange)
+        return attributedString
+    }()
+    
     convenience init(model: KMSignUpViewModel, superView: NSView) {
         self.init(frame: superView.bounds)
         viewModel = model
@@ -87,9 +143,11 @@ class KMSignUpView: KMBaseXibView {
         
         NotificationCenter.default.addObserver(self, selector: #selector(loginSuccessNotification), name: NSNotification.Name(rawValue: "MemberCenterLoginSuccess"), object: nil)
         
-        bindViewModel()
-        languageLocalized()
-        initializeUI()
+        DispatchQueue.main.async { [weak self] in
+            self?.bindViewModel()
+            self?.languageLocalized()
+            self?.initializeUI()
+        }
     }
     
     // MARK: Private Method
@@ -155,31 +213,8 @@ class KMSignUpView: KMBaseXibView {
         privacyLabel.allowsEditingTextAttributes = true
         privacyLabel.textColor = NSColor.black
         privacyLabel.font = NSFont.SFProTextRegularFont(16.0)
-        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)
-        // 定义链接的范围
-        let specialOfferRange = (fullString as NSString).range(of: specialOffer)
-        let contactsUsRange = (fullString as NSString).range(of: contactsUs)
-        let linkColor = NSColor(named: "4982E6") ?? NSColor.blue
-        let font = NSFont.SFProTextRegularFont(11.0) // 与普通文本相同的字体
-        attributedString.addAttributes([
-            .foregroundColor: NSColor(named: "0E1114") ?? NSColor.black as Any,
-            .font: font
-        ], range: (fullString as NSString).range(of: fullString))
-        attributedString.addAttributes([
-            .foregroundColor: linkColor,
-            .link: NSLocalizedString("https://www.pdfreaderpro.com/terms_of_service", comment: ""),
-            .font: font
-        ], range: specialOfferRange)
-        attributedString.addAttributes([
-            .foregroundColor: linkColor,
-            .link: NSLocalizedString("https://www.pdfreaderpro.com/privacy-policy", comment: ""),
-            .font: font
-        ], range: contactsUsRange)
-        privacyLabel.attributedStringValue = attributedString
+        
+        privacyLabel.attributedStringValue = codePrivacyAttri_
         
         signUpStateChange()
         visibleStateChange()
@@ -219,6 +254,8 @@ class KMSignUpView: KMBaseXibView {
             passwordView.isHidden = true
             verifficationTextField.placeholderString = NSLocalizedString("Please enter code", tableName: "MemberCenterLocalizable", comment: "")
             forgetButton.isHidden = true
+            
+            privacyLabel.attributedStringValue = codePrivacyAttri_
         } else if viewModel.signUpState == .password {
             selectBox1.isHidden = true
             selectBox2.isHidden = false
@@ -229,6 +266,8 @@ class KMSignUpView: KMBaseXibView {
             passwordTextField.placeholderString = NSLocalizedString("Please enter password", tableName: "MemberCenterLocalizable", comment: "")
             passwordTextField1.placeholderString = NSLocalizedString("Please enter password", tableName: "MemberCenterLocalizable", comment: "")
             forgetButton.isHidden = false
+            
+            privacyLabel.attributedStringValue = privacyAttri_
         }
     }