Kaynağa Gözat

【工具栏】- 注释模块工具栏Tip多语补充

liaoxiaoyue 1 yıl önce
ebeveyn
işleme
ff422a5070

+ 14 - 19
PDF Office/PDF Office/Class/PDFWindowController/Toolbar/KMToolbarViewController.swift

@@ -451,8 +451,8 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.titleName = NSLocalizedString("Markup", comment: "")
                 item?.target = self
                 item?.isMainTool = true
+                item?.toolTip = NSLocalizedString("Add annotation with highlight, text and shape tool", comment: "")
                 item?.btnTag = KMToolbarViewType.Annatiton.rawValue
-                item?.toolTip = NSLocalizedString("Annotate PDF with highlight, text box and markup tools", comment: "")
                 item?.btnAction = #selector(leftControllButtonAction)
                 
                 let menuItem = NSMenuItem.init(title: item?.titleName, action: #selector(leftControllButtonAction), target: self)
@@ -656,7 +656,6 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolHighlight")
                 item?.target = self
                 item?.btnTag = CAnnotationType.highlight.rawValue
-                item?.toolTip = NSLocalizedString("highlight", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(changeAnnotationMode)
                 
@@ -668,7 +667,6 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolUnderline")
                 item?.target = self
                 item?.btnTag = CAnnotationType.underline.rawValue
-                item?.toolTip = NSLocalizedString("underline", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(changeAnnotationMode)
                 
@@ -680,7 +678,6 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolStrikeththrough")
                 item?.target = self
                 item?.btnTag = CAnnotationType.strikeOut.rawValue
-                item?.toolTip = NSLocalizedString("strikeOut", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(changeAnnotationMode)
                 
@@ -692,7 +689,7 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolPen")
                 item?.target = self
                 item?.btnTag = CAnnotationType.ink.rawValue
-                item?.toolTip = NSLocalizedString("ink", comment: "")
+                item?.toolTip = NSLocalizedString("Draw freely as you do with a pen", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(changeAnnotationMode)
                 
@@ -704,11 +701,11 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolFreeText")
                 item?.target = self
                 item?.btnTag = CAnnotationType.freeText.rawValue
-                item?.toolTip = NSLocalizedString("freeText", comment: "")
+                item?.toolTip = NSLocalizedString("Text (⌘N)", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(changeAnnotationMode)
                 
-                let menuItem = NSMenuItem.init(title: "freeText", action: #selector(changeAnnotationMode), target: self)
+                let menuItem = NSMenuItem.init(title: "FreeText", action: #selector(changeAnnotationMode), target: self)
                 menuItem?.tag = CAnnotationType.freeText.rawValue
                 item?.menuFormRepresentation = menuItem
             } else if identifier == KMToolbarAnchoredAnnotationItemIdentifier {
@@ -716,11 +713,10 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolAnchored")
                 item?.target = self
                 item?.btnTag = CAnnotationType.anchored.rawValue
-                item?.toolTip = NSLocalizedString("anchored", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(changeAnnotationMode)
                 
-                let menuItem = NSMenuItem.init(title: "anchored", action: #selector(changeAnnotationMode), target: self)
+                let menuItem = NSMenuItem.init(title: "Anchored", action: #selector(changeAnnotationMode), target: self)
                 menuItem?.tag = CAnnotationType.anchored.rawValue
                 item?.menuFormRepresentation = menuItem
             } else if identifier == KMToolbarSquareAnnotationItemIdentifier {
@@ -728,11 +724,11 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolSquare_Default")
                 item?.target = self
                 item?.btnTag = CAnnotationType.square.rawValue
-                item?.toolTip = NSLocalizedString("square", comment: "")
+                item?.toolTip = NSLocalizedString("Hold shift to draw square/circle/straight arrow/line", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(changeAnnotationMode)
                 
-                let menuItem = NSMenuItem.init(title: "square", action: #selector(changeAnnotationMode), target: self)
+                let menuItem = NSMenuItem.init(title: "Square", action: #selector(changeAnnotationMode), target: self)
                 menuItem?.tag = CAnnotationType.square.rawValue
                 item?.menuFormRepresentation = menuItem
             }  else if identifier ==  KMToolbarLinkAnnotationItemIdentifier {
@@ -740,11 +736,10 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolLine")
                 item?.target = self
                 item?.btnTag = CAnnotationType.link.rawValue
-                item?.toolTip = NSLocalizedString("link", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(changeAnnotationMode)
                 
-                let menuItem = NSMenuItem.init(title: "link", action: #selector(changeAnnotationMode), target: self)
+                let menuItem = NSMenuItem.init(title: "Link", action: #selector(changeAnnotationMode), target: self)
                 menuItem?.tag = CAnnotationType.link.rawValue
                 item?.menuFormRepresentation = menuItem
             } else if identifier == KMToolbarSignSignatureAnnotationItemIdentifier {
@@ -752,7 +747,7 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolSignSignature")
                 item?.target = self
                 item?.btnTag = CAnnotationType.signSignature.rawValue
-                item?.toolTip = NSLocalizedString("SignSignature", comment: "")
+                item?.toolTip = NSLocalizedString("Add a handwritten signature or create a signature via the trackpad", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(changeAnnotationMode)
                 
@@ -764,23 +759,23 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolStamp")
                 item?.target = self
                 item?.btnTag = CAnnotationType.stamp.rawValue
-                item?.toolTip = NSLocalizedString("stamp", comment: "")
+                item?.toolTip = NSLocalizedString("Add Stamp", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(changeAnnotationMode)
                 
-                let menuItem = NSMenuItem.init(title: "stamp", action: #selector(changeAnnotationMode), target: self)
+                let menuItem = NSMenuItem.init(title: "Stamp", action: #selector(changeAnnotationMode), target: self)
                 menuItem?.tag = CAnnotationType.stamp.rawValue
                 item?.menuFormRepresentation = menuItem
             } else if identifier == KMToolbarShowToolbarItemIdentifier {
                 item?.image = NSImage(named: "KMImageNameMainToolShow")
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolShow")
                 item?.target = self
-                item?.toolTip = NSLocalizedString("show", comment: "")
-                item?.titleName = NSLocalizedString("show", comment: "")
+                item?.toolTip = NSLocalizedString("Hide", comment: "")
+                item?.titleName = NSLocalizedString("Hide", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(showPDFLayoutMode)
                 
-                let menuItem = NSMenuItem.init(title: "show", action: #selector(showPDFLayoutMode), target: self)
+                let menuItem = NSMenuItem.init(title: "Hide", action: #selector(showPDFLayoutMode), target: self)
                 item?.menuFormRepresentation = menuItem
             } else if identifier == KMToolbarAddTextEditPDFItemIdentifier {
                 item?.image = NSImage(named: "KMImageNameMainToolFreeText")

+ 5 - 45
PDF Office/PDF Office/Class/PDFWindowController/ViewController/KMMainViewController+MenuAction.swift

@@ -235,63 +235,23 @@ extension KMMainViewController {
     }
     
     @IBAction func menuItemAction_thumai(_ sender: Any) {
-        let thumai = KMLeftMethodMode()
-        var show = true
-        if self.leftSideViewController.type.methodType != .Thumbnail {
-            thumai.methodType = .Thumbnail
-        }
-        if self.leftSideViewController.type.methodType == .Thumbnail {
-            show = false
-        }
-        self.leftSideViewController.refreshMethodType(newType: thumai, show:show)
+        self.leftSideViewController.refreshMethodType(methodType: .Thumbnail)
     }
 
     @IBAction func menuItemAction_outline(_ sender: Any) {
-        let thumai = KMLeftMethodMode()
-        var show = true
-        if self.leftSideViewController.type.methodType != .Outline {
-            thumai.methodType = .Outline
-        }
-        if self.leftSideViewController.type.methodType == .Outline {
-            show = false
-        }
-        self.leftSideViewController.refreshMethodType(newType: thumai, show:show)
+        self.leftSideViewController.refreshMethodType(methodType: .Outline)
     }
 
     @IBAction func menuItemAction_bookmark(_ sender: Any) {
-        let thumai = KMLeftMethodMode()
-        var show = true
-        if self.leftSideViewController.type.methodType != .BookMark {
-            thumai.methodType = .BookMark
-        }
-        if self.leftSideViewController.type.methodType == .BookMark {
-            show = false
-        }
-        self.leftSideViewController.refreshMethodType(newType: thumai, show:show)
+        self.leftSideViewController.refreshMethodType(methodType: .BookMark)
     }
     
     @IBAction func menuItemAction_annotation(_ sender: Any) {
-        let thumai = KMLeftMethodMode()
-        var show = true
-        if self.leftSideViewController.type.methodType != .Annotation {
-            thumai.methodType = .Annotation
-        }
-        if self.leftSideViewController.type.methodType == .Annotation {
-            show = false
-        }
-        self.leftSideViewController.refreshMethodType(newType: thumai, show:show)
+        self.leftSideViewController.refreshMethodType(methodType: .Annotation)
     }
 
     @IBAction func menuItemAction_search(_ sender: Any) {
-        let thumai = KMLeftMethodMode()
-        var show = true
-        if self.leftSideViewController.type.methodType != .Search {
-            thumai.methodType = .Search
-        }
-        if self.leftSideViewController.type.methodType == .Search {
-            show = false
-        }
-        self.leftSideViewController.refreshMethodType(newType: thumai, show:show)
+        self.leftSideViewController.refreshMethodType(methodType: .Search)
     }
 
     @IBAction func menuItemAction_topic(_ sender: Any) {