mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Improve print setting summary
This commit is contained in:
parent
8fc737643b
commit
4e0ee60978
@ -8,11 +8,12 @@ Change Log
|
||||
### Improvements
|
||||
|
||||
- Update the Unicode block name list for the character inspector from Unicode 14.0.0 to Unicode 15.0.0.
|
||||
- [trivial] Tweak the setting summary display in the print dialog.
|
||||
|
||||
|
||||
### Fixes
|
||||
|
||||
- Fix an issue the total page did not update when changing the print scope option to Selection in CotEditor in the print dialog.
|
||||
- Fix an issue the total page did not update when changing the print scope option to “Selection in CotEditor” in the print dialog.
|
||||
|
||||
|
||||
|
||||
|
@ -157,10 +157,10 @@ final class PrintPanelAccessoryController: NSViewController, NSPrintPanelAccesso
|
||||
#keyPath(secondaryHeaderAlignment),
|
||||
|
||||
#keyPath(printsFooter),
|
||||
#keyPath(primaryFooterAlignment),
|
||||
#keyPath(primaryFooterContent),
|
||||
#keyPath(secondaryFooterAlignment),
|
||||
#keyPath(primaryFooterAlignment),
|
||||
#keyPath(secondaryFooterContent),
|
||||
#keyPath(secondaryFooterAlignment),
|
||||
]
|
||||
}
|
||||
|
||||
@ -168,38 +168,75 @@ final class PrintPanelAccessoryController: NSViewController, NSPrintPanelAccesso
|
||||
/// localized descriptions for print settings
|
||||
func localizedSummaryItems() -> [[NSPrintPanel.AccessorySummaryKey: String]] {
|
||||
|
||||
[
|
||||
var items: [[NSPrintPanel.AccessorySummaryKey: String]] = [
|
||||
[.itemName: "Color".localized,
|
||||
.itemDescription: self.theme.localized],
|
||||
[.itemName: "Print Background".localized,
|
||||
.itemDescription: self.printsBackground ? "On".localized : "Off".localized],
|
||||
[.itemName: "Line Number".localized,
|
||||
.itemDescription: self.printsLineNumbers ? "On".localized : "Off".localized],
|
||||
[.itemName: "Invisibles".localized,
|
||||
.itemDescription: self.printsInvisibles ? "On".localized : "Off".localized],
|
||||
|
||||
[.itemName: "Print Header".localized,
|
||||
.itemDescription: self.printsHeader ? "On" .localized : "Off".localized],
|
||||
[.itemName: "Primary Header".localized,
|
||||
.itemDescription: self.primaryHeaderContent.localizedDescription],
|
||||
[.itemName: "Primary Header Alignment".localized,
|
||||
.itemDescription: self.primaryHeaderContent.localizedDescription],
|
||||
[.itemName: "Primary Header".localized,
|
||||
.itemDescription: self.secondaryHeaderContent.localizedDescription],
|
||||
[.itemName: "Primary Header Alignment".localized,
|
||||
.itemDescription: self.secondaryHeaderAlignment.localizedDescription],
|
||||
|
||||
[.itemName: "Print Footer".localized,
|
||||
.itemDescription: self.printsFooter ? "On".localized : "Off".localized],
|
||||
[.itemName: "Primary Footer".localized,
|
||||
.itemDescription: self.primaryFooterContent.localizedDescription],
|
||||
[.itemName: "Primary Footer Alignment".localized,
|
||||
.itemDescription: self.primaryFooterAlignment.localizedDescription],
|
||||
[.itemName: "Primary Footer".localized,
|
||||
.itemDescription: self.secondaryFooterContent.localizedDescription],
|
||||
[.itemName: "Primary Footer Alignment".localized,
|
||||
.itemDescription: self.secondaryFooterAlignment.localizedDescription],
|
||||
.itemDescription: self.theme.localized]
|
||||
]
|
||||
|
||||
if #available(macOS 13, *) {
|
||||
if self.printsBackground {
|
||||
items += [[.itemName: "Print Background".localized,
|
||||
.itemDescription: "On".localized]]
|
||||
}
|
||||
if self.printsLineNumbers {
|
||||
items += [[.itemName: "Line Number".localized,
|
||||
.itemDescription: "On".localized]]
|
||||
}
|
||||
if self.printsInvisibles {
|
||||
items += [[.itemName: "Invisibles".localized,
|
||||
.itemDescription: "On".localized]]
|
||||
}
|
||||
if self.printsHeader, self.primaryHeaderContent != .none {
|
||||
items += [[.itemName: "Primary Header".localized,
|
||||
.itemDescription: self.primaryHeaderContent.localizedDescription
|
||||
+ String(localized: " (\(self.primaryHeaderAlignment.localizedDescription))")]]
|
||||
}
|
||||
if self.printsHeader, self.secondaryHeaderContent != .none {
|
||||
items += [[.itemName: "Secondary Header".localized,
|
||||
.itemDescription: self.secondaryHeaderContent.localizedDescription
|
||||
+ String(localized: " (\(self.secondaryHeaderAlignment.localizedDescription))")]]
|
||||
}
|
||||
if self.printsFooter, self.primaryFooterContent != .none {
|
||||
items += [[.itemName: "Primary Footer".localized,
|
||||
.itemDescription: self.primaryFooterContent.localizedDescription
|
||||
+ String(localized: " (\(self.primaryFooterAlignment.localizedDescription))")]]
|
||||
}
|
||||
if self.printsFooter, self.secondaryFooterContent != .none {
|
||||
items += [[.itemName: "Secondary Footer".localized,
|
||||
.itemDescription: self.secondaryFooterContent.localizedDescription
|
||||
+ String(localized: " (\(self.secondaryFooterAlignment.localizedDescription))")]]
|
||||
}
|
||||
|
||||
} else {
|
||||
items += [
|
||||
[.itemName: "Print Background".localized,
|
||||
.itemDescription: self.printsBackground ? "On".localized : "Off".localized],
|
||||
[.itemName: "Line Number".localized,
|
||||
.itemDescription: self.printsLineNumbers ? "On".localized : "Off".localized],
|
||||
[.itemName: "Invisibles".localized,
|
||||
.itemDescription: self.printsInvisibles ? "On".localized : "Off".localized],
|
||||
|
||||
[.itemName: "Print Header".localized,
|
||||
.itemDescription: self.printsHeader ? "On" .localized : "Off".localized],
|
||||
[.itemName: "Primary Header".localized,
|
||||
.itemDescription: self.primaryHeaderContent.localizedDescription
|
||||
+ String(localized: " (\(self.primaryHeaderAlignment.localizedDescription))")],
|
||||
[.itemName: "Secondary Header".localized,
|
||||
.itemDescription: self.secondaryHeaderContent.localizedDescription
|
||||
+ String(localized: " (\(self.secondaryHeaderAlignment.localizedDescription))")],
|
||||
|
||||
[.itemName: "Print Footer".localized,
|
||||
.itemDescription: self.printsFooter ? "On".localized : "Off".localized],
|
||||
[.itemName: "Primary Footer".localized,
|
||||
.itemDescription: self.primaryFooterContent.localizedDescription
|
||||
+ String(localized: " (\(self.primaryFooterAlignment.localizedDescription))")],
|
||||
[.itemName: "Secondary Footer".localized,
|
||||
.itemDescription: self.secondaryFooterContent.localizedDescription
|
||||
+ String(localized: " (\(self.secondaryFooterAlignment.localizedDescription))")],
|
||||
]
|
||||
}
|
||||
|
||||
return items
|
||||
}
|
||||
|
||||
|
||||
@ -231,7 +268,6 @@ final class PrintPanelAccessoryController: NSViewController, NSPrintPanelAccesso
|
||||
|
||||
for themeName in themeNames {
|
||||
popupButton.addItem(withTitle: themeName)
|
||||
popupButton.lastItem?.indentationLevel = 1
|
||||
}
|
||||
|
||||
// select menu item
|
||||
|
@ -365,14 +365,10 @@
|
||||
"Invisibles" = "Steuerzeichen";
|
||||
"Print Header" = "Kopfzeilen drucken";
|
||||
"Primary Header" = "Primäre Kopfzeile";
|
||||
"Primary Header Alignment" = "Ausrichtung der primären Kopfzeile";
|
||||
"Secondary Header" = "Sekundäre Kopfzeile";
|
||||
"Secondary Header Alignment" = "Ausrichtung der sekundären Kopfzeile";
|
||||
"Print Footer" = "Fußzeilen drucken";
|
||||
"Primary Footer" = "Primäre Fußzeile";
|
||||
"Primary Footer Alignment" = "Ausrichtung der primären Fußzeile";
|
||||
"Secondary Footer" = "Sekundäre Fußzeile";
|
||||
"Secondary Footer Alignment" = "Ausrichtung der sekundären Fußzeile";
|
||||
|
||||
// Summary item values
|
||||
"On" = "Ein";
|
||||
|
@ -365,14 +365,10 @@
|
||||
"Invisibles" = "Invisibles";
|
||||
"Print Header" = "Print Header";
|
||||
"Primary Header" = "Primary Header";
|
||||
"Primary Header Alignment" = "Primary Header Alignment";
|
||||
"Secondary Header" = "Secondary Header";
|
||||
"Secondary Header Alignment" = "Secondary Header Alignment";
|
||||
"Print Footer" = "Print Footer";
|
||||
"Primary Footer" = "Primary Footer";
|
||||
"Primary Footer Alignment" = "Primary Footer Alignment";
|
||||
"Secondary Footer" = "Secondary Footer";
|
||||
"Secondary Footer Alignment" = "Secondary Footer Alignment";
|
||||
|
||||
// Summary item values
|
||||
"On" = "On";
|
||||
|
@ -365,14 +365,10 @@
|
||||
"Invisibles" = "Caractères invisibles";
|
||||
"Print Header" = "Imprimer l’en-tête";
|
||||
"Primary Header" = "En-tête principal";
|
||||
"Primary Header Alignment" = "Alignement de l’en-tête principal";
|
||||
"Secondary Header" = "En-tête secondaire";
|
||||
"Secondary Header Alignment" = "Alignement de l’en-tête secondaire";
|
||||
"Print Footer" = "Imprimer le pied de page";
|
||||
"Primary Footer" = "Pied de page principal";
|
||||
"Primary Footer Alignment" = "Alignement du pied de page";
|
||||
"Secondary Footer" = "Pied de page secondaire";
|
||||
"Secondary Footer Alignment" = "Alignement du pied de page secondaire";
|
||||
|
||||
// Summary item values
|
||||
"On" = "Oui";
|
||||
|
@ -365,14 +365,10 @@
|
||||
"Invisibles" = "Caratteri invisibili";
|
||||
"Print Header" = "Stampa intestazione";
|
||||
"Primary Header" = "Intestazione primaria";
|
||||
"Primary Header Alignment" = "Allineamento intestazione primaria";
|
||||
"Secondary Header" = "Intestazione secondaria";
|
||||
"Secondary Header Alignment" = "Allineamento intestazione secondaria";
|
||||
"Print Footer" = "Stampa pie’ di pagina";
|
||||
"Primary Footer" = "Pie’ di pagina primario";
|
||||
"Primary Footer Alignment" = "Allineamento pie’ di pagina primario";
|
||||
"Secondary Footer" = "Pie’ di pagina secondario";
|
||||
"Secondary Footer Alignment" = "Allineamento pie’ di pagina secondario";
|
||||
|
||||
// Summary item values
|
||||
"On" = "Acceso";
|
||||
|
@ -365,14 +365,10 @@
|
||||
"Invisibles" = "不可視文字";
|
||||
"Print Header" = "ヘッダをプリント";
|
||||
"Primary Header" = "主ヘッダ";
|
||||
"Primary Header Alignment" = "主ヘッダの位置";
|
||||
"Secondary Header" = "副ヘッダ";
|
||||
"Secondary Header Alignment" = "副ヘッダの位置";
|
||||
"Print Footer" = "フッタをプリント";
|
||||
"Primary Footer" = "主フッタ";
|
||||
"Primary Footer Alignment" = "主フッタの位置";
|
||||
"Secondary Footer" = "副フッタ";
|
||||
"Secondary Footer Alignment" = "副フッタの位置";
|
||||
|
||||
// Summary item values
|
||||
"On" = "オン";
|
||||
|
@ -365,14 +365,10 @@
|
||||
"Invisibles" = "Invisíveis";
|
||||
"Print Header" = "Imprimir Cabeçalho";
|
||||
"Primary Header" = "Cabeçalho Primário";
|
||||
"Primary Header Alignment" = "Alinhamento do Cabeçalho Primário";
|
||||
"Secondary Header" = "Cabeçalho Secundário";
|
||||
"Secondary Header Alignment" = "Alinhamento do Cabeçalho Secundário";
|
||||
"Print Footer" = "Imprimir Rodapé";
|
||||
"Primary Footer" = "Rodapé Primário";
|
||||
"Primary Footer Alignment" = "Alinhamento do Rodapé Primário";
|
||||
"Secondary Footer" = "Rodapé Secundário";
|
||||
"Secondary Footer Alignment" = "Alinhamento do Rodapé Secundário";
|
||||
|
||||
// Summary item values
|
||||
"On" = "Ativo";
|
||||
|
@ -365,14 +365,10 @@
|
||||
"Invisibles" = "Görünmez Karakterler";
|
||||
"Print Header" = "Üstbilgiyi Yazdır";
|
||||
"Primary Header" = "Birincil Üstbilgi";
|
||||
"Primary Header Alignment" = "Birincil Üstbilgi Hizalaması";
|
||||
"Secondary Header" = "İkincil Üstbilgi";
|
||||
"Secondary Header Alignment" = "İkincil Üstbilgi Hizalaması";
|
||||
"Print Footer" = "Altbilgiyi Yazdır";
|
||||
"Primary Footer" = "Birincil Altbilgi";
|
||||
"Primary Footer Alignment" = "Birincil Altbilgi Hizalaması";
|
||||
"Secondary Footer" = "İkincil Altbilgi";
|
||||
"Secondary Footer Alignment" = "İkincil Altbilgi Hizalaması";
|
||||
|
||||
// Summary item values
|
||||
"On" = "Açık";
|
||||
|
@ -365,14 +365,10 @@
|
||||
"Invisibles" = "不可见元素";
|
||||
"Print Header" = "打印页眉";
|
||||
"Primary Header" = "主页眉";
|
||||
"Primary Header Alignment" = "主页眉对齐";
|
||||
"Secondary Header" = "次页眉";
|
||||
"Secondary Header Alignment" = "次页眉对齐";
|
||||
"Print Footer" = "打印页脚";
|
||||
"Primary Footer" = "主页脚";
|
||||
"Primary Footer Alignment" = "主页脚对齐";
|
||||
"Secondary Footer" = "次页脚";
|
||||
"Secondary Footer Alignment" = "次页脚对齐";
|
||||
|
||||
// Summary item values
|
||||
"On" = "开";
|
||||
|
@ -365,14 +365,10 @@
|
||||
"Invisibles" = "不可見元素";
|
||||
"Print Header" = "列印頁眉";
|
||||
"Primary Header" = "主頁眉";
|
||||
"Primary Header Alignment" = "主頁眉對齊";
|
||||
"Secondary Header" = "次頁眉";
|
||||
"Secondary Header Alignment" = "次頁眉對齊";
|
||||
"Print Footer" = "列印頁腳";
|
||||
"Primary Footer" = "主頁腳";
|
||||
"Primary Footer Alignment" = "主頁腳對齊";
|
||||
"Secondary Footer" = "次頁腳";
|
||||
"Secondary Footer Alignment" = "次頁腳對齊";
|
||||
|
||||
// Summary item values
|
||||
"On" = "開";
|
||||
|
Loading…
Reference in New Issue
Block a user