Bläddra i källkod

【2025】多语初始化优化

niehaoyu 5 månader sedan
förälder
incheckning
f0b0367428
100 ändrade filer med 2110 tillägg och 810 borttagningar
  1. 8 8
      PDF Office/KMComponentLibrary/KMComponentLibrary.xcodeproj/project.pbxproj
  2. 1 1
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/GroupItem/ComponentGroup.swift
  3. 1 4
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Select/ComponentSelect.swift
  4. 4 1
      PDF Office/PDF Master/AppDelegate.swift
  5. 14 14
      PDF Office/PDF Master/Class/Batch/Operation/KMBatchConvertOperation.swift
  6. 3 3
      PDF Office/PDF Master/Class/Batch/Operation/KMCompressOperation.swift
  7. 4 4
      PDF Office/PDF Master/Class/Batch/Tools/KMBatchRemoveHeaderFooterOperation.swift
  8. 18 18
      PDF Office/PDF Master/Class/Batch/View/KMCustomViewButton.swift
  9. 12 12
      PDF Office/PDF Master/Class/Batch/WindowController/VC/KMBatchOperateImageToPDFViewController.swift
  10. 5 5
      PDF Office/PDF Master/Class/Batch/WindowController/VC/KMBatchOperateRemoveHeaderFooterViewController.swift
  11. 1 1
      PDF Office/PDF Master/Class/Batch/WindowController/VC/KMPlanViewController.swift
  12. 1 1
      PDF Office/PDF Master/Class/ChromiumTabs/KMTabStripView.swift
  13. 1 1
      PDF Office/PDF Master/Class/Common/Category/CPDFKit/CPDFView+KMExtension.swift
  14. 1 5
      PDF Office/PDF Master/Class/Common/Category/NSObject+KMExtension.swift
  15. 17 17
      PDF Office/PDF Master/Class/Common/LineInspector/KMLineInspector.swift
  16. 23 23
      PDF Office/PDF Master/Class/Common/OC/Property/KMInfoWindowController.swift
  17. 2 2
      PDF Office/PDF Master/Class/Document/KMMainDocument.swift
  18. 7 7
      PDF Office/PDF Master/Class/Home/View/CreatPDFView/KMCreatPDFView.xib
  19. 2 2
      PDF Office/PDF Master/Class/Home/View/HomeContentView/QucikTools/Model/KMQucikToolsModel.swift
  20. 10 10
      PDF Office/PDF Master/Class/Home/ViewController/KMHomeViewController+Action.swift
  21. 13 26
      PDF Office/PDF Master/Class/Home/ViewController/KMHomeViewController.swift
  22. 11 11
      PDF Office/PDF Master/Class/Home/ViewController/KMHomeViewController.xib
  23. 6 6
      PDF Office/PDF Master/Class/PDFTools/AddHeaderFooter/Model/KMBatchAddHeaderFooterOperation.swift
  24. 6 6
      PDF Office/PDF Master/Class/PDFTools/AddHeaderFooter/VC/KMBatchOperateAddHeaderFooterViewController.swift
  25. 4 4
      PDF Office/PDF Master/Class/PDFTools/AddPassword/Model/KMBatchAddPasswordOperation.swift
  26. 16 16
      PDF Office/PDF Master/Class/PDFTools/AddPassword/VC/KMBatchOperateAddPasswordViewController.swift
  27. 2 2
      PDF Office/PDF Master/Class/PDFTools/Convert/ExtractImage/Controller/KMExtractImageWindowController.swift
  28. 30 30
      PDF Office/PDF Master/Class/PDFTools/Convert/NewController/KMConvertWindowController.swift
  29. 2 2
      PDF Office/PDF Master/Class/PDFTools/Crop/KMPDFCropWindowController.swift
  30. 21 21
      PDF Office/PDF Master/Class/PDFTools/Insert/KMPDFInsertWindowController.swift
  31. 7 7
      PDF Office/PDF Master/Class/PDFTools/Merge/View/KMPDFMergePageRangeTabelViewCell.swift
  32. 1 1
      PDF Office/PDF Master/Class/PDFTools/OCRNew/Controller/KMOCRPDFWindowController.swift
  33. 4 4
      PDF Office/PDF Master/Class/PDFTools/PageEdit/Controller/KMPDFEditViewController.swift
  34. 7 7
      PDF Office/PDF Master/Class/PDFTools/PageEdit/Window/KMPDFEditExtractWindow.swift
  35. 17 17
      PDF Office/PDF Master/Class/PDFTools/PageEdit/Window/KMPDFEditInsertBlankPageWindow.swift
  36. 17 17
      PDF Office/PDF Master/Class/PDFTools/PageEdit/Window/KMPDFEditInsertPageWindow.swift
  37. 7 7
      PDF Office/PDF Master/Class/PDFTools/PageEdit/Window/KMPDFEditPageRangeWindowController.swift
  38. 1 1
      PDF Office/PDF Master/Class/PDFTools/PageEdit/Window/KMPDFEditWindowController.swift
  39. 1 1
      PDF Office/PDF Master/Class/PDFTools/PageEdit/Window/KMProgressWindowController.swift
  40. 33 33
      PDF Office/PDF Master/Class/PDFTools/PageEdit/Window/SplitWindowController.swift
  41. 8 8
      PDF Office/PDF Master/Class/PDFTools/Redact/Controller/KMPDFRedactViewController.swift
  42. 16 16
      PDF Office/PDF Master/Class/PDFTools/Redact/View/KMRedactPDFView.swift
  43. 12 12
      PDF Office/PDF Master/Class/PDFTools/Redact/Window/KMRedactPropertiesWindowController.swift
  44. 8 8
      PDF Office/PDF Master/Class/PDFTools/Redact/Window/KMRedactSelectPagesWindowController.swift
  45. 4 4
      PDF Office/PDF Master/Class/PDFTools/RemovePassword/Model/KMBatchRemovePasswordOperation.swift
  46. 6 6
      PDF Office/PDF Master/Class/PDFTools/RemovePassword/VC/KMBatchOperateRemovePasswordViewController.swift
  47. 4 4
      PDF Office/PDF Master/Class/PDFTools/RemoveWatermark/Model/KMBatchRemoveBackgroundOperation.swift
  48. 3 3
      PDF Office/PDF Master/Class/PDFTools/RemoveWatermark/Model/KMBatchRemoveWatermarkOperation.swift
  49. 4 4
      PDF Office/PDF Master/Class/PDFTools/RemoveWatermark/VC/KMBatchOperateRemoveWatermarkViewController.swift
  50. 68 68
      PDF Office/PDF Master/Class/PDFTools/SelfSign/Window/KMProfileInfoWindowController.swift
  51. 7 7
      PDF Office/PDF Master/Class/PDFTools/Snapshot/View/KMSnapshotPDFView.swift
  52. 1 1
      PDF Office/PDF Master/Class/PDFTools/Snapshot/Window/KMSnapshotWindowController.swift
  53. 13 13
      PDF Office/PDF Master/Class/PDFTools/TTS/WindowController/KMTTSWindowController.swift
  54. 98 0
      PDF Office/PDF Master/Class/PDFTools/Tools/KMBaseXibView/BaseXibView.swift
  55. 24 24
      PDF Office/PDF Master/Class/PDFTools/Watermark/Controller/KMBatchOperateAddWatermarkViewController.swift
  56. 6 6
      PDF Office/PDF Master/Class/PDFTools/Watermark/Model/KMBatchAddBackgroundOperation.swift
  57. 5 5
      PDF Office/PDF Master/Class/PDFTools/Watermark/Model/KMBatchAddWatermarkOperation.swift
  58. 4 4
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/Split/View/KMSecondaryPDFView.swift
  59. 6 6
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/Controller/KMNoteOutlineFilterViewController.swift
  60. 6 6
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteOutlineView.swift
  61. 6 6
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteTableViewCell.swift
  62. 1 1
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMImageToolTipContext.swift
  63. 13 13
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideEmptyFileViewController.swift
  64. 45 45
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Action.swift
  65. 34 34
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Note.swift
  66. 19 19
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Outline.swift
  67. 4 4
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Search.swift
  68. 8 8
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Snapshot.swift
  69. 5 5
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Thumbnail.swift
  70. 20 20
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift
  71. 6 6
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Search/KMBotaSearchViewController.swift
  72. 5 5
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/View/KMBotaLeftView.swift
  73. 1 1
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMAnnotationLinkViewController.swift
  74. 14 14
      PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMToolbarCustomViewController.swift
  75. 1 1
      PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMToolbarViewController.swift
  76. 1 1
      PDF Office/PDF Master/Class/PDFWindowController/Toolbar/Model/KMToolbarConfigModel.swift
  77. 2 2
      PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift
  78. 1 1
      PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift
  79. 2 2
      PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift
  80. 1 1
      PDF Office/PDF Master/Class/Preference/Controller/KMDisplayPreferences.swift
  81. 27 27
      PDF Office/PDF Master/Class/Preference/Controller/KMGeneralPreferences.swift
  82. 1 1
      PDF Office/PDF Master/Class/Preference/Controller/KMNotesPreferences.swift
  83. 1 1
      PDF Office/PDF Master/Class/Preference/Controller/KMSyncPreferences.swift
  84. 10 10
      PDF Office/PDF Master/Class/Preference/Window/KMPreferenceController.swift
  85. 19 19
      PDF Office/PDF Master/Class/Welcome/KMWelcomeWindowController.swift
  86. 48 0
      PDF Office/PDF Master/KMClass/KMHomeViewController/KMCreatePDFWindowController/KMCreatePDFWindowController.swift
  87. 241 0
      PDF Office/PDF Master/KMClass/KMHomeViewController/KMCreatePDFWindowController/KMCreatePDFWindowController.xib
  88. 17 0
      PDF Office/PDF Master/KMClass/KMHomeViewController/KMNHomeViewController.swift
  89. 64 0
      PDF Office/PDF Master/KMClass/KMHomeViewController/KMNHomeViewController.xib
  90. 185 0
      PDF Office/PDF Master/KMClass/KMHomeViewController/Views/KMHomeOpenView/KMHomeOpenView.swift
  91. 57 0
      PDF Office/PDF Master/KMClass/KMHomeViewController/Views/KMHomeOpenView/KMHomeOpenView.xib
  92. 6 0
      PDF Office/PDF Master/KMClass/KMHomeViewController/home.xcassets/Contents.json
  93. 12 0
      PDF Office/PDF Master/KMClass/KMHomeViewController/home.xcassets/icon_suffix.imageset/Contents.json
  94. 76 0
      PDF Office/PDF Master/KMClass/KMHomeViewController/home.xcassets/icon_suffix.imageset/icon_suffix.pdf
  95. 17 0
      PDF Office/PDF Master/KMClass/PDFView/Toolbar/KMPDFSecToolbarController.swift
  96. 22 0
      PDF Office/PDF Master/KMClass/PDFView/Toolbar/KMPDFSecToolbarController.xib
  97. 17 0
      PDF Office/PDF Master/KMClass/PDFView/Toolbar/KMPDFToolbarController.swift
  98. 22 0
      PDF Office/PDF Master/KMClass/PDFView/Toolbar/KMPDFToolbarController.xib
  99. 435 0
      PDF Office/PDF Master/KMClass/Settings/SettingsDisplayView.swift
  100. 0 0
      PDF Office/PDF Master/KMClass/Settings/SettingsDisplayView.xib

+ 8 - 8
PDF Office/KMComponentLibrary/KMComponentLibrary.xcodeproj/project.pbxproj

@@ -411,6 +411,11 @@
 		BB5A9B9E2CB64D4700F64C1F /* View */ = {
 			isa = PBXGroup;
 			children = (
+				BB5A9C4D2CB64D4800F64C1F /* ComponentTextField.swift */,
+				BB5A9C4E2CB64D4800F64C1F /* ComponentBaseXibView.swift */,
+				BB5A9C4F2CB64D4800F64C1F /* ComponentSecureTextField.swift */,
+				BB5A9C632CB64D4800F64C1F /* ComponentTextView.swift */,
+				BB5A9C6C2CB64D4800F64C1F /* NibLoadable.swift */,
 				BB5A9B9F2CB64D4700F64C1F /* Tabs */,
 				BB5A9BA52CB64D4700F64C1F /* SideBar */,
 				BB5A9BAE2CB64D4700F64C1F /* Tree */,
@@ -436,15 +441,10 @@
 				BB5A9C412CB64D4700F64C1F /* ComponentModal */,
 				BB5A9C452CB64D4700F64C1F /* List */,
 				BB5A9C492CB64D4700F64C1F /* Divider */,
-				BB5A9C4D2CB64D4800F64C1F /* ComponentTextField.swift */,
-				BB5A9C4E2CB64D4800F64C1F /* ComponentBaseXibView.swift */,
-				BB5A9C4F2CB64D4800F64C1F /* ComponentSecureTextField.swift */,
 				BB5A9C502CB64D4800F64C1F /* Select */,
 				BB5A9C582CB64D4800F64C1F /* GroupItem */,
 				BB5A9C5D2CB64D4800F64C1F /* ToolTips */,
-				BB5A9C632CB64D4800F64C1F /* ComponentTextView.swift */,
 				BB5A9C642CB64D4800F64C1F /* Tag */,
-				BB5A9C6C2CB64D4800F64C1F /* NibLoadable.swift */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -865,8 +865,8 @@
 		BB5A9C412CB64D4700F64C1F /* ComponentModal */ = {
 			isa = PBXGroup;
 			children = (
-				BB5A9C422CB64D4700F64C1F /* ComponentModal.swift */,
 				BB5A9C432CB64D4700F64C1F /* ComponentModalProperty.swift */,
+				BB5A9C422CB64D4700F64C1F /* ComponentModal.swift */,
 				BB5A9C442CB64D4700F64C1F /* ComponentModal.xib */,
 			);
 			path = ComponentModal;
@@ -916,10 +916,10 @@
 		BB5A9C582CB64D4800F64C1F /* GroupItem */ = {
 			isa = PBXGroup;
 			children = (
+				BB5A9C5C2CB64D4800F64C1F /* ComponentGroup.swift */,
 				BB5A9C592CB64D4800F64C1F /* ComponentGroup.xib */,
-				BB5A9C5A2CB64D4800F64C1F /* ComponentGroupItem.xib */,
 				BB5A9C5B2CB64D4800F64C1F /* ComponentGroupItem.swift */,
-				BB5A9C5C2CB64D4800F64C1F /* ComponentGroup.swift */,
+				BB5A9C5A2CB64D4800F64C1F /* ComponentGroupItem.xib */,
 			);
 			path = GroupItem;
 			sourceTree = "<group>";

+ 1 - 1
PDF Office/KMComponentLibrary/KMComponentLibrary/View/GroupItem/ComponentGroup.swift

@@ -28,7 +28,7 @@ public class ComponentGroup: NSView, NibLoadable {
     
     private var _shadowInfo : ComponentShadowInfo?
     
-    private var menuItemArr: [ComponentMenuitemProperty] = []
+    public var menuItemArr: [ComponentMenuitemProperty] = []
     
     weak open var groupDelegate: ComponentGroupDelegate?
   

+ 1 - 4
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Select/ComponentSelect.swift

@@ -98,8 +98,7 @@ public class ComponentSelect: ComponentBaseXibView {
     }
     
     public func selectItemAtIndex(_ index: Int) {
-        
-        if index >= 0 && index < menuitemPropertys.count {
+         if index >= 0 && index < menuitemPropertys.count {
             let chooseIndex: Int = index
             let chooseProperty = menuitemPropertys[chooseIndex]
             self.inputField.stringValue = chooseProperty.text
@@ -107,8 +106,6 @@ public class ComponentSelect: ComponentBaseXibView {
             self.refreshUI()
             self.selItemProperty = chooseProperty
         }
-        
-        
     }
     
     public func indexOfSelect() -> NSInteger {

+ 4 - 1
PDF Office/PDF Master/AppDelegate.swift

@@ -7,6 +7,7 @@
 
 import Cocoa
 import UserNotifications
+import KMComponentLibrary
 
 @main
 class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
@@ -34,6 +35,8 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
         
         ComPDFUIConfig.initializeUIConfig()
         KMDesignToken.shared.parserExcel(withPath: "")
+         
+        ComponentLibrary.shared.parserExcel(withPath: "")
     }
     
     func applicationDidFinishLaunching(_ aNotification: Notification) {
@@ -755,7 +758,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
     }
     
     @IBAction func EducationDiscountAction(_ sender: NSMenuItem) {
-        let tStrHttpUrl = KMLocalizedString("https://www.pdfreaderpro.com/store?mode=edu#utm_source=mac_app&utm_medium=pdf_pro_dmg&utm_content=menu_bar_click", nil)
+        let tStrHttpUrl = KMLocalizedString("https://www.pdfreaderpro.com/store?mode=edu#utm_source=mac_app&utm_medium=pdf_pro_dmg&utm_content=menu_bar_click")
         guard let url = URL(string: tStrHttpUrl) else {
             return
         }

+ 14 - 14
PDF Office/PDF Master/Class/Batch/Operation/KMBatchConvertOperation.swift

@@ -52,7 +52,7 @@ class KMBatchConvertOperation: KMBatchOperation, CPDFConverterDelegate, CPDFConv
             self.hasExcuting = true
             didChangeValue(forKey: "isExecuting")
             if !FileManager.default.fileExists(atPath: self.operateFile?.filePath ?? "") {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("File Not Exist", nil)), info: self.operateFile!.removePasswordInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("File Not Exist")), info: self.operateFile!.removePasswordInfo)
                 
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
@@ -61,7 +61,7 @@ class KMBatchConvertOperation: KMBatchOperation, CPDFConverterDelegate, CPDFConv
             }
 
             if self.pdfDocument == nil {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.", nil)), info: self.operateFile!.removeWatermarkInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.")), info: self.operateFile!.removeWatermarkInfo)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
                 self.didChangeValue(forKey: "isFinished")
@@ -69,7 +69,7 @@ class KMBatchConvertOperation: KMBatchOperation, CPDFConverterDelegate, CPDFConv
             }
 
             if !self.pdfDocument!.allowsPrinting || !self.pdfDocument!.allowsCopying {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("This is a secured document. Editing is not permitted.", nil)), info: self.operateFile!.removeWatermarkInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("This is a secured document. Editing is not permitted.")), info: self.operateFile!.removeWatermarkInfo)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
                 self.didChangeValue(forKey: "isFinished")
@@ -78,7 +78,7 @@ class KMBatchConvertOperation: KMBatchOperation, CPDFConverterDelegate, CPDFConv
             self.operateFile?.outputFilePath = (self.operateFile?.currentConvertParameter?.fetchDestinationFilepath()) ?? ""
            
             if self.operateFile?.currentConvertParameter?.pagesArray?.count ?? 0 < 1 {
-                let error = NSError(domain: "LocalError", code: 0, userInfo: [NSLocalizedDescriptionKey: KMLocalizedString("Invalid page range or the page number is out of range. Please try again.", nil)])
+                let error = NSError(domain: "LocalError", code: 0, userInfo: [NSLocalizedDescriptionKey: KMLocalizedString("Invalid page range or the page number is out of range. Please try again.")])
                 self.delegate?.fileOperateFailed?(self.operateFile!, error: error, info: self.operateFile!.currentConvertParameter!)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
@@ -241,27 +241,27 @@ class KMBatchConvertOperation: KMBatchOperation, CPDFConverterDelegate, CPDFConv
             let err: NSError = error! as NSError
             switch err.code {
             case CPDFConverterEncryptError:
-                erroeString = KMLocalizedString("Password required or incorrect password. Please re-enter your password and try again",nil)
+                erroeString = KMLocalizedString("Password required or incorrect password. Please re-enter your password and try again")
             case CPDFConverterPermissionError:
-                erroeString = KMLocalizedString("The license doesn't allow the permission",nil);
+                erroeString = KMLocalizedString("The license doesn't allow the permission");
             case CPDFConverterMallocError:
-                erroeString = KMLocalizedString("Malloc failure",nil);
+                erroeString = KMLocalizedString("Malloc failure");
             case CPDFConverterUnknownError:
-                erroeString = KMLocalizedString("Unknown error in processing conversion. Please try again later",nil);
+                erroeString = KMLocalizedString("Unknown error in processing conversion. Please try again later");
             case CPDFConverterPDFUnknownError:
-                erroeString = KMLocalizedString("Unknown error in processing PDF. Please try again later",nil);
+                erroeString = KMLocalizedString("Unknown error in processing PDF. Please try again later");
             case CPDFConverterPDFFileError:
-                erroeString = KMLocalizedString("File not found or could not be opened. Check if your file exists or choose another file to convert",nil);
+                erroeString = KMLocalizedString("File not found or could not be opened. Check if your file exists or choose another file to convert");
             case CPDFConverterPDFFormatError:
-                erroeString = KMLocalizedString("File not in PDF format or corruptead. Change a PDF file and try again",nil);
+                erroeString = KMLocalizedString("File not in PDF format or corruptead. Change a PDF file and try again");
             case CPDFConverterPDFSecurityError:
-                erroeString = KMLocalizedString("Unsupported security scheme",nil);
+                erroeString = KMLocalizedString("Unsupported security scheme");
                 break;
             case CPDFConverterPDFPageError:
-                erroeString = KMLocalizedString("Page not found or content error",nil);
+                erroeString = KMLocalizedString("Page not found or content error");
                 break;
             default:
-                erroeString = KMLocalizedString("Table not found",nil);
+                erroeString = KMLocalizedString("Table not found");
             }
             let newError = NSError(domain: "", code: err.code, userInfo: [NSLocalizedFailureReasonErrorKey: erroeString])
             self.delegate?.fileOperateFailed?(self.operateFile!, error: newError, info: (self.operateFile?.currentConvertParameter!)!)

+ 3 - 3
PDF Office/PDF Master/Class/Batch/Operation/KMCompressOperation.swift

@@ -29,7 +29,7 @@ class KMCompressOperation: KMBatchOperation{
             self.hasExcuting = true
             didChangeValue(forKey: "isExecuting")
             if !FileManager.default.fileExists(atPath: self.operateFile?.filePath ?? "") {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("File Not Exist", nil)), info: self.operateFile!.removePasswordInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("File Not Exist")), info: self.operateFile!.removePasswordInfo)
                 
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
@@ -38,7 +38,7 @@ class KMCompressOperation: KMBatchOperation{
             }
             
             if self.pdfDocument == nil {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.", nil)), info: self.operateFile!.removeWatermarkInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.")), info: self.operateFile!.removeWatermarkInfo)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
                 self.didChangeValue(forKey: "isFinished")
@@ -48,7 +48,7 @@ class KMCompressOperation: KMBatchOperation{
                 if isSuccess {
                     self.delegate?.fileOperateSuccessed?(self.operateFile!, info: self.operateFile!.compressInfo)
                 }else{
-                    self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("Failed", nil)), info: self.operateFile!.compressInfo)
+                    self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("Failed")), info: self.operateFile!.compressInfo)
                 }
             }
             DispatchQueue.main.async {

+ 4 - 4
PDF Office/PDF Master/Class/Batch/Tools/KMBatchRemoveHeaderFooterOperation.swift

@@ -48,7 +48,7 @@ class KMBatchRemoveHeaderFooterOperation: KMBatchOperation{
             self.hasExcuting = true
             didChangeValue(forKey: "isExecuting")
             if !FileManager.default.fileExists(atPath: self.operateFile!.filePath) {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("File Not Exist", nil)), info: self.operateFile!.currentOperateInfo!)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("File Not Exist")), info: self.operateFile!.currentOperateInfo!)
                 
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
@@ -57,7 +57,7 @@ class KMBatchRemoveHeaderFooterOperation: KMBatchOperation{
             }
 
             if self.pdfDocument == nil {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.", nil)), info: self.operateFile!.currentOperateInfo!)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.")), info: self.operateFile!.currentOperateInfo!)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
                 self.didChangeValue(forKey: "isFinished")
@@ -65,7 +65,7 @@ class KMBatchRemoveHeaderFooterOperation: KMBatchOperation{
             }
 
             if !self.pdfDocument!.allowsPrinting || !self.pdfDocument!.allowsCopying {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("This is a secured document. Editing is not permitted.", nil)), info: self.operateFile!.currentOperateInfo!)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("This is a secured document. Editing is not permitted.")), info: self.operateFile!.currentOperateInfo!)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
                 self.didChangeValue(forKey: "isFinished")
@@ -167,7 +167,7 @@ class KMBatchRemoveHeaderFooterOperation: KMBatchOperation{
         }
     }
     func defaultError() -> Error {
-        return self.errorWithMsg(KMLocalizedString("Failed", nil))
+        return self.errorWithMsg(KMLocalizedString("Failed"))
     }
 }
 

+ 18 - 18
PDF Office/PDF Master/Class/Batch/View/KMCustomViewButton.swift

@@ -270,43 +270,43 @@ import Cocoa
 extension KMCustomViewButton {
     private func _toolbarButtonSelected(_ isSelected: Bool) {
         //    if (isSelected) {
-        //        if ([self.titleTextField.stringValue isEqualToString:NSLocalizedString(@"Convert", nil)]) {
+        //        if ([self.titleTextField.stringValue isEqualToString:NSLocalizedString(@"Convert")]) {
         //            self.imageView.image = [NSImage imageNamed:@"KMImageNameUXIconBatchConvert"];
-        //        } else if ([self.titleTextField.stringValue isEqualToString:NSLocalizedString(@"Merge", nil)]) {
+        //        } else if ([self.titleTextField.stringValue isEqualToString:NSLocalizedString(@"Merge")]) {
         //            self.imageView.image = [NSImage imageNamed:@"KMImageNameUXIconBatchMerge"];
-        //        } else if ([self.titleTextField.stringValue isEqualToString:NSLocalizedString(@"Compress", nil)]) {
+        //        } else if ([self.titleTextField.stringValue isEqualToString:NSLocalizedString(@"Compress")]) {
         //            self.imageView.image = [NSImage imageNamed:@"KMImageNameUXIconBatchOptimize"];
-        //        } else if ([self.titleTextField.stringValue isEqualToString:NSLocalizedString(@"OCR", nil)]) {
+        //        } else if ([self.titleTextField.stringValue isEqualToString:NSLocalizedString(@"OCR")]) {
         //            self.imageView.image = [NSImage imageNamed:@"KMImageNameUXIconBatchConvertOCR"];
-        //        } else if ([self.titleTextField.stringValue isEqualToString:NSLocalizedString(@"Security", nil)]) {
+        //        } else if ([self.titleTextField.stringValue isEqualToString:NSLocalizedString(@"Security")]) {
         //            self.imageView.image = [NSImage imageNamed:@"KMImageNameUXIconBatchSafe"];
-        //        } else if ([self.titleTextField.stringValue isEqualToString:NSLocalizedString(@"Watermark", nil)]) {
+        //        } else if ([self.titleTextField.stringValue isEqualToString:NSLocalizedString(@"Watermark")]) {
         //            self.imageView.image = [NSImage imageNamed:@"KMImageNameUXIconBatchWatermark"];
-        //        } else if ([self.titleTextField.stringValue isEqualToString:NSLocalizedString(@"Background", nil)]) {
+        //        } else if ([self.titleTextField.stringValue isEqualToString:NSLocalizedString(@"Background")]) {
         //            self.imageView.image = [NSImage imageNamed:@"KMImageNameUXIconBatchBackground"];
-        //        } else if ([self.titleTextField.stringValue isEqualToString:NSLocalizedString(@"Header & Footer", nil)]) {
+        //        } else if ([self.titleTextField.stringValue isEqualToString:NSLocalizedString(@"Header & Footer")]) {
         //            self.imageView.image = [NSImage imageNamed:@"KMImageNameUXIconBatchHeaderandfooter"];
-        //        } else if ([self.titleTextField.stringValue isEqualToString:NSLocalizedString(@"Bates Numbers", nil)]) {
+        //        } else if ([self.titleTextField.stringValue isEqualToString:NSLocalizedString(@"Bates Numbers")]) {
         //            self.imageView.image = [NSImage imageNamed:@"KMImageNameUXIconBatchBates"];
         //        }
         //    } else {
-        if self.titleTextField.stringValue == KMLocalizedString("Convert", nil) {
+        if self.titleTextField.stringValue == KMLocalizedString("Convert") {
             self.imageView.image = NSImage(named: "KMImageNameUXIconBatchConvertNor")
-        } else if self.titleTextField.stringValue == KMLocalizedString("Merge", nil) {
+        } else if self.titleTextField.stringValue == KMLocalizedString("Merge") {
             self.imageView.image = NSImage(named: "KMImageNameUXIconBatchMergeNor")
-        } else if self.titleTextField.stringValue == KMLocalizedString("Compress", nil) {
+        } else if self.titleTextField.stringValue == KMLocalizedString("Compress") {
             self.imageView.image = NSImage(named: "KMImageNameUXIconBatchOptimizeNor")
-        } else if self.titleTextField.stringValue == KMLocalizedString("OCR", nil) {
+        } else if self.titleTextField.stringValue == KMLocalizedString("OCR") {
             self.imageView.image = NSImage(named: "KMImageNameUXIconBatchConvertOCRNor")
-        } else if self.titleTextField.stringValue == KMLocalizedString("Security", nil) {
+        } else if self.titleTextField.stringValue == KMLocalizedString("Security") {
             self.imageView.image = NSImage(named: "KMImageNameUXIconBatchSafeNor")
-        } else if self.titleTextField.stringValue == KMLocalizedString("Watermark", nil) {
+        } else if self.titleTextField.stringValue == KMLocalizedString("Watermark") {
             self.imageView.image = NSImage(named: "KMImageNameUXIconBatchWatermarkNor")
-        } else if self.titleTextField.stringValue == KMLocalizedString("Background", nil) {
+        } else if self.titleTextField.stringValue == KMLocalizedString("Background") {
             self.imageView.image = NSImage(named: "KMImageNameUXIconBatchBackgroundNor")
-        } else if self.titleTextField.stringValue == KMLocalizedString("Header & Footer", nil) {
+        } else if self.titleTextField.stringValue == KMLocalizedString("Header & Footer") {
             self.imageView.image = NSImage(named: "KMImageNameUXIconBatchHeaderandfooterNor")
-        } else if self.titleTextField.stringValue == KMLocalizedString("Bates Numbers", nil) {
+        } else if self.titleTextField.stringValue == KMLocalizedString("Bates Numbers") {
             self.imageView.image = NSImage(named: "KMImageNameUXIconBatchBatesNor")
         }
 

+ 12 - 12
PDF Office/PDF Master/Class/Batch/WindowController/VC/KMBatchOperateImageToPDFViewController.swift

@@ -87,17 +87,17 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController,
         NotificationCenter.default.addObserver(self, selector: #selector(batchFilesCountNotification(notification:)), name: NSNotification.Name("KMBatchFilesCountNotification"), object: nil)
     }
     func localizedLanguage() {
-        self.outputTypeLabel.stringValue = KMLocalizedString("Output",nil)
-        self.btnMerge.title = KMLocalizedString("Merge All", nil)
-        self.createNewPDFBtn.title = KMLocalizedString("New PDF Document", nil)
-        self.appendPDFBtn.title = KMLocalizedString("Append To Existing File", nil)
-        self.appendTextField.placeholderString = KMLocalizedString("Select a File", nil)
-        self.selectLanguageLabel.stringValue = KMLocalizedString("Select OCR Language:",nil)
-        self.ocrSelectBtn.title = KMLocalizedString("OCR Plan",nil)
+        self.outputTypeLabel.stringValue = KMLocalizedString("Output")
+        self.btnMerge.title = KMLocalizedString("Merge All")
+        self.createNewPDFBtn.title = KMLocalizedString("New PDF Document")
+        self.appendPDFBtn.title = KMLocalizedString("Append To Existing File")
+        self.appendTextField.placeholderString = KMLocalizedString("Select a File")
+        self.selectLanguageLabel.stringValue = KMLocalizedString("Select OCR Language:")
+        self.ocrSelectBtn.title = KMLocalizedString("OCR Plan")
         self.updateLanguageButton((KMGOCRManager.default().selectedLanguages?.value(forKeyPath: KMGOCRLanguageStringKey) as? [String]))
         
-        self.actionButton.title = KMLocalizedString("Save as PDF", nil)
-        self.saveAsButton.title = KMLocalizedString("Save as TXT", nil)
+        self.actionButton.title = KMLocalizedString("Save as PDF")
+        self.saveAsButton.title = KMLocalizedString("Save as TXT")
         self.OCRSelectedPlanChangeAction()
     }
     func configuUI() {
@@ -150,7 +150,7 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController,
     }
     func updateLanguageButton(_ languages: [String]?) {
         if languages?.count ?? 0 < 1 {
-            self.languageButton.title = " " + KMLocalizedString("Auto Detection", nil)
+            self.languageButton.title = " " + KMLocalizedString("Auto Detection")
             return
         }
         var languageName: String = ""
@@ -327,9 +327,9 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController,
     func OCRSelectedPlanChangeAction() {
         let plan = UserDefaults.standard.integer(forKey: "KMOCRCurrentPlanKey")
         if plan == 0 {
-            self.planButton.title = " " + KMLocalizedString("Plan 1 (Online)", nil)
+            self.planButton.title = " " + KMLocalizedString("Plan 1 (Online)")
         } else {
-            self.planButton.title = " " + KMLocalizedString("Plan 2 (Offline)", nil)
+            self.planButton.title = " " + KMLocalizedString("Plan 2 (Offline)")
         }
         KMGOCRManager.default().selectedLanguages = NSMutableArray()
         self.updateLanguageButton(KMGOCRManager.default().selectedLanguages?.value(forKeyPath: KMGOCRLanguageStringKey) as? [String])

+ 5 - 5
PDF Office/PDF Master/Class/Batch/WindowController/VC/KMBatchOperateRemoveHeaderFooterViewController.swift

@@ -47,15 +47,15 @@ class KMBatchOperateRemoveHeaderFooterViewController: KMBatchOperateBaseViewCont
                 }
                 self.actionButton.tag = 1
                 if (self.isBates) {
-                    self.actionButton.title = KMLocalizedString("Remove Bates Numbers", nil)
+                    self.actionButton.title = KMLocalizedString("Remove Bates Numbers")
                 } else {
-                    self.actionButton.title = KMLocalizedString("Remove Header & Footer", nil)
+                    self.actionButton.title = KMLocalizedString("Remove Header & Footer")
                 }
                 
                 self.actionButton.setTitleColor(KMAppearance.Layout.w0Color())
             } else {
                 self.actionButton.tag = 0
-                self.actionButton.title = KMLocalizedString("Cancel", nil)
+                self.actionButton.title = KMLocalizedString("Cancel")
                 self.actionButton.setTitleColor(KMAppearance.Layout.w0Color())
             }
         }
@@ -93,9 +93,9 @@ class KMBatchOperateRemoveHeaderFooterViewController: KMBatchOperateBaseViewCont
 extension KMBatchOperateRemoveHeaderFooterViewController {
     private func _localizedlanguage() {
         if (self.isBates) {
-            self.actionButton.title = KMLocalizedString("Remove Bates Numbers", nil)
+            self.actionButton.title = KMLocalizedString("Remove Bates Numbers")
         } else {
-            self.actionButton.title = KMLocalizedString("Remove Header & Footer", nil)
+            self.actionButton.title = KMLocalizedString("Remove Header & Footer")
         }
     }
     

+ 1 - 1
PDF Office/PDF Master/Class/Batch/WindowController/VC/KMPlanViewController.swift

@@ -29,7 +29,7 @@ class KMPlanViewController: NSViewController,KMPlanTableCellViewDelegate,NSOutli
     
     @IBOutlet var outlineView: NSOutlineView!
     lazy var palns: Array<String> = {
-        let palns = [KMLocalizedString("Plan 1 (Online)",nil), KMLocalizedString("Plan 2 (Offline)",nil)]
+        let palns = [KMLocalizedString("Plan 1 (Online)"), KMLocalizedString("Plan 2 (Offline)")]
         return palns
     }()
     

+ 1 - 1
PDF Office/PDF Master/Class/ChromiumTabs/KMTabStripView.swift

@@ -15,7 +15,7 @@ class KMTabStripView: CTTabStripView {
         if self.addTabButton != nil {
             self.addTabButton.wantsLayer = true
             self.addTabButton.layer?.cornerRadius = 4
-//            self.addTabButton.toolTip = String(format: "%@(%@O)", KMLocalizedString("Open File", nil),kCommandString)
+//            self.addTabButton.toolTip = String(format: "%@(%@O)", KMLocalizedString("Open File"),kCommandString)
             
             let view = KMCoverButton()
             self.addTabButton.addSubview(view)

+ 1 - 1
PDF Office/PDF Master/Class/Common/Category/CPDFKit/CPDFView+KMExtension.swift

@@ -13,7 +13,7 @@ import Foundation
             if let doc = self.document, doc.allowsCopying == false || doc.allowsPrinting == false {
                 if ownerAlert {
                     Task {
-                        _ = await KMAlertTool.runModel(message: KMLocalizedString("This is a secured document. Editing is not permitted.", nil))
+                        _ = await KMAlertTool.runModel(message: KMLocalizedString("This is a secured document. Editing is not permitted."))
                     }
                 }
                 return false

+ 1 - 5
PDF Office/PDF Master/Class/Common/Category/NSObject+KMExtension.swift

@@ -595,10 +595,6 @@ public func KMSafePoint(x: Double, y: Double) -> NSPoint {
     return point
 }
 
-func KMLocalizedString(_ key: String, _ comment: String? = nil) -> String {
-    NSLocalizedString(key, comment: comment ?? "")
-}
-
 @objcMembers class SKStringConstants: NSObject {
     public static let disableAnimationsKey = SKDisableAnimationsKey
     public static let freeTextNoteLineWidthKey = CFreeTextNoteLineWidthKey
@@ -641,7 +637,7 @@ extension NSApplication {
             if NSDocument.isDamage(url: fileURL) {
                 let alert = NSAlert()
                 alert.alertStyle = .critical
-                alert.messageText = String(format: KMLocalizedString("The file \"%@\" could not be opened.", nil), fileURL.path.lastPathComponent)
+                alert.messageText = String(format: KMLocalizedString("The file \"%@\" could not be opened."), fileURL.path.lastPathComponent)
                 alert.informativeText = NSLocalizedString("It may be damaged or use a file format that PDF Reader Pro doesn’t recognize.", comment: "")
                 alert.addButton(withTitle: NSLocalizedString("Cancel", comment: ""))
                 alert.beginSheetModal(for: NSApp.mainWindow!) { _ in }

+ 17 - 17
PDF Office/PDF Master/Class/Common/LineInspector/KMLineInspector.swift

@@ -172,25 +172,25 @@ enum KMLineChangeAction: Int {
     private func _initDefalutValue() {
         self.window?.title = NSLocalizedString("Lines", comment: "")
         
-        self.styleButton.setHelp(KMLocalizedString("Solid line style", "Tool tip message"), for: CPDFBorderStyle.solid.rawValue)
-        self.styleButton.setHelp(KMLocalizedString("Dashed line style", "Tool tip message"), for: CPDFBorderStyle.dashed.rawValue)
-        self.styleButton.setHelp(KMLocalizedString("Beveled line style", "Tool tip message"), for: CPDFBorderStyle.beveled.rawValue)
-        self.styleButton.setHelp(KMLocalizedString("Inset line style", "Tool tip message"), for: CPDFBorderStyle.inset.rawValue)
-        self.styleButton.setHelp(KMLocalizedString("Underline line style", "Tool tip message"), for: CPDFBorderStyle.underline.rawValue)
+        self.styleButton.setHelp(KMLocalizedString("Solid line style"), for: CPDFBorderStyle.solid.rawValue)
+        self.styleButton.setHelp(KMLocalizedString("Dashed line style"), for: CPDFBorderStyle.dashed.rawValue)
+        self.styleButton.setHelp(KMLocalizedString("Beveled line style"), for: CPDFBorderStyle.beveled.rawValue)
+        self.styleButton.setHelp(KMLocalizedString("Inset line style"), for: CPDFBorderStyle.inset.rawValue)
+        self.styleButton.setHelp(KMLocalizedString("Underline line style"), for: CPDFBorderStyle.underline.rawValue)
 
-        self.startLineStyleButton.setHelp(KMLocalizedString("No start line style", "Tool tip message"), for: CPDFLineStyle.none.rawValue)
-        self.startLineStyleButton.setHelp(KMLocalizedString("Square start line style", "Tool tip message"), for: CPDFLineStyle.square.rawValue)
-        self.startLineStyleButton.setHelp(KMLocalizedString("Circle start line style", "Tool tip message"), for: CPDFLineStyle.circle.rawValue)
-        self.startLineStyleButton.setHelp(KMLocalizedString("Diamond start line style", "Tool tip message"), for: CPDFLineStyle.diamond.rawValue)
-        self.startLineStyleButton.setHelp(KMLocalizedString("Open arrow start line style", "Tool tip message"), for: CPDFLineStyle.openArrow.rawValue)
-        self.startLineStyleButton.setHelp(KMLocalizedString("Closed arrow start line style", "Tool tip message"), for: CPDFLineStyle.closedArrow.rawValue)
+        self.startLineStyleButton.setHelp(KMLocalizedString("No start line style"), for: CPDFLineStyle.none.rawValue)
+        self.startLineStyleButton.setHelp(KMLocalizedString("Square start line style"), for: CPDFLineStyle.square.rawValue)
+        self.startLineStyleButton.setHelp(KMLocalizedString("Circle start line style"), for: CPDFLineStyle.circle.rawValue)
+        self.startLineStyleButton.setHelp(KMLocalizedString("Diamond start line style"), for: CPDFLineStyle.diamond.rawValue)
+        self.startLineStyleButton.setHelp(KMLocalizedString("Open arrow start line style"), for: CPDFLineStyle.openArrow.rawValue)
+        self.startLineStyleButton.setHelp(KMLocalizedString("Closed arrow start line style"), for: CPDFLineStyle.closedArrow.rawValue)
 
-        self.endLineStyleButton.setHelp(KMLocalizedString("No end line style", "Tool tip message"), for: CPDFLineStyle.none.rawValue)
-        self.endLineStyleButton.setHelp(KMLocalizedString("Square end line style", "Tool tip message"), for: CPDFLineStyle.square.rawValue)
-        self.endLineStyleButton.setHelp(KMLocalizedString("Circle end line style", "Tool tip message"), for: CPDFLineStyle.circle.rawValue)
-        self.endLineStyleButton.setHelp(KMLocalizedString("Diamond end line style", "Tool tip message"), for: CPDFLineStyle.diamond.rawValue)
-        self.endLineStyleButton.setHelp(KMLocalizedString("Open arrow end line style", "Tool tip message"), for: CPDFLineStyle.openArrow.rawValue)
-        self.endLineStyleButton.setHelp(KMLocalizedString("Closed arrow end line style", "Tool tip message"), for: CPDFLineStyle.closedArrow.rawValue)
+        self.endLineStyleButton.setHelp(KMLocalizedString("No end line style"), for: CPDFLineStyle.none.rawValue)
+        self.endLineStyleButton.setHelp(KMLocalizedString("Square end line style"), for: CPDFLineStyle.square.rawValue)
+        self.endLineStyleButton.setHelp(KMLocalizedString("Circle end line style"), for: CPDFLineStyle.circle.rawValue)
+        self.endLineStyleButton.setHelp(KMLocalizedString("Diamond end line style"), for: CPDFLineStyle.diamond.rawValue)
+        self.endLineStyleButton.setHelp(KMLocalizedString("Open arrow end line style"), for: CPDFLineStyle.openArrow.rawValue)
+        self.endLineStyleButton.setHelp(KMLocalizedString("Closed arrow end line style"), for: CPDFLineStyle.closedArrow.rawValue)
         
         self.LineborderStyleLable.stringValue = NSLocalizedString("Line and Border Style", comment: "")
         self.lineEndingStyleLabel.stringValue = NSLocalizedString("Line Ending Style", comment: "")

+ 23 - 23
PDF Office/PDF Master/Class/Common/OC/Property/KMInfoWindowController.swift

@@ -107,26 +107,26 @@ class KMInfoWindowController: NSWindowController {
                                 PDFDocumentAttribute.creationDateAttribute.rawValue,
                                 PDFDocumentAttribute.modificationDateAttribute.rawValue,
                                 KMInfoKeywordsStringKey]
-        self._labels = [KMInfoFileNameKey : KMLocalizedString("File name:", ""),
-                        KMInfoFileSizeKey : KMLocalizedString("File size:", ""),
-                        KMInfoPageSizeKey : KMLocalizedString("Page size:", ""),
-                        KMInfoPageCountKey : KMLocalizedString("Page count:", ""),
-                        KMInfoVersionKey : KMLocalizedString("PDF Version:", ""),
-                       KMInfoEncryptedKey : KMLocalizedString("Encrypted:", ""),
-                  KMInfoAllowsPrintingKey : KMLocalizedString("Printing:", ""),
-                    KMInfoAllowsCopyingKey : KMLocalizedString("Content Copying:", ""),
-           KMInfoAllowsDocumentAssemblyKey : KMLocalizedString("Document Assembly:", ""),
-       KMInfoAllowsContentAccessibilityKey : KMLocalizedString("Content Copying for Accessibility:", ""),
-                 KMInfoAllowsCommentingKey : KMLocalizedString("Commenting:", ""),
-             KMInfoAllowsFormFieldEntryKey : KMLocalizedString("Filling of form fields:", ""),
-                        PDFDocumentAttribute.titleAttribute.rawValue : KMLocalizedString("Title:", ""),
-                        PDFDocumentAttribute.authorAttribute.rawValue : KMLocalizedString("Author:", ""),
-                        PDFDocumentAttribute.subjectAttribute.rawValue : KMLocalizedString("Subject:", ""),
-                        PDFDocumentAttribute.creatorAttribute.rawValue : KMLocalizedString("Content Creator:", ""),
-                        PDFDocumentAttribute.producerAttribute.rawValue : KMLocalizedString("PDF Producer:", ""),
-                        PDFDocumentAttribute.creationDateAttribute.rawValue : KMLocalizedString("Creation date:", ""),
-                        PDFDocumentAttribute.modificationDateAttribute.rawValue : KMLocalizedString("Modification date:", ""),
-                   KMInfoKeywordsStringKey : KMLocalizedString("Keywords:", "")]
+        self._labels = [KMInfoFileNameKey : KMLocalizedString("File name:"),
+                        KMInfoFileSizeKey : KMLocalizedString("File size:"),
+                        KMInfoPageSizeKey : KMLocalizedString("Page size:"),
+                        KMInfoPageCountKey : KMLocalizedString("Page count:"),
+                        KMInfoVersionKey : KMLocalizedString("PDF Version:"),
+                       KMInfoEncryptedKey : KMLocalizedString("Encrypted:"),
+                  KMInfoAllowsPrintingKey : KMLocalizedString("Printing:"),
+                    KMInfoAllowsCopyingKey : KMLocalizedString("Content Copying:"),
+           KMInfoAllowsDocumentAssemblyKey : KMLocalizedString("Document Assembly:"),
+       KMInfoAllowsContentAccessibilityKey : KMLocalizedString("Content Copying for Accessibility:"),
+                 KMInfoAllowsCommentingKey : KMLocalizedString("Commenting:"),
+             KMInfoAllowsFormFieldEntryKey : KMLocalizedString("Filling of form fields:"),
+                        PDFDocumentAttribute.titleAttribute.rawValue : KMLocalizedString("Title:"),
+                        PDFDocumentAttribute.authorAttribute.rawValue : KMLocalizedString("Author:"),
+                        PDFDocumentAttribute.subjectAttribute.rawValue : KMLocalizedString("Subject:"),
+                        PDFDocumentAttribute.creatorAttribute.rawValue : KMLocalizedString("Content Creator:"),
+                        PDFDocumentAttribute.producerAttribute.rawValue : KMLocalizedString("PDF Producer:"),
+                        PDFDocumentAttribute.creationDateAttribute.rawValue : KMLocalizedString("Creation date:"),
+                        PDFDocumentAttribute.modificationDateAttribute.rawValue : KMLocalizedString("Modification date:"),
+                   KMInfoKeywordsStringKey : KMLocalizedString("Keywords:")]
     }
     
     override func loadWindow() {
@@ -432,9 +432,9 @@ extension KMInfoWindowController: NSTableViewDelegate, NSTableViewDataSource {
                     value = shortDateFormatter.string(from: data as Date)
                 } else if let data = value as? NSNumber {
                     if (key == KMInfoEncryptedKey) {
-                        value = data.boolValue ? KMLocalizedString("Yes", "") : KMLocalizedString("No", "")
+                        value = data.boolValue ? KMLocalizedString("Yes") : KMLocalizedString("No")
                     } else {
-                        value = key == KMInfoPageCountKey ? data.stringValue : (data.boolValue ? KMLocalizedString("Allowed", "") : KMLocalizedString("Not Allowed", ""))
+                        value = key == KMInfoPageCountKey ? data.stringValue : (data.boolValue ? KMLocalizedString("Allowed") : KMLocalizedString("Not Allowed"))
                     }
                 }
             }
@@ -588,7 +588,7 @@ private func KMSizeString(_ size: NSSize, _ altSize: NSSize) -> String {
     }
     
     let factor = useMetric ? CM_PER_POINT : INCH_PER_POINT
-    let units = useMetric ? KMLocalizedString("cm", "size unit") : KMLocalizedString("in", "size unit")
+    let units = useMetric ? KMLocalizedString("cm") : KMLocalizedString("in")
     if (NSEqualSizes(size, altSize)) {
         return String(format: "%.2f x %.2f %@", size.width * factor, size.height * factor, units)
     } else {

+ 2 - 2
PDF Office/PDF Master/Class/Document/KMMainDocument.swift

@@ -752,8 +752,8 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
         }
         let check = try?fileURL.checkResourceIsReachable()
         if check == false || self.isDocumentEdited {
-            let msg = KMLocalizedString("You must save this file first", "Alert text when trying to create archive for unsaved document")
-            let inf = KMLocalizedString("The document has unsaved changes, or has not previously been saved to disk.", "Informative text in alert dialog")
+            let msg = KMLocalizedString("You must save this file first")
+            let inf = KMLocalizedString("The document has unsaved changes, or has not previously been saved to disk.")
             Task {
                 _ = await KMAlertTool.runModel(message: msg, informative: inf)
             }

+ 7 - 7
PDF Office/PDF Master/Class/Home/View/CreatPDFView/KMCreatPDFView.xib

@@ -1,13 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="Named colors" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMCreatPDFView" customModule="PDF_Master" customModuleProvider="target">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMCreatPDFView" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <connections>
                 <outlet property="creatBox" destination="Vti-iD-u9k" id="vT4-20-HTW"/>
                 <outlet property="creatLabel" destination="Olj-cQ-f0O" id="gSh-sd-zkf"/>
@@ -24,13 +24,13 @@
                 <view translatesAutoresizingMaskIntoConstraints="NO" id="yL2-Zs-ryZ">
                     <rect key="frame" x="0.0" y="0.0" width="264" height="111"/>
                     <subviews>
-                        <box boxType="custom" cornerRadius="1" translatesAutoresizingMaskIntoConstraints="NO" id="Vti-iD-u9k" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
+                        <box boxType="custom" cornerRadius="1" translatesAutoresizingMaskIntoConstraints="NO" id="Vti-iD-u9k" customClass="KMBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
                             <rect key="frame" x="0.0" y="0.0" width="264" height="48"/>
                             <view key="contentView" id="gdX-gO-RS9">
                                 <rect key="frame" x="1" y="1" width="262" height="46"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <subviews>
-                                    <box boxType="custom" borderWidth="0.0" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="KOh-3q-duh" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
+                                    <box boxType="custom" borderWidth="0.0" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="KOh-3q-duh" customClass="KMBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                         <rect key="frame" x="81" y="13" width="100" height="20"/>
                                         <view key="contentView" id="ynC-Yp-Rnv">
                                             <rect key="frame" x="0.0" y="0.0" width="100" height="20"/>
@@ -80,13 +80,13 @@
                             <color key="borderColor" name="KMMainColor"/>
                             <color key="fillColor" name="KMGray1Color"/>
                         </box>
-                        <box boxType="custom" cornerRadius="1" translatesAutoresizingMaskIntoConstraints="NO" id="OeJ-LB-1ap" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
+                        <box boxType="custom" cornerRadius="1" translatesAutoresizingMaskIntoConstraints="NO" id="OeJ-LB-1ap" customClass="KMBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
                             <rect key="frame" x="0.0" y="63" width="264" height="48"/>
                             <view key="contentView" id="duq-hz-9tP">
                                 <rect key="frame" x="1" y="1" width="262" height="46"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <subviews>
-                                    <box boxType="custom" borderWidth="0.0" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="7Av-Ws-uiE" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
+                                    <box boxType="custom" borderWidth="0.0" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="7Av-Ws-uiE" customClass="KMBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                         <rect key="frame" x="81" y="13" width="100" height="20"/>
                                         <view key="contentView" id="omc-32-Ugy">
                                             <rect key="frame" x="0.0" y="0.0" width="100" height="20"/>

+ 2 - 2
PDF Office/PDF Master/Class/Home/View/HomeContentView/QucikTools/Model/KMQucikToolsModel.swift

@@ -82,7 +82,7 @@ extension KMQucikToolsModel {
         default: string = ""
         }
             
-        return KMLocalizedString(string, nil)//string
+        return KMLocalizedString(string)//string
     }
     
     func subTitleString() -> String {
@@ -114,7 +114,7 @@ extension KMQucikToolsModel {
         default: string = ""
         }
             
-        return KMLocalizedString(string, nil)//string
+        return KMLocalizedString(string)//string
     }
     
     func iconImage(_ isHight: Bool = false) -> NSImage {

+ 10 - 10
PDF Office/PDF Master/Class/Home/ViewController/KMHomeViewController+Action.swift

@@ -1024,7 +1024,7 @@ extension KMHomeViewController {
             if document == nil{
                 let alert = NSAlert()
                 alert.alertStyle = .critical
-                alert.messageText = KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.", nil)
+                alert.messageText = KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.")
                 alert.beginSheetModal(for: NSApp.mainWindow!) { (response) in
                     if response == .alertFirstButtonReturn {
                         // Handle cancel action
@@ -1061,7 +1061,7 @@ extension KMHomeViewController {
                 if self.isDamageImage(image: img, path: fileURL.path) {
                     let alert = NSAlert()
                     alert.alertStyle = .critical
-                    alert.messageText = String(format: KMLocalizedString("The file \"%@\" could not be opened.", nil), fileURL.path.lastPathComponent)
+                    alert.messageText = String(format: KMLocalizedString("The file \"%@\" could not be opened."), fileURL.path.lastPathComponent)
                     alert.informativeText = NSLocalizedString("It may be damaged or use a file format that PDF Reader Pro doesn’t recognize.", comment: "")
                     alert.addButton(withTitle: NSLocalizedString("Cancel", comment: ""))
                     alert.beginSheetModal(for: NSApp.mainWindow!) { (response) in
@@ -1093,7 +1093,7 @@ extension KMHomeViewController {
         openPanel.allowedFileTypes = KMImageToPDFMethod.supportedImageTypes()
         //MARK: 允许多选还是单选,如果是付费用户允许多选
         openPanel.allowsMultipleSelection = true
-        openPanel.message = KMLocalizedString("Select images to create a new document. To select multiple files press cmd ⌘ button on keyboard and click on the target files one by one.", nil)
+        openPanel.message = KMLocalizedString("Select images to create a new document. To select multiple files press cmd ⌘ button on keyboard and click on the target files one by one.")
 //        openPanel.canChooseFiles = false
 //        openPanel.canChooseDirectories = true
 //        openPanel.canCreateDirectories = true
@@ -1118,7 +1118,7 @@ extension KMHomeViewController {
             if self.isDamageImage(image: img, path: fileURL.path) {
                 let alert = NSAlert()
                 alert.alertStyle = .critical
-                alert.messageText = String(format: KMLocalizedString("The file \"%@\" could not be opened.", nil), fileURL.path.lastPathComponent)
+                alert.messageText = String(format: KMLocalizedString("The file \"%@\" could not be opened."), fileURL.path.lastPathComponent)
                 alert.informativeText = NSLocalizedString("It may be damaged or use a file format that PDF Reader Pro doesn’t recognize.", comment: "")
                 alert.addButton(withTitle: NSLocalizedString("Cancel", comment: ""))
                 alert.beginSheetModal(for: NSApp.mainWindow!) { (response) in
@@ -1279,7 +1279,7 @@ extension KMHomeViewController {
         openPanel.allowedFileTypes = ["pdf","PDF"]
         //MARK: 允许多选还是单选,如果是付费用户允许多选
         openPanel.allowsMultipleSelection = true
-        openPanel.message = KMLocalizedString("To select multiple files press cmd ⌘ button on keyboard and click on the target files one by one.", nil)
+        openPanel.message = KMLocalizedString("To select multiple files press cmd ⌘ button on keyboard and click on the target files one by one.")
         openPanel.beginSheetModal(for: NSWindow.currentWindow()) { [self] (result) in
             if result == NSApplication.ModalResponse.OK {
                 quickPassword(urls: openPanel.urls)
@@ -1676,7 +1676,7 @@ extension KMHomeViewController {
 //                    workspace.activateFileViewerSelecting([url])
 ////                    }
 //                } else {
-//                    _ = await KMAlertTool.runModel(message: KMLocalizedString("Failed to insert page(s)!", nil))
+//                    _ = await KMAlertTool.runModel(message: KMLocalizedString("Failed to insert page(s)!"))
 //                }
 //            }
 //        }
@@ -1790,7 +1790,7 @@ extension KMHomeViewController {
                 if let pdf = CPDFDocument(url: openPanel.url!) {
                     if pdf.allowsCopying == false || pdf.allowsPrinting == false {
                         Task {
-                            _ = await KMAlertTool.runModel(message: KMLocalizedString("This is a secured document. Editing is not permitted.", nil))
+                            _ = await KMAlertTool.runModel(message: KMLocalizedString("This is a secured document. Editing is not permitted."))
                         }
                         return
                     }
@@ -1828,7 +1828,7 @@ extension KMHomeViewController {
             if let pdf = CPDFDocument(url: openPanel.url!) {
                 if pdf.allowsCopying == false || pdf.allowsPrinting == false {
                     Task {
-                        _ = await KMAlertTool.runModel(message: KMLocalizedString("This is a secured document. Editing is not permitted.", nil))
+                        _ = await KMAlertTool.runModel(message: KMLocalizedString("This is a secured document. Editing is not permitted."))
                     }
                     return
                 }
@@ -1866,7 +1866,7 @@ extension KMHomeViewController {
             if let pdf = CPDFDocument(url: openPanel.url!) {
                 if pdf.allowsCopying == false || pdf.allowsPrinting == false {
                     Task {
-                        _ = await KMAlertTool.runModel(message: KMLocalizedString("This is a secured document. Editing is not permitted.", nil))
+                        _ = await KMAlertTool.runModel(message: KMLocalizedString("This is a secured document. Editing is not permitted."))
                     }
                     return
                 }
@@ -1904,7 +1904,7 @@ extension KMHomeViewController {
             if let pdf = CPDFDocument(url: openPanel.url!) {
                 if pdf.allowsCopying == false || pdf.allowsPrinting == false {
                     Task {
-                        _ = await KMAlertTool.runModel(message: KMLocalizedString("This is a secured document. Editing is not permitted.", nil))
+                        _ = await KMAlertTool.runModel(message: KMLocalizedString("This is a secured document. Editing is not permitted."))
                     }
                     return
                 }

+ 13 - 26
PDF Office/PDF Master/Class/Home/ViewController/KMHomeViewController.swift

@@ -107,6 +107,8 @@ import Cocoa
     var showCoupon: Bool = true
     var couponDueWindowVC: KMCouponDueWindowController!
     
+    var homeVC: KMNHomeViewController = KMNHomeViewController()
+    
     @IBOutlet weak var rightBottonHeight: NSLayoutConstraint!
     
     var currentController: NSWindowController?
@@ -183,6 +185,17 @@ import Cocoa
         NotificationCenter.default.addObserver(self, selector: #selector(importFromCamera), name: Notification.Name("kDeviceCameraMenuItemNotification"), object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(importFromScanner), name: Notification.Name("kDeviceScannerMenuItemNotification"), object: nil)
         self.loadFunctionGuide()
+
+        
+        self.homeRightScrollViewView.isHidden = true
+        self.homeContentView.isHidden = true
+        self.homeVC.view.frame = self.view.bounds
+        self.homeVC.view.wantsLayer = true
+        self.homeVC.view.layer?.backgroundColor = NSColor.white.cgColor
+        self.homeVC.view.autoresizingMask = [.width, .height]
+        self.rightBox.addSubview(self.homeVC.view)
+        
+        
         
     }
     
@@ -795,32 +808,6 @@ extension KMHomeViewController {
     }
     
     func openBlankPage() {
-//        let fileName: NSString = String(format: "%@.pdf", NSLocalizedString("Untitled", comment: "")) as NSString
-//        let savePath = fetchUniquePath(fileName.kUrlToPDFFolderPath() as String)
-//        let filePath = savePath.deletingLastPathComponent
-//        if FileManager.default.fileExists(atPath: filePath) == false {
-//            try?FileManager.default.createDirectory(atPath: filePath, withIntermediateDirectories: false)
-//        }
-//
-//        let pdfDocument = CPDFDocument()
-//        pdfDocument?.insertPage(CGSize(width: 595, height: 842), at: 0)
-//        pdfDocument?.write(to: URL(fileURLWithPath: savePath))
-//        let controll: KMBrowserWindowController? = self.view.window?.windowController as? KMBrowserWindowController
-//        if controll?.browser?.tabCount() ?? 0 > 1 && KMPreference.shared.openDocumentType == .newWindow{
-//            self.reopenDocument(forPaths: URL(fileURLWithPath: savePath))
-//        }else {
-//            NSDocumentController.shared.openDocument(withContentsOf: URL(fileURLWithPath: savePath), display: true) { document, documentWasAlreadyOpen, error in
-//                if error != nil {
-//                    NSApp.presentError(error!)
-//                } else {
-//                    if document is KMMainDocument {
-//                        let newDocument = document
-//                        (newDocument as! KMMainDocument).isNewCreated = true
-//                    }
-//                }
-//    //            self.homeContentView?.reloadData()
-//            }
-//        }
         NSApplication.newBlankDocument()
     }
     

+ 11 - 11
PDF Office/PDF Master/Class/Home/ViewController/KMHomeViewController.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -53,10 +53,6 @@
             <subviews>
                 <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1v2-87-qa4">
                     <rect key="frame" x="537" y="410" width="0.0" height="0.0"/>
-                    <constraints>
-                        <constraint firstAttribute="height" id="S10-65-2uD"/>
-                        <constraint firstAttribute="width" id="nNr-po-NTu"/>
-                    </constraints>
                     <buttonCell key="cell" type="square" title="Button" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="Qq0-z1-7iI">
                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                         <font key="font" metaFont="system"/>
@@ -64,6 +60,10 @@
 Gw
 </string>
                     </buttonCell>
+                    <constraints>
+                        <constraint firstAttribute="height" id="S10-65-2uD"/>
+                        <constraint firstAttribute="width" id="nNr-po-NTu"/>
+                    </constraints>
                     <connections>
                         <action selector="escButtonAction:" target="-2" id="U8k-vz-XWX"/>
                     </connections>
@@ -95,7 +95,7 @@ Gw
                                                             </constraints>
                                                             <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="edc-z8-gCQ"/>
                                                         </imageView>
-                                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZAT-Co-tte">
+                                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZAT-Co-tte">
                                                             <rect key="frame" x="54" y="24" width="186" height="16"/>
                                                             <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="XuC-gZ-0YQ">
                                                                 <font key="font" metaFont="system"/>
@@ -130,7 +130,7 @@ Gw
                                                             </constraints>
                                                             <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="cON-bS-15a"/>
                                                         </imageView>
-                                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="p5N-bY-CVu">
+                                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="p5N-bY-CVu">
                                                             <rect key="frame" x="54" y="24" width="186" height="16"/>
                                                             <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="RZo-Aj-B8y">
                                                                 <font key="font" metaFont="system"/>
@@ -165,7 +165,7 @@ Gw
                                                             </constraints>
                                                             <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="oLu-02-hg4"/>
                                                         </imageView>
-                                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Fhh-MS-1UA">
+                                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Fhh-MS-1UA">
                                                             <rect key="frame" x="54" y="24" width="186" height="16"/>
                                                             <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="hZb-7Q-757">
                                                                 <font key="font" metaFont="system"/>
@@ -200,7 +200,7 @@ Gw
                                                             </constraints>
                                                             <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="RX4-be-ygC"/>
                                                         </imageView>
-                                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aGT-3k-XaH">
+                                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aGT-3k-XaH">
                                                             <rect key="frame" x="54" y="24" width="186" height="16"/>
                                                             <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="A36-Eb-2cb">
                                                                 <font key="font" metaFont="system"/>
@@ -388,7 +388,7 @@ Gw
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="lTX-FO-7Ze">
                             <rect key="frame" x="489" y="374" width="65" height="40"/>
                             <subviews>
-                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Hn2-R8-Bfv">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Hn2-R8-Bfv">
                                     <rect key="frame" x="14" y="12" width="37" height="16"/>
                                     <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="gkz-Hj-UOJ">
                                         <font key="font" metaFont="system"/>

+ 6 - 6
PDF Office/PDF Master/Class/PDFTools/AddHeaderFooter/Model/KMBatchAddHeaderFooterOperation.swift

@@ -39,7 +39,7 @@ class KMBatchAddHeaderFooterOperation: KMBatchOperation{
             self.hasExcuting = true
             didChangeValue(forKey: "isExecuting")
             if !FileManager.default.fileExists(atPath: self.operateFile!.filePath) {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("File Not Exist", nil)), info: self.operateFile!.removeBatesInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("File Not Exist")), info: self.operateFile!.removeBatesInfo)
                 
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
@@ -48,7 +48,7 @@ class KMBatchAddHeaderFooterOperation: KMBatchOperation{
             }
             
             if self.pdfDocument == nil {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.", nil)), info: self.operateFile!.removeWatermarkInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.")), info: self.operateFile!.removeWatermarkInfo)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
                 self.didChangeValue(forKey: "isFinished")
@@ -56,7 +56,7 @@ class KMBatchAddHeaderFooterOperation: KMBatchOperation{
             }
             
             if !self.pdfDocument!.allowsPrinting || !self.pdfDocument!.allowsCopying {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("This is a secured document. Editing is not permitted.", nil)), info: self.operateFile!.removeWatermarkInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("This is a secured document. Editing is not permitted.")), info: self.operateFile!.removeWatermarkInfo)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
                 self.didChangeValue(forKey: "isFinished")
@@ -95,7 +95,7 @@ class KMBatchAddHeaderFooterOperation: KMBatchOperation{
         var filePath = self.pdfDocument?.documentURL?.path
         let password = self.password
         if filePath == nil {
-            let str = String(format: "%@.pdf", KMLocalizedString("Untitled", nil))
+            let str = String(format: "%@.pdf", KMLocalizedString("Untitled"))
             let writeSuccess = self.pdfDocument!.write(to: URL(fileURLWithPath: (kTempSavePath?.stringByAppendingPathComponent(str))!))
             if writeSuccess {
                 let newDocument: CPDFDocument = CPDFDocument(url: URL(fileURLWithPath: (kTempSavePath?.stringByAppendingPathComponent(str))!))
@@ -135,7 +135,7 @@ class KMBatchAddHeaderFooterOperation: KMBatchOperation{
                 arr.append(number)
             }
             if arr.count < 1 {
-                let error = NSError(domain: "LocalError", code: 0, userInfo: [NSLocalizedDescriptionKey: KMLocalizedString("Invalid page range or the page number is out of range. Please try again.", nil)])
+                let error = NSError(domain: "LocalError", code: 0, userInfo: [NSLocalizedDescriptionKey: KMLocalizedString("Invalid page range or the page number is out of range. Please try again.")])
                 self.delegate?.fileOperateFailed?(self.operateFile!, error: error, info: self.operateFile!.addBatesInfo)
                 
                 willChangeValue(forKey: "isFinished")
@@ -178,7 +178,7 @@ class KMBatchAddHeaderFooterOperation: KMBatchOperation{
                 arr.append(number)
             }
             if arr.count < 1 {
-                let error = NSError(domain: "LocalError", code: 0, userInfo: [NSLocalizedDescriptionKey: KMLocalizedString("Invalid page range or the page number is out of range. Please try again.", nil)])
+                let error = NSError(domain: "LocalError", code: 0, userInfo: [NSLocalizedDescriptionKey: KMLocalizedString("Invalid page range or the page number is out of range. Please try again.")])
                 self.delegate?.fileOperateFailed?(self.operateFile!, error: error, info: self.operateFile!.addHeaderFooterInfo)
                 willChangeValue(forKey: "isFinished")
                 self.hasFinished = true

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

@@ -48,11 +48,11 @@ class KMBatchOperateAddHeaderFooterViewController: KMBatchOperateBaseViewControl
                     }
                 }
                 self.actionButton.tag = 1
-                self.actionButton.title = KMLocalizedString("Apply", nil)
+                self.actionButton.title = KMLocalizedString("Apply")
                 self.actionButton.setTitleColor(KMAppearance.Layout.w0Color())
             } else {
                 self.actionButton.tag = 0
-                self.actionButton.title = KMLocalizedString("Cancel", nil)
+                self.actionButton.title = KMLocalizedString("Cancel")
                 self.actionButton.setTitleColor(KMAppearance.Layout.w0Color())
             }
         }
@@ -75,9 +75,9 @@ class KMBatchOperateAddHeaderFooterViewController: KMBatchOperateBaseViewControl
         NotificationCenter.default.addObserver(self, selector: #selector(batchFilesCountNotification(notification:)), name: NSNotification.Name("KMBatchFilesCountNotification"), object: nil)
     }
     func localizedLanguage() {
-        self.addButton.title = "  " + KMLocalizedString("Add Template", nil)
-        self.actionButton.title = KMLocalizedString("Apply", nil)
-        self.titleLabel.stringValue = KMLocalizedString("Apply", nil)
+        self.addButton.title = "  " + KMLocalizedString("Add Template")
+        self.actionButton.title = KMLocalizedString("Apply")
+        self.titleLabel.stringValue = KMLocalizedString("Apply")
     }
     func configuInterface() {
         self.titleLabel.font = NSFont.systemFont(ofSize: 14)
@@ -149,7 +149,7 @@ class KMBatchOperateAddHeaderFooterViewController: KMBatchOperateBaseViewControl
             make?.height.greaterThanOrEqualTo()(200)
         }
         
-        self.blankView.titleLabel.stringValue = KMLocalizedString("No Templates", nil)
+        self.blankView.titleLabel.stringValue = KMLocalizedString("No Templates")
         
         self.tableView.backgroundColor = KMAppearance.Layout.l0Color()
         

+ 4 - 4
PDF Office/PDF Master/Class/PDFTools/AddPassword/Model/KMBatchAddPasswordOperation.swift

@@ -27,7 +27,7 @@ class KMBatchAddPasswordOperation: KMBatchOperation{
             self.hasExcuting = true
             didChangeValue(forKey: "isExecuting")
             if !FileManager.default.fileExists(atPath: self.operateFile!.filePath) {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("File Not Exist", nil)), info: self.operateFile!.removeBatesInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("File Not Exist")), info: self.operateFile!.removeBatesInfo)
                 
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
@@ -36,7 +36,7 @@ class KMBatchAddPasswordOperation: KMBatchOperation{
             }
 
             if self.pdfDocument == nil {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.", nil)), info: self.operateFile!.removeWatermarkInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.")), info: self.operateFile!.removeWatermarkInfo)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
                 self.didChangeValue(forKey: "isFinished")
@@ -44,7 +44,7 @@ class KMBatchAddPasswordOperation: KMBatchOperation{
             }
 
             if !self.pdfDocument!.allowsPrinting || !self.pdfDocument!.allowsCopying {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("This is a secured document. Editing is not permitted.", nil)), info: self.operateFile!.removeWatermarkInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("This is a secured document. Editing is not permitted.")), info: self.operateFile!.removeWatermarkInfo)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
                 self.didChangeValue(forKey: "isFinished")
@@ -91,7 +91,7 @@ class KMBatchAddPasswordOperation: KMBatchOperation{
             if isSuccess! {
                 self.delegate?.fileOperateSuccessed?(self.operateFile!, info: self.operateFile!.addPasswordInfo)
             } else {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("Failed", nil)), info: self.operateFile!.addPasswordInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("Failed")), info: self.operateFile!.addPasswordInfo)
             }
             self.willChangeValue(forKey: "isFinished")
             self.hasFinished = true

+ 16 - 16
PDF Office/PDF Master/Class/PDFTools/AddPassword/VC/KMBatchOperateAddPasswordViewController.swift

@@ -79,11 +79,11 @@ class KMBatchOperateAddPasswordViewController: KMBatchOperateBaseViewController,
                     }
                 }
                 self.actionButton.tag = 1
-                self.actionButton.title = KMLocalizedString("Encrypt", nil)
+                self.actionButton.title = KMLocalizedString("Encrypt")
                 self.actionButton.setTitleColor(KMAppearance.Layout.w0Color())
             } else {
                 self.actionButton.tag = 0
-                self.actionButton.title = KMLocalizedString("Cancel", nil)
+                self.actionButton.title = KMLocalizedString("Cancel")
                 self.actionButton.setTitleColor(KMAppearance.Layout.w0Color())
             }
         }
@@ -117,19 +117,19 @@ class KMBatchOperateAddPasswordViewController: KMBatchOperateBaseViewController,
     }
     
     func localizedLanguage() {
-        self.titleLabel.stringValue = KMLocalizedString("Password Security Settings", nil)
-        self.openPasswordButton.title = KMLocalizedString("", nil)
-        self.openPasswordLabel.stringValue = KMLocalizedString("Require a password to open the document.", nil)
-        self.ownerPasswordTF.stringValue = KMLocalizedString("Restrict printing and copying of the document.", nil)
-        self.forbidPrintLabel.stringValue = KMLocalizedString("Restrict document printing", nil)
-        self.forbidCopyLabel.stringValue = KMLocalizedString("Restrict content copying", nil)
-        self.fileDecriptionLabel.stringValue =  KMLocalizedString("Document Description", nil)
-        self.fileTitleLabel.stringValue = KMLocalizedString("Title:", nil)
-        self.fileAuthorLabel.stringValue = KMLocalizedString("Author:", nil)
-        self.fileThemeLabel.stringValue = KMLocalizedString("Subject:", nil)
-        self.fileKeywordLabel.stringValue = KMLocalizedString("Keywords:", nil)
+        self.titleLabel.stringValue = KMLocalizedString("Password Security Settings")
+        self.openPasswordButton.title = KMLocalizedString("")
+        self.openPasswordLabel.stringValue = KMLocalizedString("Require a password to open the document.")
+        self.ownerPasswordTF.stringValue = KMLocalizedString("Restrict printing and copying of the document.")
+        self.forbidPrintLabel.stringValue = KMLocalizedString("Restrict document printing")
+        self.forbidCopyLabel.stringValue = KMLocalizedString("Restrict content copying")
+        self.fileDecriptionLabel.stringValue =  KMLocalizedString("Document Description")
+        self.fileTitleLabel.stringValue = KMLocalizedString("Title:")
+        self.fileAuthorLabel.stringValue = KMLocalizedString("Author:")
+        self.fileThemeLabel.stringValue = KMLocalizedString("Subject:")
+        self.fileKeywordLabel.stringValue = KMLocalizedString("Keywords:")
         
-        self.actionButton.title = KMLocalizedString("Encrypt", nil)
+        self.actionButton.title = KMLocalizedString("Encrypt")
     }
     
     func configuUI() {
@@ -371,9 +371,9 @@ class KMBatchOperateAddPasswordViewController: KMBatchOperateBaseViewController,
         self.popOver?.behavior = .transient
         self.popOver?.contentSize = popViewController.view.frame.size
         if tag == 0 {
-            popViewController.updateWithHelpTip(helpTip: KMLocalizedString("Require a password to open the document.", nil))
+            popViewController.updateWithHelpTip(helpTip: KMLocalizedString("Require a password to open the document."))
         } else if tag == 1 {
-            popViewController.updateWithHelpTip(helpTip: KMLocalizedString("Restrict printing and copying of the document. A password will be required in order to change these permission settings.", nil))
+            popViewController.updateWithHelpTip(helpTip: KMLocalizedString("Restrict printing and copying of the document. A password will be required in order to change these permission settings."))
         }
         self.popOver?.show(relativeTo: sender.frame, of: self.view, preferredEdge: .maxY)
     }

+ 2 - 2
PDF Office/PDF Master/Class/PDFTools/Convert/ExtractImage/Controller/KMExtractImageWindowController.swift

@@ -280,7 +280,7 @@ class KMExtractImageWindowController: NSWindowController,PDFConvertObjectDelegat
             if let intValue = Int(self.currentPageTextField.stringValue), intValue > (self.preViewPDFView.document?.pageCount ?? 0) {
                 let alert = NSAlert()
                 alert.alertStyle = .critical
-                alert.messageText = String(format: "%@%@", self.preViewPDFView.document.documentURL.lastPathComponent.lastPathComponent,KMLocalizedString("Invalid page range or the page number is out of range. Please try again.", nil))
+                alert.messageText = String(format: "%@%@", self.preViewPDFView.document.documentURL.lastPathComponent.lastPathComponent,KMLocalizedString("Invalid page range or the page number is out of range. Please try again."))
                 alert.beginSheetModal(for: NSApp.mainWindow!, completionHandler: nil) 
                 return
             }
@@ -289,7 +289,7 @@ class KMExtractImageWindowController: NSWindowController,PDFConvertObjectDelegat
             if !checkPageRangeValidate(self.rangeTextField.stringValue) {
                 let alert = NSAlert()
                 alert.alertStyle = .critical
-                alert.messageText = String(format: "%@%@", self.preViewPDFView.document.documentURL.lastPathComponent.lastPathComponent,KMLocalizedString("Invalid page range or the page number is out of range. Please try again.", nil))
+                alert.messageText = String(format: "%@%@", self.preViewPDFView.document.documentURL.lastPathComponent.lastPathComponent,KMLocalizedString("Invalid page range or the page number is out of range. Please try again."))
                 alert.beginSheetModal(for: NSApp.mainWindow!, completionHandler: nil)
                 return
             }

+ 30 - 30
PDF Office/PDF Master/Class/PDFTools/Convert/NewController/KMConvertWindowController.swift

@@ -196,32 +196,32 @@ let kConvertFileSavePath = (kTempSavePath?.stringByAppendingPathComponent("conve
     }
     
     func localizedLanguage() {
-        formatLabel.stringValue = KMLocalizedString("Format:", nil)
-        separateButton.title = KMLocalizedString("Convert each page to a separate worksheet", nil)
-        singleButton.title = KMLocalizedString("Convert all pages to a single worksheet", nil)
-        box.title = KMLocalizedString("Page Range:", nil)
-        separateStypeLabel.stringValue = KMLocalizedString("Excel Worksheet Settings", nil)
-        extractTableButton.title = KMLocalizedString("Extract Tables Only", nil)
-        allPageButton.title = KMLocalizedString("All Pages", nil)
-        currentPageButton.title = KMLocalizedString("Current Page", nil)
-        oddPageButton.title = KMLocalizedString("Odd Pages Only", nil)
-        evenPageButton.title = KMLocalizedString("Even Pages Only", nil)
+        formatLabel.stringValue = KMLocalizedString("Format:")
+        separateButton.title = KMLocalizedString("Convert each page to a separate worksheet")
+        singleButton.title = KMLocalizedString("Convert all pages to a single worksheet")
+        box.title = KMLocalizedString("Page Range:")
+        separateStypeLabel.stringValue = KMLocalizedString("Excel Worksheet Settings")
+        extractTableButton.title = KMLocalizedString("Extract Tables Only")
+        allPageButton.title = KMLocalizedString("All Pages")
+        currentPageButton.title = KMLocalizedString("Current Page")
+        oddPageButton.title = KMLocalizedString("Odd Pages Only")
+        evenPageButton.title = KMLocalizedString("Even Pages Only")
         
-        pageRangeTextField.placeholderString = KMLocalizedString("e.g. 1,3-5,10", nil)
+        pageRangeTextField.placeholderString = KMLocalizedString("e.g. 1,3-5,10")
         
-        batchButton.title = KMLocalizedString("Batch", nil)
-        cancelButton.title = KMLocalizedString("Cancel", nil)
-        convertButton.title = KMLocalizedString("Convert", nil)
-        upgradeButton.title = KMLocalizedString("Upgrade", nil)
+        batchButton.title = KMLocalizedString("Batch")
+        cancelButton.title = KMLocalizedString("Cancel")
+        convertButton.title = KMLocalizedString("Convert")
+        upgradeButton.title = KMLocalizedString("Upgrade")
         
-        onlyTextBtn.title = KMLocalizedString("Only Text", nil)
-        onlyTableBtn.title = KMLocalizedString("Only Table", nil)
-        allContentBtn.title = KMLocalizedString("All Content", nil)
-        tableMenu1.title = KMLocalizedString("Create Sheet for each Table", nil)
-        tableMenu2.title = KMLocalizedString("Create Sheet for each Page", nil)
-        allContentMenu2.title = KMLocalizedString("Create Sheet for each Page", nil)
-        tableMenu3.title = KMLocalizedString("Create single Sheet for File", nil)
-        allContentMenu3.title = KMLocalizedString("Create single Sheet for File", nil)
+        onlyTextBtn.title = KMLocalizedString("Only Text")
+        onlyTableBtn.title = KMLocalizedString("Only Table")
+        allContentBtn.title = KMLocalizedString("All Content")
+        tableMenu1.title = KMLocalizedString("Create Sheet for each Table")
+        tableMenu2.title = KMLocalizedString("Create Sheet for each Page")
+        allContentMenu2.title = KMLocalizedString("Create Sheet for each Page")
+        tableMenu3.title = KMLocalizedString("Create single Sheet for File")
+        allContentMenu3.title = KMLocalizedString("Create single Sheet for File")
     }
     
     func hideWaitting() {
@@ -310,8 +310,8 @@ let kConvertFileSavePath = (kTempSavePath?.stringByAppendingPathComponent("conve
         
         if wordItem.title != "" {
             if isShowAdvanced {
-                let originStr = " \(KMLocalizedString("Standard", nil)) "
-                let str = KMLocalizedString("Word (.docx)", nil)
+                let originStr = " \(KMLocalizedString("Standard")) "
+                let str = KMLocalizedString("Word (.docx)")
                 
                 let attributedStr = NSMutableAttributedString(string: "\(str)  \(originStr)")
                 
@@ -556,9 +556,9 @@ let kConvertFileSavePath = (kTempSavePath?.stringByAppendingPathComponent("conve
         if let msg = alertMsg {
             alert.informativeText = msg
         } else {
-            let st = self.pdfDocument?.documentURL.lastPathComponent.count ?? 0 > 0 ? self.pdfDocument?.documentURL.lastPathComponent : KMLocalizedString("Untitled.pdf", nil)
+            let st = self.pdfDocument?.documentURL.lastPathComponent.count ?? 0 > 0 ? self.pdfDocument?.documentURL.lastPathComponent : KMLocalizedString("Untitled.pdf")
             
-            alert.messageText = String(format: "%@ %@", st!, KMLocalizedString("Invalid page range or the page number is out of range. Please try again.", nil))
+            alert.messageText = String(format: "%@ %@", st!, KMLocalizedString("Invalid page range or the page number is out of range. Please try again."))
         }
         alert.runModal()
     }
@@ -609,11 +609,11 @@ let kConvertFileSavePath = (kTempSavePath?.stringByAppendingPathComponent("conve
         updataView()
     }
     func transform(with string: String) {
-        if string == KMLocalizedString("Create Sheet for each Table", nil) {
+        if string == KMLocalizedString("Create Sheet for each Table") {
             self.excelWorksheetOption = .forEachTable
-        } else if string == KMLocalizedString("Create Sheet for each Page", nil) {
+        } else if string == KMLocalizedString("Create Sheet for each Page") {
             self.excelWorksheetOption = .forEachPage
-        } else if string == KMLocalizedString("Create single Sheet for File", nil) {
+        } else if string == KMLocalizedString("Create single Sheet for File") {
             self.excelWorksheetOption = .forTheDocument
         }
     }

+ 2 - 2
PDF Office/PDF Master/Class/PDFTools/Crop/KMPDFCropWindowController.swift

@@ -197,7 +197,7 @@ class KMPDFCropWindowController: NSWindowController, CPDFViewDelegate, NSWindowD
                 self.cropLabel.stringValue =  String(format: "%@%@ * %@%@", mat, self.formatFloat(Float(self.cropRect.size.width/unitScanl)), self.formatFloat(Float(self.cropRect.size.height/unitScanl)), self.unitPopUpButton.title)
             }
         } else {
-            self.cropLabel.stringValue = String(format: "%@%@ * %@%@", KMLocalizedString("Expanded page size:", nil), self.formatFloat(Float(self.drawPageRect.size.width/unitScanl)), self.formatFloat(Float(self.drawPageRect.size.height/unitScanl)), self.unitPopUpButton.title)
+            self.cropLabel.stringValue = String(format: "%@%@ * %@%@", KMLocalizedString("Expanded page size:"), self.formatFloat(Float(self.drawPageRect.size.width/unitScanl)), self.formatFloat(Float(self.drawPageRect.size.height/unitScanl)), self.unitPopUpButton.title)
         }
     }
     
@@ -280,7 +280,7 @@ class KMPDFCropWindowController: NSWindowController, CPDFViewDelegate, NSWindowD
         if pages.count < 1 {
             let alert = NSAlert()
             alert.alertStyle = .critical
-            alert.messageText = String(format: "%@%@", self.originalDocument?.documentURL.lastPathComponent ?? "", KMLocalizedString("Invalid page range or the page number is out of range. Please try again.", nil))
+            alert.messageText = String(format: "%@%@", self.originalDocument?.documentURL.lastPathComponent ?? "", KMLocalizedString("Invalid page range or the page number is out of range. Please try again."))
             alert.runModal()
         } else {
             self.selectPages = pages

+ 21 - 21
PDF Office/PDF Master/Class/PDFTools/Insert/KMPDFInsertWindowController.swift

@@ -89,12 +89,12 @@ class KMPDFInsertWindowController: KMBaseWindowController {
         self.fromBackView.layer?.backgroundColor = viewColor.cgColor
         self.fromBackView.layer?.borderColor = viewborderColor.cgColor
         self.outputFolderText.textColor = textColor
-        self.selectedPathButton.title = KMLocalizedString("Choose...", nil)
-        self.insertLabel.stringValue = KMLocalizedString("Insert",nil)
+        self.selectedPathButton.title = KMLocalizedString("Choose...")
+        self.insertLabel.stringValue = KMLocalizedString("Insert")
         
-        self.whereInsertLabel.stringValue = KMLocalizedString("Where to insert?",nil)
-        self.pageRangeLabel.stringValue = KMLocalizedString("Page Range:", nil)
-        self.pageLabel.stringValue = KMLocalizedString("Page", nil)
+        self.whereInsertLabel.stringValue = KMLocalizedString("Where to insert?")
+        self.pageRangeLabel.stringValue = KMLocalizedString("Page Range:")
+        self.pageLabel.stringValue = KMLocalizedString("Page")
         
         self.selectedPathButton.isEnabled = false
         self.progress.isHidden = true
@@ -106,30 +106,30 @@ class KMPDFInsertWindowController: KMBaseWindowController {
         self.pageRangeLabel.isHidden = true
         self.pageRangeBox.isHidden = true
         
-        self.blankButton.title = KMLocalizedString("Blank Page", nil)
-        self.locationFirstButton.title = KMLocalizedString("First", nil)
-        self.locationLastButton.title = KMLocalizedString("Last", nil)
-        self.outputFolderButton.title = KMLocalizedString("From PDF", nil)
+        self.blankButton.title = KMLocalizedString("Blank Page")
+        self.locationFirstButton.title = KMLocalizedString("First")
+        self.locationLastButton.title = KMLocalizedString("Last")
+        self.outputFolderButton.title = KMLocalizedString("From PDF")
         
-        self.cancelButton.title = KMLocalizedString("Cancel", nil)
-        self.insertButton.title = KMLocalizedString("Insert", nil)
+        self.cancelButton.title = KMLocalizedString("Cancel")
+        self.insertButton.title = KMLocalizedString("Insert")
         
         self.pagesText.formatter = TextFieldFormatter()
         self.pagesText.delegate = self
         
-        self.pageRangeBox.addItem(withObjectValue: KMLocalizedString("All Pages", nil))
-        self.pageRangeBox.addItem(withObjectValue: KMLocalizedString("Odd Pages Only", nil))
-        self.pageRangeBox.addItem(withObjectValue: KMLocalizedString("Even Pages Only", nil))
-        self.pageRangeBox.addItem(withObjectValue: KMLocalizedString("e.g. 1,3-5,10", nil))
-        (self.pageRangeBox.cell as? NSComboBoxCell)?.placeholderString = KMLocalizedString("e.g. 1,3-5,10", nil)
+        self.pageRangeBox.addItem(withObjectValue: KMLocalizedString("All Pages"))
+        self.pageRangeBox.addItem(withObjectValue: KMLocalizedString("Odd Pages Only"))
+        self.pageRangeBox.addItem(withObjectValue: KMLocalizedString("Even Pages Only"))
+        self.pageRangeBox.addItem(withObjectValue: KMLocalizedString("e.g. 1,3-5,10"))
+        (self.pageRangeBox.cell as? NSComboBoxCell)?.placeholderString = KMLocalizedString("e.g. 1,3-5,10")
         self.pageRangeBox.selectItem(at: 0)
         
         let menu = NSMenu()
-        _ = menu.addItem(title: KMLocalizedString("After", nil), action: #selector(after_Action), target: self)
-        _ = menu.addItem(title: KMLocalizedString("Before", nil), action: #selector(before_Action), target: self)
+        _ = menu.addItem(title: KMLocalizedString("After"), action: #selector(after_Action), target: self)
+        _ = menu.addItem(title: KMLocalizedString("Before"), action: #selector(before_Action), target: self)
         self.locationRangePopUpButton.menu = menu
         
-        self.outputFolderText.placeholderString = KMLocalizedString("Select a File", nil)
+        self.outputFolderText.placeholderString = KMLocalizedString("Select a File")
         
         self.pageRangeBox.isEnabled = false
         self.locationRangePopUpButton.isEnabled = false
@@ -189,7 +189,7 @@ class KMPDFInsertWindowController: KMBaseWindowController {
             pages.append(page)
         } else {
             if (self.outputFolderText.stringValue.isEmpty) {
-                KMAlertTool.runModelForMainThread(message: KMLocalizedString("Select a File", nil))
+                KMAlertTool.runModelForMainThread(message: KMLocalizedString("Select a File"))
                 
                 self.progress.isHidden = true
                 self.cancelButton.isEnabled = true
@@ -246,7 +246,7 @@ class KMPDFInsertWindowController: KMBaseWindowController {
                 fileAttribute?.pagesString = self.pageRangeBox.stringValue
             }
             if let data = fileAttribute?.fetchSelectPages().isEmpty, data {
-                KMAlertTool.runModelForMainThread(message: String(format: "%@ %@", fileAttribute?.filePath.lastPathComponent ?? "", KMLocalizedString("Invalid page range or the page number is out of range. Please try again.", nil)))
+                KMAlertTool.runModelForMainThread(message: String(format: "%@ %@", fileAttribute?.filePath.lastPathComponent ?? "", KMLocalizedString("Invalid page range or the page number is out of range. Please try again.")))
                 
                 self.progress.isHidden = true
                 self.cancelButton.isEnabled = true

+ 7 - 7
PDF Office/PDF Master/Class/PDFTools/Merge/View/KMPDFMergePageRangeTabelViewCell.swift

@@ -35,12 +35,12 @@ import Cocoa
         self.comboBox = comboBox
         
         self.comboBox?.removeAllItems()
-        self.comboBox?.addItems(withObjectValues: [KMLocalizedString("All Pages", nil),KMLocalizedString("Odd Pages", nil),KMLocalizedString("Even Pages", nil),KMLocalizedString("Customized", nil)])
+        self.comboBox?.addItems(withObjectValues: [KMLocalizedString("All Pages"),KMLocalizedString("Odd Pages"),KMLocalizedString("Even Pages"),KMLocalizedString("Customized")])
         
-        self.comboBox?.stringValue = KMLocalizedString("All Pages", nil)
+        self.comboBox?.stringValue = KMLocalizedString("All Pages")
         self.comboBox?.editable = false
         self.comboBox?.delete = self
-        self.comboBox?.placeholderString = KMLocalizedString("eg .1,3-5,10", nil)
+        self.comboBox?.placeholderString = KMLocalizedString("eg .1,3-5,10")
         
 
     }
@@ -58,15 +58,15 @@ import Cocoa
     
     func updatePageRange(_ pageRange: KMPageRange, pageStrings: String, isFirstResponser: Bool = true) {
         if (pageRange == .all) {
-            self.comboBox?.stringValue = KMLocalizedString("All Pages", nil)
+            self.comboBox?.stringValue = KMLocalizedString("All Pages")
             self.comboBox?.editable = false
             self.comboBox?.alert = false
         } else if (pageRange == .odd) {
-            self.comboBox?.stringValue = KMLocalizedString("Odd Pages", nil)
+            self.comboBox?.stringValue = KMLocalizedString("Odd Pages")
             self.comboBox?.editable = false
             self.comboBox?.alert = false
         } else if (pageRange == .even) {
-            self.comboBox?.stringValue = KMLocalizedString("Even Pages", nil)
+            self.comboBox?.stringValue = KMLocalizedString("Even Pages")
             self.comboBox?.editable = false
             self.comboBox?.alert = false
         } else {
@@ -147,7 +147,7 @@ extension KMPDFMergePageRangeTabelViewCell: KMSelectPopButtonDelegate {
         if (obj.isEqual(to: self.comboBox)) {
             var disableItems: [String] = []
             if (self.pageCount <= 1) {
-                disableItems.append(KMLocalizedString("Even Pages", nil))
+                disableItems.append(KMLocalizedString("Even Pages"))
             }
             self.comboBox?.disItems = disableItems
         }

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/OCRNew/Controller/KMOCRPDFWindowController.swift

@@ -178,7 +178,7 @@ class KMOCRPDFWindowController: NSWindowController, NSWindowDelegate, KMGOCRMana
         self.txtTextView.textColor = NSColor.textColor
         self.txtTextView.enclosingScrollView?.autohidesScrollers = true
         self.ocrResultLabel.stringValue = NSLocalizedString("OCR Results", comment: "")
-        self.ocrCopyButton?.toolTip = KMLocalizedString("Copy and edit text from documents with OCR.", nil)
+        self.ocrCopyButton?.toolTip = KMLocalizedString("Copy and edit text from documents with OCR.")
         self.deleteButton?.toolTip = NSLocalizedString("Delete", comment: "")
         self.deleteButton?.title = NSLocalizedString("Delete", comment: "")
         self.ocrCopyButton?.title = NSLocalizedString("Copy", comment: "")

+ 4 - 4
PDF Office/PDF Master/Class/PDFTools/PageEdit/Controller/KMPDFEditViewController.swift

@@ -762,7 +762,7 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
 
             let pages = fileAttribute?.fetchSelectPages() ?? []
             if pages.isEmpty {
-                KMAlertTool.runModelForMainThread(message: KMLocalizedString("Invalid page range or the page number is out of range. Please try again.", nil))
+                KMAlertTool.runModelForMainThread(message: KMLocalizedString("Invalid page range or the page number is out of range. Please try again."))
             } else {
                 let panel = NSOpenPanel()
                 panel.canChooseFiles = false
@@ -776,7 +776,7 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
                         var index = 0
                         var folderName = self.pdfDocument?.documentURL.deletingPathExtension().lastPathComponent
                         if folderName == nil {
-                            folderName = KMLocalizedString("Untitled", nil)
+                            folderName = KMLocalizedString("Untitled")
                         }
                         var folderPath = "\(tFolderPath)/\(folderName ?? "")"
                         //创建目录
@@ -789,7 +789,7 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
                         let result = try?FileManager.default.createDirectory(atPath: tFolderPath, withIntermediateDirectories: true)
                         if (result == nil) {
 //                        if (![[NSFileManager defaultManager] createDirectoryAtPath:tFolderPath withIntermediateDirectories:YES attributes:nil error:nil]) {
-                            KMAlertTool.runModelForMainThread(message: KMLocalizedString("Failed to split!", nil))
+                            KMAlertTool.runModelForMainThread(message: KMLocalizedString("Failed to split!"))
                             return
                         }
                         let vc = KMProgressWindowController()
@@ -804,7 +804,7 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
                                     let workSpace = NSWorkspace.shared
                                     workSpace.activateFileViewerSelecting([URL(fileURLWithPath: filePath)])
                                 } else {
-                                    KMAlertTool.runModelForMainThread(message: KMLocalizedString("Failed to split!", nil))
+                                    KMAlertTool.runModelForMainThread(message: KMLocalizedString("Failed to split!"))
                                 }
                                 NSApp.endSheet(vc.window!)
                                 vc.close()

+ 7 - 7
PDF Office/PDF Master/Class/PDFTools/PageEdit/Window/KMPDFEditExtractWindow.swift

@@ -66,12 +66,12 @@ class KMPDFEditExtractWindow: NSWindowController {
         super.windowDidLoad()
     
         self._extractPerPageFlag = false
-        self.extractAsDocumentsPerPageButton.title = KMLocalizedString("Each page in a separate file", nil)
+        self.extractAsDocumentsPerPageButton.title = KMLocalizedString("Each page in a separate file")
         
-        self.window?.title =  KMLocalizedString("Extract",nil)
-        self.cancelButton.title = KMLocalizedString("Cancel",nil)
-        self.extractButton.title = KMLocalizedString("Extract",nil)
-        self.deleteExtractButton.title = KMLocalizedString("Delete pages after extraction",nil)
+        self.window?.title =  KMLocalizedString("Extract")
+        self.cancelButton.title = KMLocalizedString("Cancel")
+        self.extractButton.title = KMLocalizedString("Extract")
+        self.deleteExtractButton.title = KMLocalizedString("Delete pages after extraction")
         self.deleteExtractButton.wantsLayer = true
         self.extractAsDocumentsPerPageButton.wantsLayer = true
     }
@@ -88,7 +88,7 @@ class KMPDFEditExtractWindow: NSWindowController {
     @IBAction func buttonItemClicked_Extract(_ sender: AnyObject) {
         if let data = self._attribute?.fetchSelectPages().isEmpty, data {
             Task {
-                _ = await KMAlertTool.runModel(message: String(format: "%@ %@", self._attribute?.filePath.lastPathComponent ?? "", KMLocalizedString("Invalid page range or the page number is out of range. Please try again.", nil)))
+                _ = await KMAlertTool.runModel(message: String(format: "%@ %@", self._attribute?.filePath.lastPathComponent ?? "", KMLocalizedString("Invalid page range or the page number is out of range. Please try again.")))
             }
             return
         }
@@ -97,7 +97,7 @@ class KMPDFEditExtractWindow: NSWindowController {
         let pages = self._attribute?.fetchSelectPages() ?? []
         if (self.deleteExtractButton.state == .on && pageCnt == pages.count) {
             Task {
-                _ = await KMAlertTool.runModel(message: String(format: "%@ %@", self._attribute?.filePath.lastPathComponent ?? "", KMLocalizedString("Invalid page range or the page number is out of range. Please try again.", nil)))
+                _ = await KMAlertTool.runModel(message: String(format: "%@ %@", self._attribute?.filePath.lastPathComponent ?? "", KMLocalizedString("Invalid page range or the page number is out of range. Please try again.")))
             }
             return
         }

+ 17 - 17
PDF Office/PDF Master/Class/PDFTools/PageEdit/Window/KMPDFEditInsertBlankPageWindow.swift

@@ -78,19 +78,19 @@ class KMPDFEditInsertBlankPageWindow: NSWindowController {
         self.standardComboBox.isEditable = false
         self.companyComboBox.isEditable = false
         
-        self.firstButton.title = KMLocalizedString("First", nil)
-        self.lastButton.title = KMLocalizedString("Last", nil)
-        self.pageButton.title = KMLocalizedString("Page", nil)
-        self.portraitButton.title = KMLocalizedString("Portrait Pages", nil)
-        self.landscapeButton.title = KMLocalizedString("Landscape Pages", nil)
-        self.standardButton.title = KMLocalizedString("Standard", nil)
-        self.customButton.title = KMLocalizedString("Custom", nil)
-        self.orientationLabel.stringValue = KMLocalizedString("Orientation", nil)
-        self.cancelButton.title = KMLocalizedString("Cancel", nil)
+        self.firstButton.title = KMLocalizedString("First")
+        self.lastButton.title = KMLocalizedString("Last")
+        self.pageButton.title = KMLocalizedString("Page")
+        self.portraitButton.title = KMLocalizedString("Portrait Pages")
+        self.landscapeButton.title = KMLocalizedString("Landscape Pages")
+        self.standardButton.title = KMLocalizedString("Standard")
+        self.customButton.title = KMLocalizedString("Custom")
+        self.orientationLabel.stringValue = KMLocalizedString("Orientation")
+        self.cancelButton.title = KMLocalizedString("Cancel")
         
-        self.insertButton.title = KMLocalizedString("Insert", nil)
-        self.positionLabel.stringValue = KMLocalizedString("Position", nil)
-        self.pageSizeLabel.stringValue = KMLocalizedString("Page Size", nil)
+        self.insertButton.title = KMLocalizedString("Insert")
+        self.positionLabel.stringValue = KMLocalizedString("Position")
+        self.pageSizeLabel.stringValue = KMLocalizedString("Page Size")
         self.currentSizeButton.state = .on
         self.portraitButton.state = .on
         self.standardComboBox.isEnabled = false
@@ -102,8 +102,8 @@ class KMPDFEditInsertBlankPageWindow: NSWindowController {
         self.pageTextField.delegate = self
             
         let menu = NSMenu()
-        _ = menu.addItem(title: KMLocalizedString("After", nil), action: #selector(after_Action), target: self)
-        _ = menu.addItem(title: KMLocalizedString("Before", nil), action: #selector(before_Action), target: self)
+        _ = menu.addItem(title: KMLocalizedString("After"), action: #selector(after_Action), target: self)
+        _ = menu.addItem(title: KMLocalizedString("Before"), action: #selector(before_Action), target: self)
         self.locationRangePopUpButton.menu = menu
         self.locationRangePopUpButton.isEnabled = false
         
@@ -134,14 +134,14 @@ class KMPDFEditInsertBlankPageWindow: NSWindowController {
         let tSize = KMPageSizeTool.getPaperSize(paperName:self.standardComboBox.stringValue)
         self.pageWidthTextField.stringValue = KMPageSizeTool.conversion(withUnit: self.companyComboBox.stringValue, value: tSize.width)
         self.pageHeightTextField.stringValue = KMPageSizeTool.conversion(withUnit: self.companyComboBox.stringValue, value: tSize.height)
-        self.standardComboBox.stringValue = String(format: "%@(%@ x %@mm)", KMLocalizedString("A4", nil),"210","297")
+        self.standardComboBox.stringValue = String(format: "%@(%@ x %@mm)", KMLocalizedString("A4"),"210","297")
         self._lastString = "mm"
         
         let page = self.pdfDocument?.page(at: UInt(self.currentPage-1)) as? CPDFPage
         let rect = page?.bounds(for: .mediaBox) ?? .zero
         let width = KMPageSizeTool.conversion(withUnit: "mm", value: (NSWidth(rect)/595 * 210))
         let height = KMPageSizeTool.conversion(withUnit: "mm", value: (NSHeight(rect)/842 * 297))
-        self.currentSizeButton.title = String(format: "%@(%@ x %@mm)", KMLocalizedString("Current Size", nil),width,height)
+        self.currentSizeButton.title = String(format: "%@(%@ x %@mm)", KMLocalizedString("Current Size"),width,height)
     }
     
     @IBAction func byPageStepperAction(_ sender: AnyObject?) {
@@ -259,7 +259,7 @@ class KMPDFEditInsertBlankPageWindow: NSWindowController {
             if(!(width > 0 && height > 0)) {
                 let alert = NSAlert()
                 alert.alertStyle = .critical
-                alert.messageText = KMLocalizedString("Please enter the correct size.", nil)
+                alert.messageText = KMLocalizedString("Please enter the correct size.")
                 alert.runModal()
                 return
             }

+ 17 - 17
PDF Office/PDF Master/Class/PDFTools/PageEdit/Window/KMPDFEditInsertPageWindow.swift

@@ -97,9 +97,9 @@ class KMPDFEditInsertPageWindow: NSWindowController {
         }
         
         self.outputFolderText.textColor = textColor
-        self.selectedPathButton.title = KMLocalizedString("Choose...", nil)
-        self.whereInsertLabel.stringValue = KMLocalizedString("Where to insert?",nil)
-        self.pageLabel.stringValue = KMLocalizedString("Page", nil)
+        self.selectedPathButton.title = KMLocalizedString("Choose...")
+        self.whereInsertLabel.stringValue = KMLocalizedString("Where to insert?")
+        self.pageLabel.stringValue = KMLocalizedString("Page")
         
         self.progress.isHidden = true
         
@@ -107,19 +107,19 @@ class KMPDFEditInsertPageWindow: NSWindowController {
         self.pagesText.isEditable = false
         self.byPageStepper.isEnabled = false
         
-        self.locationFirstButton.title = KMLocalizedString("First", nil)
-        self.locationLastButton.title = KMLocalizedString("Last", nil)
-        self.cancelButton.title = KMLocalizedString("Cancel", nil)
-        self.insertButton.title = KMLocalizedString("Insert", nil)
+        self.locationFirstButton.title = KMLocalizedString("First")
+        self.locationLastButton.title = KMLocalizedString("Last")
+        self.cancelButton.title = KMLocalizedString("Cancel")
+        self.insertButton.title = KMLocalizedString("Insert")
         
         self.pagesText.formatter = TextFieldFormatter()
         self.pagesText.delegate = self
             
-        self.allPageButton.title = KMLocalizedString("All Pages", nil)
-        self.singlePageButton.title = KMLocalizedString("Odd Pages Only", nil)
-        self.doublePageButton.title = KMLocalizedString("Even Pages Only", nil)
-        self.rangeTextField.placeholderString = KMLocalizedString("e.g. 1,3-5,10", nil)
-        self.insertLabel.stringValue = KMLocalizedString("Page Range", nil)
+        self.allPageButton.title = KMLocalizedString("All Pages")
+        self.singlePageButton.title = KMLocalizedString("Odd Pages Only")
+        self.doublePageButton.title = KMLocalizedString("Even Pages Only")
+        self.rangeTextField.placeholderString = KMLocalizedString("e.g. 1,3-5,10")
+        self.insertLabel.stringValue = KMLocalizedString("Page Range")
         
         if(self.type == .pageEdit) {
             self.customTextField.stringValue = String(format: "/ %ld", self.insertDocument?.pageCount ?? 0)
@@ -130,11 +130,11 @@ class KMPDFEditInsertPageWindow: NSWindowController {
         self.allPageButton.state = .on
         
         let menu = NSMenu()
-        _ = menu.addItem(title: KMLocalizedString("After", nil), action: #selector(after_Action), target: self)
-        _ = menu.addItem(title: KMLocalizedString("Before", nil), action: #selector(before_Action), target: self)
+        _ = menu.addItem(title: KMLocalizedString("After"), action: #selector(after_Action), target: self)
+        _ = menu.addItem(title: KMLocalizedString("Before"), action: #selector(before_Action), target: self)
         self.locationRangePopUpButton.menu = menu
         
-        self.outputFolderText.placeholderString = KMLocalizedString("Select a File", nil)
+        self.outputFolderText.placeholderString = KMLocalizedString("Select a File")
         
         self.locationRangePopUpButton.isEnabled = false
         
@@ -216,7 +216,7 @@ class KMPDFEditInsertPageWindow: NSWindowController {
         if self.outputFolderText.stringValue == "" || self.outputFolderText.stringValue.isEmpty {
             let alert = NSAlert()
             alert.alertStyle = .critical
-            alert.messageText = KMLocalizedString("Select a File", nil)
+            alert.messageText = KMLocalizedString("Select a File")
             alert.runModal()
 
             self.progress.isHidden = true
@@ -273,7 +273,7 @@ class KMPDFEditInsertPageWindow: NSWindowController {
         if (fileAttribute.fetchSelectPages().isEmpty) {
             let alert = NSAlert()
             alert.alertStyle = .critical
-            alert.messageText = String(format: "%@ %@", fileAttribute.filePath.lastPathComponent, KMLocalizedString("Invalid page range or the page number is out of range. Please try again.", nil))
+            alert.messageText = String(format: "%@ %@", fileAttribute.filePath.lastPathComponent, KMLocalizedString("Invalid page range or the page number is out of range. Please try again."))
             alert.runModal()
 
             self.progress.isHidden = true

+ 7 - 7
PDF Office/PDF Master/Class/PDFTools/PageEdit/Window/KMPDFEditPageRangeWindowController.swift

@@ -31,16 +31,16 @@ class KMPDFEditPageRangeWindowController: NSWindowController {
     override func windowDidLoad() {
         super.windowDidLoad()
     
-        self.pageRangeLabel.stringValue = KMLocalizedString("Page Range", nil)
-        self.pageRangeTextField.placeholderString = KMLocalizedString("e.g. 1,3-5,10", nil)
+        self.pageRangeLabel.stringValue = KMLocalizedString("Page Range")
+        self.pageRangeTextField.placeholderString = KMLocalizedString("e.g. 1,3-5,10")
     //    self.totalPageCountLabel.integerValue = self.pdfDocument.pageCount;
         
-        self.totalPageCountLabel.stringValue = String(format: KMLocalizedString(", Total %ld Pages", nil), self.pdfDocument?.pageCount ?? 0)
+        self.totalPageCountLabel.stringValue = String(format: KMLocalizedString(", Total %ld Pages"), self.pdfDocument?.pageCount ?? 0)
         self.detailLabel.stringValue = ""
-        self.cancelButton.title = KMLocalizedString("Cancel", nil)
-        self.okButton.title = KMLocalizedString("OK", nil)
+        self.cancelButton.title = KMLocalizedString("Cancel")
+        self.okButton.title = KMLocalizedString("OK")
         
-        self.window?.title = KMLocalizedString("Page Range", nil)
+        self.window?.title = KMLocalizedString("Page Range")
         
         self.fileAttri_ = KMFileAttribute()
         self.fileAttri_?.filePath = self.pdfDocument?.documentURL.path ?? ""
@@ -63,7 +63,7 @@ class KMPDFEditPageRangeWindowController: NSWindowController {
         if self.fileAttri_ == nil || self.fileAttri_!.fetchSelectPages().isEmpty {
             let alert = NSAlert()
             alert.alertStyle = .critical
-            alert.messageText = String(format: "%@ %@", self.pdfDocument?.documentURL.lastPathComponent.lastPathComponent ?? "", KMLocalizedString("Invalid page range or the page number is out of range. Please try again.", nil))
+            alert.messageText = String(format: "%@ %@", self.pdfDocument?.documentURL.lastPathComponent.lastPathComponent ?? "", KMLocalizedString("Invalid page range or the page number is out of range. Please try again."))
 //            alert.runModal()
             alert.beginSheetModal(for: self.window!) { res in
                 self.window?.makeFirstResponder(self.pageRangeTextField)

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/PageEdit/Window/KMPDFEditWindowController.swift

@@ -29,7 +29,7 @@ class KMPDFEditWindowController: KMBaseWindowController {
         
         self.window?.kmCurrentWindowC = self
     
-        self.window?.title = KMLocalizedString("Page Edit", nil)
+        self.window?.title = KMLocalizedString("Page Edit")
         if self.responds(to: NSSelectorFromString("setContentViewController:")) {
             let contentView = self.window?.contentView
             self.contentViewController = self._viewController

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/PageEdit/Window/KMProgressWindowController.swift

@@ -21,7 +21,7 @@ class KMProgressWindowController: NSWindowController {
     override func windowDidLoad() {
         super.windowDidLoad()
     
-        self.titleLabel.stringValue = KMLocalizedString("Processing...", nil)
+        self.titleLabel.stringValue = KMLocalizedString("Processing...")
         self.extractProgress.doubleValue = 1
     }
 

+ 33 - 33
PDF Office/PDF Master/Class/PDFTools/PageEdit/Window/SplitWindowController.swift

@@ -189,7 +189,7 @@ class SplitWindowController: KMBaseWindowController {
             fileAttribute?.bAllPage = false
             
             let pageCnt = self._PDFDocument?.pageCount ?? 0
-            if self.pageRangeComboBox.stringValue == KMLocalizedString("Odd Pages Only", nil) {
+            if self.pageRangeComboBox.stringValue == KMLocalizedString("Odd Pages Only") {
                 var tPagesString = ""
                 for i in 0 ..< pageCnt {
                     if (i%2 == 0) {
@@ -202,7 +202,7 @@ class SplitWindowController: KMBaseWindowController {
                 }
                 fileAttribute?.pagesString = tPagesString
                 fileAttribute?.pagesType = .odd
-            } else if self.pageRangeComboBox.stringValue == KMLocalizedString("Even Pages Only", nil) {
+            } else if self.pageRangeComboBox.stringValue == KMLocalizedString("Even Pages Only") {
                 var tPagesString = ""
                 for i in 0 ..< pageCnt {
                     if (i%2 == 1) {
@@ -220,7 +220,7 @@ class SplitWindowController: KMBaseWindowController {
                 fileAttribute?.pagesType = .custom
             }
             if let data = fileAttribute?.fetchSelectPages().isEmpty, data {
-                KMAlertTool.runModelForMainThread(message: KMLocalizedString("Invalid page range or the page number is out of range. Please try again.", nil))
+                KMAlertTool.runModelForMainThread(message: KMLocalizedString("Invalid page range or the page number is out of range. Please try again."))
                 return
             }
         }
@@ -260,7 +260,7 @@ class SplitWindowController: KMBaseWindowController {
                             self.splitButton.isEnabled = true
                             
                             if (successArray.isEmpty == false) {
-                                let response = KMAlertTool.runModelForMainThread_r(message: KMLocalizedString("Splitting completed. Tap 'OK' to open the output folder.", nil), buttons: [KMLocalizedString("OK",nil)])
+                                let response = KMAlertTool.runModelForMainThread_r(message: KMLocalizedString("Splitting completed. Tap 'OK' to open the output folder."), buttons: [KMLocalizedString("OK")])
                                 if (response == .alertFirstButtonReturn ) {
                                     self.km_quick_endSheet()
                                     DispatchQueue.main.asyncAfter(deadline: .now()+0.5) {
@@ -269,7 +269,7 @@ class SplitWindowController: KMBaseWindowController {
                                     }
                                 }
                             } else {
-                                let response = KMAlertTool.runModelForMainThread_r(message: KMLocalizedString("Failed to split!", nil))
+                                let response = KMAlertTool.runModelForMainThread_r(message: KMLocalizedString("Failed to split!"))
                                 if (response == .alertFirstButtonReturn) {
                                     self.km_quick_endSheet()
                                 }
@@ -287,7 +287,7 @@ class SplitWindowController: KMBaseWindowController {
                             self.splitButton.isEnabled = true
                             
                             if (successArray.isEmpty == false) {
-                                let response = KMAlertTool.runModelForMainThread_r(message: KMLocalizedString("Splitting completed. Tap 'OK' to open the output folder.", nil), buttons: [KMLocalizedString("OK",nil)])
+                                let response = KMAlertTool.runModelForMainThread_r(message: KMLocalizedString("Splitting completed. Tap 'OK' to open the output folder."), buttons: [KMLocalizedString("OK")])
                                 if (response == .alertFirstButtonReturn) {
                                     self.km_quick_endSheet()
                                     DispatchQueue.main.asyncAfter(deadline: .now()+0.5) {
@@ -296,7 +296,7 @@ class SplitWindowController: KMBaseWindowController {
                                     }
                                 }
                             }else{
-                                let response = KMAlertTool.runModelForMainThread_r(message: KMLocalizedString("Failed to split!", nil))
+                                let response = KMAlertTool.runModelForMainThread_r(message: KMLocalizedString("Failed to split!"))
                                 if (response == .alertFirstButtonReturn) {
                                     self.km_quick_endSheet()
                                 }
@@ -344,7 +344,7 @@ class SplitWindowController: KMBaseWindowController {
 //                                if ([_splitDelegate respondsToSelector:@selector(didFinshedSplitWithURL:)]) {
 //                                    [_splitDelegate didFinshedSplitWithURL:_fileURL];
 //                                }
-                                let response = KMAlertTool.runModelForMainThread_r(message: KMLocalizedString("Splitting completed. Tap 'OK' to open the output folder.", nil), buttons: [KMLocalizedString("OK",nil)])
+                                let response = KMAlertTool.runModelForMainThread_r(message: KMLocalizedString("Splitting completed. Tap 'OK' to open the output folder."), buttons: [KMLocalizedString("OK")])
                                 if (response == .alertFirstButtonReturn) {
                                     self.km_quick_endSheet()
                                     DispatchQueue.main.asyncAfter(deadline: .now()+0.5) {
@@ -353,7 +353,7 @@ class SplitWindowController: KMBaseWindowController {
                                     }
                                 }
                             }else{
-                                let response = KMAlertTool.runModelForMainThread_r(message: KMLocalizedString("Failed to split!", nil))
+                                let response = KMAlertTool.runModelForMainThread_r(message: KMLocalizedString("Failed to split!"))
                                 if (response == .alertFirstButtonReturn) {
                                     self.km_quick_endSheet()
                                 }
@@ -389,7 +389,7 @@ class SplitWindowController: KMBaseWindowController {
             sender.isEditable = true
             sender.isSelectable = true
             self.pageRangeComboBox.stringValue = self.pageRangeComboBox.stringValue
-            (sender.cell as? NSComboBoxCell)?.placeholderString = KMLocalizedString("e.g. 1,3-5,10", nil)
+            (sender.cell as? NSComboBoxCell)?.placeholderString = KMLocalizedString("e.g. 1,3-5,10")
             self.window?.makeFirstResponder(sender)
         }
     }
@@ -399,27 +399,27 @@ class SplitWindowController: KMBaseWindowController {
 
 extension SplitWindowController {
     private func _localizedLanguage() {
-        self.splitMethodLabel.stringValue = KMLocalizedString("Split Methods", nil)
-//        self.splitLabel.stringValue = KMLocalizedString("Split Methods", nil)
-        self.pagesLabel.stringValue = KMLocalizedString("page(s)", nil)
-        self.filesLabel.stringValue = KMLocalizedString("PDF file(s)", nil)
-//        self.labelingLabel.stringValue = KMLocalizedString("File Naming", nil)
-        self.fileNameLabel.stringValue = KMLocalizedString("File Naming", nil)
-        self.exampleLabel.stringValue = KMLocalizedString("example", nil)
+        self.splitMethodLabel.stringValue = KMLocalizedString("Split Methods")
+//        self.splitLabel.stringValue = KMLocalizedString("Split Methods")
+        self.pagesLabel.stringValue = KMLocalizedString("page(s)")
+        self.filesLabel.stringValue = KMLocalizedString("PDF file(s)")
+//        self.labelingLabel.stringValue = KMLocalizedString("File Naming")
+        self.fileNameLabel.stringValue = KMLocalizedString("File Naming")
+        self.exampleLabel.stringValue = KMLocalizedString("example")
         
-        self.byPageButton.title = KMLocalizedString("Split by every", nil)
-        self.byFileButton.title = KMLocalizedString("Split averagely to", nil)
-        self.pageFromButton.title = KMLocalizedString("Split by page range", nil)
-        self.cancelButton.title = KMLocalizedString("Cancel", nil)
-        self.splitButton.title = KMLocalizedString("Split", nil)
-        self.originalFileButton.title = KMLocalizedString("Keep the current file name in front of labels", nil)
-        self.renameButton.title = KMLocalizedString("Label", nil)
-        self.separatorButton.title = KMLocalizedString("Separator", nil)
+        self.byPageButton.title = KMLocalizedString("Split by every")
+        self.byFileButton.title = KMLocalizedString("Split averagely to")
+        self.pageFromButton.title = KMLocalizedString("Split by page range")
+        self.cancelButton.title = KMLocalizedString("Cancel")
+        self.splitButton.title = KMLocalizedString("Split")
+        self.originalFileButton.title = KMLocalizedString("Keep the current file name in front of labels")
+        self.renameButton.title = KMLocalizedString("Label")
+        self.separatorButton.title = KMLocalizedString("Separator")
         
-        self.byPageButton.toolTip = KMLocalizedString("Split by every", nil)
-        self.byFileButton.toolTip = KMLocalizedString("Split averagely to", nil)
-        self.pageFromButton.toolTip = KMLocalizedString("Split by page range", nil)
-        self.originalFileButton.toolTip = KMLocalizedString("Keep the current file name in front of labels", nil)
+        self.byPageButton.toolTip = KMLocalizedString("Split by every")
+        self.byFileButton.toolTip = KMLocalizedString("Split averagely to")
+        self.pageFromButton.toolTip = KMLocalizedString("Split by page range")
+        self.originalFileButton.toolTip = KMLocalizedString("Keep the current file name in front of labels")
     }
     
     private func _setInputRange() {
@@ -459,10 +459,10 @@ extension SplitWindowController {
         //初始化ComboBox
         self.pageRangeComboBox.removeAllItems()
         
-        let pageRangeArray = [KMLocalizedString("Odd Pages Only", nil),
-                                    KMLocalizedString("Even Pages Only", nil),
-                                    KMLocalizedString("e.g. 1,3-5,10", nil)]
-        (self.pageRangeComboBox.cell as? NSComboBoxCell)?.placeholderString = KMLocalizedString("e.g. 1,3-5,10", nil)
+        let pageRangeArray = [KMLocalizedString("Odd Pages Only"),
+                                    KMLocalizedString("Even Pages Only"),
+                                    KMLocalizedString("e.g. 1,3-5,10")]
+        (self.pageRangeComboBox.cell as? NSComboBoxCell)?.placeholderString = KMLocalizedString("e.g. 1,3-5,10")
         self.pageRangeComboBox.addItems(withObjectValues: pageRangeArray)
         self.pageRangeComboBox.selectItem(at: 0)
         self.pageRangeComboBox.isSelectable = false

+ 8 - 8
PDF Office/PDF Master/Class/PDFTools/Redact/Controller/KMPDFRedactViewController.swift

@@ -66,8 +66,8 @@ class KMPDFRedactViewController: NSViewController {
         self.redactTextBox.layer?.cornerRadius = 6
         self.redactTextLabel.textColor = KMAppearance.Layout.w0Color()
         self.propertiesLabel.textColor = KMAppearance.Layout.w0Color()
-        self.redactTextLabel.stringValue = KMLocalizedString("Redact Text", nil)
-        self.propertiesLabel.stringValue = KMLocalizedString("Properties", nil)
+        self.redactTextLabel.stringValue = KMLocalizedString("Redact Text")
+        self.propertiesLabel.stringValue = KMLocalizedString("Properties")
         
         self.propertiesButton.mouseMoveCallback = { [weak self] mouseEntered in
             self?.propertiesBox.layer?.cornerRadius = 6
@@ -79,14 +79,14 @@ class KMPDFRedactViewController: NSViewController {
         }
         
         // Do view setup here.
-        self.redactTipLabel.stringValue = KMLocalizedString("You are under redact mode", nil)
-        self.applyButton.title = KMLocalizedString("Apply", nil)
-        self.exitButton.toolTip = KMLocalizedString("Exit", nil)
+        self.redactTipLabel.stringValue = KMLocalizedString("You are under redact mode")
+        self.applyButton.title = KMLocalizedString("Apply")
+        self.exitButton.toolTip = KMLocalizedString("Exit")
 
         self.exitBox.fillColor = .clear
         self.exitBox.borderColor = KMAppearance.Layout.w70Color()
         self.exitBox.borderWidth = 1.0
-        self.exitButton.title = KMLocalizedString("Exit", nil)
+        self.exitButton.title = KMLocalizedString("Exit")
         self.exitButton.setTitleColor(KMAppearance.Layout.w0Color())
     
         self.applyButton.setTitleColor(KMAppearance.Interactive.a0Color())
@@ -167,7 +167,7 @@ class KMPDFRedactViewController: NSViewController {
             return
         }
 
-        let returnCode = KMAlertTool.runModelForMainThread_r(message: "", informative: KMLocalizedString("This will permanently remove the redacted information from this document. Once you save this document, you won’t be able to retrieve the redacted information.", nil), buttons: [KMLocalizedString("Apply", nil), KMLocalizedString("Cancel", nil)])
+        let returnCode = KMAlertTool.runModelForMainThread_r(message: "", informative: KMLocalizedString("This will permanently remove the redacted information from this document. Once you save this document, you won’t be able to retrieve the redacted information."), buttons: [KMLocalizedString("Apply"), KMLocalizedString("Cancel")])
         if returnCode == .alertFirstButtonReturn {
             self.saveAsPath()
         }
@@ -268,7 +268,7 @@ class KMPDFRedactViewController: NSViewController {
 extension KMPDFRedactViewController: CPDFViewDelegate {
     func pdfViewCurrentPageDidChanged(_ pdfView: CPDFView!) {
         let fileName = pdfView.document.documentURL.deletingLastPathComponent().lastPathComponent
-        let title = String(format: KMLocalizedString("%@ (page %ld / %ld)", "Window title format"), fileName, pdfView.currentPageIndex+1, pdfView.document.pageCount)
+        let title = String(format: KMLocalizedString("%@ (page %ld / %ld)"), fileName, pdfView.currentPageIndex+1, pdfView.document.pageCount)
         if(self.titleBack != nil) {
             self.titleBack!(title)
         }

+ 16 - 16
PDF Office/PDF Master/Class/PDFTools/Redact/View/KMRedactPDFView.swift

@@ -117,16 +117,16 @@ private let KMPDFViewRedactAnnotationAcross = "KMPDFViewRedactAnnotationAcross"
 //        CPDFAnnotation *annotation = [page annotationAtPoint:pagePoint];
         let annotation = page?.annotation(at: pagePoint)
         if let data = annotation, data is CPDFRedactAnnotation && self.operationType == .redact {
-            var item = menu?.insertItem(withTitle: KMLocalizedString("Delete", nil), action: #selector(deleteAnnotation), target: self, at: 0)
+            var item = menu?.insertItem(withTitle: KMLocalizedString("Delete"), action: #selector(deleteAnnotation), target: self, at: 0)
             item?.representedObject = annotation
             menu?.insertItem(.separator(), at: 1)
-            item = menu?.insertItem(withTitle: KMLocalizedString("Make Current Properties Default", nil), action: #selector(setPropertiesDefault), target: self, at: 2)
+            item = menu?.insertItem(withTitle: KMLocalizedString("Make Current Properties Default"), action: #selector(setPropertiesDefault), target: self, at: 2)
             item?.representedObject = annotation
             
-            _ = menu?.insertItem(withTitle: KMLocalizedString("Properties", nil), action: #selector(properties), target: self, at: 3)
+            _ = menu?.insertItem(withTitle: KMLocalizedString("Properties"), action: #selector(properties), target: self, at: 3)
             menu?.insertItem(.separator(), at: 4)
-            _ = menu?.insertItem(withTitle: KMLocalizedString("Repeat Mark Across Pages", nil), action: #selector(repeatMark), target: self, at: 5)
-            _ = menu?.insertItem(withTitle: KMLocalizedString("Apply Redactions", nil), action: #selector(applyRedact), target: self, at: 6)
+            _ = menu?.insertItem(withTitle: KMLocalizedString("Repeat Mark Across Pages"), action: #selector(repeatMark), target: self, at: 5)
+            _ = menu?.insertItem(withTitle: KMLocalizedString("Apply Redactions"), action: #selector(applyRedact), target: self, at: 6)
             self.currentAnnotation = annotation as? CPDFRedactAnnotation
         }
         return menu
@@ -687,7 +687,7 @@ extension KMRedactPDFView {
 
 extension KMRedactPDFView {
     func fontColorMenuItem() -> NSMenuItem {
-        let fontColorItem = NSMenuItem(title: KMLocalizedString("Text Color", nil), action: #selector(menuItemEditingClick_FontColor), keyEquivalent: "")
+        let fontColorItem = NSMenuItem(title: KMLocalizedString("Text Color"), action: #selector(menuItemEditingClick_FontColor), keyEquivalent: "")
         fontColorItem.target = self
         return fontColorItem
     }
@@ -725,7 +725,7 @@ extension KMRedactPDFView {
             }
         }
         
-        let fontSizeItem = NSMenuItem(title: KMLocalizedString("Font Size", nil), action: nil, keyEquivalent: "")
+        let fontSizeItem = NSMenuItem(title: KMLocalizedString("Font Size"), action: nil, keyEquivalent: "")
         fontSizeItem.submenu = submenu
         return fontSizeItem
     }
@@ -750,7 +750,7 @@ extension KMRedactPDFView {
             item.tag = i
             submenu.addItem(item)
         }
-        let exportmentItem = NSMenuItem(title: KMLocalizedString("Export", nil), action: nil, keyEquivalent: "")
+        let exportmentItem = NSMenuItem(title: KMLocalizedString("Export"), action: nil, keyEquivalent: "")
         exportmentItem.submenu = submenu
         return exportmentItem
     }
@@ -768,7 +768,7 @@ extension KMRedactPDFView {
     }
     
     func imageRotateMenuItem() -> NSMenuItem {
-        let item = NSMenuItem(title: KMLocalizedString("Rotate", nil), action: #selector(menuItemEditingClick_RotateImage), keyEquivalent: "")
+        let item = NSMenuItem(title: KMLocalizedString("Rotate"), action: #selector(menuItemEditingClick_RotateImage), keyEquivalent: "")
         item.target = self
         return item
     }
@@ -781,10 +781,10 @@ extension KMRedactPDFView {
      - (NSMenuItem *)alightMenuItem {
          NSMenu *submenu = [[[NSMenu alloc] init] autorelease];
          
-         NSArray *titles = @[NSLocalizedString(@"Left Alignment", nil),
-                             NSLocalizedString(@"Right Alignment", nil),
-                             NSLocalizedString(@"Center", nil),
-                             NSLocalizedString(@"Justified Alignment", nil),];
+         NSArray *titles = @[NSLocalizedString(@"Left Alignment"),
+                             NSLocalizedString(@"Right Alignment"),
+                             NSLocalizedString(@"Center"),
+                             NSLocalizedString(@"Justified Alignment"),];
          NSTextAlignment alignment = [self editingSelectionAlignment];
          for (NSUInteger i=0; i<titles.count; i++) {
              NSMenuItem *item = [[[NSMenuItem alloc] initWithTitle:[titles objectAtIndex:i]
@@ -797,7 +797,7 @@ extension KMRedactPDFView {
              [submenu addItem:item];
          }
          
-         NSMenuItem *alignmentItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Text Alignment", nil) action:nil keyEquivalent:@""];
+         NSMenuItem *alignmentItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Text Alignment") action:nil keyEquivalent:@""];
          alignmentItem.submenu = submenu;
          
          return alignmentItem;
@@ -808,7 +808,7 @@ extension KMRedactPDFView {
      }
      
      - (NSMenuItem *)imageCutMenuItem {
-         NSMenuItem *fontColorItem = [[[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Cut", nil)
+         NSMenuItem *fontColorItem = [[[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Cut")
                                                                  action:@selector(menuItemEditingClick_CutImage:)
                                                           keyEquivalent:@""] autorelease];
          fontColorItem.target = self;
@@ -816,7 +816,7 @@ extension KMRedactPDFView {
      }
 
      - (NSMenuItem *)imagePasteMenuItem {
-         NSMenuItem *fontColorItem = [[[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Paste", nil)
+         NSMenuItem *fontColorItem = [[[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Paste")
                                                                  action:@selector(menuItemEditingClick_PasteImage:)
                                                           keyEquivalent:@""] autorelease];
          fontColorItem.target = self;

+ 12 - 12
PDF Office/PDF Master/Class/PDFTools/Redact/Window/KMRedactPropertiesWindowController.swift

@@ -43,18 +43,18 @@ class KMRedactPropertiesWindowController: NSWindowController {
     override func windowDidLoad() {
         super.windowDidLoad()
     
-        self.outlineColorLabel.stringValue = KMLocalizedString("Redaction Mark Outline Color:", nil)
-        self.fillColorLabel.stringValue = KMLocalizedString("Redact Area Fill Color:", nil)
-        self.overlayTextButton.title = KMLocalizedString("Use Overlay Text", nil)
-        self.overlayTextLabel.stringValue = KMLocalizedString("Overlay Text:", nil)
-    //    self.repeatTextButton.title = NSLocalizedString(@"Repeat Text", nil);
-    //    self.autoSizeTextButton.title = NSLocalizedString(@"Auto-Size text to fit redaction region", nil);
-        self.alignementLabel.stringValue = KMLocalizedString("Text Alignment", nil)
-        self.fontSizeLabel.stringValue = KMLocalizedString("Font Size", nil)
-        self.fontColorLabel.stringValue = String(format: "%@:", KMLocalizedString("Font Color", nil))
-        self.makePropertiesButton.title = KMLocalizedString("Make Properties Default", nil)
-        self.cancelButton.title = KMLocalizedString("Cancel", nil)
-        self.okButton.title = KMLocalizedString("OK", nil)
+        self.outlineColorLabel.stringValue = KMLocalizedString("Redaction Mark Outline Color:")
+        self.fillColorLabel.stringValue = KMLocalizedString("Redact Area Fill Color:")
+        self.overlayTextButton.title = KMLocalizedString("Use Overlay Text")
+        self.overlayTextLabel.stringValue = KMLocalizedString("Overlay Text:")
+    //    self.repeatTextButton.title = NSLocalizedString(@"Repeat Text");
+    //    self.autoSizeTextButton.title = NSLocalizedString(@"Auto-Size text to fit redaction region");
+        self.alignementLabel.stringValue = KMLocalizedString("Text Alignment")
+        self.fontSizeLabel.stringValue = KMLocalizedString("Font Size")
+        self.fontColorLabel.stringValue = String(format: "%@:", KMLocalizedString("Font Color"))
+        self.makePropertiesButton.title = KMLocalizedString("Make Properties Default")
+        self.cancelButton.title = KMLocalizedString("Cancel")
+        self.okButton.title = KMLocalizedString("OK")
         
         if let anno = self.readactAnnotation {
             self.outlineColorWell.color = anno.borderColor()

+ 8 - 8
PDF Office/PDF Master/Class/PDFTools/Redact/Window/KMRedactSelectPagesWindowController.swift

@@ -33,13 +33,13 @@ class KMRedactSelectPagesWindowController: NSWindowController {
     override func windowDidLoad() {
         super.windowDidLoad()
     
-        self.titleLabel.stringValue = KMLocalizedString("Repeat Mark Across Pages", nil)
-        self.allPagesButton.title = KMLocalizedString("All Pages", nil)
-        self.oddPagesButton.title = KMLocalizedString("Odd Pages Only", nil)
-        self.evenPagesButton.title = KMLocalizedString("Even Pages Only", nil)
-        self.otherTextField.placeholderString = KMLocalizedString("e.g. 1,3-5,10",nil)
-        self.cancelButton.title = KMLocalizedString("Cancel", nil)
-        self.okButton.title = KMLocalizedString("OK", nil)
+        self.titleLabel.stringValue = KMLocalizedString("Repeat Mark Across Pages")
+        self.allPagesButton.title = KMLocalizedString("All Pages")
+        self.oddPagesButton.title = KMLocalizedString("Odd Pages Only")
+        self.evenPagesButton.title = KMLocalizedString("Even Pages Only")
+        self.otherTextField.placeholderString = KMLocalizedString("e.g. 1,3-5,10")
+        self.cancelButton.title = KMLocalizedString("Cancel")
+        self.okButton.title = KMLocalizedString("OK")
         if(self.pdfDocument != nil) {
             self.pagesLabel.stringValue = String(format: "/%ld", self.pdfDocument!.pageCount)
         }
@@ -125,7 +125,7 @@ class KMRedactSelectPagesWindowController: NSWindowController {
             self.selectedPages = tempPagesArray
         }
         if (hasError || self.selectedPages.count < 1) {
-            let message = String(format: "%@ %@", self.pdfDocument?.documentURL.lastPathComponent ?? "", KMLocalizedString("Invalid page range or the page number is out of range. Please try again.", nil))
+            let message = String(format: "%@ %@", self.pdfDocument?.documentURL.lastPathComponent ?? "", KMLocalizedString("Invalid page range or the page number is out of range. Please try again."))
             KMAlertTool.runModelForMainThread(message: message)
             return;
         }

+ 4 - 4
PDF Office/PDF Master/Class/PDFTools/RemovePassword/Model/KMBatchRemovePasswordOperation.swift

@@ -25,7 +25,7 @@ class KMBatchRemovePasswordOperation: KMBatchOperation{
             self.hasExcuting = true
             didChangeValue(forKey: "isExecuting")
             if !FileManager.default.fileExists(atPath: self.operateFile!.filePath) {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("File Not Exist", nil)), info: self.operateFile!.removePasswordInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("File Not Exist")), info: self.operateFile!.removePasswordInfo)
                 
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
@@ -34,7 +34,7 @@ class KMBatchRemovePasswordOperation: KMBatchOperation{
             }
 
             if self.pdfDocument == nil {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.", nil)), info: self.operateFile!.removeWatermarkInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.")), info: self.operateFile!.removeWatermarkInfo)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
                 self.didChangeValue(forKey: "isFinished")
@@ -42,7 +42,7 @@ class KMBatchRemovePasswordOperation: KMBatchOperation{
             }
 
             if !self.pdfDocument!.allowsPrinting || !self.pdfDocument!.allowsCopying {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("This is a secured document. Editing is not permitted.", nil)), info: self.operateFile!.removeWatermarkInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("This is a secured document. Editing is not permitted.")), info: self.operateFile!.removeWatermarkInfo)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
                 self.didChangeValue(forKey: "isFinished")
@@ -56,7 +56,7 @@ class KMBatchRemovePasswordOperation: KMBatchOperation{
             if result {
                 self.delegate?.fileOperateSuccessed?(self.operateFile!, info: self.operateFile!.removePasswordInfo)
             } else {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("Failed", nil)), info: self.operateFile!.removePasswordInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("Failed")), info: self.operateFile!.removePasswordInfo)
             }
             self.willChangeValue(forKey: "isFinished") 
             self.hasFinished = true

+ 6 - 6
PDF Office/PDF Master/Class/PDFTools/RemovePassword/VC/KMBatchOperateRemovePasswordViewController.swift

@@ -36,11 +36,11 @@ class KMBatchOperateRemovePasswordViewController: KMBatchOperateBaseViewControll
                     }
                 }
                 self.actionButton.tag = 1
-                self.actionButton.title = KMLocalizedString("Remove Password", nil)
+                self.actionButton.title = KMLocalizedString("Remove Password")
                 self.actionButton.setTitleColor(KMAppearance.Layout.w0Color())
             } else {
                 self.actionButton.tag = 0
-                self.actionButton.title = KMLocalizedString("Cancel", nil)
+                self.actionButton.title = KMLocalizedString("Cancel")
                 self.actionButton.setTitleColor(KMAppearance.Layout.w0Color())
             }
         }
@@ -88,12 +88,12 @@ class KMBatchOperateRemovePasswordViewController: KMBatchOperateBaseViewControll
         }
     }
     func localizedLanguage() {
-        self.titleLabel.stringValue = KMLocalizedString("Remove Password", nil)
+        self.titleLabel.stringValue = KMLocalizedString("Remove Password")
         
-        self.firstHintDetailLabel.stringValue =  KMLocalizedString("PDF Password Remover is an easy-to-use PDF security remover, which helps users decrypt PDF protections and remove restrictions on printing, editing and copying.",nil)
+        self.firstHintDetailLabel.stringValue =  KMLocalizedString("PDF Password Remover is an easy-to-use PDF security remover, which helps users decrypt PDF protections and remove restrictions on printing, editing and copying.")
         
-        self.secondHintDetailLabel.stringValue = KMLocalizedString("If open password is required, you need to enter the right password first and then remove protections from PDF files.",nil)
-        self.actionButton.title = KMLocalizedString("Remove Password", nil)
+        self.secondHintDetailLabel.stringValue = KMLocalizedString("If open password is required, you need to enter the right password first and then remove protections from PDF files.")
+        self.actionButton.title = KMLocalizedString("Remove Password")
     }
     func configuUI() {
         self.view.wantsLayer = true

+ 4 - 4
PDF Office/PDF Master/Class/PDFTools/RemoveWatermark/Model/KMBatchRemoveBackgroundOperation.swift

@@ -25,7 +25,7 @@ class KMBatchRemoveBackgroundOperation: KMBatchOperation{
             self.hasExcuting = true
             didChangeValue(forKey: "isExecuting")
             if !FileManager.default.fileExists(atPath: self.operateFile!.filePath) {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("File Not Exist", nil)), info: self.operateFile!.removeBackgroundInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("File Not Exist")), info: self.operateFile!.removeBackgroundInfo)
                 
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
@@ -34,7 +34,7 @@ class KMBatchRemoveBackgroundOperation: KMBatchOperation{
             }
 
             if self.pdfDocument == nil {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.", nil)), info: self.operateFile!.removeBackgroundInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.")), info: self.operateFile!.removeBackgroundInfo)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
                 self.didChangeValue(forKey: "isFinished")
@@ -42,7 +42,7 @@ class KMBatchRemoveBackgroundOperation: KMBatchOperation{
             }
 
             if !self.pdfDocument!.allowsPrinting || !self.pdfDocument!.allowsCopying {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("This is a secured document. Editing is not permitted.", nil)), info: self.operateFile!.removeBackgroundInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("This is a secured document. Editing is not permitted.")), info: self.operateFile!.removeBackgroundInfo)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
                 self.didChangeValue(forKey: "isFinished")
@@ -52,7 +52,7 @@ class KMBatchRemoveBackgroundOperation: KMBatchOperation{
                 if result == 1 {
                     self.delegate?.fileOperateSuccessed?(self.operateFile!, info: self.operateFile!.removeBackgroundInfo)
                 } else {
-                    self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("Failed", nil)) as NSError, info: self.operateFile!.removeBackgroundInfo)
+                    self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("Failed")) as NSError, info: self.operateFile!.removeBackgroundInfo)
                 }
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true

+ 3 - 3
PDF Office/PDF Master/Class/PDFTools/RemoveWatermark/Model/KMBatchRemoveWatermarkOperation.swift

@@ -25,7 +25,7 @@ class KMBatchRemoveWatermarkOperation: KMBatchOperation{
             self.hasExcuting = true
             didChangeValue(forKey: "isExecuting")
             if !FileManager.default.fileExists(atPath: self.operateFile!.filePath) {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("File Not Exist", nil)), info: self.operateFile!.removeWatermarkInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("File Not Exist")), info: self.operateFile!.removeWatermarkInfo)
                 
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
@@ -34,7 +34,7 @@ class KMBatchRemoveWatermarkOperation: KMBatchOperation{
             }
 
             if self.pdfDocument == nil {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.", nil)), info: self.operateFile!.removeWatermarkInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.")), info: self.operateFile!.removeWatermarkInfo)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
                 self.didChangeValue(forKey: "isFinished")
@@ -42,7 +42,7 @@ class KMBatchRemoveWatermarkOperation: KMBatchOperation{
             }
 
             if !self.pdfDocument!.allowsPrinting || !self.pdfDocument!.allowsCopying {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("This is a secured document. Editing is not permitted.", nil)), info: self.operateFile!.removeWatermarkInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("This is a secured document. Editing is not permitted.")), info: self.operateFile!.removeWatermarkInfo)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
                 self.didChangeValue(forKey: "isFinished")

+ 4 - 4
PDF Office/PDF Master/Class/PDFTools/RemoveWatermark/VC/KMBatchOperateRemoveWatermarkViewController.swift

@@ -39,11 +39,11 @@ class KMBatchOperateRemoveWatermarkViewController: KMBatchOperateBaseViewControl
                     }
                 }
                 self.actionButton.tag = 1
-                self.actionButton.title = self.isBackground ? KMLocalizedString("Remove Background", nil) : KMLocalizedString("Remove Watermark", nil)
+                self.actionButton.title = self.isBackground ? KMLocalizedString("Remove Background") : KMLocalizedString("Remove Watermark")
                 self.actionButton.setTitleColor(KMAppearance.Layout.w0Color())
             } else {
                 self.actionButton.tag = 0
-                self.actionButton.title = KMLocalizedString("Cancel", nil)
+                self.actionButton.title = KMLocalizedString("Cancel")
                 self.actionButton.setTitleColor(KMAppearance.Layout.w0Color())
             }
         }
@@ -133,8 +133,8 @@ class KMBatchOperateRemoveWatermarkViewController: KMBatchOperateBaseViewControl
     }
     
     func localizedLanguage() {
-        self.titleLabel.stringValue = self.isBackground ?  KMLocalizedString("Remove Background", nil) : KMLocalizedString("Remove Watermark", nil)
-        self.detailLabel.stringValue = self.isBackground ? KMLocalizedString("The PDF background remover helps you to remove images and color backgrounds from PDF files for an easy reading experience.", nil) : KMLocalizedString("PDF Reader Pro is a PDF watermark remover helping you to remove textual and image watermarks from PDF files. The quality of the final output is same as the original files.", nil)
+        self.titleLabel.stringValue = self.isBackground ?  KMLocalizedString("Remove Background") : KMLocalizedString("Remove Watermark")
+        self.detailLabel.stringValue = self.isBackground ? KMLocalizedString("The PDF background remover helps you to remove images and color backgrounds from PDF files for an easy reading experience.") : KMLocalizedString("PDF Reader Pro is a PDF watermark remover helping you to remove textual and image watermarks from PDF files. The quality of the final output is same as the original files.")
         self.actionButton.title = self.titleLabel.stringValue
     }
     

+ 68 - 68
PDF Office/PDF Master/Class/PDFTools/SelfSign/Window/KMProfileInfoWindowController.swift

@@ -82,7 +82,7 @@ class KMProfileInfoWindowController: KMBaseWindowController {
     
     @IBAction func buttonClicked_RemoveNewInfo(_ sender: AnyObject?) {
         let editIndex = self.tableView.selectedRow
-        let customIndex = self.tableContents.index(of: KMLocalizedString("Custom", nil)) ?? NSNotFound
+        let customIndex = self.tableContents.index(of: KMLocalizedString("Custom")) ?? NSNotFound
         if (editIndex - customIndex - 1 < KMProfileInfo.shared().customInfoArray.count) {
             KMProfileInfo.shared().removeObjectFromCustomInfoArray(at: editIndex - customIndex - 1)
             self._fetchDisplayKeys()
@@ -117,7 +117,7 @@ class KMProfileInfoWindowController: KMBaseWindowController {
     
     @IBAction func menuItemClicked_Delete(_ sender: AnyObject?) {
         let editIndex = self.tableView.clickedRow
-        let customIndex = self.tableContents.index(of: KMLocalizedString("Custom", nil)) ?? NSNotFound
+        let customIndex = self.tableContents.index(of: KMLocalizedString("Custom")) ?? NSNotFound
         if (editIndex < customIndex) {
             switch (editIndex) {
                 case 1:
@@ -185,11 +185,11 @@ class KMProfileInfoWindowController: KMBaseWindowController {
 
 extension KMProfileInfoWindowController {
     private func _configuViews() {
-        self.titleLabel.stringValue = KMLocalizedString("My Profile", nil)
+        self.titleLabel.stringValue = KMLocalizedString("My Profile")
 
         //Button Part
-        self.backButton.title = KMLocalizedString("Cancel", nil)
-        self.addButton.title = KMLocalizedString("Add to Doc", nil)
+        self.backButton.title = KMLocalizedString("Cancel")
+        self.addButton.title = KMLocalizedString("Add to Doc")
         self.addButton.isEnabled = false
         self.removeNewInfoButton.isEnabled = false
         //NSMenu Part
@@ -198,37 +198,37 @@ extension KMProfileInfoWindowController {
         let addItem = self.tableView.menu?.item(at: 1)
         let deleteItem = self.tableView.menu?.item(at: 2)
         
-        editItem?.title = KMLocalizedString("Edit", nil)
-        addItem?.title = KMLocalizedString("Add to Doc", nil)
-        deleteItem?.title = KMLocalizedString("Delete", nil)
+        editItem?.title = KMLocalizedString("Edit")
+        addItem?.title = KMLocalizedString("Add to Doc")
+        deleteItem?.title = KMLocalizedString("Delete")
     }
     
     private func _fetchDisplayKeys() {
         self.tableContents = []
-        self.tableContents.append(KMLocalizedString("Name", nil))
-        self.tableContents.append(KMLocalizedString("Full Name", nil))
-        self.tableContents.append(KMLocalizedString("First Name", nil))
-        self.tableContents.append(KMLocalizedString("Middle Name", nil))
-        self.tableContents.append(KMLocalizedString("Last Name", nil))
+        self.tableContents.append(KMLocalizedString("Name"))
+        self.tableContents.append(KMLocalizedString("Full Name"))
+        self.tableContents.append(KMLocalizedString("First Name"))
+        self.tableContents.append(KMLocalizedString("Middle Name"))
+        self.tableContents.append(KMLocalizedString("Last Name"))
         
-        self.tableContents.append(KMLocalizedString("Address", nil))
-        self.tableContents.append(KMLocalizedString("Street 1", nil))
-        self.tableContents.append(KMLocalizedString("Street 2", nil))
-        self.tableContents.append(KMLocalizedString("City", nil))
-        self.tableContents.append(KMLocalizedString("State", nil))
-        self.tableContents.append(KMLocalizedString("Zip", nil))
-        self.tableContents.append(KMLocalizedString("Country", nil))
+        self.tableContents.append(KMLocalizedString("Address"))
+        self.tableContents.append(KMLocalizedString("Street 1"))
+        self.tableContents.append(KMLocalizedString("Street 2"))
+        self.tableContents.append(KMLocalizedString("City"))
+        self.tableContents.append(KMLocalizedString("State"))
+        self.tableContents.append(KMLocalizedString("Zip"))
+        self.tableContents.append(KMLocalizedString("Country"))
         
-        self.tableContents.append(KMLocalizedString("Contact Information", nil))
-        self.tableContents.append(KMLocalizedString("Email", nil))
-        self.tableContents.append(KMLocalizedString("Tel", nil))
+        self.tableContents.append(KMLocalizedString("Contact Information"))
+        self.tableContents.append(KMLocalizedString("Email"))
+        self.tableContents.append(KMLocalizedString("Tel"))
         
-        self.tableContents.append(KMLocalizedString("Dates", nil))
-        self.tableContents.append(KMLocalizedString("Date", nil))
-        self.tableContents.append(KMLocalizedString("Birth Date", nil))
+        self.tableContents.append(KMLocalizedString("Dates"))
+        self.tableContents.append(KMLocalizedString("Date"))
+        self.tableContents.append(KMLocalizedString("Birth Date"))
         
         if (KMProfileInfo.shared().customInfoArray.count > 0) {
-            self.tableContents.append(KMLocalizedString("Custom", nil))
+            self.tableContents.append(KMLocalizedString("Custom"))
             for i in 0 ..< KMProfileInfo.shared().customInfoArray.count {
                 if let dict: [String : Any] = KMProfileInfo.shared().customInfoArray[i] as? [String : Any], dict.isEmpty == false {
                     self.tableContents.append(dict.keys.first!)
@@ -248,50 +248,50 @@ extension KMProfileInfoWindowController {
         var nameString: String = ""
 
         if (tag == 1) {
-            placeHoldString = KMLocalizedString("Add Full Name", nil)
+            placeHoldString = KMLocalizedString("Add Full Name")
             nameString = KMProfileInfo.shared().fullName
         } else if (tag == 2) {
-            placeHoldString = KMLocalizedString("Add First Name", nil)
+            placeHoldString = KMLocalizedString("Add First Name")
             nameString = KMProfileInfo.shared().firstName
         } else if (tag == 3) {
-            placeHoldString = KMLocalizedString("Add Middle Name", nil)
+            placeHoldString = KMLocalizedString("Add Middle Name")
             nameString = KMProfileInfo.shared().middleName
         } else if (tag == 4) {
-            placeHoldString = KMLocalizedString("Add Last Name", nil)
+            placeHoldString = KMLocalizedString("Add Last Name")
             nameString = KMProfileInfo.shared().lastName
         } else if (tag == 6) {
-            placeHoldString = KMLocalizedString("Add Street 1", nil)
+            placeHoldString = KMLocalizedString("Add Street 1")
             nameString = KMProfileInfo.shared().street1
         } else if (tag == 7) {
-            placeHoldString = KMLocalizedString("Add Street 2", nil)
+            placeHoldString = KMLocalizedString("Add Street 2")
             nameString = KMProfileInfo.shared().street2
         } else if (tag == 8) {
 
-            placeHoldString = KMLocalizedString("Add City", nil)
+            placeHoldString = KMLocalizedString("Add City")
             nameString = KMProfileInfo.shared().city
         } else if (tag == 9) {
-            placeHoldString = KMLocalizedString("Add State", nil)
+            placeHoldString = KMLocalizedString("Add State")
             nameString = KMProfileInfo.shared().state
         } else if (tag == 10) {
-            placeHoldString = KMLocalizedString("Add Zip", nil)
+            placeHoldString = KMLocalizedString("Add Zip")
             nameString = KMProfileInfo.shared().zip
         } else if (tag == 11) {
-            placeHoldString = KMLocalizedString("Add Country", nil)
+            placeHoldString = KMLocalizedString("Add Country")
             nameString = KMProfileInfo.shared().country
         } else if (tag == 13) {
-            placeHoldString = KMLocalizedString("Add Email", nil)
+            placeHoldString = KMLocalizedString("Add Email")
             nameString = KMProfileInfo.shared().email
         } else if (tag == 14) {
-            placeHoldString = KMLocalizedString("Add Tel", nil)
+            placeHoldString = KMLocalizedString("Add Tel")
             nameString = KMProfileInfo.shared().tel
         } else if (tag == 16) {
-            placeHoldString = KMLocalizedString("Add Date", nil)
+            placeHoldString = KMLocalizedString("Add Date")
             let date = Date()
             let formatter = DateFormatter()
             formatter.dateFormat = "YYYY/MM/dd"
             nameString = formatter.string(from: date)
         } else if (tag == 17) {
-            placeHoldString = KMLocalizedString("Add Birth Date", nil)
+            placeHoldString = KMLocalizedString("Add Birth Date")
             nameString = KMProfileInfo.shared().birthDate
         }
         textField?.stringValue = nameString
@@ -320,8 +320,8 @@ extension KMProfileInfoWindowController: NSTableViewDelegate, NSTableViewDataSou
     
     func tableView(_ tableView: NSTableView, heightOfRow row: Int) -> CGFloat {
         let addingString = self.tableContents[row]
-        let customIndex = self.tableContents.index(of: KMLocalizedString("Custom", nil)) ?? NSNotFound
-        if (addingString == KMLocalizedString("Name", nil) || addingString == KMLocalizedString("Address", nil) || addingString == KMLocalizedString("Contact Information", nil) || addingString == KMLocalizedString("Dates", nil) || addingString == KMLocalizedString("Custom", nil)) && row <= customIndex {
+        let customIndex = self.tableContents.index(of: KMLocalizedString("Custom")) ?? NSNotFound
+        if (addingString == KMLocalizedString("Name") || addingString == KMLocalizedString("Address") || addingString == KMLocalizedString("Contact Information") || addingString == KMLocalizedString("Dates") || addingString == KMLocalizedString("Custom")) && row <= customIndex {
             return 24.0
         }
         return 36.0
@@ -329,9 +329,9 @@ extension KMProfileInfoWindowController: NSTableViewDelegate, NSTableViewDataSou
     
     func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? {
         let addingString = self.tableContents[row]
-        let customIndex = self.tableContents.index(of: KMLocalizedString("Custom", nil)) ?? NSNotFound
+        let customIndex = self.tableContents.index(of: KMLocalizedString("Custom")) ?? NSNotFound
         var tableCellView: NSTableCellView?
-        if (addingString == KMLocalizedString("Name", nil) || addingString == KMLocalizedString("Address", nil) || addingString == KMLocalizedString("Contact Information", nil) || addingString == KMLocalizedString("Dates", nil) || addingString == KMLocalizedString("Custom", nil)) && row <= customIndex {
+        if (addingString == KMLocalizedString("Name") || addingString == KMLocalizedString("Address") || addingString == KMLocalizedString("Contact Information") || addingString == KMLocalizedString("Dates") || addingString == KMLocalizedString("Custom")) && row <= customIndex {
             tableCellView = (tableView.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: TitleCellIdentifier), owner: tableColumn) as! NSTableCellView)
             let cellView = tableCellView as! KMProfileTitleCellView
             cellView.textField?.stringValue = addingString
@@ -360,7 +360,7 @@ extension KMProfileInfoWindowController: NSTableViewDelegate, NSTableViewDataSou
                 self._configuTextField(cellView)
                 cellView?.textField?.isEditable = false
                 cellView?.textField?.isSelectable = false
-                if addingString == KMLocalizedString("Date", nil) {
+                if addingString == KMLocalizedString("Date") {
                     cellView?.detailtextField.isEditable = false
                     cellView?.detailtextField.isSelectable = false
                 } else {
@@ -374,8 +374,8 @@ extension KMProfileInfoWindowController: NSTableViewDelegate, NSTableViewDataSou
                 let dict = KMProfileInfo.shared().customInfoArray[index] as? [String : Any]
                 cellView?.addButton.isHidden = true
                 cellView?.detailtextField.stringValue = dict?.values.first as? String ?? ""
-                cellView?.detailtextField.placeholderString = KMLocalizedString("Type Value Here", nil)
-                cellView?.textField?.placeholderString = KMLocalizedString("Type Label Here", nil)
+                cellView?.detailtextField.placeholderString = KMLocalizedString("Type Value Here")
+                cellView?.textField?.placeholderString = KMLocalizedString("Type Label Here")
                 cellView?.textField?.isEditable = true
                 cellView?.textField?.isSelectable = true
                 cellView?.detailtextField.isEditable = true
@@ -390,8 +390,8 @@ extension KMProfileInfoWindowController: NSTableViewDelegate, NSTableViewDataSou
     
     func tableView(_ tableView: NSTableView, shouldSelectRow row: Int) -> Bool {
         let addingString = self.tableContents[row]
-        let customIndex = self.tableContents.index(of: KMLocalizedString("Custom", nil)) ?? NSNotFound
-        if (addingString == KMLocalizedString("Name", nil) || addingString == KMLocalizedString("Address", nil) || addingString == KMLocalizedString("Contact Information", nil) || addingString == KMLocalizedString("Dates", nil) || addingString == KMLocalizedString("Custom", nil)) && row <= customIndex {
+        let customIndex = self.tableContents.index(of: KMLocalizedString("Custom")) ?? NSNotFound
+        if (addingString == KMLocalizedString("Name") || addingString == KMLocalizedString("Address") || addingString == KMLocalizedString("Contact Information") || addingString == KMLocalizedString("Dates") || addingString == KMLocalizedString("Custom")) && row <= customIndex {
             return false
         }
         return true
@@ -417,7 +417,7 @@ extension KMProfileInfoWindowController: NSTableViewDelegate, NSTableViewDataSou
                 }
             }
         }
-        let customIndex = self.tableContents.index(of: KMLocalizedString("Custom", nil)) ?? NSNotFound
+        let customIndex = self.tableContents.index(of: KMLocalizedString("Custom")) ?? NSNotFound
         if (self.tableView.selectedRow > customIndex) {
             self.removeNewInfoButton.isEnabled = true
         } else {
@@ -501,33 +501,33 @@ extension KMProfileInfoWindowController: NSTextFieldDelegate {
             var placeHoldString = ""
 
             if (tag == 1) {
-                placeHoldString = KMLocalizedString("Add Full Name", nil)
+                placeHoldString = KMLocalizedString("Add Full Name")
             } else if (tag == 2) {
-                placeHoldString = KMLocalizedString("Add First Name", nil)
+                placeHoldString = KMLocalizedString("Add First Name")
             } else if (tag == 3) {
-                placeHoldString = KMLocalizedString("Add Middle Name", nil)
+                placeHoldString = KMLocalizedString("Add Middle Name")
             } else if (tag == 4) {
-                placeHoldString = KMLocalizedString("Add Last Name", nil)
+                placeHoldString = KMLocalizedString("Add Last Name")
             } else if (tag == 6) {
-                placeHoldString = KMLocalizedString("Add Street 1", nil)
+                placeHoldString = KMLocalizedString("Add Street 1")
             } else if (tag == 7) {
-                placeHoldString = KMLocalizedString("Add Street 2", nil)
+                placeHoldString = KMLocalizedString("Add Street 2")
             } else if (tag == 8) {
-                placeHoldString = KMLocalizedString("Add City", nil)
+                placeHoldString = KMLocalizedString("Add City")
             } else if (tag == 9) {
-                placeHoldString = KMLocalizedString("Add State", nil)
+                placeHoldString = KMLocalizedString("Add State")
             } else if (tag == 10) {
-                placeHoldString = KMLocalizedString("Add Zip", nil)
+                placeHoldString = KMLocalizedString("Add Zip")
             } else if (tag == 11) {
-                placeHoldString = KMLocalizedString("Add Country", nil)
+                placeHoldString = KMLocalizedString("Add Country")
             } else if (tag == 13) {
-                placeHoldString = KMLocalizedString("Add Email", nil)
+                placeHoldString = KMLocalizedString("Add Email")
             } else if (tag == 14) {
-                placeHoldString = KMLocalizedString("Add Tel", nil)
+                placeHoldString = KMLocalizedString("Add Tel")
             } else if (tag == 16) {
-                placeHoldString = KMLocalizedString("Add Date", nil)
+                placeHoldString = KMLocalizedString("Add Date")
             } else if (tag == 17) {
-                placeHoldString = KMLocalizedString("Add Birth Date", nil)
+                placeHoldString = KMLocalizedString("Add Birth Date")
             }
 
             if (textField?.stringValue.isEmpty == false) {
@@ -556,7 +556,7 @@ extension KMProfileInfoWindowController: NSMenuItemValidation {
                 return false
             } else {
                 let cellView1 = cellView as? KMProfileCellView
-                if (cellView1?.textField?.stringValue == KMLocalizedString("Date", nil)) {
+                if (cellView1?.textField?.stringValue == KMLocalizedString("Date")) {
                     return false
                 }
                 return true
@@ -582,7 +582,7 @@ extension KMProfileInfoWindowController: NSMenuItemValidation {
 //                return NO;
 //            } else {
 //                KMProfileCellView *cellView1 = (KMProfileCellView *)cellView;
-//                if ([cellView1.textField.stringValue isEqualToString:NSLocalizedString(@"Date", nil)]) {
+//                if ([cellView1.textField.stringValue isEqualToString:NSLocalizedString(@"Date")]) {
 //                    return NO;
 //                }
 //                return YES;
@@ -591,7 +591,7 @@ extension KMProfileInfoWindowController: NSMenuItemValidation {
                 return false
             } else {
                 let cellView1 = cellView as? KMProfileCellView
-                if (cellView1?.textField?.stringValue == KMLocalizedString("Date", nil)) {
+                if (cellView1?.textField?.stringValue == KMLocalizedString("Date")) {
                     return false
                 }
                 return true

+ 7 - 7
PDF Office/PDF Master/Class/PDFTools/Snapshot/View/KMSnapshotPDFView.swift

@@ -239,18 +239,18 @@ class KMSnapshotPDFView: CPDFListView {
         }
         
         menu?.insertItem(.separator(), at: 0)
-        menu?.insertItem(withTitle: KMLocalizedString("Print", "Menu item title"), action: #selector(menuItemClick_Print), target: self, at: 0)
+        menu?.insertItem(withTitle: KMLocalizedString("Print"), action: #selector(menuItemClick_Print), target: self, at: 0)
 
-        var item = menu?.insertItem(withTitle: KMLocalizedString("Export", "Menu item title"), action: nil, target: self, at: 0)
+        var item = menu?.insertItem(withTitle: KMLocalizedString("Export"), action: nil, target: self, at: 0)
         let subMenu = NSMenu()
          
-        subMenu.addItem(title: KMLocalizedString("PNG", "Menu item title"), action: #selector(menuItemClick_ExportPNG), target: self)
-        subMenu.addItem(title: KMLocalizedString("JPG", "Menu item title"), action: #selector(menuItemClick_ExportJPG), target: self)
-        subMenu.addItem(title: KMLocalizedString("PDF", "Menu item title"), action: #selector(menuItemClick_ExportPDF), target: self)
+        subMenu.addItem(title: KMLocalizedString("PNG"), action: #selector(menuItemClick_ExportPNG), target: self)
+        subMenu.addItem(title: KMLocalizedString("JPG"), action: #selector(menuItemClick_ExportJPG), target: self)
+        subMenu.addItem(title: KMLocalizedString("PDF"), action: #selector(menuItemClick_ExportPDF), target: self)
         item?.submenu = subMenu
 
         menu?.insertItem(.separator(), at: 0)
-        menu?.insertItem(withTitle: KMLocalizedString("Copy", "Menu item title"), action: #selector(menuItemClick_Copy), target: self, at: 0)
+        menu?.insertItem(withTitle: KMLocalizedString("Copy"), action: #selector(menuItemClick_Copy), target: self, at: 0)
         
 //        [self setCurrentSelection:RUNNING_AFTER(10_11) ? [[[PDFSelection alloc] initWithDocument:[self document]] autorelease] : nil];
         self.currentSelection = CPDFSelection(document: self.document)
@@ -273,7 +273,7 @@ class KMSnapshotPDFView: CPDFListView {
         }
         if let i = menu?.indexOfItem(withTarget: self, andAction: NSSelectorFromString("_setActualSize:")), i != -1 {
             menu?.item(at: i)?.action = #selector(doActualSize)
-            var item = menu?.insertItem(withTitle: KMLocalizedString("Physical Size", "Menu item title"), action: #selector(doPhysicalSize), target: self, at: i + 1)
+            var item = menu?.insertItem(withTitle: KMLocalizedString("Physical Size"), action: #selector(doPhysicalSize), target: self, at: i + 1)
 //            item?.keyEquivalentModifierMask = [.alternate]
 //            [item setKeyEquivalentModifierMask:NSAlternateKeyMask];
 //            [item setAlternate:YES];

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/Snapshot/Window/KMSnapshotWindowController.swift

@@ -105,7 +105,7 @@ class KMSnapshotWindowController: KMBaseWindowController {
     */
     
     override func windowTitle(forDocumentDisplayName displayName: String) -> String {
-        return String(format: "%@ %C %@", displayName, EM_DASH_CHARACTER, String(format: KMLocalizedString("Page %@", ""), self.pageLabel))
+        return String(format: "%@ %C %@", displayName, EM_DASH_CHARACTER, String(format: KMLocalizedString("Page %@"), self.pageLabel))
     }
     
     func setNeedsDisplay(in rect: NSRect, of page: CPDFPage?) {

+ 13 - 13
PDF Office/PDF Master/Class/PDFTools/TTS/WindowController/KMTTSWindowController.swift

@@ -60,23 +60,23 @@ class KMTTSWindowController: NSWindowController, KMTTSManagerDelegate, NSWindowD
         self.speedSlider.minValue = Double(minSpeed);
         self.speedSlider.maxValue = Double(maxSpeed);
         
-        self.nextButton.toolTip = KMLocalizedString("Next Page", nil)
+        self.nextButton.toolTip = KMLocalizedString("Next Page")
 //        self.nextButton.isShowCustomToolTip = true
-        self.forwardButton.toolTip = KMLocalizedString("Previous Page", nil)
+        self.forwardButton.toolTip = KMLocalizedString("Previous Page")
 //        self.forwardButton.isShowCustomToolTip = true
         self.speedSlider.isEnabled = true
         self.speedStepper.isEnabled = true
-        self.playButton.toolTip = KMLocalizedString("Play", nil)
+        self.playButton.toolTip = KMLocalizedString("Play")
 //        self.playButton.isShowCustomToolTip = true
-        self.sppendCountLabel.stringValue = KMLocalizedString("SpeedX", nil)
+        self.sppendCountLabel.stringValue = KMLocalizedString("SpeedX")
         let str = String(format: "%.1f", KMTTSManager.defalutManager.rate/Float(standardSpeed))
         self.speedStepper.stringValue = str
         self.speedTextField.stringValue = str
         self.speedSlider.stringValue = str//[NSString stringWithFormat:@"%.1f",([KMTTSManager defaultManager].rate/standardSpeed)];
         
-        self.sontinuouButton.title = KMLocalizedString("Continuous Reading", nil);
-        self.speedLabel.stringValue = KMLocalizedString("Speed", nil) + ":"//[NSString stringWithFormat:@"%@:",KMLocalizedString("Speed", nil)];
-        self.languageLabel.stringValue = KMLocalizedString("Language", nil) + ":" //[NSString stringWithFormat:@"%@:",KMLocalizedString(@"Language", nil)];
+        self.sontinuouButton.title = KMLocalizedString("Continuous Reading");
+        self.speedLabel.stringValue = KMLocalizedString("Speed") + ":"//[NSString stringWithFormat:@"%@:",KMLocalizedString("Speed")];
+        self.languageLabel.stringValue = KMLocalizedString("Language") + ":" //[NSString stringWithFormat:@"%@:",KMLocalizedString(@"Language")];
         
         let array = KMTTSManager.defalutManager.availableVoices()
         let currentVoicName = KMTTSManager.defalutManager.voice()
@@ -319,14 +319,14 @@ class KMTTSWindowController: NSWindowController, KMTTSManagerDelegate, NSWindowD
     @IBAction func buttonItemClick_Play(_ sender: KMToolbarItem) {
         if (KMTTSManager.defalutManager.isPaused) {
             self.playButton.image = NSImage(named: "KMImageNameTTSPause")
-            self.playButton.toolTip = KMLocalizedString("Pause", nil)
+            self.playButton.toolTip = KMLocalizedString("Pause")
             self.speedSlider.isEnabled = false
             self.speedStepper.isEnabled = false
             KMTTSManager.defalutManager.continueSpeaking()
         } else if (KMTTSManager.defalutManager.isSpeaking()) {
             self.isChangePage = true
             self.playButton.image = NSImage(named: "KMImageNameTTSStop")
-            self.playButton.toolTip = KMLocalizedString("Play", nil)
+            self.playButton.toolTip = KMLocalizedString("Play")
 
             self.speedSlider.isEnabled = true
             self.speedStepper.isEnabled = true
@@ -395,7 +395,7 @@ class KMTTSWindowController: NSWindowController, KMTTSManagerDelegate, NSWindowD
             self.playButton.image = NSImage(named: "KMImageNameTTSStop")
             self.speedSlider.isEnabled = true
             self.speedStepper.isEnabled = true
-            self.playButton.toolTip = KMLocalizedString("Play", nil)
+            self.playButton.toolTip = KMLocalizedString("Play")
         } else {
             if KMTTSManager.defalutManager.isContinue {
                 if !isChangePage {
@@ -404,7 +404,7 @@ class KMTTSWindowController: NSWindowController, KMTTSManagerDelegate, NSWindowD
                         self.playButton.image = NSImage(named: "KMImageNameTTSStop")
                         self.speedSlider.isEnabled = true
                         self.speedStepper.isEnabled = true
-                        self.playButton.toolTip = KMLocalizedString("Play", nil)
+                        self.playButton.toolTip = KMLocalizedString("Play")
                     } else {
                         let currentPageIndex = self.currentPageIndex
                         if currentPageIndex + 1 < self.pdfView.document.pageCount {
@@ -418,7 +418,7 @@ class KMTTSWindowController: NSWindowController, KMTTSManagerDelegate, NSWindowD
                             self.playButton.image = NSImage(named: "KMImageNameTTSStop")
                             self.speedSlider.isEnabled = true
                             self.speedStepper.isEnabled = true
-                            self.playButton.toolTip = KMLocalizedString("Play", nil)
+                            self.playButton.toolTip = KMLocalizedString("Play")
                         }
                     }
                 }
@@ -428,7 +428,7 @@ class KMTTSWindowController: NSWindowController, KMTTSManagerDelegate, NSWindowD
                     self.speedStepper.isEnabled = true
                     self.pdfView.setHighlightedSelections(nil)
                     self.playButton.image = NSImage(named: "KMImageNameTTSStop")
-                    self.playButton.toolTip = KMLocalizedString("Play", nil)
+                    self.playButton.toolTip = KMLocalizedString("Play")
                 }
             }
             if isChangePage {

+ 98 - 0
PDF Office/PDF Master/Class/PDFTools/Tools/KMBaseXibView/BaseXibView.swift

@@ -0,0 +1,98 @@
+//
+//  BaseXibView.swift
+//  KMComponentLibrary
+//
+//  Created by wanjun on 2024/6/6.
+//
+
+import Cocoa
+import AppKit
+
+@objcMembers
+public class BaseXibView: NSView {
+
+    @IBOutlet var contentView: NSView!
+    
+//    private var area : NSTrackingArea?
+    
+    
+    // MARK: 初始化
+    public required init?(coder decoder: NSCoder) {
+        super.init(coder: decoder)
+        self.initContentView()
+ 
+        
+    }
+    
+    override init(frame frameRect: NSRect) {
+        super.init(frame: frameRect)
+        self.initContentView()
+    
+        
+    }
+    
+    private func initContentView() {
+        let isExist = Bundle.main.path(forResource: String(describing:self.classForCoder.self), ofType: "nib")
+        if isExist != nil {
+            var topLevelArray: NSArray? = nil
+            let resource = NSNib(nibNamed: String(describing:self.classForCoder.self), bundle: Bundle(for: self.classForCoder.self))
+ 
+            if resource != nil {
+                if (resource!.instantiate(withOwner: self, topLevelObjects: &topLevelArray)) {
+                    for view in topLevelArray! {
+                        if view is NSView {
+                            contentView = view as? NSView
+                            break
+                        }
+                    }
+                }
+                
+                if contentView == nil {
+                    contentView = NSView()
+                }
+                addSubview(contentView)
+                contentView.translatesAutoresizingMaskIntoConstraints = false
+                NSLayoutConstraint.activate([
+                    contentView.topAnchor.constraint(equalTo: topAnchor),
+                    contentView.leftAnchor.constraint(equalTo: leftAnchor),
+                    contentView.rightAnchor.constraint(equalTo: rightAnchor),
+                    contentView.bottomAnchor.constraint(equalTo: bottomAnchor)])
+                contentView.updateConstraintsForSubtreeIfNeeded()
+            }
+        }
+    }
+    
+//    public override func updateTrackingAreas() {
+//        super.updateTrackingAreas()
+//
+//        if let _area = area, _area.rect.isEmpty == false {
+//            if (_area.rect.equalTo(bounds)) {
+//                return
+//            }
+//        }
+//        
+//        if (area != nil) {
+//            removeTrackingArea(area!)
+//            area = nil
+//        }
+//        
+//        area = NSTrackingArea(rect: bounds, options: [.mouseEnteredAndExited, .mouseMoved, .activeAlways], owner: self)
+//        self.addTrackingArea(area!)
+//    }
+//    
+//    public override func mouseEntered(with event: NSEvent) {
+//        super.mouseEntered(with: event)
+//        
+//    }
+//    
+//    public override func mouseMoved(with event: NSEvent) {
+//        super.mouseMoved(with: event)
+//        
+//    }
+//    
+//    public override func mouseExited(with event: NSEvent) {
+//        super.mouseExited(with: event)
+//        
+//    }
+    
+}

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

@@ -191,20 +191,20 @@ class KMBatchOperateAddWatermarkViewController: KMBatchOperateBaseViewController
                 self.collectionView.isSelectable = true
                 self.actionButton.tag = 1
         //        if (self.isBackground) {
-        //            self.actionButton.title = NSLocalizedString(@"Add Background", nil);
+        //            self.actionButton.title = NSLocalizedString(@"Add Background");
         //        } else {
-        //            self.actionButton.title = NSLocalizedString(@"Add Watermark", nil);
+        //            self.actionButton.title = NSLocalizedString(@"Add Watermark");
         //        }
-                self.actionButton.title = KMLocalizedString("Apply", nil)
+                self.actionButton.title = KMLocalizedString("Apply")
                 self.addButton.isEnabled = true
         //        if (self.onlyManagerTemplate) {
-        //            self.actionButton.title = NSLocalizedString(@"Add Template", nil);
+        //            self.actionButton.title = NSLocalizedString(@"Add Template");
         //        }
             } else {
                 self.collectionView.isSelectable = false
                 self.addButton.isEnabled = false
                 self.actionButton.tag = 0
-                self.actionButton.title = KMLocalizedString("Cancel", nil);
+                self.actionButton.title = KMLocalizedString("Cancel");
             }
             self.actionButton.setTitleColor(KMAppearance.Layout.w0Color())
         }
@@ -414,21 +414,21 @@ class KMBatchOperateAddWatermarkViewController: KMBatchOperateBaseViewController
 
 extension KMBatchOperateAddWatermarkViewController {
     private func _localizedlanguage() {
-        self.addButton.title = "  " + KMLocalizedString("Add Template", nil)
+        self.addButton.title = "  " + KMLocalizedString("Add Template")
         self.addButton.imageHugsTitle = true
-        self.fileButton.title = KMLocalizedString("File", nil)
-        self.actionButton.title = KMLocalizedString("Apply", nil)
+        self.fileButton.title = KMLocalizedString("File")
+        self.actionButton.title = KMLocalizedString("Apply")
         if (!self.isBackground) {
-            self.titleLabel.stringValue = KMLocalizedString("Watermark", nil)
-            self.textButton.title = KMLocalizedString("Text", nil)
-    //        self.actionButton.title = NSLocalizedString(@"Add Watermark", nil);
+            self.titleLabel.stringValue = KMLocalizedString("Watermark")
+            self.textButton.title = KMLocalizedString("Text")
+    //        self.actionButton.title = NSLocalizedString(@"Add Watermark");
         } else {
-            self.titleLabel.stringValue = KMLocalizedString("Background", nil)
-            self.textButton.title = KMLocalizedString("Color", nil)
-    //        self.actionButton.title = NSLocalizedString(@"Add Background", nil);
+            self.titleLabel.stringValue = KMLocalizedString("Background")
+            self.textButton.title = KMLocalizedString("Color")
+    //        self.actionButton.title = NSLocalizedString(@"Add Background");
         }
     //    if (self.onlyManagerTemplate) {
-    //        self.actionButton.title = NSLocalizedString(@"Add Template", nil);
+    //        self.actionButton.title = NSLocalizedString(@"Add Template");
     //    }
 
         if (self.onlyManagerTemplate) {
@@ -446,7 +446,7 @@ extension KMBatchOperateAddWatermarkViewController {
             self.managerTemplateTitleLabel.isHidden = true
         }
         
-        self.managerTemplateTitleLabel.stringValue = KMLocalizedString("Manage Templates", nil)
+        self.managerTemplateTitleLabel.stringValue = KMLocalizedString("Manage Templates")
     }
     
     private func _configuiUI() {
@@ -540,7 +540,7 @@ extension KMBatchOperateAddWatermarkViewController {
             make?.bottom.equalTo()(self.bottomBaseView.mas_top)
             make?.height.greaterThanOrEqualTo()(200)
         }
-            self.blankView.titleLabel.stringValue = KMLocalizedString("No Templates", nil)
+            self.blankView.titleLabel.stringValue = KMLocalizedString("No Templates")
             
             if (self.isBackground) {
                 self.blankView.imageView.image = NSImage(named: KMImageNameEmptyBackground)
@@ -552,14 +552,14 @@ extension KMBatchOperateAddWatermarkViewController {
         let menu = NSMenu()
             if(!self.isBackground) {
                     if(!self.isBatchOperation) {
-                        _ = menu.addItem(title: KMLocalizedString("Batch Add Watermarks", nil), action: #selector(_buttonItemClick_addBatch), target: self)
+                        _ = menu.addItem(title: KMLocalizedString("Batch Add Watermarks"), action: #selector(_buttonItemClick_addBatch), target: self)
                     }
-                _ = menu.addItem(title: KMLocalizedString("Remove All Watermark Templates", nil), action: #selector(_buttonItemClick_CleanAll), target: self)
+                _ = menu.addItem(title: KMLocalizedString("Remove All Watermark Templates"), action: #selector(_buttonItemClick_CleanAll), target: self)
             } else {
                 if(!self.isBatchOperation) {
-                    _ = menu.addItem(title: KMLocalizedString("Batch Add Background", nil), action: #selector(_buttonItemClick_addBatch), target: self)
+                    _ = menu.addItem(title: KMLocalizedString("Batch Add Background"), action: #selector(_buttonItemClick_addBatch), target: self)
                 }
-                _ = menu.addItem(title: KMLocalizedString("Remove All Background Templates", nil), action: #selector(_buttonItemClick_CleanAll), target: self)
+                _ = menu.addItem(title: KMLocalizedString("Remove All Background Templates"), action: #selector(_buttonItemClick_CleanAll), target: self)
             }
             self.view.menu = menu;
     }
@@ -645,9 +645,9 @@ extension KMBatchOperateAddWatermarkViewController {
         let alert = NSAlert()
         alert.alertStyle = .warning
         alert.messageText = ""
-        alert.informativeText = KMLocalizedString("Are you sure to delete all templates?", nil)
-        alert.addButton(withTitle: KMLocalizedString("Delete", nil))
-        alert.addButton(withTitle: KMLocalizedString("Cancel", nil))
+        alert.informativeText = KMLocalizedString("Are you sure to delete all templates?")
+        alert.addButton(withTitle: KMLocalizedString("Delete"))
+        alert.addButton(withTitle: KMLocalizedString("Cancel"))
         alert.beginSheetModal(for: NSApp.mainWindow!) { returnCode in
             if returnCode == .alertFirstButtonReturn {
                 self._deleteAllWatermark()

+ 6 - 6
PDF Office/PDF Master/Class/PDFTools/Watermark/Model/KMBatchAddBackgroundOperation.swift

@@ -37,7 +37,7 @@ class KMBatchAddBackgroundOperation: KMBatchOperation{
             }
             
             if !FileManager.default.fileExists(atPath: self.operateFile!.filePath) {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("File Not Exist", nil)), info: self.operateFile!.addBackgroundInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("File Not Exist")), info: self.operateFile!.addBackgroundInfo)
                 
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
@@ -46,7 +46,7 @@ class KMBatchAddBackgroundOperation: KMBatchOperation{
             }
             
             if self.pdfDocument == nil {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.", nil)), info: self.operateFile!.addBackgroundInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.")), info: self.operateFile!.addBackgroundInfo)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
                 self.didChangeValue(forKey: "isFinished")
@@ -54,7 +54,7 @@ class KMBatchAddBackgroundOperation: KMBatchOperation{
             }
             
             if !self.pdfDocument!.allowsPrinting || !self.pdfDocument!.allowsCopying {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("This is a secured document. Editing is not permitted.", nil)), info: self.operateFile!.addBackgroundInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("This is a secured document. Editing is not permitted.")), info: self.operateFile!.addBackgroundInfo)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
                 self.didChangeValue(forKey: "isFinished")
@@ -62,7 +62,7 @@ class KMBatchAddBackgroundOperation: KMBatchOperation{
             }
             
             if newArr.count < 1 {
-                let err = NSError(domain: "LocalError", code: 0, userInfo: [NSLocalizedDescriptionKey: KMLocalizedString("Invalid page range or the page number is out of range. Please try again.", nil)])
+                let err = NSError(domain: "LocalError", code: 0, userInfo: [NSLocalizedDescriptionKey: KMLocalizedString("Invalid page range or the page number is out of range. Please try again.")])
                 self.delegate?.fileOperateFailed?(self.operateFile!, error: err, info: self.operateFile!.addBackgroundInfo)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
@@ -85,7 +85,7 @@ class KMBatchAddBackgroundOperation: KMBatchOperation{
         var filePath = self.pdfDocument?.documentURL?.path
         let password = self.password
         if filePath?.count ?? 0 < 1 {
-            let str = String(format: "%@.pdf", KMLocalizedString("Untitled", nil))
+            let str = String(format: "%@.pdf", KMLocalizedString("Untitled"))
             let writeSuccess = self.pdfDocument!.write(to: URL(fileURLWithPath: (kTempSavePath?.stringByAppendingPathComponent(str))!))
             if writeSuccess {
                 let newDocument: CPDFDocument = CPDFDocument(url: URL(fileURLWithPath: (kTempSavePath?.stringByAppendingPathComponent(str))!))
@@ -148,7 +148,7 @@ class KMBatchAddBackgroundOperation: KMBatchOperation{
         if result {
             self.delegate?.fileOperateSuccessed?(self.operateFile!, info: self.operateFile!.addBackgroundInfo)
         }else {
-            self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("Failed", nil)), info: self.operateFile!.addBackgroundInfo)
+            self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("Failed")), info: self.operateFile!.addBackgroundInfo)
         }
         self.willChangeValue(forKey: "isFinished")
         self.hasFinished = true

+ 5 - 5
PDF Office/PDF Master/Class/PDFTools/Watermark/Model/KMBatchAddWatermarkOperation.swift

@@ -40,7 +40,7 @@ class KMBatchAddWatermarkOperation: KMBatchOperation{
             }
             
             if !FileManager.default.fileExists(atPath: self.operateFile!.filePath) {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("File Not Exist", nil)), info: self.operateFile!.addWatermarkInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("File Not Exist")), info: self.operateFile!.addWatermarkInfo)
                 
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
@@ -49,7 +49,7 @@ class KMBatchAddWatermarkOperation: KMBatchOperation{
             }
             
             if self.pdfDocument == nil {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.", nil)), info: self.operateFile!.addWatermarkInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("An error occurred while opening this document. The file is damaged and could not be repaired.")), info: self.operateFile!.addWatermarkInfo)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
                 self.didChangeValue(forKey: "isFinished")
@@ -57,7 +57,7 @@ class KMBatchAddWatermarkOperation: KMBatchOperation{
             }
             
             if !self.pdfDocument!.allowsPrinting || !self.pdfDocument!.allowsCopying {
-                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("This is a secured document. Editing is not permitted.", nil)), info: self.operateFile!.addWatermarkInfo)
+                self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("This is a secured document. Editing is not permitted.")), info: self.operateFile!.addWatermarkInfo)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
                 self.didChangeValue(forKey: "isFinished")
@@ -65,7 +65,7 @@ class KMBatchAddWatermarkOperation: KMBatchOperation{
             }
             
             if newArr.count < 1 {
-                let err = NSError(domain: "LocalError", code: 0, userInfo: [NSLocalizedDescriptionKey: KMLocalizedString("Invalid page range or the page number is out of range. Please try again.", nil)])
+                let err = NSError(domain: "LocalError", code: 0, userInfo: [NSLocalizedDescriptionKey: KMLocalizedString("Invalid page range or the page number is out of range. Please try again.")])
                 self.delegate?.fileOperateFailed?(self.operateFile!, error: err, info: self.operateFile!.addWatermarkInfo)
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true
@@ -77,7 +77,7 @@ class KMBatchAddWatermarkOperation: KMBatchOperation{
                 if success {
                     self.delegate?.fileOperateSuccessed?(self.operateFile!, info: self.operateFile!.addWatermarkInfo)
                 }else {
-                    self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("Failed", nil)), info: self.operateFile!.addWatermarkInfo)
+                    self.delegate?.fileOperateFailed?(self.operateFile!, error: self.errorWithMsg(KMLocalizedString("Failed")), info: self.operateFile!.addWatermarkInfo)
                 }
                 self.willChangeValue(forKey: "isFinished")
                 self.hasFinished = true

+ 4 - 4
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/Split/View/KMSecondaryPDFView.swift

@@ -455,13 +455,13 @@ class KMSecondaryPDFView: CPDFListView {
                 item = menu?.insertItem(withTitle: NSLocalizedString("Book Mode", comment: "Menu item title"), action: #selector(toggleDisplayAsBookFromMenu), target: self, at: data)
             }
             data += 1
-            item = menu?.insertItem(withTitle: KMLocalizedString("Page Breaks", "Menu item title"), action: #selector(toggleDisplayPageBreaksFromMenu), target: self, at: data)
+            item = menu?.insertItem(withTitle: KMLocalizedString("Page Breaks"), action: #selector(toggleDisplayPageBreaksFromMenu), target: self, at: data)
         }
         
         i = menu?.indexOfItem(withTarget: self, andAction: NSSelectorFromString("zoomToPhysicalSize:"))
         if let data = i, data != -1 {
             menu?.item(at: data)?.action = #selector(doActualSize)
-            item = menu?.insertItem(withTitle: KMLocalizedString("Physical Size", "Menu item title"), action: #selector(doPhysicalSize), target: self, at: data + 1)
+            item = menu?.insertItem(withTitle: KMLocalizedString("Physical Size"), action: #selector(doPhysicalSize), target: self, at: data + 1)
 //            [item setKeyEquivalentModifierMask:NSAlternateKeyMask];
             item?.keyEquivalentModifierMask = [.option]
             item?.isAlternate = true
@@ -475,8 +475,8 @@ class KMSecondaryPDFView: CPDFListView {
         }
 
         if let data = i {
-            _ = menu?.insertItem(withTitle: KMLocalizedString("Scroll Tool", "Menu item title"), action: #selector(changeToolMode), target: self, at: data)
-            _ = menu?.insertItem(withTitle: KMLocalizedString("Text Tool", "Menu item title"), action: #selector(changeToolMode), target: self, tag: 1 ,at: data)
+            _ = menu?.insertItem(withTitle: KMLocalizedString("Scroll Tool"), action: #selector(changeToolMode), target: self, at: data)
+            _ = menu?.insertItem(withTitle: KMLocalizedString("Text Tool"), action: #selector(changeToolMode), target: self, tag: 1 ,at: data)
             menu?.insertItem(.separator(), at: data)
         }
         

+ 6 - 6
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/Controller/KMNoteOutlineFilterViewController.swift

@@ -152,20 +152,20 @@ class KMNoteOutlineFilterViewController: NSViewController {
         self.view.layer?.cornerRadius = 4.0
         self.view.layer?.borderWidth = 0.0
 
-        self.typeLabel.stringValue = KMLocalizedString("Type", nil)
+        self.typeLabel.stringValue = KMLocalizedString("Type")
         self.typeLabel.textColor = KMAppearance.Layout.h0Color()
-        self.colorLabel.stringValue = KMLocalizedString("Color", nil)
+        self.colorLabel.stringValue = KMLocalizedString("Color")
         self.colorLabel.textColor = KMAppearance.Layout.h0Color()
-        self.authorLabel.stringValue = KMLocalizedString("Author", nil)
+        self.authorLabel.stringValue = KMLocalizedString("Author")
         self.authorLabel.textColor = KMAppearance.Layout.h0Color()
-        self.clearButton.title = KMLocalizedString("Clear", nil)
+        self.clearButton.title = KMLocalizedString("Clear")
         self.clearButton.setTitleColor(KMAppearance.Layout.mColor())
-        self.cancelButton.title = KMLocalizedString("Cancel", nil)
+        self.cancelButton.title = KMLocalizedString("Cancel")
         self.cancelButton.setTitleColor(KMAppearance.Layout.h0Color())
         self.cancelButton.wantsLayer = true
         let cwidth = self.cancelButton.title.boundingRect(with: NSMakeSize(CGFloat(MAXFLOAT), 20), options: .usesLineFragmentOrigin, attributes: [.font : self.cancelButton.font ?? NSFont.systemFont(ofSize: 12)]).size.width
         self.cancelWidthConst.constant = cwidth + 7 * 2
-        self.OKButton.title = KMLocalizedString("Apply", nil)
+        self.OKButton.title = KMLocalizedString("Apply")
         self.OKButton.setTitleColor(KMAppearance.Layout.w0Color())
         self.OKButton.wantsLayer = true
         let owidth = self.OKButton.title.boundingRect(with: NSMakeSize(CGFloat(MAXFLOAT), 20), options: .usesLineFragmentOrigin, attributes: [.font : self.OKButton.font ?? NSFont.systemFont(ofSize: 12)]).size.width

+ 6 - 6
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteOutlineView.swift

@@ -188,17 +188,17 @@ class KMNoteOutlineView: KMCustomOutlineView {
 extension KMNoteOutlineView {
     private func _titleForTableColumnIdentifier(_ identifier: String) -> String? {
         if (identifier == NOTE_COLUMNID) {
-            return KMLocalizedString("Note", "Table header title")
+            return KMLocalizedString("Note")
         } else if (identifier == TYPE_COLUMNID) {
-            return KMLocalizedString("Type", "Table header title")
+            return KMLocalizedString("Type")
         } else if (identifier == COLOR_COLUMNID) {
-            return KMLocalizedString("Color", "Table header title")
+            return KMLocalizedString("Color")
         } else if (identifier == PAGE_COLUMNID) {
-            return KMLocalizedString("Page", "Table header title")
+            return KMLocalizedString("Page")
         } else if (identifier == AUTHOR_COLUMNID) {
-            return KMLocalizedString("Author", "Table header title")
+            return KMLocalizedString("Author")
         } else if (identifier == DATE_COLUMNID) {
-            return KMLocalizedString("Date", "Table header title")
+            return KMLocalizedString("Date")
         }
         return nil
     }

+ 6 - 6
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteTableViewCell.swift

@@ -295,17 +295,17 @@ extension KMNoteTableViewCell {
                     let type = newAnnotation.annotationType
                     var returnString = ""
                     if (type == .signFalse) {
-                        returnString = KMLocalizedString("X", nil)
+                        returnString = KMLocalizedString("X")
                     } else if (type == .signature) {
-                        returnString = KMLocalizedString("Check mark", nil)
+                        returnString = KMLocalizedString("Check mark")
                     } else if (type == .signCircle) {
-                        returnString = KMLocalizedString("Circle", nil)
+                        returnString = KMLocalizedString("Circle")
                     } else if (type == .signLine) {
-                        returnString = KMLocalizedString("Line", nil)
+                        returnString = KMLocalizedString("Line")
                     } else if (type == .signDot) {
-                        returnString = KMLocalizedString("Dot", nil)
+                        returnString = KMLocalizedString("Dot")
                     } else if (type == .signText) {
-                        returnString = KMLocalizedString("Text", nil)
+                        returnString = KMLocalizedString("Text")
                     }
                     self.annotationContentLabel.stringValue = returnString
                 } else {

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMImageToolTipContext.swift

@@ -112,7 +112,7 @@ extension CPDFDestination: KMImageToolTipContext {
                 
         sourceRect = KMConstrainRect(rect: sourceRect, boundary: pageImageRect)
                 
-        let labelString = NSAttributedString(string: String(format: KMLocalizedString("Page %@", "Tool tip label format"), page.km_displayLabel), attributes: attri)
+        let labelString = NSAttributedString(string: String(format: KMLocalizedString("Page %@"), page.km_displayLabel), attributes: attri)
         var labelRect = labelString.boundingRect(with: .zero, options: [.usesLineFragmentOrigin])
         labelRect.size.width = floor(NSWidth(labelRect))
         labelRect.size.height = 2.0 * floor(0.5 * NSHeight(labelRect)) // make sure the cap radius is integral

+ 13 - 13
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideEmptyFileViewController.swift

@@ -39,32 +39,32 @@ class KMLeftSideEmptyFileViewController: NSViewController {
     override func loadView() {
         super.loadView()
         
-        self.emptyOutlineLabel.stringValue = KMLocalizedString("To create outline item select header in contents, right click it and select \"Add Outline Item\"  or click \"+\"  above.",nil)
+        self.emptyOutlineLabel.stringValue = KMLocalizedString("To create outline item select header in contents, right click it and select \"Add Outline Item\"  or click \"+\"  above.")
         self.emptyOutlineLabel.textColor = KMAppearance.Layout.h2Color()
-        self.notCreateOutLine.stringValue = KMLocalizedString("No outlines", nil)
+        self.notCreateOutLine.stringValue = KMLocalizedString("No outlines")
         self.notCreateOutLine.textColor = KMAppearance.Layout.h0Color()
-        self.emptyAnnotationLabel.stringValue = KMLocalizedString("No Annotations",nil)
+        self.emptyAnnotationLabel.stringValue = KMLocalizedString("No Annotations")
 //        self.emptyAnnotationLabel.textColor = KMAppearance.Layout.h0Color()
         self.emptyAnnotationLabel.textColor = NSColor.km_init(hex: "#94989C")
-        self.emptySnapLabel.stringValue = KMLocalizedString("To create snapshot select an area in contents, right click it and select \"Snapshot\" .",nil)
+        self.emptySnapLabel.stringValue = KMLocalizedString("To create snapshot select an area in contents, right click it and select \"Snapshot\" .")
         self.emptySnapLabel.textColor = KMAppearance.Layout.h2Color()
-        self.snapshotNotCreatedLabel.stringValue = KMLocalizedString("No Snapshots", nil)
+        self.snapshotNotCreatedLabel.stringValue = KMLocalizedString("No Snapshots")
         self.snapshotNotCreatedLabel.textColor = KMAppearance.Layout.h0Color()
-        self.searchOutlineSearchField.placeholderString = KMLocalizedString("Search Outline", nil)
+        self.searchOutlineSearchField.placeholderString = KMLocalizedString("Search Outline")
 
         
         self.exportAnnotationBtn.toolTip = NSLocalizedString("Export Annotations…", tableName: "MainMenu", comment: "")
         self.deleteAnnotationBtn.toolTip = NSLocalizedString("Remove All Annotations", tableName: "MainMenu", comment: "")
-        self.filterAnnotationBtn.toolTip = KMLocalizedString("Note Type", nil)
+        self.filterAnnotationBtn.toolTip = KMLocalizedString("Note Type")
         
-        self.addOutlineBox.toolTip = KMLocalizedString("Add Outline Item", nil)
-        self.deleteOutlineBtn.toolTip = KMLocalizedString("Delete", nil)
+        self.addOutlineBox.toolTip = KMLocalizedString("Add Outline Item")
+        self.deleteOutlineBtn.toolTip = KMLocalizedString("Delete")
 
-        self.deleteSnapBtn.toolTip = KMLocalizedString("Delete", nil)
-        self.exportSnapBtn.toolTip = KMLocalizedString("Export", nil)
-        self.printSnapBtn.toolTip = KMLocalizedString("Print", nil)
+        self.deleteSnapBtn.toolTip = KMLocalizedString("Delete")
+        self.exportSnapBtn.toolTip = KMLocalizedString("Export")
+        self.printSnapBtn.toolTip = KMLocalizedString("Print")
         
-        self.emptySearchResultLabel.stringValue = KMLocalizedString("No Results", nil)
+        self.emptySearchResultLabel.stringValue = KMLocalizedString("No Results")
         self.emptySearchResultLabel.textColor = KMAppearance.Layout.h0Color()
         
         self.emptySnapView.wantsLayer = true

+ 45 - 45
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Action.swift

@@ -26,28 +26,28 @@ extension KMLeftSideViewController {
             let model = self.snapshots[selectedRow]
             let controller = model.windowC
             let menu = NSMenu()
-            let itemExport = menu.addItem(title: KMLocalizedString("Export", "Menu item title"), action: nil, target: self)
+            let itemExport = menu.addItem(title: KMLocalizedString("Export"), action: nil, target: self)
             let subMenu = NSMenu()
 
-            var t = subMenu.addItem(title: KMLocalizedString("PNG", "Menu item title"), action: #selector(menuItemClick_ExportPNG), target: self)
+            var t = subMenu.addItem(title: KMLocalizedString("PNG"), action: #selector(menuItemClick_ExportPNG), target: self)
             t?.representedObject = controller
 
-            t = subMenu.addItem(title: KMLocalizedString("JPG", "Menu item title"), action: #selector(menuItemClick_ExportJPG), target: self)
+            t = subMenu.addItem(title: KMLocalizedString("JPG"), action: #selector(menuItemClick_ExportJPG), target: self)
             t?.representedObject = controller
 
-            t = subMenu.addItem(title: KMLocalizedString("PDF", "Menu item title"), action: #selector(menuItemClick_ExportPDF), target: self)
+            t = subMenu.addItem(title: KMLocalizedString("PDF"), action: #selector(menuItemClick_ExportPDF), target: self)
             t?.representedObject = controller
             itemExport?.submenu = subMenu
 
-            let itemPrint = menu.addItem(title: KMLocalizedString("Print", "Menu item title"), action: #selector(menuItemClick_Print), target: self)
+            let itemPrint = menu.addItem(title: KMLocalizedString("Print"), action: #selector(menuItemClick_Print), target: self)
             itemPrint?.representedObject = controller
             menu.addItem(.separator())
 
-            let itemSelectAll = menu.addItem(title: KMLocalizedString("Select All", "Menu item title"), action: #selector(menuItemClick_SelectAll), target: self)
+            let itemSelectAll = menu.addItem(title: KMLocalizedString("Select All"), action: #selector(menuItemClick_SelectAll), target: self)
             itemSelectAll?.representedObject = controller
             menu.addItem(.separator())
 
-            let itemDeleteAllSnapshot = menu.addItem(title: KMLocalizedString("Delete All Snapshots", "Menu item title"), action: #selector(deleteAllSnapshot), target: self)
+            let itemDeleteAllSnapshot = menu.addItem(title: KMLocalizedString("Delete All Snapshots"), action: #selector(deleteAllSnapshot), target: self)
             itemDeleteAllSnapshot?.representedObject = controller
             if let data = NSApp.currentEvent {
                 NSMenu.popUpContextMenu(menu, with: data, for: button)
@@ -163,63 +163,63 @@ extension KMLeftSideViewController: NSMenuDelegate {
             let pageCount = self.pageCount()
             if (row != -1 && isLocked == false) {
                 if(self.thumbnailTableView.selectedRowIndexes.count == pageCount) {
-                    item = menu.addItem(title: KMLocalizedString("Cut", "Menu item title"), action: nil, target: self)
+                    item = menu.addItem(title: KMLocalizedString("Cut"), action: nil, target: self)
                 } else {
-                    item = menu.addItem(title: KMLocalizedString("Cut", "Menu item title"), action: #selector(cutPage), target: self)
+                    item = menu.addItem(title: KMLocalizedString("Cut"), action: #selector(cutPage), target: self)
                 }
                 item?.representedObject = IndexSet(integer: row)
                 
                 
-                item = menu.addItem(title: KMLocalizedString("Copy", "Menu item title"), action: #selector(copyPage), target: self)
+                item = menu.addItem(title: KMLocalizedString("Copy"), action: #selector(copyPage), target: self)
                 item?.representedObject = IndexSet(integer: row)
                 
                 if (self.copyPages.count > 0) {
-                    item = menu.addItem(title: KMLocalizedString("Paste", "Menu item title"), action: #selector(pastePage), target: self)
+                    item = menu.addItem(title: KMLocalizedString("Paste"), action: #selector(pastePage), target: self)
                 }else{
-                    item = menu.addItem(title: KMLocalizedString("Paste", "Menu item title"), action: nil, target: self)
+                    item = menu.addItem(title: KMLocalizedString("Paste"), action: nil, target: self)
                 }
                 item?.representedObject = IndexSet(integer: row)
 
                 menu.addItem(.separator())
 
                 if(self.thumbnailTableView.selectedRowIndexes.count == pageCount) {
-                    item = menu.addItem(title: KMLocalizedString("Delete", "Menu item title"), action: nil, target: self)
+                    item = menu.addItem(title: KMLocalizedString("Delete"), action: nil, target: self)
                 } else {
-                    item = menu.addItem(title: KMLocalizedString("Delete", "Menu item title"), action: #selector(deletePage), target: self)
+                    item = menu.addItem(title: KMLocalizedString("Delete"), action: #selector(deletePage), target: self)
                 }
                 item?.representedObject = IndexSet(integer: row)
 
                 menu.addItem(.separator())
 
-                item = menu.addItem(title: KMLocalizedString("Rotate", "Menu item title"), action: #selector(rotatePageMenuAction), target: self)
+                item = menu.addItem(title: KMLocalizedString("Rotate"), action: #selector(rotatePageMenuAction), target: self)
                 item?.representedObject = IndexSet(integer: row)
 
-                item = menu.addItem(title: KMLocalizedString("Insert", "Menu item title"), action: nil, target: self)
+                item = menu.addItem(title: KMLocalizedString("Insert"), action: nil, target: self)
                 let subMenu = NSMenu()
-                _ = subMenu.addItem(title: KMLocalizedString("Blank Page", "Menu item title"), action: #selector(quickInsert), target: self)
-                _ = subMenu.addItem(title: KMLocalizedString("Blank Page - Custom...", "Menu item title"), action: #selector(insert), target: self)
-                _ = subMenu.addItem(title: KMLocalizedString("From PDF", "Menu item title"), action: #selector(insertPDF), target: self)
+                _ = subMenu.addItem(title: KMLocalizedString("Blank Page"), action: #selector(quickInsert), target: self)
+                _ = subMenu.addItem(title: KMLocalizedString("Blank Page - Custom..."), action: #selector(insert), target: self)
+                _ = subMenu.addItem(title: KMLocalizedString("From PDF"), action: #selector(insertPDF), target: self)
                 item?.submenu = subMenu
                 item?.representedObject = IndexSet(integer: row)
 
-                item = menu.addItem(title: KMLocalizedString("Extract", "Menu item title"), action: #selector(extractPage), target: self)
+                item = menu.addItem(title: KMLocalizedString("Extract"), action: #selector(extractPage), target: self)
                 item?.representedObject = IndexSet(integer: row)
 
-                item = menu.addItem(title: KMLocalizedString("Page Edit", "Menu item title"), action: #selector(pageEdit), target: self)
+                item = menu.addItem(title: KMLocalizedString("Page Edit"), action: #selector(pageEdit), target: self)
 
                 menu.addItem(.separator())
 
                 var displayStr = ""
                 if (self.isDisplayPageSize) {
-                    displayStr = KMLocalizedString("Hide Page Size", "Menu item title")
+                    displayStr = KMLocalizedString("Hide Page Size")
                 } else {
-                    displayStr = KMLocalizedString("Display Page Size", "Menu item title")
+                    displayStr = KMLocalizedString("Display Page Size")
                 }
                 item = menu.addItem(title: displayStr, action: #selector(displayPageSize), target: self)
                 item?.representedObject = IndexSet(integer: row)
                 
                 if let doct = self.pdfDocument() {
-                    item = menu.addItem(title: KMLocalizedString("Share", "Menu item title"), action: nil, target: self)
+                    item = menu.addItem(title: KMLocalizedString("Share"), action: nil, target: self)
                     
                     var tName = self.fileNameWithSelectedPages(self.thumbnailTableView.selectedRowIndexes)
                     if (tName.count > 50) {
@@ -245,15 +245,15 @@ extension KMLeftSideViewController: NSMenuDelegate {
                 let hideNotes = self.hideNotes()
                 let allowsNotes = self.allowsNotes()
                 if hideNotes  == false && allowsNotes {
-                    item = menu.addItem(withTitle: KMLocalizedString("Add New Circle", "Menu item title"), action: #selector(addAnnotationsForSelections), target: self, tag: CAnnotationType.circle.rawValue)
+                    item = menu.addItem(withTitle: KMLocalizedString("Add New Circle"), action: #selector(addAnnotationsForSelections), target: self, tag: CAnnotationType.circle.rawValue)
                     item?.representedObject = selections
-                    item = menu.addItem(withTitle: KMLocalizedString("Add New Rectangle", "Menu item title"), action: #selector(addAnnotationsForSelections), target: self, tag: CAnnotationType.square.rawValue)
+                    item = menu.addItem(withTitle: KMLocalizedString("Add New Rectangle"), action: #selector(addAnnotationsForSelections), target: self, tag: CAnnotationType.square.rawValue)
                     item?.representedObject = selections
-                    item = menu.addItem(withTitle: KMLocalizedString("Add New Highlight", "Menu item title"), action: #selector(addAnnotationsForSelections), target: self, tag: CAnnotationType.highlight.rawValue)
+                    item = menu.addItem(withTitle: KMLocalizedString("Add New Highlight"), action: #selector(addAnnotationsForSelections), target: self, tag: CAnnotationType.highlight.rawValue)
                     item?.representedObject = selections
-                    item = menu.addItem(withTitle: KMLocalizedString("Add New Underline", "Menu item title"), action: #selector(addAnnotationsForSelections), target: self, tag: CAnnotationType.underline.rawValue)
+                    item = menu.addItem(withTitle: KMLocalizedString("Add New Underline"), action: #selector(addAnnotationsForSelections), target: self, tag: CAnnotationType.underline.rawValue)
                     item?.representedObject = selections
-                    item = menu.addItem(withTitle: KMLocalizedString("Add New Strikethrough", "Menu item title"), action: #selector(addAnnotationsForSelections), target: self, tag: CAnnotationType.strikeOut.rawValue)
+                    item = menu.addItem(withTitle: KMLocalizedString("Add New Strikethrough"), action: #selector(addAnnotationsForSelections), target: self, tag: CAnnotationType.strikeOut.rawValue)
                     item?.representedObject = selections
                 }
             }
@@ -274,21 +274,21 @@ extension KMLeftSideViewController: NSMenuDelegate {
                     }
                 }
 
-                item = menu.addItem(title: KMLocalizedString("Select", "Menu item title"), action: #selector(selectSelections), target: self)
+                item = menu.addItem(title: KMLocalizedString("Select"), action: #selector(selectSelections), target: self)
                 item?.representedObject = selections
                 menu.addItem(.separator())
                 let hideNotes = self.hideNotes()
                 let allowsNotes = self.allowsNotes()
                 if hideNotes == false && allowsNotes {
-                    item = menu.addItem(withTitle: KMLocalizedString("Add New Circle", "Menu item title"), action: #selector(addAnnotationsForSelections), target: self, tag: CAnnotationType.circle.rawValue)
+                    item = menu.addItem(withTitle: KMLocalizedString("Add New Circle"), action: #selector(addAnnotationsForSelections), target: self, tag: CAnnotationType.circle.rawValue)
                     item?.representedObject = selections
-                    item = menu.addItem(withTitle: KMLocalizedString("Add New Rectangle", "Menu item title"), action: #selector(addAnnotationsForSelections), target: self, tag: CAnnotationType.square.rawValue)
+                    item = menu.addItem(withTitle: KMLocalizedString("Add New Rectangle"), action: #selector(addAnnotationsForSelections), target: self, tag: CAnnotationType.square.rawValue)
                     item?.representedObject = selections
-                    item = menu.addItem(withTitle: KMLocalizedString("Add New Highlight", "Menu item title"), action: #selector(addAnnotationsForSelections), target: self, tag: CAnnotationType.highlight.rawValue)
+                    item = menu.addItem(withTitle: KMLocalizedString("Add New Highlight"), action: #selector(addAnnotationsForSelections), target: self, tag: CAnnotationType.highlight.rawValue)
                     item?.representedObject = selections
-                    item = menu.addItem(withTitle: KMLocalizedString("Add New Underline", "Menu item title"), action: #selector(addAnnotationsForSelections), target: self, tag: CAnnotationType.underline.rawValue)
+                    item = menu.addItem(withTitle: KMLocalizedString("Add New Underline"), action: #selector(addAnnotationsForSelections), target: self, tag: CAnnotationType.underline.rawValue)
                     item?.representedObject = selections
-                    item = menu.addItem(withTitle: KMLocalizedString("Add New Strikethrough", "Menu item title"), action: #selector(addAnnotationsForSelections), target: self, tag: CAnnotationType.strikeOut.rawValue)
+                    item = menu.addItem(withTitle: KMLocalizedString("Add New Strikethrough"), action: #selector(addAnnotationsForSelections), target: self, tag: CAnnotationType.strikeOut.rawValue)
                     item?.representedObject = selections
                 }
             }
@@ -299,38 +299,38 @@ extension KMLeftSideViewController: NSMenuDelegate {
                 let controller = model.windowC
 
                 if let data = controller?.window?.isVisible, data {
-                    item = menu.addItem(title: KMLocalizedString("Hide", "Menu item title"), action: #selector(hideSnapshot), target: self)
+                    item = menu.addItem(title: KMLocalizedString("Hide"), action: #selector(hideSnapshot), target: self)
                     item?.representedObject = controller
                 } else {
-                    item = menu.addItem(title: KMLocalizedString("Show", "Menu item title"), action: #selector(showSnapshot), target: self)
+                    item = menu.addItem(title: KMLocalizedString("Show"), action: #selector(showSnapshot), target: self)
                     item?.representedObject = controller
                 }
                 menu.addItem(.separator())
 
-                item = menu.addItem(title: KMLocalizedString("Export", "Menu item title"), action: nil, target: self)
+                item = menu.addItem(title: KMLocalizedString("Export"), action: nil, target: self)
                 let subMenu = NSMenu()
 
-                var t = subMenu.addItem(title: KMLocalizedString("PNG", "Menu item title"), action: #selector(menuItemClick_ExportPNG), target: self)
+                var t = subMenu.addItem(title: KMLocalizedString("PNG"), action: #selector(menuItemClick_ExportPNG), target: self)
                 t?.representedObject = controller
 
-                t = subMenu.addItem(title: KMLocalizedString("JPG", "Menu item title"), action: #selector(menuItemClick_ExportJPG), target: self)
+                t = subMenu.addItem(title: KMLocalizedString("JPG"), action: #selector(menuItemClick_ExportJPG), target: self)
                 t?.representedObject = controller
                 
-                t = subMenu.addItem(title: KMLocalizedString("PDF", "Menu item title"), action: #selector(menuItemClick_ExportPDF), target: self)
+                t = subMenu.addItem(title: KMLocalizedString("PDF"), action: #selector(menuItemClick_ExportPDF), target: self)
                 t?.representedObject = controller
                 item?.submenu = subMenu
 
-                item = menu.addItem(title: KMLocalizedString("Print", "Menu item title"), action: #selector(menuItemClick_Print), target: self)
+                item = menu.addItem(title: KMLocalizedString("Print"), action: #selector(menuItemClick_Print), target: self)
                 item?.representedObject = controller
                 menu.addItem(.separator())
                 
-                item = menu.addItem(title: KMLocalizedString("Copy", "Menu item title"), action: #selector(menuItemClick_Copy), target: self)
+                item = menu.addItem(title: KMLocalizedString("Copy"), action: #selector(menuItemClick_Copy), target: self)
                 item?.representedObject = controller
                 menu.addItem(.separator())
 
-                item = menu.addItem(title: KMLocalizedString("Delete", "Menu item title"), action: #selector(deleteSnapshot), target: self)
+                item = menu.addItem(title: KMLocalizedString("Delete"), action: #selector(deleteSnapshot), target: self)
                 item?.representedObject = controller
-                item = menu.addItem(title: KMLocalizedString("Delete All Snapshots", "Menu item title"), action: #selector(deleteAllSnapshot), target: self)
+                item = menu.addItem(title: KMLocalizedString("Delete All Snapshots"), action: #selector(deleteAllSnapshot), target: self)
                 item?.representedObject = controller
             }
         } else if menu.isEqual(to: self.noteOutlineView.menu) {

+ 34 - 34
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Note.swift

@@ -58,10 +58,10 @@ extension KMLeftSideViewController {
         self.sortTypeBox.downCallback = { [unowned self] downEntered, mouseBox, _ in
             if (downEntered) {
                 let menu = NSMenu()
-                let timeItem = menu.addItem(title: KMLocalizedString("Time", nil), action: #selector(sortTypeAction), target: self)
+                let timeItem = menu.addItem(title: KMLocalizedString("Time"), action: #selector(sortTypeAction), target: self)
                 timeItem?.representedObject = self
                 timeItem?.tag = 0
-                let pageItem = menu.addItem(title: KMLocalizedString("Page", nil), action: #selector(sortTypeAction), target: self)
+                let pageItem = menu.addItem(title: KMLocalizedString("Page"), action: #selector(sortTypeAction), target: self)
                 pageItem?.representedObject = self
                 timeItem?.tag = 1
                 if (self.noteSortType == .time) {
@@ -105,7 +105,7 @@ extension KMLeftSideViewController {
         self.caseInsensitiveNoteSearch = sud.bool(forKey: SKCaseInsensitiveNoteSearchKey)
         self.isAscendSort = KMDataManager.ud_bool(forKey: Self.Key.noteAscendSortKey)
         
-        self.noteTitleLabel.stringValue = KMLocalizedString("Notes", nil);
+        self.noteTitleLabel.stringValue = KMLocalizedString("Notes");
         self.noteTitleLabel.textColor = KMAppearance.Layout.h0Color()
         
         self.noteSearchField.layer?.borderColor = KMAppearance.Interactive.a0Color().cgColor
@@ -114,7 +114,7 @@ extension KMLeftSideViewController {
         self.moreButtonLayer?.layerType = .none
         self.moreButtonLayer?.isHidden = true
         
-        self.noteFilterButton.toolTip = KMLocalizedString("Sort", nil)
+        self.noteFilterButton.toolTip = KMLocalizedString("Sort")
         self.noteFilterButton.wantsLayer = true
         self.filterButtonLayer?.isHidden = true
         self.filterButtonLayer?.wantsLayer = true
@@ -123,16 +123,16 @@ extension KMLeftSideViewController {
         
         if (self.isAscendSort) {
             self.noteSortButton.image = NSImage(named: KMImageNameBtnSidebarRankReverse)
-            self.noteSortButton.toolTip = KMLocalizedString("ascending sort", nil)
+            self.noteSortButton.toolTip = KMLocalizedString("ascending sort")
         } else {
             self.noteSortButton.image = NSImage(named: KMImageNameBtnSidebarRankPositive)
-            self.noteSortButton.toolTip = KMLocalizedString("descending sort", nil)
+            self.noteSortButton.toolTip = KMLocalizedString("descending sort")
         }
         
-        self.noteSearchButton.toolTip = KMLocalizedString("Search", nil)
+        self.noteSearchButton.toolTip = KMLocalizedString("Search")
         
-        self.noteDoneButton.title = KMLocalizedString("Done", nil)
-        self.noteDoneButton.toolTip = KMLocalizedString("Done", nil)
+        self.noteDoneButton.title = KMLocalizedString("Done")
+        self.noteDoneButton.toolTip = KMLocalizedString("Done")
         self.noteDoneButton.setTitleColor(KMAppearance.Layout.w0Color())
         self.noteDoneButton.wantsLayer = true
         self.noteDoneButton.layer?.backgroundColor = KMAppearance.Interactive.a0Color().cgColor
@@ -145,15 +145,15 @@ extension KMLeftSideViewController {
         if (sortType == 1) {
             self.noteSortType = KMNoteSortType(rawValue: sortType) ?? .none
             if (self.noteSortType == .time) {
-                self.sortTypeLabel.stringValue = KMLocalizedString("Time", nil)
-                self.sortTypeBox.toolTip = KMLocalizedString("Time", nil)
+                self.sortTypeLabel.stringValue = KMLocalizedString("Time")
+                self.sortTypeBox.toolTip = KMLocalizedString("Time")
             } else if (self.noteSortType == .page) {
-                self.sortTypeLabel.stringValue = KMLocalizedString("Page", nil)
-                self.sortTypeBox.toolTip = KMLocalizedString("Page", nil)
+                self.sortTypeLabel.stringValue = KMLocalizedString("Page")
+                self.sortTypeBox.toolTip = KMLocalizedString("Page")
             }
         } else {
             self.noteSortType = .time
-            self.sortTypeLabel.stringValue = KMLocalizedString("Time", nil)
+            self.sortTypeLabel.stringValue = KMLocalizedString("Time")
         }
         self.sortTypeLabel.textColor = KMAppearance.Layout.h1Color()
          
@@ -197,10 +197,10 @@ extension KMLeftSideViewController {
             return
         }
         let isFold = model.isFold()
-        item = menu.addItem(title: KMLocalizedString("Expand", nil), action: #selector(unfoldNoteAction), target: self)
+        item = menu.addItem(title: KMLocalizedString("Expand"), action: #selector(unfoldNoteAction), target: self)
         item?.state = isFold ? .off : .on
         item?.representedObject = items
-        item = menu.addItem(title: KMLocalizedString("Collapse", nil), action: #selector(foldNoteAction), target: self)
+        item = menu.addItem(title: KMLocalizedString("Collapse"), action: #selector(foldNoteAction), target: self)
         item?.state = isFold ? .on : .off
         item?.representedObject = items
         
@@ -213,17 +213,17 @@ extension KMLeftSideViewController {
                     let isNote = annotation?.isNote() ?? false
                     if isNote {
                         // [NSLocalizedString(@"Edit", @"Menu item title") stringByAppendingEllipsis]
-                        item = menu.addItem(title: KMLocalizedString("Edit", "Menu item title"), action: #selector(editNoteTextFromTable), target: self)
+                        item = menu.addItem(title: KMLocalizedString("Edit"), action: #selector(editNoteTextFromTable), target: self)
                         item?.representedObject = annotation
                     }
                 } else if let data = self.noteOutlineView.tableColumn(withIdentifier: NSUserInterfaceItemIdentifier("note"))?.isHidden, data  {
                     //                            [NSLocalizedString(@"Edit", @"Menu item title") stringByAppendingEllipsis]
-                    item = menu.addItem(title: KMLocalizedString("Edit", "Menu item title"), action: #selector(editThisAnnotation), target: self)
+                    item = menu.addItem(title: KMLocalizedString("Edit"), action: #selector(editThisAnnotation), target: self)
                     item?.representedObject = annotation
                 } else {
-                    item = menu.addItem(title: KMLocalizedString("Edit", "Menu item title"), action: #selector(editNoteFromTable), target: self)
+                    item = menu.addItem(title: KMLocalizedString("Edit"), action: #selector(editNoteFromTable), target: self)
                     item?.representedObject = annotation
-                    item = menu.addItem(title: KMLocalizedString("Edit", "Menu item title"), action: #selector(editThisAnnotation), target: self)
+                    item = menu.addItem(title: KMLocalizedString("Edit"), action: #selector(editThisAnnotation), target: self)
                     item?.representedObject = annotation
                     item?.keyEquivalentModifierMask = [.option]
                     item?.isAlternate = true
@@ -236,7 +236,7 @@ extension KMLeftSideViewController {
             
             menu.addItem(.separator())
             if self.outlineView(self.noteOutlineView, canDeleteItems: items as? [Any] ?? []) {
-                item = menu.addItem(title: KMLocalizedString("Delete", "Menu item title"), action: #selector(deleteNotes), target: self)
+                item = menu.addItem(title: KMLocalizedString("Delete"), action: #selector(deleteNotes), target: self)
                 item?.representedObject = items
             }
             _ = self._addDeleteAllAnnoItem(menu)
@@ -281,27 +281,27 @@ extension KMLeftSideViewController {
                 self?.moreButtonLayer?.isHidden = true
             }
         }
-        let expandAllItem = menu.addItem(title: KMLocalizedString("Expand All", nil), action: #selector(note_expandAllComments), target: self)
+        let expandAllItem = menu.addItem(title: KMLocalizedString("Expand All"), action: #selector(note_expandAllComments), target: self)
         expandAllItem?.representedObject = self.noteOutlineView
-        let foldAllItem = menu.addItem(title: KMLocalizedString("Collapse All", nil), action: #selector(note_foldAllComments), target: self)
+        let foldAllItem = menu.addItem(title: KMLocalizedString("Collapse All"), action: #selector(note_foldAllComments), target: self)
         foldAllItem?.representedObject = self.noteOutlineView
         let type = self.annoListModel?.foldType ?? .none
         expandAllItem?.state = type == .unfold ? .on : .off
         foldAllItem?.state = type == .fold ? .on : .off
 
-        let showItem = menu.addItem(title: KMLocalizedString("Show Note", nil), action: nil, target: self)
+        let showItem = menu.addItem(title: KMLocalizedString("Show Note"), action: nil, target: self)
         let subMenu = NSMenu()
-        let pageItem = subMenu.addItem(title: KMLocalizedString("Page", nil), action: #selector(noteShowNoteAction), target: self)
+        let pageItem = subMenu.addItem(title: KMLocalizedString("Page"), action: #selector(noteShowNoteAction), target: self)
         pageItem?.state = self.annoListIsShowPage() ? .on : .off
         pageItem?.representedObject = self.noteOutlineView
         pageItem?.tag = 101
         
-        let timeItem = subMenu.addItem(title: KMLocalizedString("Time", nil) , action: #selector(noteShowNoteAction), target: self)
+        let timeItem = subMenu.addItem(title: KMLocalizedString("Time") , action: #selector(noteShowNoteAction), target: self)
         timeItem?.state = self.annoListIsShowTime() ? .on : .off
         timeItem?.representedObject = self.noteOutlineView
         timeItem?.tag = 102
         
-        let authorItem = subMenu.addItem(title: KMLocalizedString("Author", nil) , action: #selector(noteShowNoteAction), target: self)
+        let authorItem = subMenu.addItem(title: KMLocalizedString("Author") , action: #selector(noteShowNoteAction), target: self)
         authorItem?.state = self.annoListIsShowAnther() ? .on : .off
         authorItem?.representedObject = self.noteOutlineView
         authorItem?.tag = 103
@@ -452,7 +452,7 @@ extension KMLeftSideViewController {
             return
         }
         Task {
-            let response = await KMAlertTool.runModel(message: KMLocalizedString("This will permanently remove all annotations. Are you sure to continue?", nil), buttons: [KMLocalizedString("Yes", nil), KMLocalizedString("No", nil)])
+            let response = await KMAlertTool.runModel(message: KMLocalizedString("This will permanently remove all annotations. Are you sure to continue?"), buttons: [KMLocalizedString("Yes"), KMLocalizedString("No")])
             if response == .alertFirstButtonReturn {
 //                var annos: [CPDFAnnotation] = []
 //                for i in 0 ..< doc.pageCount {
@@ -535,11 +535,11 @@ extension KMLeftSideViewController {
         if (self.isAscendSort) {
             self.isAscendSort = false
             self.noteSortButton.image = NSImage(named: KMImageNameBtnSidebarRankPositive)
-            self.noteSortButton.toolTip = KMLocalizedString("descending sort", nil)
+            self.noteSortButton.toolTip = KMLocalizedString("descending sort")
         } else {
             self.isAscendSort = true
             self.noteSortButton.image = NSImage(named: KMImageNameBtnSidebarRankReverse)
-            self.noteSortButton.toolTip = KMLocalizedString("ascending sort", nil)
+            self.noteSortButton.toolTip = KMLocalizedString("ascending sort")
         }
         KMDataManager.ud_set(self.isAscendSort, forKey: Self.Key.noteAscendSortKey)
         if self.noteSearchMode {
@@ -632,12 +632,12 @@ extension KMLeftSideViewController {
         }
         if (tag == 0) {
             self.noteSortType = .page
-            self.sortTypeLabel.stringValue = KMLocalizedString("Page", nil)
-            self.sortTypeBox.toolTip = KMLocalizedString("Page", nil)
+            self.sortTypeLabel.stringValue = KMLocalizedString("Page")
+            self.sortTypeBox.toolTip = KMLocalizedString("Page")
         } else if (tag == 1) {
             self.noteSortType = .time
-            self.sortTypeLabel.stringValue = KMLocalizedString("Time", nil)
-            self.sortTypeBox.toolTip = KMLocalizedString("Time", nil)
+            self.sortTypeLabel.stringValue = KMLocalizedString("Time")
+            self.sortTypeBox.toolTip = KMLocalizedString("Time")
         }
         KMDataManager.ud_set(self.noteSortType.rawValue, forKey: Self.Key.noteSortTypeKey)
         

+ 19 - 19
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Outline.swift

@@ -34,7 +34,7 @@ extension KMLeftSideViewController {
         self.outlineDoneButton.action = #selector(leftSideViewDoneButtonAction)
         
         let menuOutline = NSMenu()
-        _ = menuOutline.addItem(title: KMLocalizedString("Ignore Case", "Menu item title"), action: #selector(toggleOutlineCaseInsensitiveSearch), target: self)
+        _ = menuOutline.addItem(title: KMLocalizedString("Ignore Case"), action: #selector(toggleOutlineCaseInsensitiveSearch), target: self)
         (self.outlineSearchField.cell as? NSSearchFieldCell)?.searchMenuTemplate = menuOutline
         self.outlineSearchField.target = self
         
@@ -54,14 +54,14 @@ extension KMLeftSideViewController {
         self.outlineView.wantsLayer = true
         self.outlineView.layer?.backgroundColor = KMAppearance.Layout.l0Color().cgColor
         
-        self.outlineLabel.stringValue = KMLocalizedString("Outline", nil);
+        self.outlineLabel.stringValue = KMLocalizedString("Outline");
         self.outlineLabel.textColor = KMAppearance.Layout.h0Color()
-        self.outlineAddButton.toolTip = KMLocalizedString("Add Item", nil)
+        self.outlineAddButton.toolTip = KMLocalizedString("Add Item")
         
-        self.outlineSearchButton.toolTip = KMLocalizedString("Search", nil)
+        self.outlineSearchButton.toolTip = KMLocalizedString("Search")
         
-        self.outlineDoneButton.title = KMLocalizedString("Done", nil);
-        self.outlineDoneButton.toolTip = KMLocalizedString("Done", nil);
+        self.outlineDoneButton.title = KMLocalizedString("Done");
+        self.outlineDoneButton.toolTip = KMLocalizedString("Done");
         self.outlineDoneButton.setTitleColor(KMAppearance.Layout.w0Color())
         self.outlineDoneButton.wantsLayer = true
         self.outlineDoneButton.layer?.backgroundColor = KMAppearance.Interactive.a0Color().cgColor
@@ -76,7 +76,7 @@ extension KMLeftSideViewController {
         self.outlineDoneButton.isHidden = true
         self.outlineSearchField.isHidden = true
         
-        (self.outlineSearchField.cell as? NSSearchFieldCell)?.placeholderString = KMLocalizedString("Search Outline", nil)
+        (self.outlineSearchField.cell as? NSSearchFieldCell)?.placeholderString = KMLocalizedString("Search Outline")
         
         self.tocOutlineView.backgroundColor = KMAppearance.Layout.l0Color()
         self.tocOutlineView.autoresizesOutlineColumn = false
@@ -199,7 +199,7 @@ extension KMLeftSideViewController {
             }
 
             let ol = CPDFOutline()
-            ol.label = String(format: "%@ %ld", KMLocalizedString("Page", nil), self.currentPageIndex()+1)
+            ol.label = String(format: "%@ %ld", KMLocalizedString("Page"), self.currentPageIndex()+1)
             ol.destination = self.currentDestination()
             self.addoutline(parent: rootOL, addOutline: ol, index: Int(rootOL?.numberOfChildren ?? 0), needExpand: false)
             return
@@ -208,7 +208,7 @@ extension KMLeftSideViewController {
         if let row = ris.last {
             let item = self.tocOutlineView.item(atRow: row) as? CPDFOutline
             let ol = CPDFOutline()
-            ol.label = String(format: "%@ %ld", KMLocalizedString("Page", nil), self.currentPageIndex()+1)
+            ol.label = String(format: "%@ %ld", KMLocalizedString("Page"), self.currentPageIndex()+1)
             ol.destination = self.currentDestination()
             let idx = Int(item?.index ?? 0) + 1
             self.addoutline(parent: item?.parent, addOutline: ol, index: idx, needExpand: false)
@@ -250,9 +250,9 @@ extension KMLeftSideViewController {
         let alert = NSAlert()
         alert.alertStyle = .critical
         alert.messageText = ""
-        alert.informativeText = KMLocalizedString("This will permanently remove all outlines. Are you sure to continue?", nil)
-        alert.addButton(withTitle: KMLocalizedString("Yes", nil))
-        alert.addButton(withTitle: KMLocalizedString("No", nil))
+        alert.informativeText = KMLocalizedString("This will permanently remove all outlines. Are you sure to continue?")
+        alert.addButton(withTitle: KMLocalizedString("Yes"))
+        alert.addButton(withTitle: KMLocalizedString("No"))
         let response = alert.runModal()
         if response == .alertFirstButtonReturn {
             if let item = self.outlineRoot() {
@@ -466,7 +466,7 @@ extension KMLeftSideViewController {
         if addOutline.label != nil {
             parentOutline?.insertChild(addOutline, at: UInt(index))
         } else {
-            let outline = parentOutline?.km_insertChild(label: String(format: "%@ %ld", KMLocalizedString("Page", nil), self.currentPageIndex()+1), dest: self.currentDestination(), at: index)
+            let outline = parentOutline?.km_insertChild(label: String(format: "%@ %ld", KMLocalizedString("Page"), self.currentPageIndex()+1), dest: self.currentDestination(), at: index)
             tempO = outline
         }
         
@@ -543,10 +543,10 @@ extension KMLeftSideViewController {
     
     func outlineMoreMenu(_ view: NSButton) {
         let menu = NSMenu()
-        let expandAllItem = menu.addItem(title: KMLocalizedString("Expand All", nil), action: #selector(toc_expandAllComments), target: self)
+        let expandAllItem = menu.addItem(title: KMLocalizedString("Expand All"), action: #selector(toc_expandAllComments), target: self)
         expandAllItem?.representedObject = self.tocOutlineView
 
-        let foldAllItem = menu.addItem(title: KMLocalizedString("Collapse All", nil), action: #selector(toc_foldAllComments), target: self)
+        let foldAllItem = menu.addItem(title: KMLocalizedString("Collapse All"), action: #selector(toc_foldAllComments), target: self)
         foldAllItem?.representedObject = self.tocOutlineView
         let rootOL = self.outlineRoot()
         let childNum = rootOL?.numberOfChildren ?? 0
@@ -571,7 +571,7 @@ extension KMLeftSideViewController {
         expandAllItem?.state = self.tocType == .unfold ? .on : .off
         foldAllItem?.state = self.tocType == .fold ? .on : .off
 
-        let removeEntryItem = menu.addItem(title: KMLocalizedString("Remove All Outlines", nil), action: #selector(leftSideEmptyAnnotationClick_DeleteOutline), target: self)
+        let removeEntryItem = menu.addItem(title: KMLocalizedString("Remove All Outlines"), action: #selector(leftSideEmptyAnnotationClick_DeleteOutline), target: self)
         removeEntryItem?.representedObject = self.tocOutlineView
         if let data = NSApp.currentEvent {
             NSMenu.popUpContextMenu(menu, with: data, for: view)
@@ -662,7 +662,7 @@ extension KMLeftSideViewController {
         }
         let item = self.tocOutlineView.item(atRow: row) as? CPDFOutline
         let ol = CPDFOutline()
-        ol.label = String(format: "%@ %ld", KMLocalizedString("Page", nil), "\(self.currentPageIndex() + 1)")
+        ol.label = String(format: "%@ %ld", KMLocalizedString("Page"), "\(self.currentPageIndex() + 1)")
         ol.destination = self.currentDestination()
         self.addoutline(parent: item, addOutline: ol, index: Int(item?.numberOfChildren ?? 0), needExpand: true)
     }
@@ -677,7 +677,7 @@ extension KMLeftSideViewController {
         let parentOL = item?.parent
         if parentOL?.parent != nil {
             let ol = CPDFOutline()
-            ol.label = String(format: "%@ %ld", KMLocalizedString("Page", nil), "\(self.currentPageIndex() + 1)")
+            ol.label = String(format: "%@ %ld", KMLocalizedString("Page"), "\(self.currentPageIndex() + 1)")
             ol.destination = self.currentDestination()
             self.addoutline(parent: parentOL?.parent, addOutline: ol, index: Int(parentOL?.index ?? 0) + 1, needExpand: false)
         }
@@ -701,7 +701,7 @@ extension KMLeftSideViewController {
             return
         }
         Task {
-            let res = await KMAlertTool.runModel(style: .informational, message: KMLocalizedString("Are you sure you want to set the destination as the current location?", nil), buttons: [KMLocalizedString("Yes", nil), KMLocalizedString("No", nil)])
+            let res = await KMAlertTool.runModel(style: .informational, message: KMLocalizedString("Are you sure you want to set the destination as the current location?"), buttons: [KMLocalizedString("Yes"), KMLocalizedString("No")])
             if (res == .alertFirstButtonReturn) {
                 self.changePDFOutlineDestination(self.currentDestination(), PDFoutline: ol)
                 let idx = self.tocOutlineView.row(forItem: ol)

+ 4 - 4
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Search.swift

@@ -21,13 +21,13 @@ extension KMLeftSideViewController {
     
     func documentDidBeginFind() {
 //        [leftSideController applySearchTableHeader:[NSLocalizedString(@"Searching", @"Message in search table header") stringByAppendingEllipsis]];
-        self.applySearchTableHeader(KMLocalizedString("Searching", "Message in search table header"))
+        self.applySearchTableHeader(KMLocalizedString("Searching"))
         self.searchResults = []
         self.groupSearchResults = []
     }
     
     func documentDidEndFind() {
-        self.applySearchTableHeader(KMLocalizedString("\(self.searchResults.count) Results", "Message in search table header"))
+        self.applySearchTableHeader(KMLocalizedString("\(self.searchResults.count) Results"))
     }
     
     func updateFindResultHighlightsForDirection(_ direction: NSWindow.SelectionDirection) {
@@ -135,8 +135,8 @@ extension KMLeftSideViewController {
         self.findTableView.backgroundColor = KMAppearance.Layout.l0Color()
         self.groupedFindTableView.backgroundColor = KMAppearance.Layout.l0Color()
         
-        self.findTableView.tableColumn(withIdentifier: kPageColumnId)?.headerCell.title = KMLocalizedString("Page", "Table header title")
-        self.groupedFindTableView.tableColumn(withIdentifier: kPageColumnId)?.headerCell.title = KMLocalizedString("Page", "Table header title")
+        self.findTableView.tableColumn(withIdentifier: kPageColumnId)?.headerCell.title = KMLocalizedString("Page")
+        self.groupedFindTableView.tableColumn(withIdentifier: kPageColumnId)?.headerCell.title = KMLocalizedString("Page")
         (self.groupedFindTableView.tableColumn(withIdentifier: _kRelevanceColumnId)?.dataCell as? NSCell)?.isEnabled = false
     }
     

+ 8 - 8
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Snapshot.swift

@@ -163,9 +163,9 @@ extension KMLeftSideViewController {
         self.snapshotNormalView.wantsLayer = true
         self.snapshotNormalView.layer?.backgroundColor = KMAppearance.Layout.l0Color().cgColor
         
-        self.snapshotLabel.stringValue = KMLocalizedString("Snapshots", nil)
+        self.snapshotLabel.stringValue = KMLocalizedString("Snapshots")
         self.snapshotLabel.textColor = KMAppearance.Layout.h0Color()
-        self.snapshotNormalSearchButton.toolTip = KMLocalizedString("Search", nil)
+        self.snapshotNormalSearchButton.toolTip = KMLocalizedString("Search")
         
         self.snapshotSearchField.backgroundColor = KMAppearance.Layout.l_1Color()
         self.snapshotSearchField.wantsLayer = true
@@ -173,11 +173,11 @@ extension KMLeftSideViewController {
         self.snapshotSearchField.layer?.borderWidth = 1.0
         self.snapshotSearchField.layer?.borderColor = KMAppearance.Interactive.a0Color().cgColor
         
-        self.snapshotDoneButton.toolTip = KMLocalizedString("Done", nil)
+        self.snapshotDoneButton.toolTip = KMLocalizedString("Done")
         self.snapshotDoneButton.wantsLayer = true
         self.snapshotDoneButton.layer?.backgroundColor = KMAppearance.Interactive.a0Color().cgColor
         self.snapshotDoneButton.layer?.cornerRadius = 4.0
-        self.snapshotDoneButton.title = KMLocalizedString("Done", nil)
+        self.snapshotDoneButton.title = KMLocalizedString("Done")
         self.snapshotDoneButton.setTitleColor(KMAppearance.Layout.w0Color())
         self.snapshotDoneButton.isHidden = true
         
@@ -185,10 +185,10 @@ extension KMLeftSideViewController {
         self.snapshotSearchZoomOutButton.isHidden = true
         self.snapshotSearchZoomInButton.isHidden = true
         
-        self.snapshotNormalZoomInButton.toolTip = KMLocalizedString("Zoom In", nil)
-        self.snapshotSearchZoomInButton.toolTip = KMLocalizedString("Zoom In", nil)
-        self.snapshotNormalZoomOutButton.toolTip = KMLocalizedString("Zoom Out", nil)
-        self.snapshotSearchZoomOutButton.toolTip = KMLocalizedString("Zoom Out", nil)
+        self.snapshotNormalZoomInButton.toolTip = KMLocalizedString("Zoom In")
+        self.snapshotSearchZoomInButton.toolTip = KMLocalizedString("Zoom In")
+        self.snapshotNormalZoomOutButton.toolTip = KMLocalizedString("Zoom Out")
+        self.snapshotSearchZoomOutButton.toolTip = KMLocalizedString("Zoom Out")
         
         self.snapshotTableView.backgroundColor = KMAppearance.Layout.l0Color()
 //        self.snapshotTableView.backgroundColor = .clear

+ 5 - 5
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Thumbnail.swift

@@ -140,11 +140,11 @@ extension KMLeftSideViewController {
         self.thumbnailView.wantsLayer = true
         self.thumbnailView.layer?.backgroundColor = KMAppearance.Layout.l0Color().cgColor
         
-        self.thumbnailTitleLabel.stringValue = KMLocalizedString("Thumbnails", nil)
+        self.thumbnailTitleLabel.stringValue = KMLocalizedString("Thumbnails")
         self.thumbnailTitleLabel.textColor = KMAppearance.Layout.h0Color()
         
-        self.thumbnailZoomInButton.toolTip = KMLocalizedString("Zoom In", nil)
-        self.thumbnailZoomOutButton.toolTip = KMLocalizedString("Zoom Out", nil)
+        self.thumbnailZoomInButton.toolTip = KMLocalizedString("Zoom In")
+        self.thumbnailZoomOutButton.toolTip = KMLocalizedString("Zoom Out")
         
         self.thumbnailTableView.backgroundColor = KMAppearance.Layout.l0Color()
         self.thumbnailTableView.allowsMultipleSelection = true
@@ -381,7 +381,7 @@ extension KMLeftSideViewController {
         }
         if document.allowsCopying == false || document.allowsPrinting == false {
             Task {
-                _ = await KMAlertTool.runModel(message: KMLocalizedString("This is a secured document. Editing is not permitted.", nil))
+                _ = await KMAlertTool.runModel(message: KMLocalizedString("This is a secured document. Editing is not permitted."))
             }
             return
         }
@@ -444,7 +444,7 @@ extension KMLeftSideViewController {
                 
         if document.allowsCopying == false || document.allowsPrinting == false {
             Task {
-                _ = await KMAlertTool.runModel(message: KMLocalizedString("This is a secured document. Editing is not permitted.", nil))
+                _ = await KMAlertTool.runModel(message: KMLocalizedString("This is a secured document. Editing is not permitted."))
             }
             return
         }

+ 20 - 20
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift

@@ -286,8 +286,8 @@ class KMLeftSideViewController: KMSideViewController {
         self.searchViewController.segmentedControl.setSegmentCount(2, with: 25)
         self.searchViewController.segmentedControl.setImage(NSImage(named: KMImageNameUXIconBtnSidebarListNor)!, for: 0)
         self.searchViewController.segmentedControl.setImage(NSImage(named: KMImageNameUXIconBtnSidebarPageNor)!, for: 1)
-        self.searchViewController.segmentedControl.setToolTip(KMLocalizedString("Separate search results", nil), for: 0)
-        self.searchViewController.segmentedControl.setToolTip(KMLocalizedString("Group search results by page", nil), for: 1)
+        self.searchViewController.segmentedControl.setToolTip(KMLocalizedString("Separate search results"), for: 0)
+        self.searchViewController.segmentedControl.setToolTip(KMLocalizedString("Group search results by page"), for: 1)
         self.searchViewController.segmentedControl.isBackgroundHighlighted = true
         self.searchViewController.segmentedControl.selectedSegment = 0
         self.searchViewController.segmentedControl.block = { [weak self] segIndex in
@@ -373,10 +373,10 @@ class KMLeftSideViewController: KMSideViewController {
         }
         
         let menu = NSMenu()
-        _ = menu.addItem(title: KMLocalizedString("Whole Words Only", "Menu item title"), action: #selector(toggleWholeWordSearch), target: self)
-        _ = menu.addItem(title: KMLocalizedString("Ignore Case", "Menu item title"), action: #selector(toggleCaseInsensitiveSearch), target: self)
+        _ = menu.addItem(title: KMLocalizedString("Whole Words Only"), action: #selector(toggleWholeWordSearch), target: self)
+        _ = menu.addItem(title: KMLocalizedString("Ignore Case"), action: #selector(toggleCaseInsensitiveSearch), target: self)
         (self.searchField.cell as? NSSearchFieldCell)?.searchMenuTemplate = menu
-        (self.searchField.cell as? NSSearchFieldCell)?.placeholderString = KMLocalizedString("Search PDF", "placeholder")
+        (self.searchField.cell as? NSSearchFieldCell)?.placeholderString = KMLocalizedString("Search PDF")
         
         self.searchField.action = #selector(search)
         self.searchField.target = self
@@ -418,7 +418,7 @@ class KMLeftSideViewController: KMSideViewController {
         self.leftListView.wantsLayer = true
         self.leftListView.layer?.backgroundColor = KMAppearance.Layout.l0Color().cgColor
         
-        self.emptySearchLabel.stringValue = KMLocalizedString("No Results",nil)
+        self.emptySearchLabel.stringValue = KMLocalizedString("No Results")
         self.emptySearchLabel.textColor = KMAppearance.Layout.h0Color()
         self.emptySearchBox.isHidden = true
         
@@ -502,7 +502,7 @@ class KMLeftSideViewController: KMSideViewController {
         if (self.searchResults.count > 0) {
             self.searchViewController.emptyBox.isHidden = true
             self.searchViewController.searchResultsView.isHidden = false
-            self.searchViewController.searchResultsLabel.stringValue = String(format: KMLocalizedString("%ld Results", "Message in search table header"), self.searchResults.count)
+            self.searchViewController.searchResultsLabel.stringValue = String(format: KMLocalizedString("%ld Results"), self.searchResults.count)
         } else {
             self.searchViewController.emptyBox.isHidden = false
             self.searchViewController.searchResultsView.isHidden = true
@@ -599,10 +599,10 @@ class KMLeftSideViewController: KMSideViewController {
         self.searchField = self.searchViewController.searchField
         
         let menu = NSMenu()
-        _ = menu.addItem(title: KMLocalizedString("Whole Words Only", "Menu item title"), action: #selector(toggleWholeWordSearch), target: self)
-        _ = menu.addItem(title: KMLocalizedString("Ignore Case", "Menu item title"), action: #selector(toggleCaseInsensitiveSearch), target: self)
+        _ = menu.addItem(title: KMLocalizedString("Whole Words Only"), action: #selector(toggleWholeWordSearch), target: self)
+        _ = menu.addItem(title: KMLocalizedString("Ignore Case"), action: #selector(toggleCaseInsensitiveSearch), target: self)
         (self.searchViewController.searchField.cell as? NSSearchFieldCell)?.searchMenuTemplate = menu
-        (self.searchViewController.searchField.cell as? NSSearchFieldCell)?.placeholderString = KMLocalizedString("Search PDF", "placeholder")
+        (self.searchViewController.searchField.cell as? NSSearchFieldCell)?.placeholderString = KMLocalizedString("Search PDF")
         self.searchViewController.searchField.action = #selector(search)
         self.searchViewController.searchField.target = self
 
@@ -666,9 +666,9 @@ class KMLeftSideViewController: KMSideViewController {
         self.searchField = self.noteSearchField
         
         let menu = NSMenu()
-        _ = menu.addItem(title: KMLocalizedString("Ignore Case", "Menu item title"), action: #selector(toggleCaseInsensitiveNoteSearch), target: self)
+        _ = menu.addItem(title: KMLocalizedString("Ignore Case"), action: #selector(toggleCaseInsensitiveNoteSearch), target: self)
         (self.noteSearchField.cell as? NSSearchFieldCell)?.searchMenuTemplate = menu
-        (self.noteSearchField.cell as? NSSearchFieldCell)?.placeholderString = KMLocalizedString("Search Notes", "placeholder")
+        (self.noteSearchField.cell as? NSSearchFieldCell)?.placeholderString = KMLocalizedString("Search Notes")
         self.noteSearchField.action = #selector(searchNotes)
         self.noteSearchField.target = self
     }
@@ -677,9 +677,9 @@ class KMLeftSideViewController: KMSideViewController {
         self.searchField = self.snapshotSearchField;
         
         let menu = NSMenu()
-        _ = menu.addItem(title: KMLocalizedString("Ignore Case", "Menu item title"), action: #selector(toggleCaseInsensitiveNoteSearch), target: self)
+        _ = menu.addItem(title: KMLocalizedString("Ignore Case"), action: #selector(toggleCaseInsensitiveNoteSearch), target: self)
         (self.snapshotSearchField.cell as? NSSearchFieldCell)?.searchMenuTemplate = menu
-        (self.snapshotSearchField.cell as? NSSearchFieldCell)?.placeholderString = KMLocalizedString("Search Snapshots", "placeholder")
+        (self.snapshotSearchField.cell as? NSSearchFieldCell)?.placeholderString = KMLocalizedString("Search Snapshots")
         self.snapshotSearchField.action = #selector(searchNotes)
         self.snapshotSearchField.target = self
         self.snapshotSearchField.delegate = self
@@ -1071,9 +1071,9 @@ extension KMLeftSideViewController: NSTableViewDelegate, NSTableViewDataSource {
                 let w =  KMPageSizeTool.conversion(withUnit: "mm", value: (NSWidth(rect)/595 * 210))
                 let h =  KMPageSizeTool.conversion(withUnit: "mm", value: (NSHeight(rect)/842 * 297))
                 if let data = page?.rotation, data == 90 || data == 270 {
-                    cell.sizeLabel.stringValue = String(format: "%.f × %.f %@", h.stringToCGFloat(), w.stringToCGFloat(), KMLocalizedString("mm", nil))
+                    cell.sizeLabel.stringValue = String(format: "%.f × %.f %@", h.stringToCGFloat(), w.stringToCGFloat(), KMLocalizedString("mm"))
                 } else {
-                    cell.sizeLabel.stringValue = String(format: "%.f × %.f %@", w.stringToCGFloat(), h.stringToCGFloat(), KMLocalizedString("mm", nil))
+                    cell.sizeLabel.stringValue = String(format: "%.f × %.f %@", w.stringToCGFloat(), h.stringToCGFloat(), KMLocalizedString("mm"))
                 }
             } else {
                 cell.sizeLabel.stringValue = "0 mm"
@@ -1590,7 +1590,7 @@ extension KMLeftSideViewController: NSTableViewDelegate, NSTableViewDataSource {
                 let match = self.searchResults[idx].selection
                 string.append("* ")
 //                [string appendFormat:NSLocalizedString(@"Page %@", @""), [match firstPageLabel]];
-                string = string.appendingFormat(KMLocalizedString("Page %@", ""), "\(match.safeFirstPage()?.pageIndex() ?? 0)")
+                string = string.appendingFormat(KMLocalizedString("Page %@"), "\(match.safeFirstPage()?.pageIndex() ?? 0)")
 //                [string appendFormat:@"", [[match contextString] string]];
                 string = string.appendingFormat(": %@\n", match.string() ?? "")
             }
@@ -1603,9 +1603,9 @@ extension KMLeftSideViewController: NSTableViewDelegate, NSTableViewDataSource {
                 let result = self.groupSearchResults[idx]
                 let matches = result.datas
                 string.append("* ")
-                string = string.appendingFormat(KMLocalizedString("Page %@", ""), "\(result.selectionPageIndex)")
+                string = string.appendingFormat(KMLocalizedString("Page %@"), "\(result.selectionPageIndex)")
                 string.append(": ")
-                string = string.appendingFormat(KMLocalizedString("%ld Results", ""), matches.count)
+                string = string.appendingFormat(KMLocalizedString("%ld Results"), matches.count)
 //                [string appendFormat:@":\n\t%@\n", [[matches valueForKeyPath:@"contextString.string"] componentsJoinedByString:@"\n\t"]];
                 var tmpString = ""
                 for model in matches {
@@ -2367,7 +2367,7 @@ extension KMLeftSideViewController: KMCustomOutlineViewDelegate, KMCustomOutline
                 self.listView?.remove(anno)
             }
             self.dataUpdating = false
-            self.listView?.undoManager?.setActionName(KMLocalizedString("Remove Note", "Undo action name"))
+            self.listView?.undoManager?.setActionName(KMLocalizedString("Remove Note"))
             
             self.note_refrshUIIfNeed()
         } else if anOutlineView.isEqual(to: self.tocOutlineView) {

+ 6 - 6
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Search/KMBotaSearchViewController.swift

@@ -38,20 +38,20 @@ class KMBotaSearchViewController: NSViewController {
     override func loadView() {
         super.loadView()
         
-        self.emptySearchLabel.stringValue = KMLocalizedString("No Results",nil)
+        self.emptySearchLabel.stringValue = KMLocalizedString("No Results")
         self.emptySearchLabel.textColor = KMAppearance.Layout.h1Color()
         self.emptyBox.fillColor = KMAppearance.Layout.l0Color()
-        self.searchLabel.stringValue = KMLocalizedString("Search", nil)
+        self.searchLabel.stringValue = KMLocalizedString("Search")
         self.searchLabel.textColor = KMAppearance.Layout.h0Color()
-        self.searchTips.stringValue = KMLocalizedString("Search", nil)
+        self.searchTips.stringValue = KMLocalizedString("Search")
         self.searchTips.textColor = KMAppearance.Layout.h2Color()
         self.searchResultsLabel.textColor = KMAppearance.Layout.h1Color()
-        self.pageLabel.stringValue = KMLocalizedString("Page", nil)
+        self.pageLabel.stringValue = KMLocalizedString("Page")
         self.pageLabel.textColor = KMAppearance.Layout.h1Color()
         self.searchResultsView.isHidden = true
         
-        self.searchDomeButton.title = KMLocalizedString("Done", nil)
-        self.searchDomeButton.toolTip = KMLocalizedString("Done", nil)
+        self.searchDomeButton.title = KMLocalizedString("Done")
+        self.searchDomeButton.toolTip = KMLocalizedString("Done")
         self.searchDomeButton.setTitleColor(KMAppearance.Layout.w0Color())
         self.searchDomeButton.wantsLayer = true
         self.searchDomeButton.layer?.backgroundColor = KMAppearance.Interactive.a0Color().cgColor

+ 5 - 5
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/View/KMBotaLeftView.swift

@@ -48,11 +48,11 @@ class KMBotaLeftView: NSView {
         self.segmentedControl.setImage(NSImage(named: KMImageNameUXIconSidetabbarAnnotationNor)!, for: 2)
         self.segmentedControl.setImage(NSImage(named: KMImageNameUXIconSidetabbarSnapshotNor)!, for: 3)
         self.segmentedControl.setImage(NSImage(named: KMImageNameUXIconSidetabbarSearchNor)!, for: 4)
-        self.segmentedControl.setToolTip(KMLocalizedString("View Thumbnails", nil), for: 0)
-        self.segmentedControl.setToolTip(KMLocalizedString("View Outline", nil), for: 1)
-        self.segmentedControl.setToolTip(KMLocalizedString("View Notes", nil), for: 2)
-        self.segmentedControl.setToolTip(KMLocalizedString("View Snapshots", nil), for: 3)
-        self.segmentedControl.setToolTip(KMLocalizedString("Search", nil), for: 4)
+        self.segmentedControl.setToolTip(KMLocalizedString("View Thumbnails"), for: 0)
+        self.segmentedControl.setToolTip(KMLocalizedString("View Outline"), for: 1)
+        self.segmentedControl.setToolTip(KMLocalizedString("View Notes"), for: 2)
+        self.segmentedControl.setToolTip(KMLocalizedString("View Snapshots"), for: 3)
+        self.segmentedControl.setToolTip(KMLocalizedString("Search"), for: 4)
         self.segmentedControl.selectedSegment = UInt8.max
         self.segmentedControl.wantsLayer = true
         self.segmentedControl.layer?.backgroundColor = KMAppearance.Layout.l_1Color().cgColor

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMAnnotationLinkViewController.swift

@@ -17,6 +17,6 @@ class KMAnnotationLinkViewController: NSViewController {
         super.viewDidLoad()
         // Do view setup here.
         
-        linkActionLabel.stringValue = KMLocalizedString("Select an area or text on a page for a link to be inserted.", nil)
+        linkActionLabel.stringValue = KMLocalizedString("Select an area or text on a page for a link to be inserted.")
     }
 }

+ 14 - 14
PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMToolbarCustomViewController.swift

@@ -53,21 +53,21 @@ class KMToolbarCustomViewController: NSViewController {
     override func loadView() {
         super.loadView()
         
-        self.titleLabel.stringValue = KMLocalizedString("Customize Toolbar", nil)
-        self.subTitleLabel.stringValue = String(format: "%@", KMLocalizedString("Drag-and-drop tools to change their order", nil))
-        self.leftLabel.stringValue = KMLocalizedString("Choose tools to add:", nil)
-        self.rightLabel.stringValue = KMLocalizedString("Tools to show in Toolbar:", nil)
+        self.titleLabel.stringValue = KMLocalizedString("Customize Toolbar")
+        self.subTitleLabel.stringValue = String(format: "%@", KMLocalizedString("Drag-and-drop tools to change their order"))
+        self.leftLabel.stringValue = KMLocalizedString("Choose tools to add:")
+        self.rightLabel.stringValue = KMLocalizedString("Tools to show in Toolbar:")
 
-        self.okButton.title = KMLocalizedString("Done", nil)
-        self.cancelButton.title = KMLocalizedString("Cancel", nil)
-        self.resetButton.title = KMLocalizedString("Reset", nil)
-        self.resetButton.toolTip = KMLocalizedString("Reset Toolbars", nil)
+        self.okButton.title = KMLocalizedString("Done")
+        self.cancelButton.title = KMLocalizedString("Cancel")
+        self.resetButton.title = KMLocalizedString("Reset")
+        self.resetButton.toolTip = KMLocalizedString("Reset Toolbars")
         
-        self.addButton.title = String(format: "%@  >>", KMLocalizedString("Add", nil))
-        self.addButton.toolTip = KMLocalizedString("Add to Toolbar", nil)
+        self.addButton.title = String(format: "%@  >>", KMLocalizedString("Add"))
+        self.addButton.toolTip = KMLocalizedString("Add to Toolbar")
         
-        self.removeButton.title = String(format: "<<  %@", KMLocalizedString("Remove", nil))
-        self.removeButton.toolTip = KMLocalizedString("Remove from Toolbar", nil)
+        self.removeButton.title = String(format: "<<  %@", KMLocalizedString("Remove"))
+        self.removeButton.toolTip = KMLocalizedString("Remove from Toolbar")
         
         var color = NSColor(red: 51.0/255.0, green: 51.0/255.0, blue: 51.0/255.0, alpha: 1.0)
         if (KMAppearance.isDarkMode()) {
@@ -201,12 +201,12 @@ extension KMToolbarCustomViewController: NSTableViewDelegate, NSTableViewDataSou
             itemIdentifier = self._defaultItems[row]
         }
         if itemIdentifier == KMToolbarSpaceItemIdentifier || itemIdentifier == KMNewToolbarSpaceItemIdentifier {
-            cellView?.textField?.stringValue = KMLocalizedString("", nil)
+            cellView?.textField?.stringValue = KMLocalizedString("")
             cellView?.imageView?.image = NSImage(named: KMImageNameToolbarSpace)
         } else {
             if let data = self.toolbar?.delegate?.toolbar?(self.toolbar!, itemFor: itemIdentifier!) {
                 if itemIdentifier == KMToolbarFormAlignmentIdentifier {
-                    cellView?.textField?.stringValue = KMLocalizedString("Alignment", nil)
+                    cellView?.textField?.stringValue = KMLocalizedString("Alignment")
                 } else {
                     cellView?.textField?.stringValue = data.titleName ?? ""
                 }

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMToolbarViewController.swift

@@ -1214,7 +1214,7 @@ extension KMToolbarViewController {
             item?.titleName = NSLocalizedString("Tools", comment: "")
             item?.image = NSImage(named: "KMImageNameUXIconToolbarMytoolsNor")
             item?.target = self
-            item?.toolTip = String(format: "%@: %@, %@, %@, %@",  KMLocalizedString("Tool Mode", nil),KMLocalizedString("Annotate", nil),KMLocalizedString("Scroll", nil),KMLocalizedString("Magnify", nil),KMLocalizedString("Select", nil))
+            item?.toolTip = String(format: "%@: %@, %@, %@, %@",  KMLocalizedString("Tool Mode"),KMLocalizedString("Annotate"),KMLocalizedString("Scroll"),KMLocalizedString("Magnify"),KMLocalizedString("Select"))
             item?.btnTag = KMToolbarViewType.Annatiton.rawValue
             item?.btnAction = #selector(leftControllButtonAction)
             item?.boxImagePosition = .imageAbove

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/Toolbar/Model/KMToolbarConfigModel.swift

@@ -323,7 +323,7 @@ extension KMToolbarConfigModel {
         } else if identifier == KMDocumentAnnotationToolbarItemIdentifier {
             item?.titleName = NSLocalizedString("Tools", comment: "")
             item?.image = NSImage(named: "KMImageNameUXIconToolbarMytoolsNor")
-//            item?.toolTip = String(format: "%@: %@, %@, %@, %@",  KMLocalizedString("Tool Mode", nil),KMLocalizedString("Annotate", nil),KMLocalizedString("Scroll", nil),KMLocalizedString("Magnify", nil),KMLocalizedString("Select", nil))
+//            item?.toolTip = String(format: "%@: %@, %@, %@, %@",  KMLocalizedString("Tool Mode"),KMLocalizedString("Annotate"),KMLocalizedString("Scroll"),KMLocalizedString("Magnify"),KMLocalizedString("Select"))
             item?.boxImagePosition = .imageAbove
             item?.selectBackgroundType = .imageBox
         } else if identifier == KMDocumentPageToolbarItemIdentifier {

+ 2 - 2
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift

@@ -1948,7 +1948,7 @@ extension KMMainViewController {
             size.width = fmax(size.width, NSWidth(rect))
             size.height = fmax(size.height, NSHeight(rect))
         }
-       beginProgressSheet(with: KMLocalizedString("Cropping Pages", "Message for progress sheet"), maxValue: min(18, self.listView.document.pageCount))
+       beginProgressSheet(with: KMLocalizedString("Cropping Pages"), maxValue: min(18, self.listView.document.pageCount))
        var rectArray: Array<NSRect> = []
         for i in 0 ..< self.listView.document.pageCount {
             progressC?.increment(by: Double(i))
@@ -1998,7 +1998,7 @@ extension KMMainViewController {
              size.width = fmax(size.width, NSWidth(rect))
              size.height = fmax(size.height, NSHeight(rect))
          }
-        beginProgressSheet(with: KMLocalizedString("Cropping Pages", "Message for progress sheet"), maxValue: min(18, self.listView.document.pageCount))
+        beginProgressSheet(with: KMLocalizedString("Cropping Pages"), maxValue: min(18, self.listView.document.pageCount))
         var rectArray: Array<NSRect> = []
          for i in 0 ..< self.listView.document.pageCount {
              progressC?.increment(by: Double(i))

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift

@@ -858,7 +858,7 @@ extension KMMainViewController {
     }
     
     @objc func addOutLineItemAction() {
-        let labelString = "\(KMLocalizedString("Page", nil)) \((self.listView?.currentPageIndex ?? 0) + 1)"
+        let labelString = "\(KMLocalizedString("Page")) \((self.listView?.currentPageIndex ?? 0) + 1)"
         let label = self.listView?.currentSelection?.string() ?? labelString
         let dest =  self.listView?.currentDestination
         if let row = self.leftSideViewController.selectedRowIndexes().last {

+ 2 - 2
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift

@@ -651,7 +651,7 @@ import Cocoa
         
         if self.listView.document.allowsPrinting == false || self.listView.document.allowsCopying == false {
             Task {
-                _ = await KMAlertTool.runModel(message: KMLocalizedString("This is a secured document. Editing is not permitted.", nil))
+                _ = await KMAlertTool.runModel(message: KMLocalizedString("This is a secured document. Editing is not permitted."))
             }
             return
         }
@@ -723,7 +723,7 @@ import Cocoa
         let controller = self._getPDFRedactController()
         if let data = controller {
             if data.redactPdfView.newAddAnnotation.count > 0 {
-                KMAlertTool.runModel(message: "", informative: KMLocalizedString("There are unapplied redactions in this file. Exit will not save redaction.", nil), buttons: [KMLocalizedString("Exit", nil), KMLocalizedString("Cancel", nil)]) { response in
+                KMAlertTool.runModel(message: "", informative: KMLocalizedString("There are unapplied redactions in this file. Exit will not save redaction."), buttons: [KMLocalizedString("Exit"), KMLocalizedString("Cancel")]) { response in
                     if response == .alertFirstButtonReturn {
                         data.redactPdfView.newAddAnnotation.removeAll()
                         self.exitRedact()

+ 1 - 1
PDF Office/PDF Master/Class/Preference/Controller/KMDisplayPreferences.swift

@@ -133,7 +133,7 @@ import Cocoa
             super.title = newValue
         }
         get {
-            KMLocalizedString("Display", "Preference pane label")
+            KMLocalizedString("Display")
         }
     }
     

+ 27 - 27
PDF Office/PDF Master/Class/Preference/Controller/KMGeneralPreferences.swift

@@ -77,38 +77,38 @@ class KMGeneralPreferences: NSViewController {
     override func viewDidLoad() {
         super.viewDidLoad()
         
-        self.authorLabel.stringValue = KMLocalizedString("Author:", nil)
+        self.authorLabel.stringValue = KMLocalizedString("Author:")
         self.authorTextField.delegate = self
         
-        self.openTabLabel.stringValue = String(format: "%@:", KMLocalizedString("Open a document in", nil))
+        self.openTabLabel.stringValue = String(format: "%@:", KMLocalizedString("Open a document in"))
         for item in self.openTabButton.itemArray {
-            item.title = KMLocalizedString(item.title, nil)
+            item.title = KMLocalizedString(item.title)
         }
-        self.showConvertMenuButton.title = KMLocalizedString("Show PDF Reader Pro in menu bar", nil)
-        self.defaultOpenButton.title = KMLocalizedString("Set PDF Reader Pro as the default PDF viewer", nil)
-        self.reopenLastOpenFilesButton.title = KMLocalizedString("Reopen last open files at startup", nil)
-        self.autoSaveInfoBtn.title = KMLocalizedString("Autosave Documents", nil)
+        self.showConvertMenuButton.title = KMLocalizedString("Show PDF Reader Pro in menu bar")
+        self.defaultOpenButton.title = KMLocalizedString("Set PDF Reader Pro as the default PDF viewer")
+        self.reopenLastOpenFilesButton.title = KMLocalizedString("Reopen last open files at startup")
+        self.autoSaveInfoBtn.title = KMLocalizedString("Autosave Documents")
         
-        openFilesLabelField.stringValue = KMLocalizedString("Open files:", nil)
-        openFileForDefaultButton.title = KMLocalizedString("Default", nil)
-        openFileForMaximButton.title = KMLocalizedString("Maximized", nil)
-        openFileForFitButton.title = KMLocalizedString("Fit", nil)
-        showLeftSideButton.title = KMLocalizedString("Tick to show left sidebar when open", nil)
+        openFilesLabelField.stringValue = KMLocalizedString("Open files:")
+        openFileForDefaultButton.title = KMLocalizedString("Default")
+        openFileForMaximButton.title = KMLocalizedString("Maximized")
+        openFileForFitButton.title = KMLocalizedString("Fit")
+        showLeftSideButton.title = KMLocalizedString("Tick to show left sidebar when open")
         self.editPDFPopWindowIsShowButton.title = NSLocalizedString("Show quick entrance while editing content", comment: "")
         self.editPDFPopWindowIsShowButton.target = self
         self.editPDFPopWindowIsShowButton.action = #selector(editPDFPopWindowShowAction)
-        rememberSnapshotButton.title = KMLocalizedString("Remember snapshots", nil)
-        revertInitPDFSetLabel.stringValue = KMLocalizedString("Revert initial PDF view settings for:", nil)
-        normalButton.title = KMLocalizedString("Normal", nil)
-        fullScreenButton.title = KMLocalizedString("Full Screen", nil)
-        autoSaveLabel.stringValue = KMLocalizedString("To set the initial PDF view settings, choose \"Use Current View Settings as Default\" from the PDF menu.", nil)
-        autoSaveNotesBackupButton.title = KMLocalizedString("Automatically save PDF Reader Pro Edition notes backups", nil)
-        keepSnapshotOnTopButton.title = KMLocalizedString("Keep snapshot windows on top", nil)
-        updateIntervalLabelField.stringValue = KMLocalizedString("Check for PDF Reader Pro Edition updates:", nil)
-        savePwdKeychainLabel.stringValue = KMLocalizedString("Save passwords in Keychain:", nil)
-        savePwdForAlwaysButton.title = KMLocalizedString("Always", nil)
-        savePwdForNeverButton.title = KMLocalizedString("Never", nil)
-        savePwdForAskButton.title = KMLocalizedString("Ask", nil)
+        rememberSnapshotButton.title = KMLocalizedString("Remember snapshots")
+        revertInitPDFSetLabel.stringValue = KMLocalizedString("Revert initial PDF view settings for:")
+        normalButton.title = KMLocalizedString("Normal")
+        fullScreenButton.title = KMLocalizedString("Full Screen")
+        autoSaveLabel.stringValue = KMLocalizedString("To set the initial PDF view settings, choose \"Use Current View Settings as Default\" from the PDF menu.")
+        autoSaveNotesBackupButton.title = KMLocalizedString("Automatically save PDF Reader Pro Edition notes backups")
+        keepSnapshotOnTopButton.title = KMLocalizedString("Keep snapshot windows on top")
+        updateIntervalLabelField.stringValue = KMLocalizedString("Check for PDF Reader Pro Edition updates:")
+        savePwdKeychainLabel.stringValue = KMLocalizedString("Save passwords in Keychain:")
+        savePwdForAlwaysButton.title = KMLocalizedString("Always")
+        savePwdForNeverButton.title = KMLocalizedString("Never")
+        savePwdForAskButton.title = KMLocalizedString("Ask")
         
         self.authorLabel.sizeToFit()
         var frame = self.authorTextField.frame
@@ -156,7 +156,7 @@ class KMGeneralPreferences: NSViewController {
         } else {
             self.autoSaveSlider.floatValue = 0
         }
-        self.autoSaveLbl.stringValue = String(format: "%.0f %@", AutoSaveManager.manager.timeInterval, KMLocalizedString("minute(s)", nil))
+        self.autoSaveLbl.stringValue = String(format: "%.0f %@", AutoSaveManager.manager.timeInterval, KMLocalizedString("minute(s)"))
         
         self._selectOpenFileType(KMPreference.shared.openFileType)
         self.showLeftSideButton.state = KMPreference.shared.showLeftSideBar ? .on : .off
@@ -263,7 +263,7 @@ class KMGeneralPreferences: NSViewController {
         let value = 1 + 19 * self.autoSaveSlider.floatValue
         
         AutoSaveManager.manager.timeInterval = CGFloat(value)
-        self.autoSaveLbl.stringValue = String(format: "%.0f %@", AutoSaveManager.manager.timeInterval, KMLocalizedString("minute(s)", nil))
+        self.autoSaveLbl.stringValue = String(format: "%.0f %@", AutoSaveManager.manager.timeInterval, KMLocalizedString("minute(s)"))
         
         Self.cancelPreviousPerformRequests(withTarget: self, selector: #selector(autoSaveSliderFinish), object: nil)
         self.perform(#selector(autoSaveSliderFinish), with: nil, afterDelay: 1)
@@ -303,7 +303,7 @@ class KMGeneralPreferences: NSViewController {
             super.title = newValue
         }
         get {
-            return KMLocalizedString("General", "Preference pane label")
+            return KMLocalizedString("General")
         }
     }
     

+ 1 - 1
PDF Office/PDF Master/Class/Preference/Controller/KMNotesPreferences.swift

@@ -70,7 +70,7 @@ class KMNotesPreferences: NSViewController {
             super.title = newValue
         }
         get {
-            return KMLocalizedString("Annotate", "Preference pane label")
+            return KMLocalizedString("Annotate")
         }
     }
     

+ 1 - 1
PDF Office/PDF Master/Class/Preference/Controller/KMSyncPreferences.swift

@@ -85,7 +85,7 @@ class KMSyncPreferences: NSViewController {
             super.title = newValue
         }
         get {
-            return KMLocalizedString("Sync", "Preference pane label")
+            return KMLocalizedString("Sync")
         }
     }
 

+ 10 - 10
PDF Office/PDF Master/Class/Preference/Window/KMPreferenceController.swift

@@ -80,8 +80,8 @@ private let NIBNAME_KEY = "nibName"
             self.window?.toolbarStyle = .expanded
         }
         
-        resetBtn.title = KMLocalizedString("Reset", nil)
-        resetAllBtn.title = KMLocalizedString("Reset All", nil)
+        resetBtn.title = KMLocalizedString("Reset")
+        resetAllBtn.title = KMLocalizedString("Reset All")
         let window = self.window
         let toolbar = NSToolbar(identifier: SKPreferencesToolbarIdentifier)
         toolbar.allowsUserCustomization = false
@@ -217,19 +217,19 @@ private let NIBNAME_KEY = "nibName"
         
         let label = (self.currentPane as? NSViewController)?.title ?? ""
         let alert = NSAlert()
-        alert.messageText = String(format: KMLocalizedString("Reset %@ preferences to their original values?", "Message in alert dialog when pressing Reset All button"), label)
-        alert.informativeText = String(format: KMLocalizedString("Choosing Reset will restore all settings in this pane to the state they were in when PDF Reader Pro Edition was first installed.", "Informative text in alert dialog when pressing Reset All button"), label)
-        alert.addButton(withTitle: KMLocalizedString("Reset", "Button title"))
-        alert.addButton(withTitle: KMLocalizedString("Cancel", "Button title"))
+        alert.messageText = String(format: KMLocalizedString("Reset %@ preferences to their original values?"), label)
+        alert.informativeText = String(format: KMLocalizedString("Choosing Reset will restore all settings in this pane to the state they were in when PDF Reader Pro Edition was first installed."), label)
+        alert.addButton(withTitle: KMLocalizedString("Reset"))
+        alert.addButton(withTitle: KMLocalizedString("Cancel"))
         alert.beginSheetModal(for: self.window!, modalDelegate: self, didEnd: #selector(_resetCurrentSheetDidEnd), contextInfo: nil)
     }
     
     @IBAction func resetAll(_ sender: AnyObject?) {
         let alert = NSAlert()
-        alert.messageText = KMLocalizedString("Reset all preferences to their original values?", "Message in alert dialog when pressing Reset All button")
-        alert.informativeText = KMLocalizedString("Choosing Reset will restore all settings to the state they were in when PDF Reader Pro Edition was first installed.", "Informative text in alert dialog when pressing Reset All button")
-        alert.addButton(withTitle: KMLocalizedString("Reset", "Button title"))
-        alert.addButton(withTitle: KMLocalizedString("Cancel", "Button title"))
+        alert.messageText = KMLocalizedString("Reset all preferences to their original values?")
+        alert.informativeText = KMLocalizedString("Choosing Reset will restore all settings to the state they were in when PDF Reader Pro Edition was first installed.")
+        alert.addButton(withTitle: KMLocalizedString("Reset"))
+        alert.addButton(withTitle: KMLocalizedString("Cancel"))
         
         let response = alert.runModal()
         if (response == .alertFirstButtonReturn) {

+ 19 - 19
PDF Office/PDF Master/Class/Welcome/KMWelcomeWindowController.swift

@@ -172,11 +172,11 @@ class KMWelcomeWindowController: NSWindowController {
             box?.contentView?.addSubview(nextButtonVC.view)
             nextButtonVC.view.frame = box?.contentView?.bounds ?? NSZeroRect
             nextButtonVC.view.autoresizingMask = [.width, .height]
-    //        nextButtonVC.stringValue = NSLocalizedString(@"Next", nil);
+    //        nextButtonVC.stringValue = NSLocalizedString(@"Next");
             if (KMLightMemberManager.manager.isLogin()) { // let’s start
-                nextButtonVC.stringValue = KMLocalizedString("Let's Start", nil)
+                nextButtonVC.stringValue = KMLocalizedString("Let's Start")
             } else {
-                nextButtonVC.stringValue = KMLocalizedString("Sign up", nil)
+                nextButtonVC.stringValue = KMLocalizedString("Sign up")
             }
             nextButtonVC.target = self
     //        nextButtonVC.action = @selector(nextButtonAction:);
@@ -202,7 +202,7 @@ class KMWelcomeWindowController: NSWindowController {
         self.remindMeLaterBox.contentView?.addSubview(self._remindMeLaterButtonVC!.view)
         self._remindMeLaterButtonVC?.view.frame = self.remindMeLaterBox.contentView!.bounds
         self._remindMeLaterButtonVC?.view.autoresizingMask = [.width, .height]
-        self._remindMeLaterButtonVC?.stringValue = KMLocalizedString("Remind Me Later", nil)
+        self._remindMeLaterButtonVC?.stringValue = KMLocalizedString("Remind Me Later")
         self._remindMeLaterButtonVC?.target = self
         self._remindMeLaterButtonVC?.action = #selector(_remindMeLaterButtonAction)
         self._remindMeLaterButtonVC?.button(type: .Text, size: .m)
@@ -213,9 +213,9 @@ class KMWelcomeWindowController: NSWindowController {
         self._signUpButtonVC?.view.frame = self.signUpBox.contentView!.bounds
         self._signUpButtonVC?.view.autoresizingMask = [.width, .height]
         if (KMLightMemberManager.manager.isLogin()) { // let’s start
-            self._signUpButtonVC?.stringValue = KMLocalizedString("Let's Start", nil)
+            self._signUpButtonVC?.stringValue = KMLocalizedString("Let's Start")
         } else {
-            self._signUpButtonVC?.stringValue = KMLocalizedString("Sign up", nil)
+            self._signUpButtonVC?.stringValue = KMLocalizedString("Sign up")
         }
         
         self._signUpButtonVC?.target = self;
@@ -254,7 +254,7 @@ class KMWelcomeWindowController: NSWindowController {
         }
         
         for view in self.contentViews {
-            let label = NSTextField(labelWithString: KMLocalizedString("Sign up to Unlock Premium Features", nil))
+            let label = NSTextField(labelWithString: KMLocalizedString("Sign up to Unlock Premium Features"))
             view.addSubview(label)
             label.frame = NSMakeRect(0, 14, NSWidth(view.frame), 18)
             label.alignment = .center
@@ -302,23 +302,23 @@ class KMWelcomeWindowController: NSWindowController {
         self.imageView6.image = NSImage(named: "KMImageNameWelcomeConvert")
         
         
-        self.title1Label.stringValue = KMLocalizedString("The Brand New PDF Reader Pro", nil)
-        self.subtitle1Label.stringValue = KMLocalizedString("PDF Reader Pro Invites You to Enjoy All Advanced Features! Use the new powerful software integrated with AI technology to edit your PDFs", nil)
+        self.title1Label.stringValue = KMLocalizedString("The Brand New PDF Reader Pro")
+        self.subtitle1Label.stringValue = KMLocalizedString("PDF Reader Pro Invites You to Enjoy All Advanced Features! Use the new powerful software integrated with AI technology to edit your PDFs")
         
-        self.title2Label.stringValue = KMLocalizedString("Process PDF Document wit AI Robot", nil)
-        self.subtitle2Label.stringValue = KMLocalizedString("Smart PDF AI robot, powered by Chatgpt helps you translate, rewrite, and correct PDFs with ease, bringing you an enhanced PDF experience.", nil)
+        self.title2Label.stringValue = KMLocalizedString("Process PDF Document wit AI Robot")
+        self.subtitle2Label.stringValue = KMLocalizedString("Smart PDF AI robot, powered by Chatgpt helps you translate, rewrite, and correct PDFs with ease, bringing you an enhanced PDF experience.")
         
-        self.title3Label.stringValue = KMLocalizedString("Comment PDFs with Rich Annotation Tools", nil)
-        self.subtitle3Label.stringValue = KMLocalizedString("Add highlights, freehand, text, stamps, links, shapes, and notes to your documents. Easily mark up your PDFs anytime!", nil)
+        self.title3Label.stringValue = KMLocalizedString("Comment PDFs with Rich Annotation Tools")
+        self.subtitle3Label.stringValue = KMLocalizedString("Add highlights, freehand, text, stamps, links, shapes, and notes to your documents. Easily mark up your PDFs anytime!")
         
-        self.title4Label.stringValue = KMLocalizedString("Edit Original Text and Images Like Word", nil)
-        self.subtitle4Label.stringValue = KMLocalizedString("Fix a typo or add a new text box in a PDF effortlessly. Crop, replace, rotate, flip, and export images as desired.", nil)
+        self.title4Label.stringValue = KMLocalizedString("Edit Original Text and Images Like Word")
+        self.subtitle4Label.stringValue = KMLocalizedString("Fix a typo or add a new text box in a PDF effortlessly. Crop, replace, rotate, flip, and export images as desired.")
         
-        self.title6Label.stringValue = KMLocalizedString("Organize PDF Pages with Ease", nil)
-        self.subtitle6Label.stringValue = KMLocalizedString("Drag and drop page thumbnails to rearrange pages. Or easily delete, insert, rotate, split pages.", nil)
+        self.title6Label.stringValue = KMLocalizedString("Organize PDF Pages with Ease")
+        self.subtitle6Label.stringValue = KMLocalizedString("Drag and drop page thumbnails to rearrange pages. Or easily delete, insert, rotate, split pages.")
         
-        self.title5Label.stringValue = KMLocalizedString("Convert PDF to Office Fast and Easily", nil)
-        self.subtitle5Label.stringValue = KMLocalizedString("Convert PDF to editable Word, Excel, PPT, Text and image with all your fonts and formatting preserved.", nil)
+        self.title5Label.stringValue = KMLocalizedString("Convert PDF to Office Fast and Easily")
+        self.subtitle5Label.stringValue = KMLocalizedString("Convert PDF to editable Word, Excel, PPT, Text and image with all your fonts and formatting preserved.")
     }
     
     @objc private func _previousButtonAction() {

+ 48 - 0
PDF Office/PDF Master/KMClass/KMHomeViewController/KMCreatePDFWindowController/KMCreatePDFWindowController.swift

@@ -0,0 +1,48 @@
+//
+//  KMCreatePDFWindowController.swift
+//  PDF Reader Pro
+//
+//  Created by Niehaoyu on 2024/10/9.
+//
+
+import Cocoa
+import KMComponentLibrary
+
+class KMCreatePDFWindowController: NSWindowController {
+
+    @IBOutlet var titleLabel: NSTextField!
+    
+    @IBOutlet var urlRadio: ComponentRadio!
+    @IBOutlet var fileRadio: ComponentRadio!
+    @IBOutlet var inputView: ComponentInput!
+    
+    @IBOutlet var pageConfigLabel: NSTextField!
+    @IBOutlet var pageSizeLabel: NSTextField!
+    @IBOutlet var pageSizeSelect: ComponentSelect!
+    @IBOutlet var spacingLabel: NSTextField!
+    @IBOutlet var spacingInputNumber: ComponentInputNumber!
+    @IBOutlet var mmLabel: NSTextField!
+    
+    @IBOutlet var cancelButton: ComponentButton!
+    @IBOutlet var openButton: ComponentButton!
+    
+    
+    override func windowDidLoad() {
+        super.windowDidLoad()
+
+        // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
+        
+        self.setUpProperty()
+        
+    }
+    
+    func setUpProperty() {
+        
+        
+        cancelButton.properties = ComponentButtonProperty(type: .default_tertiary,
+                                                          size: .s,
+                                                          state: .normal,
+                                                          buttonText: "")
+    }
+    
+}

+ 241 - 0
PDF Office/PDF Master/KMClass/KMHomeViewController/KMCreatePDFWindowController/KMCreatePDFWindowController.xib

@@ -0,0 +1,241 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="KMCreatePDFWindowController" customModule="PDF_Reader_Pro" customModuleProvider="target">
+            <connections>
+                <outlet property="cancelButton" destination="IrH-ze-acR" id="ubH-hh-lDb"/>
+                <outlet property="fileRadio" destination="n3d-fJ-bff" id="vao-hg-ttb"/>
+                <outlet property="inputView" destination="GjE-yq-b12" id="Mns-No-lhr"/>
+                <outlet property="mmLabel" destination="G5B-GM-rTI" id="Z0z-RG-MEW"/>
+                <outlet property="openButton" destination="2kB-tV-KqN" id="hxm-9E-STs"/>
+                <outlet property="pageConfigLabel" destination="RF7-tv-Jrz" id="fq5-ZB-kWr"/>
+                <outlet property="pageSizeLabel" destination="xeU-19-U4j" id="IeP-Qh-Jg5"/>
+                <outlet property="pageSizeSelect" destination="IA0-ze-73t" id="ukT-2r-Ali"/>
+                <outlet property="spacingInputNumber" destination="VzK-DN-qyR" id="ACF-qA-o7L"/>
+                <outlet property="spacingLabel" destination="dgM-nz-nYy" id="3wv-xl-Wn8"/>
+                <outlet property="titleLabel" destination="QI6-z0-9LA" id="nTK-kQ-1Qz"/>
+                <outlet property="urlRadio" destination="zMB-oT-6ND" id="TnX-nq-oaD"/>
+                <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5">
+            <windowStyleMask key="styleMask" closable="YES" miniaturizable="YES" resizable="YES" fullSizeContentView="YES"/>
+            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
+            <rect key="contentRect" x="196" y="240" width="480" height="320"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
+            <view key="contentView" id="se5-gp-TjO">
+                <rect key="frame" x="0.0" y="0.0" width="480" height="320"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="LXW-8l-TgD">
+                        <rect key="frame" x="0.0" y="0.0" width="480" height="320"/>
+                        <view key="contentView" id="1S5-lc-U0M">
+                            <rect key="frame" x="0.0" y="0.0" width="480" height="320"/>
+                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                            <subviews>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="WaW-eX-JhH">
+                                    <rect key="frame" x="0.0" y="276" width="480" height="44"/>
+                                    <subviews>
+                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="QI6-z0-9LA">
+                                            <rect key="frame" x="22" y="14" width="130" height="16"/>
+                                            <textFieldCell key="cell" lineBreakMode="clipping" title="New From Web Page" id="Q9r-qs-Y9x">
+                                                <font key="font" usesAppearanceFont="YES"/>
+                                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                            </textFieldCell>
+                                        </textField>
+                                    </subviews>
+                                    <constraints>
+                                        <constraint firstItem="QI6-z0-9LA" firstAttribute="leading" secondItem="WaW-eX-JhH" secondAttribute="leading" constant="24" id="C5R-A9-xey"/>
+                                        <constraint firstAttribute="height" constant="44" id="qd4-CP-3qW"/>
+                                        <constraint firstItem="QI6-z0-9LA" firstAttribute="centerY" secondItem="WaW-eX-JhH" secondAttribute="centerY" id="tpf-j4-61J"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="evd-y3-Z2b">
+                                    <rect key="frame" x="24" y="196" width="432" height="72"/>
+                                    <subviews>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="zMB-oT-6ND" customClass="ComponentRadio" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="0.0" y="40" width="50" height="32"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="32" id="bkc-qe-LuM"/>
+                                                <constraint firstAttribute="width" constant="50" id="ys0-Ch-AAO"/>
+                                            </constraints>
+                                        </customView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="n3d-fJ-bff" customClass="ComponentRadio" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="66" y="40" width="50" height="32"/>
+                                            <constraints>
+                                                <constraint firstAttribute="width" constant="50" id="Nmg-nz-cov"/>
+                                                <constraint firstAttribute="height" constant="32" id="yDr-Ai-5MD"/>
+                                            </constraints>
+                                        </customView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="GjE-yq-b12" customClass="ComponentInput" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="0.0" y="0.0" width="432" height="32"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="32" id="TgG-1W-dOo"/>
+                                            </constraints>
+                                        </customView>
+                                    </subviews>
+                                    <constraints>
+                                        <constraint firstItem="n3d-fJ-bff" firstAttribute="top" secondItem="evd-y3-Z2b" secondAttribute="top" id="2or-6q-WIt"/>
+                                        <constraint firstItem="n3d-fJ-bff" firstAttribute="leading" secondItem="zMB-oT-6ND" secondAttribute="trailing" constant="16" id="DAv-hK-J40"/>
+                                        <constraint firstAttribute="trailing" secondItem="GjE-yq-b12" secondAttribute="trailing" id="Glt-Dp-QgW"/>
+                                        <constraint firstItem="zMB-oT-6ND" firstAttribute="leading" secondItem="evd-y3-Z2b" secondAttribute="leading" id="Gqx-LG-bae"/>
+                                        <constraint firstAttribute="height" constant="72" id="HYw-3U-tdu"/>
+                                        <constraint firstItem="GjE-yq-b12" firstAttribute="top" secondItem="zMB-oT-6ND" secondAttribute="bottom" constant="8" id="NTr-EC-fll"/>
+                                        <constraint firstItem="GjE-yq-b12" firstAttribute="leading" secondItem="evd-y3-Z2b" secondAttribute="leading" id="O03-z9-PCq"/>
+                                        <constraint firstItem="zMB-oT-6ND" firstAttribute="top" secondItem="evd-y3-Z2b" secondAttribute="top" id="PYN-Pl-HKE"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="3rV-Nu-2vp">
+                                    <rect key="frame" x="24" y="64" width="432" height="116"/>
+                                    <subviews>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="eEC-Mp-Gnv">
+                                            <rect key="frame" x="0.0" y="76" width="432" height="40"/>
+                                            <subviews>
+                                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="RF7-tv-Jrz">
+                                                    <rect key="frame" x="-2" y="12" width="121" height="16"/>
+                                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Page Configuration" id="5HY-iP-7gs">
+                                                        <font key="font" usesAppearanceFont="YES"/>
+                                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                                    </textFieldCell>
+                                                </textField>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="RF7-tv-Jrz" firstAttribute="centerY" secondItem="eEC-Mp-Gnv" secondAttribute="centerY" id="IKs-Gh-xto"/>
+                                                <constraint firstAttribute="height" constant="40" id="fBf-VA-cxs"/>
+                                                <constraint firstItem="RF7-tv-Jrz" firstAttribute="leading" secondItem="eEC-Mp-Gnv" secondAttribute="leading" id="h3g-Q8-g3a"/>
+                                            </constraints>
+                                        </customView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="QGX-Yf-dfs">
+                                            <rect key="frame" x="0.0" y="44" width="432" height="32"/>
+                                            <subviews>
+                                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xeU-19-U4j">
+                                                    <rect key="frame" x="-2" y="8" width="68" height="16"/>
+                                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Page Size:" id="GQB-uA-kk5">
+                                                        <font key="font" usesAppearanceFont="YES"/>
+                                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                                    </textFieldCell>
+                                                </textField>
+                                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="IA0-ze-73t" customClass="ComponentSelect" customModule="KMComponentLibrary">
+                                                    <rect key="frame" x="64" y="0.0" width="368" height="32"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="32" id="XJG-gR-Qb9"/>
+                                                    </constraints>
+                                                </customView>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="xeU-19-U4j" firstAttribute="centerY" secondItem="QGX-Yf-dfs" secondAttribute="centerY" id="1GJ-Qo-CIK"/>
+                                                <constraint firstAttribute="trailing" secondItem="IA0-ze-73t" secondAttribute="trailing" id="7pf-rD-bfX"/>
+                                                <constraint firstItem="xeU-19-U4j" firstAttribute="leading" secondItem="QGX-Yf-dfs" secondAttribute="leading" id="BIe-98-A39"/>
+                                                <constraint firstItem="IA0-ze-73t" firstAttribute="leading" secondItem="xeU-19-U4j" secondAttribute="trailing" id="Fm3-jh-Mwn"/>
+                                                <constraint firstItem="IA0-ze-73t" firstAttribute="centerY" secondItem="QGX-Yf-dfs" secondAttribute="centerY" id="vIe-hL-M5m"/>
+                                                <constraint firstAttribute="height" constant="32" id="wOD-wx-0lx"/>
+                                            </constraints>
+                                        </customView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="Yh7-64-KZy">
+                                            <rect key="frame" x="0.0" y="4" width="432" height="32"/>
+                                            <subviews>
+                                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="dgM-nz-nYy">
+                                                    <rect key="frame" x="-2" y="8" width="57" height="16"/>
+                                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Spacing:" id="mNQ-DX-g06">
+                                                        <font key="font" usesAppearanceFont="YES"/>
+                                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                                    </textFieldCell>
+                                                </textField>
+                                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="VzK-DN-qyR" customClass="ComponentInputNumber" customModule="KMComponentLibrary">
+                                                    <rect key="frame" x="53" y="0.0" width="96" height="32"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="32" id="dvp-Ed-o3e"/>
+                                                        <constraint firstAttribute="width" constant="96" id="sIv-Jl-ran"/>
+                                                    </constraints>
+                                                </customView>
+                                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="G5B-GM-rTI">
+                                                    <rect key="frame" x="147" y="8" width="27" height="16"/>
+                                                    <textFieldCell key="cell" lineBreakMode="clipping" title="mm" id="CUV-oB-e8A">
+                                                        <font key="font" usesAppearanceFont="YES"/>
+                                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                                    </textFieldCell>
+                                                </textField>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="G5B-GM-rTI" firstAttribute="centerY" secondItem="Yh7-64-KZy" secondAttribute="centerY" id="25R-0r-wBL"/>
+                                                <constraint firstItem="dgM-nz-nYy" firstAttribute="centerY" secondItem="Yh7-64-KZy" secondAttribute="centerY" id="4Ph-Zt-SsY"/>
+                                                <constraint firstItem="VzK-DN-qyR" firstAttribute="leading" secondItem="dgM-nz-nYy" secondAttribute="trailing" id="7z1-yY-sTo"/>
+                                                <constraint firstItem="VzK-DN-qyR" firstAttribute="centerY" secondItem="Yh7-64-KZy" secondAttribute="centerY" id="PK2-jd-gUF"/>
+                                                <constraint firstItem="G5B-GM-rTI" firstAttribute="leading" secondItem="VzK-DN-qyR" secondAttribute="trailing" id="Vg5-6h-Y9J"/>
+                                                <constraint firstAttribute="height" constant="32" id="egR-P1-gdv"/>
+                                                <constraint firstItem="dgM-nz-nYy" firstAttribute="leading" secondItem="Yh7-64-KZy" secondAttribute="leading" id="q9g-66-CrA"/>
+                                            </constraints>
+                                        </customView>
+                                    </subviews>
+                                    <constraints>
+                                        <constraint firstAttribute="trailing" secondItem="QGX-Yf-dfs" secondAttribute="trailing" id="2a3-YD-WAU"/>
+                                        <constraint firstItem="Yh7-64-KZy" firstAttribute="top" secondItem="QGX-Yf-dfs" secondAttribute="bottom" constant="8" id="3hv-Af-qRl"/>
+                                        <constraint firstAttribute="height" constant="116" id="BTE-nU-NYf"/>
+                                        <constraint firstItem="Yh7-64-KZy" firstAttribute="leading" secondItem="3rV-Nu-2vp" secondAttribute="leading" id="Gkq-fk-kJa"/>
+                                        <constraint firstItem="eEC-Mp-Gnv" firstAttribute="top" secondItem="3rV-Nu-2vp" secondAttribute="top" id="Qai-Fs-mgb"/>
+                                        <constraint firstItem="QGX-Yf-dfs" firstAttribute="top" secondItem="eEC-Mp-Gnv" secondAttribute="bottom" id="Wim-Kb-n3G"/>
+                                        <constraint firstItem="eEC-Mp-Gnv" firstAttribute="leading" secondItem="3rV-Nu-2vp" secondAttribute="leading" id="abU-DW-oqH"/>
+                                        <constraint firstAttribute="trailing" secondItem="eEC-Mp-Gnv" secondAttribute="trailing" id="fVI-NE-aU5"/>
+                                        <constraint firstItem="QGX-Yf-dfs" firstAttribute="leading" secondItem="3rV-Nu-2vp" secondAttribute="leading" id="uXb-f5-iU7"/>
+                                        <constraint firstAttribute="trailing" secondItem="Yh7-64-KZy" secondAttribute="trailing" id="yND-8L-i1j"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="2kB-tV-KqN" customClass="ComponentButton" customModule="KMComponentLibrary">
+                                    <rect key="frame" x="366" y="16" width="90" height="32"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="90" id="IWo-Wk-83l"/>
+                                        <constraint firstAttribute="height" constant="32" id="ien-bI-nJI"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="IrH-ze-acR" customClass="ComponentButton" customModule="KMComponentLibrary">
+                                    <rect key="frame" x="268" y="16" width="90" height="32"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="32" id="8pj-jU-XN2"/>
+                                        <constraint firstAttribute="width" constant="90" id="fAA-AI-yAO"/>
+                                    </constraints>
+                                </customView>
+                            </subviews>
+                            <constraints>
+                                <constraint firstItem="evd-y3-Z2b" firstAttribute="leading" secondItem="1S5-lc-U0M" secondAttribute="leading" constant="24" id="00b-Hk-wbW"/>
+                                <constraint firstAttribute="trailing" secondItem="evd-y3-Z2b" secondAttribute="trailing" constant="24" id="320-zQ-0nq"/>
+                                <constraint firstItem="evd-y3-Z2b" firstAttribute="top" secondItem="WaW-eX-JhH" secondAttribute="bottom" constant="8" id="B0j-ZD-9R6"/>
+                                <constraint firstItem="2kB-tV-KqN" firstAttribute="leading" secondItem="IrH-ze-acR" secondAttribute="trailing" constant="8" id="EGe-gN-hUB"/>
+                                <constraint firstAttribute="trailing" secondItem="3rV-Nu-2vp" secondAttribute="trailing" constant="24" id="NC0-Q2-nZL"/>
+                                <constraint firstItem="WaW-eX-JhH" firstAttribute="leading" secondItem="1S5-lc-U0M" secondAttribute="leading" id="Wfr-yV-fq6"/>
+                                <constraint firstItem="3rV-Nu-2vp" firstAttribute="top" secondItem="evd-y3-Z2b" secondAttribute="bottom" constant="16" id="azf-cW-d4y"/>
+                                <constraint firstAttribute="trailing" secondItem="2kB-tV-KqN" secondAttribute="trailing" constant="24" id="jeo-Fh-fh2"/>
+                                <constraint firstItem="2kB-tV-KqN" firstAttribute="centerY" secondItem="IrH-ze-acR" secondAttribute="centerY" id="mpT-bZ-EMb"/>
+                                <constraint firstAttribute="trailing" secondItem="WaW-eX-JhH" secondAttribute="trailing" id="pLB-Fb-P2o"/>
+                                <constraint firstItem="WaW-eX-JhH" firstAttribute="top" secondItem="1S5-lc-U0M" secondAttribute="top" id="rMb-Eu-BBu"/>
+                                <constraint firstItem="2kB-tV-KqN" firstAttribute="top" secondItem="3rV-Nu-2vp" secondAttribute="bottom" constant="16" id="xhK-Qn-Yyr"/>
+                                <constraint firstItem="3rV-Nu-2vp" firstAttribute="leading" secondItem="1S5-lc-U0M" secondAttribute="leading" constant="24" id="ytU-XK-fxK"/>
+                            </constraints>
+                        </view>
+                    </box>
+                </subviews>
+                <constraints>
+                    <constraint firstAttribute="bottom" secondItem="LXW-8l-TgD" secondAttribute="bottom" id="bvn-1Q-IPJ"/>
+                    <constraint firstItem="LXW-8l-TgD" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="fNK-oZ-DAg"/>
+                    <constraint firstAttribute="trailing" secondItem="LXW-8l-TgD" secondAttribute="trailing" id="tAk-fN-IJf"/>
+                    <constraint firstItem="LXW-8l-TgD" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="tMc-vr-Jy8"/>
+                </constraints>
+            </view>
+            <connections>
+                <outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
+            </connections>
+            <point key="canvasLocation" x="77" y="65"/>
+        </window>
+    </objects>
+</document>

+ 17 - 0
PDF Office/PDF Master/KMClass/KMHomeViewController/KMNHomeViewController.swift

@@ -0,0 +1,17 @@
+//
+//  KMNHomeViewController.swift
+//  PDF Reader Pro
+//
+//  Created by Niehaoyu on 2024/10/8.
+//
+
+import Cocoa
+
+class KMNHomeViewController: NSViewController {
+
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        // Do view setup here.
+    }
+    
+}

+ 64 - 0
PDF Office/PDF Master/KMClass/KMHomeViewController/KMNHomeViewController.xib

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="KMNHomeViewController" customModule="PDF_Reader_Pro" customModuleProvider="target">
+            <connections>
+                <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <customView id="Hz6-mo-xeY">
+            <rect key="frame" x="0.0" y="0.0" width="584" height="408"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <subviews>
+                <customView translatesAutoresizingMaskIntoConstraints="NO" id="6Nj-0K-OdC">
+                    <rect key="frame" x="0.0" y="0.0" width="584" height="408"/>
+                    <subviews>
+                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="elb-1V-cgI">
+                            <rect key="frame" x="0.0" y="0.0" width="240" height="408"/>
+                            <subviews>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="Bxr-Ds-C57" customClass="KMHomeOpenView" customModule="PDF_Reader_Pro" customModuleProvider="target">
+                                    <rect key="frame" x="16" y="284" width="208" height="92"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="208" id="90S-rZ-U5v"/>
+                                        <constraint firstAttribute="height" constant="92" id="OcP-RR-aOy"/>
+                                    </constraints>
+                                </customView>
+                            </subviews>
+                            <constraints>
+                                <constraint firstItem="Bxr-Ds-C57" firstAttribute="centerX" secondItem="elb-1V-cgI" secondAttribute="centerX" id="5oo-uK-JgL"/>
+                                <constraint firstAttribute="width" constant="240" id="GIp-bc-gJQ"/>
+                                <constraint firstItem="Bxr-Ds-C57" firstAttribute="top" secondItem="elb-1V-cgI" secondAttribute="top" constant="32" id="GfU-54-afy"/>
+                            </constraints>
+                        </customView>
+                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="MCf-YB-R6z">
+                            <rect key="frame" x="240" y="0.0" width="344" height="408"/>
+                        </customView>
+                    </subviews>
+                    <constraints>
+                        <constraint firstAttribute="bottom" secondItem="elb-1V-cgI" secondAttribute="bottom" id="4A7-Qa-jdD"/>
+                        <constraint firstItem="MCf-YB-R6z" firstAttribute="top" secondItem="6Nj-0K-OdC" secondAttribute="top" id="HcZ-Da-dKr"/>
+                        <constraint firstItem="MCf-YB-R6z" firstAttribute="leading" secondItem="elb-1V-cgI" secondAttribute="trailing" id="M4T-UB-OOG"/>
+                        <constraint firstItem="elb-1V-cgI" firstAttribute="leading" secondItem="6Nj-0K-OdC" secondAttribute="leading" id="NG5-Fk-FwN"/>
+                        <constraint firstAttribute="bottom" secondItem="MCf-YB-R6z" secondAttribute="bottom" id="apL-0Q-S9z"/>
+                        <constraint firstAttribute="trailing" secondItem="MCf-YB-R6z" secondAttribute="trailing" id="d5i-jv-yy3"/>
+                        <constraint firstItem="elb-1V-cgI" firstAttribute="top" secondItem="6Nj-0K-OdC" secondAttribute="top" id="rpo-sR-Xws"/>
+                    </constraints>
+                </customView>
+            </subviews>
+            <constraints>
+                <constraint firstAttribute="bottom" secondItem="6Nj-0K-OdC" secondAttribute="bottom" id="F5B-qZ-yY5"/>
+                <constraint firstItem="6Nj-0K-OdC" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" id="FcS-6N-FAx"/>
+                <constraint firstAttribute="trailing" secondItem="6Nj-0K-OdC" secondAttribute="trailing" id="kBN-Zi-5O3"/>
+                <constraint firstItem="6Nj-0K-OdC" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" id="ydm-B1-D0A"/>
+            </constraints>
+            <point key="canvasLocation" x="228" y="-88"/>
+        </customView>
+    </objects>
+</document>

+ 185 - 0
PDF Office/PDF Master/KMClass/KMHomeViewController/Views/KMHomeOpenView/KMHomeOpenView.swift

@@ -0,0 +1,185 @@
+//
+//  KMHomeOpenView.swift
+//  PDF Reader Pro
+//
+//  Created by Niehaoyu on 2024/10/8.
+//
+
+import Cocoa
+import KMComponentLibrary
+
+
+class KMHomeOpenView: BaseXibView {
+    
+    @IBOutlet weak var contendView: NSView!
+    @IBOutlet weak var openFileButton: ComponentButton!
+    @IBOutlet weak var createFileDropdown: ComponentDropdown!
+    
+    var groupView: ComponentGroup!
+    
+    override func draw(_ dirtyRect: NSRect) {
+        super.draw(dirtyRect)
+        
+        // Drawing code here.
+    }
+    
+    public required init?(coder decoder: NSCoder) {
+        super.init(coder: decoder)
+        
+    }
+    
+    override init(frame frameRect: NSRect) {
+        super.init(frame: frameRect)
+    }
+    
+    public override func awakeFromNib() {
+        super.awakeFromNib()
+        
+        self.setUpButtonProperty()
+    }
+    
+    func setUpButtonProperty() {
+        openFileButton.properties = ComponentButtonProperty(type: .primary,
+                                                            size: .m,
+                                                            state: .normal,
+                                                            buttonText: KMLocalizedString("Open Files", comment: ""))
+        openFileButton.setTarget(self, action: #selector(openFileAction(_:)))
+        
+        createFileDropdown.properties = ComponentDropdownProperty(type: .default_defaultTertiary,
+                                                                  size: .m,
+                                                                  state: .normal,
+                                                                  split: false,
+                                                                  disabled: false,
+                                                                  text: KMLocalizedString("Create PDF", comment: ""))
+        createFileDropdown.componentDelegate = self
+    }
+    
+    //MARK: - GroupView
+    func showGroupView() {
+        var viewHeight: CGFloat = 8
+        var menuItemArr: [ComponentMenuitemProperty] = []
+        for i in ["New From File", "New Blank Page", "New From Web Page", "New From Clipboard", " ", "Import From Scanner"] {
+            if i == " " {
+                let property: ComponentMenuitemProperty = ComponentMenuitemProperty.divider()
+                menuItemArr.append(property)
+                viewHeight += 8
+            } else {
+                let properties_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, leftIcon: false, rightIcon: false, keyEquivalent: nil, text: KMLocalizedString(i, comment: ""))
+                menuItemArr.append(properties_Menuitem)
+                viewHeight += 36
+            }
+        }
+        
+        if groupView == nil {
+            groupView = ComponentGroup.createFromNib(in: ComponentLibrary.shared.componentBundle())
+        }
+        groupView.groupDelegate = self
+        groupView?.frame = CGRectMake(310, 0, CGRectGetWidth(self.bounds), viewHeight)
+        groupView.updateGroupInfo(menuItemArr)
+        groupView?.showWithPoint(createFileDropdown.frame.origin, inView: self)
+        
+        createFileDropdown.properties.state = .pressed
+        createFileDropdown.reloadData()
+        
+    }
+    
+    func removeGroupView() {
+        if groupView != nil {
+            groupView.removeFromSuperview()
+        }
+        createFileDropdown.properties.state = .normal
+        createFileDropdown.reloadData()
+        
+    }
+    
+    //MARK: - Action
+    @objc func openFileAction(_ sender: NSView) {
+        let openPanel = NSOpenPanel()
+        openPanel.allowedFileTypes = ["pdf", "PDF"]
+        openPanel.allowsMultipleSelection = false
+        openPanel.beginSheetModal(for: self.window!) { result in
+             if result == NSApplication.ModalResponse.OK {
+                 if let url = openPanel.url {
+                      
+                 }
+            }
+        }
+    }
+    
+    func newFromFile() {
+        let createWC: KMCreatePDFWindowController = KMCreatePDFWindowController(windowNibName: "KMCreatePDFWindowController")
+        self.window?.beginSheet(createWC.window!, completionHandler: { result in
+            
+        })
+    }
+    
+    func newBlankPage() {
+        let panel = NSSavePanel()
+        panel.allowedFileTypes = ["pdf"]
+        let resp = panel.runModal()
+        if resp != .OK {
+            return
+        }
+        let saveUrl = panel.url!
+        let pdfDocument = CPDFDocument()
+        pdfDocument?.insertPage(CGSize(width: 595, height: 842), at: 0)
+        pdfDocument?.write(toFile: saveUrl.path)
+        
+        
+    }
+    
+    func newFromWebPage() {
+        let createWC: KMCreatePDFWindowController = KMCreatePDFWindowController(windowNibName: "KMCreatePDFWindowController")
+        self.window?.beginSheet(createWC.window!, completionHandler: { result in
+            
+        })
+    }
+    
+    func newFromClipboard() {
+        
+    }
+    
+    func importFromScanner() {
+        let vc = KMDeviceBrowserWindowController.shared
+        vc.window?.center()
+        vc.type = .scanner
+        vc.importScannerFileCallback = { [weak self] (url: NSURL) -> Void in
+
+        }
+        vc.showWindow(NSApp.mainWindow)
+    }
+    
+}
+
+//MARK: - ComponentDropdownDelegate
+extension KMHomeOpenView: ComponentDropdownDelegate {
+    func componentDropdownDidShowMenuItem(dropdown: ComponentDropdown) {
+        self.showGroupView()
+    }
+    
+}
+
+//MARK: - ComponentGroupDelegate
+extension KMHomeOpenView: ComponentGroupDelegate {
+    func componentGroupDidDismiss(group: ComponentGroup?) {
+        
+        self.removeGroupView()
+    }
+    
+    func componentGroupDidSelect(group: ComponentGroup?, menuItemProperty: ComponentMenuitemProperty?) {
+        if let selItem = menuItemProperty {
+            let index = group?.menuItemArr.firstIndex(of: selItem)
+            if index == 0 {
+                self.newFromFile()
+            } else if index == 1 {
+                self.newBlankPage()
+            } else if index == 2 {
+                self.newFromWebPage()
+            } else if index == 3 {
+                self.newFromClipboard()
+            } else if index == 5 {
+                self.importFromScanner()
+            }
+        }
+    }
+}

+ 57 - 0
PDF Office/PDF Master/KMClass/KMHomeViewController/Views/KMHomeOpenView/KMHomeOpenView.xib

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="KMHomeOpenView" customModule="PDF_Reader_Pro" customModuleProvider="target">
+            <connections>
+                <outlet property="contendView" destination="WKT-j5-JeE" id="CRK-fN-CSp"/>
+                <outlet property="createFileDropdown" destination="a9d-ow-nE7" id="sNA-8o-2bF"/>
+                <outlet property="openFileButton" destination="xSX-hx-O74" id="Hg1-Sa-p35"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <customView id="c22-O7-iKe">
+            <rect key="frame" x="0.0" y="0.0" width="208" height="92"/>
+            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <subviews>
+                <customView translatesAutoresizingMaskIntoConstraints="NO" id="WKT-j5-JeE">
+                    <rect key="frame" x="0.0" y="0.0" width="208" height="92"/>
+                    <subviews>
+                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="xSX-hx-O74" customClass="ComponentButton" customModule="KMComponentLibrary">
+                            <rect key="frame" x="0.0" y="52" width="208" height="40"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="40" id="Z7F-aM-NF8"/>
+                            </constraints>
+                        </customView>
+                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="a9d-ow-nE7" customClass="ComponentDropdown" customModule="KMComponentLibrary">
+                            <rect key="frame" x="0.0" y="0.0" width="208" height="40"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="40" id="5Vu-b0-GV8"/>
+                            </constraints>
+                        </customView>
+                    </subviews>
+                    <constraints>
+                        <constraint firstAttribute="trailing" secondItem="xSX-hx-O74" secondAttribute="trailing" id="6Xl-6F-Apn"/>
+                        <constraint firstItem="xSX-hx-O74" firstAttribute="top" secondItem="WKT-j5-JeE" secondAttribute="top" id="CAQ-NZ-HsE"/>
+                        <constraint firstItem="a9d-ow-nE7" firstAttribute="top" secondItem="xSX-hx-O74" secondAttribute="bottom" constant="12" id="RNL-MS-SQU"/>
+                        <constraint firstItem="a9d-ow-nE7" firstAttribute="leading" secondItem="WKT-j5-JeE" secondAttribute="leading" id="YkA-D9-JeD"/>
+                        <constraint firstAttribute="trailing" secondItem="a9d-ow-nE7" secondAttribute="trailing" id="gF5-fZ-1kJ"/>
+                        <constraint firstItem="xSX-hx-O74" firstAttribute="leading" secondItem="WKT-j5-JeE" secondAttribute="leading" id="oO1-TO-gId"/>
+                    </constraints>
+                </customView>
+            </subviews>
+            <constraints>
+                <constraint firstAttribute="bottom" secondItem="WKT-j5-JeE" secondAttribute="bottom" id="SEI-T0-dRC"/>
+                <constraint firstItem="WKT-j5-JeE" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="eVk-Nb-Z2b"/>
+                <constraint firstItem="WKT-j5-JeE" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="oCK-YI-MEk"/>
+                <constraint firstAttribute="trailing" secondItem="WKT-j5-JeE" secondAttribute="trailing" id="u9a-FI-vFv"/>
+            </constraints>
+            <point key="canvasLocation" x="41" y="114"/>
+        </customView>
+    </objects>
+</document>

+ 6 - 0
PDF Office/PDF Master/KMClass/KMHomeViewController/home.xcassets/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 12 - 0
PDF Office/PDF Master/KMClass/KMHomeViewController/home.xcassets/icon_suffix.imageset/Contents.json

@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "filename" : "icon_suffix.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 76 - 0
PDF Office/PDF Master/KMClass/KMHomeViewController/home.xcassets/icon_suffix.imageset/icon_suffix.pdf

@@ -0,0 +1,76 @@
+%PDF-1.7
+
+1 0 obj
+  << >>
+endobj
+
+2 0 obj
+  << /Length 3 0 R >>
+stream
+/DeviceRGB CS
+/DeviceRGB cs
+q
+1.000000 0.000000 -0.000000 1.000000 4.166626 6.504028 cm
+0.062745 0.094118 0.156863 scn
+0.244078 6.585268 m
+0.569515 6.910705 1.097152 6.910705 1.422589 6.585268 c
+5.833333 2.174523 l
+10.244078 6.585268 l
+10.569514 6.910705 11.097152 6.910705 11.422588 6.585268 c
+11.748026 6.259831 11.748026 5.732193 11.422588 5.406757 c
+6.422589 0.406757 l
+6.097152 0.081320 5.569514 0.081320 5.244078 0.406757 c
+0.244078 5.406757 l
+-0.081359 5.732193 -0.081359 6.259831 0.244078 6.585268 c
+h
+f*
+n
+Q
+
+endstream
+endobj
+
+3 0 obj
+  517
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 20.000000 20.000000 ]
+     /Resources 1 0 R
+     /Contents 2 0 R
+     /Parent 5 0 R
+  >>
+endobj
+
+5 0 obj
+  << /Kids [ 4 0 R ]
+     /Count 1
+     /Type /Pages
+  >>
+endobj
+
+6 0 obj
+  << /Pages 5 0 R
+     /Type /Catalog
+  >>
+endobj
+
+xref
+0 7
+0000000000 65535 f
+0000000010 00000 n
+0000000034 00000 n
+0000000607 00000 n
+0000000629 00000 n
+0000000802 00000 n
+0000000876 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+935
+%%EOF

+ 17 - 0
PDF Office/PDF Master/KMClass/PDFView/Toolbar/KMPDFSecToolbarController.swift

@@ -0,0 +1,17 @@
+//
+//  KMPDFSecToolbarController.swift
+//  PDF Reader Pro
+//
+//  Created by Niehaoyu on 2024/10/8.
+//
+
+import Cocoa
+
+class KMPDFSecToolbarController: NSViewController {
+
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        // Do view setup here.
+    }
+    
+}

+ 22 - 0
PDF Office/PDF Master/KMClass/PDFView/Toolbar/KMPDFSecToolbarController.xib

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="KMPDFSecToolbarController" customModule="PDF_Reader_Pro" customModuleProvider="target">
+            <connections>
+                <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <customView id="Hz6-mo-xeY">
+            <rect key="frame" x="0.0" y="0.0" width="480" height="272"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <point key="canvasLocation" x="108" y="-72"/>
+        </customView>
+    </objects>
+</document>

+ 17 - 0
PDF Office/PDF Master/KMClass/PDFView/Toolbar/KMPDFToolbarController.swift

@@ -0,0 +1,17 @@
+//
+//  KMPDFToolbarController.swift
+//  PDF Reader Pro
+//
+//  Created by Niehaoyu on 2024/10/8.
+//
+
+import Cocoa
+
+class KMPDFToolbarController: NSViewController {
+
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        // Do view setup here.
+    }
+    
+}

+ 22 - 0
PDF Office/PDF Master/KMClass/PDFView/Toolbar/KMPDFToolbarController.xib

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="KMPDFToolbarController" customModule="PDF_Reader_Pro" customModuleProvider="target">
+            <connections>
+                <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <customView id="Hz6-mo-xeY">
+            <rect key="frame" x="0.0" y="0.0" width="706" height="80"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <point key="canvasLocation" x="193" y="67"/>
+        </customView>
+    </objects>
+</document>

+ 435 - 0
PDF Office/PDF Master/KMClass/Settings/SettingsDisplayView.swift

@@ -0,0 +1,435 @@
+//
+//  SettingsDisplayView.swift
+//  PDF Reader Pro
+//
+//  Created by Niehaoyu on 2024/9/26.
+//
+
+import Cocoa
+import KMComponentLibrary
+
+class SettingsDisplayView: BaseXibView {
+
+    @IBOutlet weak var contendBox: NSBox!
+    
+    @IBOutlet weak var layoutZoomView: NSView!
+    @IBOutlet weak var layoutZoomLabel: NSTextField!
+    @IBOutlet weak var layoutLabel: NSTextField!
+    @IBOutlet weak var layoutSelectView: ComponentSelect!
+    @IBOutlet weak var zoomLabel: NSTextField!
+    @IBOutlet weak var zoomSelectView: ComponentSelect!
+    
+    @IBOutlet weak var leftSideView: NSView!
+    @IBOutlet weak var leftSideLabel: NSTextField!
+    @IBOutlet weak var defaultOpenRadio: ComponentRadio!
+    @IBOutlet weak var defaultOpenSelectView: ComponentSelect!
+    @IBOutlet weak var remeberLastRadio: ComponentRadio!
+    @IBOutlet weak var hideLeftSideRadio: ComponentRadio!
+    @IBOutlet weak var prioritizeOutlineCheckbox: ComponentCheckBox!
+    @IBOutlet weak var defaultOpenRadioWidthConst: NSLayoutConstraint!
+    @IBOutlet weak var remeberLastRadioWidthConst: NSLayoutConstraint!
+    @IBOutlet weak var hideLeftSideRadioWidthConst: NSLayoutConstraint!
+    @IBOutlet weak var prioritizeOutlineCheckboxWidthConst: NSLayoutConstraint!
+    
+    @IBOutlet weak var propertyPanelView: NSView!
+    @IBOutlet weak var propertyPanelLabel: NSTextField!
+    @IBOutlet weak var panelInteractionLabel: NSTextField!
+    @IBOutlet weak var panelInteractionSelect: ComponentSelect!
+    @IBOutlet weak var showQuickCheckbox: ComponentCheckBox!
+    @IBOutlet weak var showQuickCheckboxWidthConst: NSLayoutConstraint!
+     
+    @IBOutlet weak var highlightView: NSView!
+    @IBOutlet weak var highlightLabel: NSTextField!
+    @IBOutlet weak var highlightLinkCheckbox: ComponentCheckBox!
+    @IBOutlet weak var highlightFormCheckbox: ComponentCheckBox!
+    @IBOutlet weak var highlightLinkBoxWidthConst: NSLayoutConstraint!
+    @IBOutlet weak var highglightFormboxWidthConst: NSLayoutConstraint!
+    
+    
+    deinit {
+        NotificationCenter.default.removeObserver(self)
+    }
+    
+    override func draw(_ dirtyRect: NSRect) {
+        super.draw(dirtyRect)
+
+        // Drawing code here.
+        self.setTitleUI()
+        
+        self.setUpLayoutAndZoom()
+        
+        self.setUpLeftSidePanel()
+        
+        self.setUpPropertyPanel()
+        
+        self.setUpHighlight()
+        
+        self.reloadData()
+    }
+    
+    public required init?(coder decoder: NSCoder) {
+        super.init(coder: decoder)
+        
+    }
+    
+    override init(frame frameRect: NSRect) {
+        super.init(frame: frameRect)
+    }
+    
+    public override func awakeFromNib() {
+        super.awakeFromNib()
+
+       
+    }
+    
+    func setTitleUI () {
+         
+        var titleLabelColor: NSColor = NSColor.labelColor
+        if let value = ComponentLibrary.shared.getComponentValueFromKey("colorText/2") {
+            let currentValue = value as! [String : Any]
+            titleLabelColor = ComponentLibrary.shared.getColor(rgbaDict: currentValue)
+        }
+        
+        var subtitleLabelColor: NSColor = NSColor.labelColor
+        if let value = ComponentLibrary.shared.getComponentValueFromKey("comp-field/colorText-filled-nor") {
+            let currentValue = value as! [String : Any]
+            subtitleLabelColor = ComponentLibrary.shared.getColor(rgbaDict: currentValue)
+        }
+        
+        var titleLabelFont: NSFont = NSFont.systemFont(ofSize: 14)
+        if let value = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium") {
+            titleLabelFont = value
+        }
+        
+        var subtitleLabelFont: NSFont = NSFont.systemFont(ofSize: 14)
+        if let value = ComponentLibrary.shared.getFontFromKey("mac/body-s-regular") {
+            subtitleLabelFont = value
+        }
+        
+        //Layout and Zoom
+        layoutZoomLabel.stringValue = KMLocalizedString("Default Layout and Zoom", comment: "")
+        layoutZoomLabel.textColor = titleLabelColor
+        layoutZoomLabel.font = titleLabelFont
+        
+        layoutLabel.stringValue = KMLocalizedString("Page Layout:", comment: "")
+        layoutLabel.textColor = subtitleLabelColor
+        layoutLabel.font = subtitleLabelFont
+        
+        zoomLabel.stringValue = KMLocalizedString("Zoom:", comment: "")
+        zoomLabel.textColor = subtitleLabelColor
+        zoomLabel.font = subtitleLabelFont
+         
+        leftSideLabel.stringValue = KMLocalizedString("Left Side Panel", comment: "")
+        leftSideLabel.textColor = titleLabelColor
+        leftSideLabel.font = titleLabelFont
+        
+        propertyPanelLabel.stringValue = KMLocalizedString("Property Panel", comment: "")
+        propertyPanelLabel.textColor = titleLabelColor
+        propertyPanelLabel.font = titleLabelFont
+        
+        panelInteractionLabel.stringValue = KMLocalizedString("Panel Open Interaction:", comment: "")
+        panelInteractionLabel.textColor = subtitleLabelColor
+        panelInteractionLabel.font = subtitleLabelFont
+         
+        highlightLabel.stringValue = KMLocalizedString("Highlight", comment: "")
+        highlightLabel.textColor = titleLabelColor
+        highlightLabel.font = titleLabelFont
+        
+    }
+    
+    func setUpLayoutAndZoom() {
+        
+        layoutSelectView.properties = ComponentSelectProperties(size: .s,
+                                                                state: .normal,
+                                                                isDisabled: false,
+                                                                isError: false,
+                                                                leftIcon: false,
+                                                                placeholder: nil,
+                                                                errorText: nil,
+                                                                creatable: false,
+                                                                text: KMLocalizedString("Single Page Continuous", comment: ""))
+        if true {
+            var menuItemArr: [ComponentMenuitemProperty] = []
+            for string in ["Single Page", "Single Page Continuous", "Two Page", "Two Page Continuous",
+                           "Book Mode", "Book Mode Continuous"] {
+                var itemProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, leftIcon: false, rightIcon: false, keyEquivalent: nil, text: KMLocalizedString(string, comment: ""))
+                if string == " " {
+                    itemProperty = ComponentMenuitemProperty.divider()
+                }
+                menuItemArr.append(itemProperty)
+            }
+            layoutSelectView.updateMenuItemsArr(menuItemArr)
+            layoutSelectView.delegate = self
+        }
+        
+        zoomSelectView.properties = ComponentSelectProperties(size: .s,
+                                                              state: .normal,
+                                                              isDisabled: false,
+                                                              isError: false,
+                                                              leftIcon: false,
+                                                              placeholder: nil,
+                                                              errorText: nil,
+                                                              creatable: false,
+                                                              text: KMLocalizedString("Adaptation Width", comment: ""))
+        if true {
+            var menuItemArr: [ComponentMenuitemProperty] = []
+            for string in ["Adaptation Width", "Adapt to Page", "Actual Size", " ",
+                           "10%", "25%", "50%", "75%", "100%", "150%", "200%", "400%", "800%"] {
+                
+                var itemProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, leftIcon: false, rightIcon: false, keyEquivalent: nil, text: KMLocalizedString(string, comment: ""))
+                if string == " " {
+                    itemProperty = ComponentMenuitemProperty.divider()
+                }
+                menuItemArr.append(itemProperty)
+            }
+            
+            zoomSelectView.updateMenuItemsArr(menuItemArr)
+            zoomSelectView.delegate = self
+        }
+        
+    }
+    
+    func setUpLeftSidePanel() {
+        //Left Side Panel
+        defaultOpenRadio.properties = ComponentCheckBoxProperty(size: .s,
+                                                                state: .normal,
+                                                                isDisabled: false,
+                                                                showhelp: false,
+                                                                text: "Default Open",
+                                                                checkboxType: .normal)
+        defaultOpenRadioWidthConst.constant = defaultOpenRadio.properties.propertyInfo.viewWidth
+        
+        defaultOpenSelectView.properties = ComponentSelectProperties(size: .s,
+                                                                state: .normal,
+                                                                isDisabled: false,
+                                                                isError: false,
+                                                                leftIcon: false,
+                                                                placeholder: nil,
+                                                                errorText: nil,
+                                                                creatable: false,
+                                                                text: "Thumbnail")
+        if true {
+            var menuItemArr: [ComponentMenuitemProperty] = []
+            let ThumbnailProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, leftIcon: false, rightIcon: false, keyEquivalent: nil, text: "Thumbnail")
+            menuItemArr.append(ThumbnailProperty)
+            
+            let OutlineProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, leftIcon: false, rightIcon: false, keyEquivalent: nil, text: "Outline")
+            menuItemArr.append(OutlineProperty)
+            
+            let BookmarkProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, leftIcon: false, rightIcon: false, keyEquivalent: nil, text: "Bookmark")
+            menuItemArr.append(BookmarkProperty)
+            
+            let AnnotationProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, leftIcon: false, rightIcon: false, keyEquivalent: nil, text: "Annotation")
+            menuItemArr.append(AnnotationProperty)
+            
+            defaultOpenSelectView.updateMenuItemsArr(menuItemArr)
+            defaultOpenSelectView.delegate = self
+        }
+        
+        remeberLastRadio.properties = ComponentCheckBoxProperty(size: .s,
+                                                                state: .normal,
+                                                                isDisabled: false,
+                                                                showhelp: false,
+                                                                text: "Same as the last open",
+                                                                checkboxType: .normal)
+        remeberLastRadioWidthConst.constant = remeberLastRadio.properties.propertyInfo.viewWidth
+        
+        hideLeftSideRadio.properties = ComponentCheckBoxProperty(size: .s,
+                                                                state: .normal,
+                                                                isDisabled: false,
+                                                                showhelp: false,
+                                                                text: "Hide left side panel",
+                                                                checkboxType: .normal)
+        hideLeftSideRadioWidthConst.constant = hideLeftSideRadio.properties.propertyInfo.viewWidth
+        
+        prioritizeOutlineCheckbox.properties = ComponentCheckBoxProperty(size: .s,
+                                                                state: .normal,
+                                                                isDisabled: false,
+                                                                showhelp: false,
+                                                                text: "Prioritize open the outline list when outlines are available",
+                                                                checkboxType: .normal)
+        prioritizeOutlineCheckboxWidthConst.constant = prioritizeOutlineCheckbox.properties.propertyInfo.viewWidth
+        
+        defaultOpenRadio.setTarget(self, action: #selector(leftSidePanelAction(_:)))
+        remeberLastRadio.setTarget(self, action: #selector(leftSidePanelAction(_:)))
+        hideLeftSideRadio.setTarget(self, action: #selector(leftSidePanelAction(_:)))
+        prioritizeOutlineCheckbox.setTarget(self, action: #selector(leftSidePanelAction(_:)))
+        
+    }
+    
+    func setUpPropertyPanel() {
+     //Property Panel
+         
+        panelInteractionSelect.properties = ComponentSelectProperties(size: .s,
+                                                                state: .normal,
+                                                                isDisabled: false,
+                                                                isError: false,
+                                                                leftIcon: false,
+                                                                placeholder: nil,
+                                                                errorText: nil,
+                                                                creatable: false,
+                                                                text: "Automatic")
+        if true {
+            var menuItemArr: [ComponentMenuitemProperty] = []
+            let AutomaticProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, leftIcon: false, rightIcon: false, keyEquivalent: nil, text: "Automatic")
+            menuItemArr.append(AutomaticProperty)
+            
+            let hideProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, leftIcon: false, rightIcon: false, keyEquivalent: nil, text: "Hide Property Panel")
+            menuItemArr.append(hideProperty)
+            
+            panelInteractionSelect.updateMenuItemsArr(menuItemArr)
+            panelInteractionSelect.delegate = self
+        }
+        
+        showQuickCheckbox.properties = ComponentCheckBoxProperty(size: .s,
+                                                                 state: .normal,
+                                                                 isDisabled: false,
+                                                                 showhelp: false,
+                                                                 text: "Always show quick action bar",
+                                                                 checkboxType: SettingsManager.sharedInstance.showQuickActionBar ? .selected : .normal)
+        showQuickCheckbox.setTarget(self, action: #selector(propertyPanelAction(_:)))
+        showQuickCheckboxWidthConst.constant = showQuickCheckbox.properties.propertyInfo.viewWidth
+        
+    }
+    
+    func setUpHighlight() {
+        //Highlight
+        
+        highlightLinkCheckbox.properties = ComponentCheckBoxProperty(size: .s,
+                                                                     state: .normal,
+                                                                     isDisabled: false,
+                                                                     showhelp: false,
+                                                                     text: "Highlight Link",
+                                                                     checkboxType: SettingsManager.sharedInstance.highlightLink ? .selected : .normal)
+        highlightLinkBoxWidthConst.constant = highlightLinkCheckbox.properties.propertyInfo.viewWidth
+        
+        highlightFormCheckbox.properties = ComponentCheckBoxProperty(size: .s,
+                                                                     state: .normal,
+                                                                     isDisabled: false,
+                                                                     showhelp: false,
+                                                                     text: "Highlight Form Field",
+                                                                     checkboxType: SettingsManager.sharedInstance.highlightFormField ? .selected : .normal)
+        highglightFormboxWidthConst.constant = highlightFormCheckbox.properties.propertyInfo.viewWidth
+        
+        highlightLinkCheckbox.setTarget(self, action: #selector(highlightAction(_:)))
+        highlightFormCheckbox.setTarget(self, action: #selector(highlightAction(_:)))
+        
+    }
+ 
+    func reloadData() {
+        
+        //Default Layout and Zoom
+        layoutSelectView.selectItemAtIndex(SettingsManager.sharedInstance.layoutType.rawValue)
+        zoomSelectView.selectItemAtIndex(SettingsManager.sharedInstance.zoomType.rawValue)
+        
+        
+        //Left Side Panel
+        defaultOpenRadio.properties.checkboxType = .normal
+        remeberLastRadio.properties.checkboxType = .normal
+        hideLeftSideRadio.properties.checkboxType = .normal
+        prioritizeOutlineCheckbox.properties.checkboxType = .normal
+        
+        defaultOpenSelectView.properties.isDisabled = true
+        if SettingsManager.sharedInstance.leftPanelType == .defaultOpen {
+            defaultOpenSelectView.properties.isDisabled = false
+            defaultOpenRadio.properties.checkboxType = .selected
+            
+        } else if SettingsManager.sharedInstance.leftPanelType == .sameAsLastOpen {
+            remeberLastRadio.properties.checkboxType = .selected
+            
+        } else if SettingsManager.sharedInstance.leftPanelType == .hideLeftSide {
+            hideLeftSideRadio.properties.checkboxType = .selected
+            
+        } else if SettingsManager.sharedInstance.leftPanelType == .prioritizeOutline {
+            prioritizeOutlineCheckbox.properties.checkboxType = .selected
+            
+        }
+        
+        defaultOpenRadio.reloadData()
+        remeberLastRadio.reloadData()
+        hideLeftSideRadio.reloadData()
+        prioritizeOutlineCheckbox.reloadData()
+        
+        defaultOpenSelectView.selectItemAtIndex(SettingsManager.sharedInstance.defaultOpen.rawValue)
+        defaultOpenSelectView.reloadData()
+        
+        //Property Panel
+        panelInteractionSelect.selectItemAtIndex(SettingsManager.sharedInstance.panelOpenType.rawValue)
+        panelInteractionSelect.reloadData()
+        
+        showQuickCheckbox.properties.checkboxType = SettingsManager.sharedInstance.showQuickActionBar ? .selected : .normal
+        showQuickCheckbox.reloadData()
+
+        //Highlight
+        highlightLinkCheckbox.properties.checkboxType = SettingsManager.sharedInstance.highlightLink ? .selected : .normal
+        highlightLinkCheckbox.reloadData()
+        
+        highlightFormCheckbox.properties.checkboxType = SettingsManager.sharedInstance.highlightFormField ? .selected : .normal
+        highlightFormCheckbox.reloadData()
+        
+    }
+ 
+    //MARK: - Action
+     
+    @objc func leftSidePanelAction(_ sender: NSView) {
+        if sender == defaultOpenRadio {
+            SettingsManager.sharedInstance.leftPanelType = .defaultOpen
+            
+        } else if sender == remeberLastRadio {
+            SettingsManager.sharedInstance.leftPanelType = .sameAsLastOpen
+        } else if sender == hideLeftSideRadio {
+            SettingsManager.sharedInstance.leftPanelType = .hideLeftSide
+        } else if sender == prioritizeOutlineCheckbox {
+            SettingsManager.sharedInstance.leftPanelType = .prioritizeOutline
+        }
+        self.reloadData()
+        
+    }
+    
+    @objc func propertyPanelAction(_ sender: NSView) {
+        if sender == showQuickCheckbox {
+            SettingsManager.sharedInstance.showQuickActionBar = showQuickCheckbox.properties.checkboxType == .selected ? true : false
+        }
+        self.reloadData()
+        
+    }
+    
+    @objc func highlightAction(_ sender: NSView) {
+        if sender == highlightLinkCheckbox {
+            SettingsManager.sharedInstance.highlightLink = highlightLinkCheckbox.properties.checkboxType == .selected ? true : false
+        } else if sender == highlightFormCheckbox {
+            SettingsManager.sharedInstance.highlightFormField = highlightFormCheckbox.properties.checkboxType == .selected ? true : false
+        }
+        self.reloadData()
+        
+    }
+    
+    
+}
+
+extension SettingsDisplayView: ComponentSelectDelegate {
+    func componentSelectDidSelect(view: ComponentSelect?, menuItemProperty: ComponentMenuitemProperty?) {
+        if view == layoutSelectView {
+            if layoutSelectView.indexOfSelect() >= 0 {
+                SettingsManager.sharedInstance.layoutType = pageLayoutType(rawValue: layoutSelectView.indexOfSelect())!
+            }
+        } else if view == zoomSelectView {
+            if zoomSelectView.indexOfSelect() >= 0 {
+                SettingsManager.sharedInstance.zoomType = zoomInfoType(rawValue: zoomSelectView.indexOfSelect())!
+            }
+        } else if view == defaultOpenSelectView {
+            if defaultOpenSelectView.indexOfSelect() >= 0 {
+                SettingsManager.sharedInstance.defaultOpen = defaultOpenType(rawValue: defaultOpenSelectView.indexOfSelect())!
+            }
+        } else if view == panelInteractionSelect {
+            if panelInteractionSelect.indexOfSelect() >= 0 {
+                SettingsManager.sharedInstance.panelOpenType = panelOpenInteractionType(rawValue: panelInteractionSelect.indexOfSelect())!
+            }
+        }
+        SettingsManager.sharedInstance.saveData()
+        
+        self.reloadData()
+    }
+    
+}
+ 

+ 0 - 0
PDF Office/PDF Master/KMClass/Settings/SettingsDisplayView.xib


Vissa filer visades inte eftersom för många filer har ändrats