Skip to content

Build your personal knowledge base with Trilium Notes

feat(pdf): improve save filter on Windows

Elian Dorand4965e8d41eb
diff --git a/src/services/window.ts b/src/services/window.ts
index 69fde7c886..5a2dad6c2b 100644
--- a/src/services/window.ts
+++ b/src/services/window.ts
@@ -14,6 +14,7 @@ import { formatDownloadTitle, isDev, isMac, isWindows } from "./utils.js";
import { fileURLToPath } from "url";
import { dirname } from "path";
+import { t } from "i18next";
// Prevent the window being garbage collected
let mainWindow: BrowserWindow | null;
@@ -61,7 +62,7 @@ ipcMain.on("export-as-pdf", async (e, opts: ExportAsPdfOpts) => {
defaultPath: formatDownloadTitle(opts.title, "file", "application/pdf"),
filters: [
{
- name: "PDF",
+ name: t("pdf.export_filter"),
extensions: [ "pdf" ]
}
]
diff --git a/translations/en/server.json b/translations/en/server.json
index 72836a5871..c3ac0dd4a3 100644
--- a/translations/en/server.json
+++ b/translations/en/server.json
@@ -253,5 +253,8 @@
},
"content_renderer": {
"note-cannot-be-displayed": "This note type cannot be displayed."
+ },
+ "pdf": {
+ "export_filter": "PDF Document (*.pdf)"
}
}
diff --git a/translations/ro/server.json b/translations/ro/server.json
index 5c1d4b2fd0..aec0902a51 100644
--- a/translations/ro/server.json
+++ b/translations/ro/server.json
@@ -254,5 +254,8 @@
},
"content_renderer": {
"note-cannot-be-displayed": "Acest tip de notiță nu poate fi afișat."
+ },
+ "pdf": {
+ "export_filter": "Document PDF (*.pdf)"
}
}