feat(pdf): describe the attributes & fix conflict in name

This commit is contained in:
Elian Doran 2025-02-01 17:34:36 +02:00
parent 2659bd33e8
commit fa655ea45e
No known key found for this signature in database
4 changed files with 10 additions and 3 deletions

View File

@ -242,7 +242,9 @@ const ATTR_HELP: Record<string, Record<string, string>> = {
executeDescription: t("attribute_detail.execute_description"),
excludeFromNoteMap: t("attribute_detail.exclude_from_note_map"),
newNotesOnTop: t("attribute_detail.new_notes_on_top"),
hideHighlightWidget: t("attribute_detail.hide_highlight_widget")
hideHighlightWidget: t("attribute_detail.hide_highlight_widget"),
printLandscape: t("attribute_detail.print_landscape"),
printPageSize: t("attribute_detail.print_page_size")
},
relation: {
runOnNoteCreation: t("attribute_detail.run_on_note_creation"),

View File

@ -261,7 +261,7 @@ export default class NoteDetailWidget extends NoteContextAwareWidget {
const { ipcRenderer } = utils.dynamicRequire("electron");
ipcRenderer.send("export-as-pdf", {
title: this.note.title,
pageSize: this.note.getAttributeValue("label", "pageSize") ?? "Letter",
pageSize: this.note.getAttributeValue("label", "printPageSize") ?? "Letter",
landscape: this.note.hasAttribute("label", "printLandscape")
});
}

View File

@ -438,7 +438,9 @@
"share_favicon": "Favicon note to be set in the shared page. Typically you want to set it to share root and make it inheritable. Favicon note must be in the shared sub-tree as well. Consider using 'share_hidden_from_tree'.",
"is_owned_by_note": "is owned by note",
"other_notes_with_name": "Other notes with {{attributeType}} name \"{{attributeName}}\"",
"and_more": "... and {{count}} more."
"and_more": "... and {{count}} more.",
"print_landscape": "When exporting to PDF, changes the orientation of the page to landscape instead of portrait.",
"print_page_size": "When exporting to PDF, changes the size of the page. Supported values: <code>A0</code>, <code>A1</code>, <code>A2</code>, <code>A3</code>, <code>A4</code>, <code>A5</code>, <code>A6</code>, <code>Legal</code>, <code>Letter</code>, <code>Tabloid</code>, <code>Ledger</code>."
},
"attribute_editor": {
"help_text_body1": "To add label, just type e.g. <code>#rock</code> or if you want to add also value then e.g. <code>#year = 2020</code>",

View File

@ -72,6 +72,9 @@ export default [
{ type: "label", name: "webViewSrc", isDangerous: true },
{ type: "label", name: "hideHighlightWidget" },
{ type: "label", name: "printLandscape" },
{ type: "label", name: "printPageSize" },
// relation names
{ type: "relation", name: "internalLink" },
{ type: "relation", name: "imageLink" },