Skip to content

Build your personal knowledge base with Trilium Notes

feat(i18n): translate new note title

Elian Doran301e4b6ea9c3
diff --git a/src/services/notes.ts b/src/services/notes.ts
index 59031b8d99..5c983f9846 100644
--- a/src/services/notes.ts
+++ b/src/services/notes.ts
@@ -27,6 +27,7 @@ import { AttachmentRow, AttributeRow, BranchRow, NoteRow, NoteType } from '../be
import TaskContext from "./task_context.js";
import { NoteParams } from './note-interface.js';
import imageService from "./image.js";
+import { t } from "i18next";
interface FoundLink {
name: "imageLink" | "internalLink" | "includeNoteLink" | "relationMapLink",
@@ -95,7 +96,7 @@ function copyChildAttributes(parentNote: BNote, childNote: BNote) {
}
function getNewNoteTitle(parentNote: BNote) {
- let title = "new note";
+ let title = t("notes.new-note");
const titleTemplate = parentNote.getLabelValue('titleTemplate');
diff --git a/translations/en/server.json b/translations/en/server.json
index 82d828f8c5..f726aaa5d6 100644
--- a/translations/en/server.json
+++ b/translations/en/server.json
@@ -240,5 +240,8 @@
"other": "Other",
"advanced-title": "Advanced",
"visible-launchers-title": "Visible Launchers"
+ },
+ "notes": {
+ "new-note": "New note"
}
}