ソースを参照

【综合】新增中文内嵌文档

wanjun 4 ヶ月 前
コミット
0cb8b4dffd

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

@@ -322,10 +322,10 @@ extension KMTools {
     @objc class func openQuickStartStudy() {
         // MARK: -
         // MARK: 内嵌文档需要替换
-        var fileName = "Quick Start Guide"
+        var fileName = NSLocalizedString("Quick Start Guide.pdf", comment: "")
         let fileType = "pdf"
         
-        let path = Bundle.main.path(forResource: fileName, ofType: fileType)
+        let path = Bundle.main.path(forResource: fileName, ofType: "")
         if (path == nil || FileManager.default.fileExists(atPath: path!) == false) {
             KMTools.openURL(url: URL(string: "https://www.pdfreaderpro.com/help"))
             return

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/AddHeaderFooter/New/View/KMHeaderFooterView.swift

@@ -173,7 +173,7 @@ class KMHeaderFooterView: KMBaseXibView, NSTextViewDelegate, NSComboBoxDelegate
     
     var initialID: String = ""
     
-    var filePath: String = Bundle.main.path(forResource: "Quick Start Guide", ofType: "pdf") ?? ""
+    var filePath: String = Bundle.main.path(forResource: NSLocalizedString("Quick Start Guide.pdf", comment: ""), ofType: "") ?? ""
     var password: String = ""
     var type: KMBatchModifyTemplateType = .Use // Replace with the actual type
     var pdfDocument: CPDFDocument? {

+ 2 - 2
PDF Office/PDF Master/Class/PDFTools/AddHeaderFooter/VC/KMBatchOperateAddHeaderFooterViewController.swift

@@ -309,7 +309,7 @@ class KMBatchOperateAddHeaderFooterViewController: KMBatchOperateBaseViewControl
 //            }
 //        }
 //        wc.beginSheetModal(for: NSApp.keyWindow!, completionHandler: nil)
-        let filePath: String = Bundle.main.path(forResource: "Quick Start Guide", ofType: "pdf") ?? ""
+        let filePath: String = Bundle.main.path(forResource: NSLocalizedString("Quick Start Guide.pdf", comment: ""), ofType: "") ?? ""
         var cdocument = self.pdfView?.document
         if isBatchOperation {
             cdocument = CPDFDocument(url: URL(fileURLWithPath: filePath))
@@ -523,7 +523,7 @@ class KMBatchOperateAddHeaderFooterViewController: KMBatchOperateBaseViewControl
 //        }
 //        wc?.beginSheetModalForWindow(NSApp.keyWindow, completionHandler: nil)
         
-        var filePath: String = Bundle.main.path(forResource: "Quick Start Guide", ofType: "pdf") ?? ""
+        var filePath: String = Bundle.main.path(forResource: NSLocalizedString("Quick Start Guide.pdf", comment: ""), ofType: "") ?? ""
         if self.pdfView?.document.documentURL.path.count ?? 0 > 0 {
             filePath = self.pdfView?.document.documentURL.path ?? ""
         }

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/AddHeaderFooter/WindowComtroller/KMHeaderFooterManagerWindowController.swift

@@ -15,7 +15,7 @@ class KMHeaderFooterManagerWindowController: NSWindowController{
     var onlyManagerTemplate: Bool = false
     
     lazy var filePath: String = {
-        var str = Bundle.main.path(forResource: "Quick Start Guide", ofType: "pdf")
+        var str = Bundle.main.path(forResource: NSLocalizedString("Quick Start Guide.pdf", comment: ""), ofType: "")
         return str ?? ""
     }()
     var password: String = ""

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/Background/New/View/KMAddBackgroundView.swift

@@ -86,7 +86,7 @@ class KMAddBackgroundView: KMBaseXibView, NSComboBoxDelegate {
         return bg
     }()
     var originalBackground: KMBackgroundModel = KMBackgroundModel()
-    var filePath: String = Bundle.main.path(forResource: "Quick Start Guide", ofType: "pdf") ?? ""
+    var filePath: String = Bundle.main.path(forResource: NSLocalizedString("Quick Start Guide.pdf", comment: ""), ofType: "") ?? ""
     var password: String = ""
     var type: KMBackgroundManagerType = .use
     var pdfDocument: CPDFDocument? {

+ 3 - 3
PDF Office/PDF Master/Class/PDFTools/Watermark/Controller/KMBatchOperateAddWatermarkViewController.swift

@@ -333,7 +333,7 @@ class KMBatchOperateAddWatermarkViewController: KMBatchOperateBaseViewController
     }
     
     @IBAction func buttonClicked_addtemplate(_ sender: NSButton) {
-        let filePath: String = Bundle.main.path(forResource: "Quick Start Guide", ofType: "pdf") ?? ""
+        let filePath: String = Bundle.main.path(forResource: NSLocalizedString("Quick Start Guide.pdf", comment: ""), ofType: "") ?? ""
         var cdocument = self.pdfView?.document
         if isBatchOperation {
             cdocument = CPDFDocument(url: URL(fileURLWithPath: filePath))
@@ -655,7 +655,7 @@ extension KMBatchOperateAddWatermarkViewController {
         }
     }
     func editBackground(_ background: KMBackgroundModel) {
-        var filePath: String = Bundle.main.path(forResource: "Quick Start Guide", ofType: "pdf") ?? ""
+        var filePath: String = Bundle.main.path(forResource: NSLocalizedString("Quick Start Guide.pdf", comment: ""), ofType: "") ?? ""
         if self.pdfView?.document.documentURL.path.count ?? 0 > 0 {
             filePath = self.pdfView?.document.documentURL.path ?? ""
         }
@@ -704,7 +704,7 @@ extension KMBatchOperateAddWatermarkViewController {
     
     func editWatermark(_ waterMark: KMWatermarkModel) {
         if !isBackground {
-            var filePath: String = Bundle.main.path(forResource: "Quick Start Guide", ofType: "pdf") ?? ""
+            var filePath: String = Bundle.main.path(forResource: NSLocalizedString("Quick Start Guide.pdf", comment: ""), ofType: "") ?? ""
             if self.pdfView?.document.documentURL.path.count ?? 0 > 0 {
                 filePath = self.pdfView?.document.documentURL.path ?? ""
             }

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/Watermark/New/View/KMWatermarkView.swift

@@ -90,7 +90,7 @@ class KMWatermarkView: KMBaseXibView, NSTextFieldDelegate, NSComboBoxDelegate, N
     
     var currentType: Int = 0
     
-    var filePath: String = Bundle.main.path(forResource: "Quick Start Guide", ofType: "pdf") ?? ""
+    var filePath: String = Bundle.main.path(forResource: NSLocalizedString("Quick Start Guide.pdf", comment: ""), ofType: "") ?? ""
     var password: String = ""
     var originalWatermark: KMWatermarkModel = KMWatermarkModel()
     var watermark: KMWatermarkModel = KMWatermarkModel()

BIN
PDF Office/PDF Master/Class/PDFWindowController/MainWindowController/快速教学.pdf


+ 2 - 0
PDF Office/PDF Master/Strings/zh-Hans.lproj/Localizable.strings

@@ -4167,3 +4167,5 @@
 
 "Note State" = "状态";
 "View Bookmarks" = "查看书签";
+
+"Quick Start Guide.pdf" = "快速教学.pdf";

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

@@ -4297,3 +4297,5 @@
 
 "Note State" = "狀態";
 "View Bookmarks" = "查看書籤";
+
+"Quick Start Guide.pdf" = "Quick Start Guide.pdf";

+ 12 - 4
PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

@@ -761,6 +761,9 @@
 		9F3A48C82C8017FA0047F565 /* KMPurchaseEmbeddedWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9F3A48C42C8017FA0047F565 /* KMPurchaseEmbeddedWindowController.xib */; };
 		9F3A48C92C8017FA0047F565 /* KMPurchaseEmbeddedWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9F3A48C42C8017FA0047F565 /* KMPurchaseEmbeddedWindowController.xib */; };
 		9F3A48CA2C8017FA0047F565 /* KMPurchaseEmbeddedWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9F3A48C42C8017FA0047F565 /* KMPurchaseEmbeddedWindowController.xib */; };
+		9F3BCDC82CCB749400BDAB67 /* 快速教学.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 9F3BCDC72CCB749400BDAB67 /* 快速教学.pdf */; };
+		9F3BCDC92CCB749400BDAB67 /* 快速教学.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 9F3BCDC72CCB749400BDAB67 /* 快速教学.pdf */; };
+		9F3BCDCA2CCB749400BDAB67 /* 快速教学.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 9F3BCDC72CCB749400BDAB67 /* 快速教学.pdf */; };
 		9F3D818729A0A9A60087B5AD /* KMDesignButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F3D818529A0A9A60087B5AD /* KMDesignButton.swift */; };
 		9F3D818829A0A9A60087B5AD /* KMDesignButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F3D818529A0A9A60087B5AD /* KMDesignButton.swift */; };
 		9F3D818929A0A9A60087B5AD /* KMDesignButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F3D818529A0A9A60087B5AD /* KMDesignButton.swift */; };
@@ -5943,6 +5946,7 @@
 		9F39B9432A661ED500930ACA /* KMHomeScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMHomeScrollView.swift; sourceTree = "<group>"; };
 		9F3A48C32C8017FA0047F565 /* KMPurchaseEmbeddedWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPurchaseEmbeddedWindowController.swift; sourceTree = "<group>"; };
 		9F3A48C42C8017FA0047F565 /* KMPurchaseEmbeddedWindowController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMPurchaseEmbeddedWindowController.xib; sourceTree = "<group>"; };
+		9F3BCDC72CCB749400BDAB67 /* 快速教学.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = "快速教学.pdf"; sourceTree = "<group>"; };
 		9F3D818529A0A9A60087B5AD /* KMDesignButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMDesignButton.swift; sourceTree = "<group>"; };
 		9F3D818629A0A9A60087B5AD /* KMDesignButton.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMDesignButton.xib; sourceTree = "<group>"; };
 		9F3D818D29A22AD90087B5AD /* Date+KMExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Date+KMExtensions.swift"; sourceTree = "<group>"; };
@@ -8278,6 +8282,7 @@
 			isa = PBXGroup;
 			children = (
 				BBB2ACDF2B5943F600098854 /* Quick Start Guide.pdf */,
+				9F3BCDC72CCB749400BDAB67 /* 快速教学.pdf */,
 				899700E628F3E4D3009AF911 /* MainWindowController.swift */,
 				899700E728F3E4D3009AF911 /* MainWindowController.xib */,
 				BB78EAA92B561F9700121691 /* KMFullScreenWindow.swift */,
@@ -15133,6 +15138,7 @@
 				ADBC376129CC637900D93208 /* KMReadModelView.xib in Resources */,
 				ADDF83832B391A5D00A81A4E /* DSignatureSaveTypeViewController.xib in Resources */,
 				BBD8EE992B8EC86A00EB05FE /* AutoSaveFileItem.xib in Resources */,
+				9F3BCDC82CCB749400BDAB67 /* 快速教学.pdf in Resources */,
 				AD1FE8382BD7C98300AA4A9B /* KMPDFPrintManageWindowController.xib in Resources */,
 				AD1D480B2AFB18DA007AC1F0 /* KMCompressWIndowControllerNew.xib in Resources */,
 				9F1F82DD292F84D60092C4B4 /* KMHomeInsertActionViewController.xib in Resources */,
@@ -15701,6 +15707,7 @@
 				ADD56F5B2BB3F48300E87ED9 /* KMFreeTextStylesViewController.xib in Resources */,
 				9F5752ED2B58FF73005DC303 /* KMAnnotationFromViewController.xib in Resources */,
 				BB04FD112B206F4000D80F7B /* KMPlanViewController.xib in Resources */,
+				9F3BCDC92CCB749400BDAB67 /* 快速教学.pdf in Resources */,
 				BBB376AB2B10A7FD009539CC /* a_3a.png in Resources */,
 				BB5E2EFD2C2BF3FF00657A61 /* KMEditPDFCropComfirmWindowController.xib in Resources */,
 				9FDDFDC02C93E4DD0051B6FC /* paddle.js in Resources */,
@@ -16041,6 +16048,7 @@
 				ADAAC1692BD645DB001F2DA6 /* KMRecommondPopWindow.xib in Resources */,
 				9F88108A2B564E9700F69815 /* KMAnnotationButtonWidgetOptionsViewController.xib in Resources */,
 				AD58F4072B14954B00299EE0 /* KMCompareTextHeaderView.xib in Resources */,
+				9F3BCDCA2CCB749400BDAB67 /* 快速教学.pdf in Resources */,
 				ADAFDA872AEB804B00F084BC /* KMQucikToolCollectionViewItem.xib in Resources */,
 				9FBA0F0329015A82001117AF /* KMFastToolCollectionViewItem.xib in Resources */,
 				BB8810BD2B4F872500AFA63E /* KMVerificationWindowController.xib in Resources */,
@@ -21176,7 +21184,7 @@
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
 				COMBINE_HIDPI_IMAGES = YES;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 202410250;
 				DEFINES_MODULE = YES;
 				DEVELOPMENT_TEAM = 4GGQPGRTSV;
 				ENABLE_HARDENED_RUNTIME = YES;
@@ -21345,7 +21353,7 @@
 					"$(PROJECT_DIR)/PDF\\ Master/Class/PDFTools/Convert/Library",
 				);
 				MACOSX_DEPLOYMENT_TARGET = 11.0;
-				MARKETING_VERSION = 1.3.0;
+				MARKETING_VERSION = 4.6.3;
 				OTHER_LDFLAGS = "-ObjC";
 				OTHER_SWIFT_FLAGS = "-DVERSION_DMG";
 				PRODUCT_BUNDLE_IDENTIFIER = com.brother.pdfreaderprofree.mac;
@@ -21370,7 +21378,7 @@
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
 				COMBINE_HIDPI_IMAGES = YES;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 202410250;
 				DEFINES_MODULE = YES;
 				DEVELOPMENT_TEAM = 4GGQPGRTSV;
 				ENABLE_HARDENED_RUNTIME = YES;
@@ -21537,7 +21545,7 @@
 					"$(PROJECT_DIR)/PDF\\ Master/Class/PDFTools/Convert/Library",
 				);
 				MACOSX_DEPLOYMENT_TARGET = 11.0;
-				MARKETING_VERSION = 1.3.0;
+				MARKETING_VERSION = 4.6.3;
 				OTHER_LDFLAGS = "-ObjC";
 				OTHER_SWIFT_FLAGS = "-DVERSION_DMG";
 				PRODUCT_BUNDLE_IDENTIFIER = com.brother.pdfreaderprofree.mac;