Browse Source

【fix】【工具】导航栏-工具-文档信息弹窗中缺多语。bug修复

tangchao 10 months ago
parent
commit
9a29251a6b

+ 29 - 20
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 = [KMLocalizedString("File name:", "Info label") : KMInfoFileNameKey,
-                        KMLocalizedString("File size:", "Info label") : KMInfoFileSizeKey,
-                        KMLocalizedString("Page size:", "Info label") : KMInfoPageSizeKey,
-                        KMLocalizedString("Page count:", "Info label") : KMInfoPageCountKey,
-                        KMLocalizedString("PDF Version:", "Info label") : KMInfoVersionKey,
-                        KMLocalizedString("Encrypted:", "Info label") : KMInfoEncryptedKey,
-                        KMLocalizedString("Printing:", "Info label") : KMInfoAllowsPrintingKey,
-                        KMLocalizedString("Content Copying:", "Info label") : KMInfoAllowsCopyingKey,
-                        KMLocalizedString("Document Assembly:", "Info label") : KMInfoAllowsDocumentAssemblyKey,
-                        KMLocalizedString("Content Copying for Accessibility:", "Info label") : KMInfoAllowsContentAccessibilityKey,
-                        KMLocalizedString("Commenting:", "Info label") : KMInfoAllowsCommentingKey,
-                        KMLocalizedString("Filling of form fields:", "Info label") : KMInfoAllowsFormFieldEntryKey,
-                        KMLocalizedString("Title:", "Info label") : PDFDocumentAttribute.titleAttribute.rawValue,
-                        KMLocalizedString("Author:", "Info label") : PDFDocumentAttribute.authorAttribute.rawValue,
-                        KMLocalizedString("Subject:", "Info label") : PDFDocumentAttribute.subjectAttribute.rawValue,
-                        KMLocalizedString("Content Creator:", "Info label") : PDFDocumentAttribute.creatorAttribute.rawValue,
-                        KMLocalizedString("PDF Producer:", "Info label") : PDFDocumentAttribute.producerAttribute.rawValue,
-                        KMLocalizedString("Creation date:", "Info label") : PDFDocumentAttribute.creationDateAttribute.rawValue,
-                        KMLocalizedString("Modification date:", "Info label") : PDFDocumentAttribute.modificationDateAttribute.rawValue,
-                        KMLocalizedString("Keywords:", "Info label") : 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:", "")]
     }
     
     override func loadWindow() {
@@ -137,12 +137,21 @@ class KMInfoWindowController: NSWindowController {
 
     override func windowDidLoad() {
         super.windowDidLoad()
+        
+        self.window?.title = NSLocalizedString("Document Info", comment: "")
     
         self.updateForDocument(NSApp.mainWindow?.windowController?.document as? NSDocument)
         
         self.summaryTableView.selectionHighlightStyle = .none
         self.attributesTableView.selectionHighlightStyle = .none
 
+        for item in self.tabView.tabViewItems {
+            if item.isEqual(to: self.tabView.tabViewItems.first) {
+                item.label = NSLocalizedString("Summary", comment: "")
+            } else {
+                item.label = NSLocalizedString("Attributes", comment: "")
+            }
+        }
         self.tabView.selectTabViewItem(at: 1)
 
         NotificationCenter.default.addObserver(self, selector: #selector(_handleViewFrameDidChangeNotification), name: NSView.frameDidChangeNotification, object: self.attributesTableView.enclosingScrollView)

+ 3 - 0
PDF Office/PDF Master/Class/README.md

@@ -94,6 +94,9 @@
 
 * 自定义注释工具 KMToolbarCustomWindowController
 
+## 填写与签名
+* 日期注释 CSelfSignAnnotationFreeText
+
 ## 数字签名
 * KMPDFDigitalSignViewController
 

+ 9 - 0
PDF Office/PDF Master/Strings/de.lproj/Localizable.strings

@@ -2787,3 +2787,12 @@
 "Line" = "gerade Linie";
 "Close Current Tab" = "Aktuelle Registerkarte schließen";
 
+/* Class = "NSPanel"; title = "Document Info"; ObjectID = "5"; */
+"Document Info" = "Dokument-informationen";
+
+/* Class = "NSTabViewItem"; label = "Attributes"; ObjectID = "92"; */
+"Attributes" = "Eigenschaften";
+
+/* Class = "NSTabViewItem"; label = "Summary"; ObjectID = "94"; */
+"Summary" = "Zusammenfassung";
+

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

@@ -1011,7 +1011,7 @@
 /* Class = "NSButtonCell"; title = "Open pane only for Outline"; ObjectID = "49"; */
 "Open pane only for Outline" = "Open panel only for Outline";
 
-//MARK: InfoWindow
+//MARK: - InfoWindow
 
 /* Class = "NSWindow"; title = "Document Info"; ObjectID = "5"; */
 "Document Info" = "Document Info";

+ 9 - 0
PDF Office/PDF Master/Strings/es.lproj/Localizable.strings

@@ -2878,3 +2878,12 @@
 "Line" = "línea recta";
 
 "Close Current Tab" = "Cierre la pestaña actual";
+
+/* Class = "NSPanel"; title = "Document Info"; ObjectID = "5"; */
+"Document Info" = "Información del documento";
+
+/* Class = "NSTabViewItem"; label = "Attributes"; ObjectID = "92"; */
+"Attributes" = "Atributos";
+
+/* Class = "NSTabViewItem"; label = "Summary"; ObjectID = "94"; */
+"Summary" = "Resumen";

+ 9 - 0
PDF Office/PDF Master/Strings/fr.lproj/Localizable.strings

@@ -2749,3 +2749,12 @@
 "Strikethrough" = "barré";
 "Line" = "ligne droite";
 "Close Current Tab" = "Fermer l'onglet actuel";
+
+/* Class = "NSPanel"; title = "Document Info"; ObjectID = "5"; */
+"Document Info" = "Informations du document";
+
+/* Class = "NSTabViewItem"; label = "Attributes"; ObjectID = "92"; */
+"Attributes" = "Attributs";
+
+/* Class = "NSTabViewItem"; label = "Summary"; ObjectID = "94"; */
+"Summary" = "Récapitulatif";

+ 10 - 0
PDF Office/PDF Master/Strings/it.lproj/Localizable.strings

@@ -2674,3 +2674,13 @@
 "Line" = "retta";
 
 "Close Current Tab" = "Chiudi la finestra attuale";
+
+/* Class = "NSPanel"; title = "Document Info"; ObjectID = "5"; */
+"Document Info" = "Informazioni sul documento";
+
+/* Class = "NSTabViewItem"; label = "Attributes"; ObjectID = "92"; */
+"Attributes" = "Attributi";
+
+/* Class = "NSTabViewItem"; label = "Summary"; ObjectID = "94"; */
+"Summary" = "Riepilogo";
+

+ 9 - 0
PDF Office/PDF Master/Strings/ja.lproj/Localizable.strings

@@ -2941,3 +2941,12 @@
 "Line" = "直線";
 
 "Close Current Tab" = "現在のタブを閉じる";
+
+// Class = "NSPanel"; title = "Document Info"; ObjectID = "5";
+"Document Info" = "文書情報";
+
+// Class = "NSTabViewItem"; label = "Attributes"; ObjectID = "92";
+"Attributes" = "詳細";
+
+// Class = "NSTabViewItem"; label = "Summary"; ObjectID = "94";
+"Summary" = "概要";

+ 9 - 0
PDF Office/PDF Master/Strings/nl.lproj/Localizable.strings

@@ -2952,3 +2952,12 @@
 "Line" = "rechte lijn";
 
 "Close Current Tab" = "Sluit huidige tabblad";
+
+/* Class = "NSPanel"; title = "Document Info"; ObjectID = "5"; */
+"Document Info" = "Document Info";
+
+/* Class = "NSTabViewItem"; label = "Attributes"; ObjectID = "92"; */
+"Attributes" = "Attributen";
+
+/* Class = "NSTabViewItem"; label = "Summary"; ObjectID = "94"; */
+"Summary" = "Samenvatting";

+ 9 - 0
PDF Office/PDF Master/Strings/pl.lproj/Localizable.strings

@@ -2890,3 +2890,12 @@
 "Line" = "linia prosta";
 
 "Close Current Tab" = "Zamknij kartę";
+
+/* Class = "NSPanel"; title = "Document Info"; ObjectID = "5"; */
+"Document Info" = "Informacje o dokumencie";
+
+/* Class = "NSTabViewItem"; label = "Attributes"; ObjectID = "92"; */
+"Attributes" = "Atrybuty";
+
+/* Class = "NSTabViewItem"; label = "Summary"; ObjectID = "94"; */
+"Summary" = "Podsumowanie";

+ 9 - 0
PDF Office/PDF Master/Strings/ru.lproj/Localizable.strings

@@ -2815,3 +2815,12 @@
 "Line" = "прямая линия";
 
 "Close Current Tab" = "Закрыть текущая вкладка";
+
+/* Class = "NSPanel"; title = "Document Info"; ObjectID = "5"; */
+"Document Info" = "Свойства";
+
+/* Class = "NSTabViewItem"; label = "Attributes"; ObjectID = "92"; */
+"Attributes" = "Атрибуты";
+
+/* Class = "NSTabViewItem"; label = "Summary"; ObjectID = "94"; */
+"Summary" = "Основные";

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

@@ -3854,3 +3854,12 @@
 "Line" = "直线";
 
 "Close Current Tab" = "关闭当前页签";
+
+/* Class = "NSPanel"; title = "Document Info"; ObjectID = "5"; */
+"Document Info" = "文件简介";
+
+/* Class = "NSTabViewItem"; label = "Attributes"; ObjectID = "92"; */
+"Attributes" = "属性";
+
+/* Class = "NSTabViewItem"; label = "Summary"; ObjectID = "94"; */
+"Summary" = "摘要";

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

@@ -3985,3 +3985,12 @@
 "Line" = "直線";
 
 "Close Current Tab" = "關閉目前頁籤";
+
+/* Class = "NSPanel"; title = "Document Info"; ObjectID = "5"; */
+"Document Info" = "文件簡介";
+
+/* Class = "NSTabViewItem"; label = "Attributes"; ObjectID = "92"; */
+"Attributes" = "屬性";
+
+/* Class = "NSTabViewItem"; label = "Summary"; ObjectID = "94"; */
+"Summary" = "摘要";