diff --git a/apps/client/src/services/note_types.ts b/apps/client/src/services/note_types.ts index a3f356e14..64d31ad39 100644 --- a/apps/client/src/services/note_types.ts +++ b/apps/client/src/services/note_types.ts @@ -81,7 +81,7 @@ let rootCreationDate: Date | undefined; async function getNoteTypeItems(command?: TreeCommandNames) { const items: MenuItem[] = [ ...getBlankNoteTypes(command), - ...await getBuiltInTemplates("Collections", command, true), + ...await getBuiltInTemplates(t("note_types.collections"), command, true), ...await getBuiltInTemplates(null, command, false), ...await getUserTemplates(command) ]; diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json index 00cb9f227..87f000446 100644 --- a/apps/client/src/translations/en/translation.json +++ b/apps/client/src/translations/en/translation.json @@ -1629,7 +1629,8 @@ "beta-feature": "Beta", "ai-chat": "AI Chat", "task-list": "Task List", - "new-feature": "New" + "new-feature": "New", + "collections": "Collections" }, "protect_note": { "toggle-on": "Protect the note", diff --git a/apps/server/src/assets/translations/en/server.json b/apps/server/src/assets/translations/en/server.json index 7b5633c62..0f6759798 100644 --- a/apps/server/src/assets/translations/en/server.json +++ b/apps/server/src/assets/translations/en/server.json @@ -303,5 +303,20 @@ "subpages": "Subpages:", "on-this-page": "On This Page", "expand": "Expand" + }, + "hidden_subtree_templates": { + "text-snippet": "Text Snippet", + "description": "Description", + "list-view": "List View", + "grid-view": "Grid View", + "calendar": "Calendar", + "table": "Table", + "geo-map": "Geo Map", + "start-date": "Start Date", + "end-date": "End Date", + "start-time": "Start Time", + "end-time": "End Time", + "geolocation": "Geolocation", + "built-in-templates": "Built-in templates" } } diff --git a/apps/server/src/services/hidden_subtree_templates.ts b/apps/server/src/services/hidden_subtree_templates.ts index 62ab20717..6cc35fff9 100644 --- a/apps/server/src/services/hidden_subtree_templates.ts +++ b/apps/server/src/services/hidden_subtree_templates.ts @@ -1,15 +1,16 @@ import { HiddenSubtreeItem } from "@triliumnext/commons"; +import { t } from "i18next"; export default function buildHiddenSubtreeTemplates() { const templates: HiddenSubtreeItem = { id: "_templates", - title: "Built-in templates", + title: t("hidden_subtree_templates.built-in-templates"), type: "book", children: [ { id: "_template_text_snippet", type: "text", - title: "Text Snippet", + title: t("hidden_subtree_templates.text-snippet"), icon: "bx-align-left", attributes: [ { @@ -23,14 +24,14 @@ export default function buildHiddenSubtreeTemplates() { { name: "label:textSnippetDescription", type: "label", - value: "promoted,alias=Description,single,text" + value: `promoted,alias=${t("hidden_subtree_templates.description")},single,text` } ] }, { id: "_template_list_view", type: "book", - title: "List View", + title: t("hidden_subtree_templates.list-view"), icon: "bx bx-list-ul", attributes: [ { @@ -51,7 +52,7 @@ export default function buildHiddenSubtreeTemplates() { { id: "_template_grid_view", type: "book", - title: "Grid View", + title: t("hidden_subtree_templates.grid-view"), icon: "bx bxs-grid", attributes: [ { @@ -72,7 +73,7 @@ export default function buildHiddenSubtreeTemplates() { { id: "_template_calendar", type: "book", - title: "Calendar", + title: t("hidden_subtree_templates.calendar"), icon: "bx bx-calendar", attributes: [ { @@ -95,25 +96,25 @@ export default function buildHiddenSubtreeTemplates() { { name: "label:startDate", type: "label", - value: "promoted,alias=Start Date,single,date", + value: `promoted,alias=${t("hidden_subtree_templates.start-date")},single,date`, isInheritable: true }, { name: "label:endDate", type: "label", - value: "promoted,alias=End Date,single,date", + value: `promoted,alias=${t("hidden_subtree_templates.end-date")},single,date`, isInheritable: true }, { name: "label:startTime", type: "label", - value: "promoted,alias=Start Time,single,time", + value: `promoted,alias=${t("hidden_subtree_templates.start-time")},single,time`, isInheritable: true }, { name: "label:endTime", type: "label", - value: "promoted,alias=End Time,single,time", + value: `promoted,alias=${t("hidden_subtree_templates.end-time")},single,time`, isInheritable: true } ] @@ -121,7 +122,7 @@ export default function buildHiddenSubtreeTemplates() { { id: "_template_table", type: "book", - title: "Table", + title: t("hidden_subtree_templates.table"), icon: "bx bx-table", attributes: [ { @@ -142,7 +143,7 @@ export default function buildHiddenSubtreeTemplates() { { id: "_template_geo_map", type: "book", - title: "Geo Map", + title: t("hidden_subtree_templates.geo-map"), icon: "bx bx-map-alt", attributes: [ { @@ -165,7 +166,7 @@ export default function buildHiddenSubtreeTemplates() { { name: "label:geolocation", type: "label", - value: "promoted,alias=Geolocation,single,text", + value: `promoted,alias=${t("hidden_subtree_templates.geolocation")},single,text`, isInheritable: true } ]