Selaa lähdekoodia

Merge branch 'develop_PDFReaderProV4.6.0' of git.kdan.cc:Mac_PDF/PDF_Office into develop_PDFReaderProV4.6.0

tangchao 6 kuukautta sitten
vanhempi
commit
4ae9c52bed

+ 17 - 9
PDF Office/PDF Master/Class/Purchase/DMG/KMPurchaseEmbeddedWindowController.swift

@@ -261,9 +261,13 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
             }
         } else {
             pdfReaderProLabel.stringValue = NSLocalizedString("PDF Reader Pro for Mac", comment: "")
-            prmiumLabel.stringValue = NSLocalizedString("Premium and PDF to Office Converter", comment: "")
-            oneLicenseLabel.stringValue = NSLocalizedString("One License for One Mac. One Time Purchase.", comment: "")
-            
+            if productToType(originalProductID) == .ipaPremium {
+                prmiumLabel.stringValue = NSLocalizedString("Premium", comment: "")
+                oneLicenseLabel.stringValue = NSLocalizedString("One license for one device. One time purchase.", comment: "")
+            } else if productToType(originalProductID) == .ipaPermanent {
+                prmiumLabel.stringValue = NSLocalizedString("Permanent version (with PDF to Office Pack)", comment: "")
+                oneLicenseLabel.stringValue = NSLocalizedString("One license for one device. One time purchase.", comment: "")
+            }
             aiAddOnButton.image = NSImage(named: "EmbeddedPayment06")
             aiAddOnLabel.stringValue = NSLocalizedString("AI Add-on", comment: "")
             aiAddOnLabel.textColor = NSColor(named: "KMPurchaseTitleColor")
@@ -304,7 +308,7 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
 
         couponButton.title = NSLocalizedString("I have a coupon?", comment: "")
         couponButton.setTitleColor(color: NSColor(named: "KMPurchaseCouponColor")!, font: NSFont.SFProTextRegularFont(14))
-        coupomTextField.placeholderString = NSLocalizedString("Enter your coupon code and Apply it", comment: "")
+        coupomTextField.placeholderString = NSLocalizedString("Please enter a coupon code.", comment: "")
         applyButton.title = NSLocalizedString("Apply", comment: "")
         applyButton.setTitleColor(color: NSColor(named: "KMPurchaseApplyColor") ?? NSColor.black, font: NSFont.SFProTextRegularFont(13))
         couponBox.isHidden = true
@@ -353,7 +357,7 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
         attributedString.addAttribute(.font, value: font, range: (fullString as NSString).range(of: fullString))
         privacyLabel.attributedStringValue = attributedString
 
-        billInformationLabel.stringValue = NSLocalizedString("Bill Information", comment: "")
+        billInformationLabel.stringValue = NSLocalizedString("Billing Information", comment: "")
         billInformationLabel.textColor = NSColor(named: "KMPurchaseTitleColor1")
         billInformationLabel.font = NSFont.SFProTextRegularFont(14.0)
         emailLabel.stringValue = NSLocalizedString("Email", comment: "")
@@ -364,6 +368,7 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
         if VerificationManager.default().email != nil {
             emailTextField.stringValue = VerificationManager.default().email
         }
+        emailTextField.delegate = self
         errorLabel.textColor = NSColor(named: "KMPurchaseErrorColor")
         errorLabel.font = NSFont.SFProTextRegularFont(11.0)
         emailErrorLabel(isReveal: false)
@@ -380,7 +385,7 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
         payExplainLabel.font = NSFont.SFProTextRegularFont(11.0)
         let localizedString = NSLocalizedString("By submitting this order, I agree to the %@ and %@ for subscription products", comment: "")
         let privacyPolicy = NSLocalizedString("Privacy Policy", comment: "")
-        let termsOfService = NSLocalizedString("Terms of Service", comment: "")
+        let termsOfService = NSLocalizedString("Term Service", comment: "")
         let fullString1 = String(format: localizedString, privacyPolicy, termsOfService)
         let attributedString1 = NSMutableAttributedString(string: fullString1)
         let privacyPolicyRange = (fullString1 as NSString).range(of: privacyPolicy)
@@ -834,6 +839,7 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
     }
     
     @IBAction func payButtonAction(_ sender: NSButton) {
+        emailErrorLabel(isReveal: false)
         confirmPayment(isConfirm: false)
         refreshApplyButton(isReveal: true)
         paymentMethod = KMPaymentType(rawValue: uint32(sender.tag)) ?? .paypal
@@ -1028,8 +1034,10 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
         }
 
         var licenseCode = ""
-        if let license = VerificationManager.default().originLicenseCode, license.count > 0 {
-            licenseCode = license
+        if productID == "com.brother.pdfreaderpro.mac.product_2" {
+            if let license = VerificationManager.default().originLicenseCode, license.count > 0 {
+                licenseCode = license
+            }
         }
         self._buyProduct(productID, count: pdfCount, discountId: coupomTextField.stringValue, payment: paymentMethod, license: licenseCode, email: emailTextField.stringValue) { [weak self] info, err in
             guard let self = self else { return }
@@ -1640,7 +1648,7 @@ extension KMPurchaseEmbeddedWindowController: NSTextFieldDelegate {
             if !isNumeric(textField!.stringValue) {
                 if textField == amountTextField1 { textField?.stringValue = String(pdfCount) }
             }
-        }
+        } 
     }
 }
 

+ 3 - 1
PDF Office/PDF Master/Class/Purchase/DMG/KMPurchaseEmbeddedWindowController.xib

@@ -116,7 +116,7 @@
                                     <subviews>
                                         <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="D4J-Se-9AB">
                                             <rect key="frame" x="-2" y="2" width="210" height="16"/>
-                                            <textFieldCell key="cell" lineBreakMode="clipping" title="Are you a student or a professor? " id="ag6-6K-D9d">
+                                            <textFieldCell key="cell" title="Are you a student or a professor? " id="ag6-6K-D9d">
                                                 <font key="font" usesAppearanceFont="YES"/>
                                                 <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -127,6 +127,8 @@
                                         <constraint firstItem="D4J-Se-9AB" firstAttribute="top" secondItem="hQ9-hE-7SE" secondAttribute="top" constant="2" id="7aV-Ot-vTx"/>
                                         <constraint firstAttribute="bottom" secondItem="D4J-Se-9AB" secondAttribute="bottom" constant="2" id="OtY-Cy-YeS"/>
                                         <constraint firstItem="D4J-Se-9AB" firstAttribute="centerY" secondItem="hQ9-hE-7SE" secondAttribute="centerY" id="TBD-GV-YFs"/>
+                                        <constraint firstItem="D4J-Se-9AB" firstAttribute="top" secondItem="hQ9-hE-7SE" secondAttribute="top" constant="2" id="U0K-IA-VLi"/>
+                                        <constraint firstAttribute="bottom" secondItem="D4J-Se-9AB" secondAttribute="bottom" constant="2" id="cCQ-Co-b3S"/>
                                         <constraint firstItem="D4J-Se-9AB" firstAttribute="leading" secondItem="hQ9-hE-7SE" secondAttribute="leading" id="kC9-ph-ha2"/>
                                         <constraint firstAttribute="trailing" secondItem="D4J-Se-9AB" secondAttribute="trailing" id="s8e-kx-aIL"/>
                                     </constraints>

+ 5 - 3
PDF Office/PDF Master/Class/Purchase/DMG/Verification/KMVerificationWindowController.m

@@ -299,9 +299,11 @@ static KMVerificationWindowController *_currentWindowController = nil;
                                                 name:[VerificationManager manager].accountName] ;
             } else if (clickIndex == 1) {
                 //了解更多
-                NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@?utm_source=app_dmg&utm_medium=dmg_puw_sec_free_trial", Swift_oc_Tool.Store_Link_OC]];
-                [[NSWorkspace sharedWorkspace] openURL:url];
-                [blockSelf close];
+//                NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@?utm_source=app_dmg&utm_medium=dmg_puw_sec_free_trial", Swift_oc_Tool.Store_Link_OC]];
+//                [[NSWorkspace sharedWorkspace] openURL:url];
+//                [blockSelf close];
+                KMPurchaseCompareDMGWindowController *singleTon = [[KMPurchaseCompareDMGWindowController alloc] init];
+                [singleTon showWindow:nil];
             } else if (clickIndex == 2) {
                 //输入序列码
                 KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivate];

+ 4 - 1
PDF Office/PDF Master/Strings/en.lproj/Localizable.strings

@@ -4203,10 +4203,13 @@
 "Please enter right license code. How to Retrieve License." = "Please enter right license code. How to Retrieve License.";
 "Input license code previously activated the app" = "Input license code previously activated the app";
 "By submitting this order, I agree to the Privacy Policy and Terms of Service for subscription products" = "By submitting this order, I agree to the Privacy Policy and Terms of Service for subscription products";
+"By submitting this order, I agree to the %@ and %@ for subscription products" = "By submitting this order, I agree to the %@ and %@ for subscription products";
 "Continue to Pay" = "Continue to Pay";
 "1 license code to activate 2 PCs. (Mac and Windows)" = "1 license code to activate 2 PCs. (Mac and Windows)";
 "Pay sum" = "Pay sum";
-"Are you a student or a professor? Get Special Offer / Want a volume purchase? Please Contact Us." = "Are you a student or a professor? Get Special Offer / Want a volume purchase? Please Contact Us.";
+"Are you a student or a professor? %@ / Want a volume purchase? Please %@." = "Are you a student or a professor? %@ / Want a volume purchase? Please %@.";
+"Get Special Offer" = "Get Special Offer";
+"Contact Us" = "Contact Us";
 "Applied" = "Applied";
 "Please enter a coupon code." = "Please enter a coupon code.";
 "Please enter your email for license receiving." = "Please enter your email for license receiving.";

+ 4 - 1
PDF Office/PDF Master/Strings/zh-Hans.lproj/Localizable.strings

@@ -4102,11 +4102,14 @@
 "The coupon code is invalid. Please try again." = "优惠劵代码无效、请重试。";
 "Please enter right license code. How to Retrieve License." = "请输入正确的许可证代码。如何检索许可证。";
 "Input license code previously activated the app" = "输入先前激活应用程序的许可证代码。";
-"By submitting this order, I agree to the Privacy Policy and Terms of Service for subscription products" = "通过提交此订单,我同意订阅产品的隐私政策和服务条款";
+"By submitting this order, I agree to the %@ and %@ for subscription products" = "通过提交此订单,我同意订阅产品的%@和%@";
 "Continue to Pay" = "继续支付";
 "1 license code to activate 2 PCs. (Mac and Windows)" = "一个序列码可激活两台桌机设备(Mac和Windows)";
 "Pay sum" = "支付金额";
 "Are you a student or a professor? Get Special Offer / Want a volume purchase? Please Contact Us." = "点击此处申请教育折扣。申请批量采购折扣请联系我们。";
+"Are you a student or a professor? %@ / Want a volume purchase? Please %@." = "点击此处%@。申请批量采购折扣请%@。";
+"Get Special Offer" = "申请教育折扣";
+"Contact Us" = "联系我们";
 "Applied" = "已应用";
 "Please enter a coupon code." = "请输入优惠券码。";
 "Please enter your email for license receiving." = "请输入邮箱,用于接收序列码。";

+ 4 - 2
PDF Office/PDF Master/Strings/zh-Hant.lproj/Localizable.strings

@@ -4234,11 +4234,13 @@
 "The coupon code is invalid. Please try again." = "優惠劵代碼無效、請重試。";
 "Please enter right license code. How to Retrieve License." = "請輸入正確的許可證代碼。";
 "Input license code previously activated the app" = "輸入先前啟動應用程式的許可證代碼。";
-"By submitting this order, I agree to the Privacy Policy and Terms of Service for subscription products" = "提交此訂單,我同意訂閱產品的隱私和服務政策條款";
+"By submitting this order, I agree to the %@ and %@ for subscription products" = "提交此訂單,我同意訂閱產品的%@和%@";
 "Continue to Pay" = "繼續支付";
 "1 license code to activate 2 PCs. (Mac and Windows)" = "一個序號可啟動突變桌機設備(Mac和Windows)";
 "Pay sum" = "支付金額";
-"Are you a student or a professor? Get Special Offer / Want a volume purchase? Please Contact Us." = "點擊此處申請教育折扣。";
+"Are you a student or a professor? %@ / Want a volume purchase? Please %@." = "點擊此處%@。申請批量採購折扣%@。";
+"Get Special Offer" = "獲得特別優惠";
+"Contact Us" = "聯絡我們";
 "Applied" = "已申請";
 "Please enter a coupon code." = "請輸入優惠券碼。";
 "Please enter your email for license receiving." = "請輸入郵箱,用於接收序號。";