Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
add translation for ribbon widgets: note_paths.js
Nriver835891999efd
diff --git a/src/public/app/widgets/ribbon_widgets/note_paths.js b/src/public/app/widgets/ribbon_widgets/note_paths.jsindex 7d8f2102d5..45fd04122d 100644--- a/src/public/app/widgets/ribbon_widgets/note_paths.js+++ b/src/public/app/widgets/ribbon_widgets/note_paths.js@@ -1,6 +1,7 @@import NoteContextAwareWidget from "../note_context_aware_widget.js";import treeService from "../../services/tree.js";import linkService from "../../services/link.js";+import { t } from "../../services/i18n.js";const TPL = `<div class="note-paths-widget">@@ -32,7 +33,7 @@ const TPL = `<ul class="note-path-list"></ul>- <button class="btn btn-sm" data-trigger-command="cloneNoteIdsTo">Clone note to new location...</button>+ <button class="btn btn-sm" data-trigger-command="cloneNoteIdsTo">${t("note_paths.clone_button")}</button></div>`;export default class NotePathsWidget extends NoteContextAwareWidget {@@ -47,7 +48,7 @@ export default class NotePathsWidget extends NoteContextAwareWidget {getTitle() {return {show: true,- title: 'Note Paths',+ title: t("note_paths.title"),icon: 'bx bx-collection'};}@@ -76,10 +77,9 @@ export default class NotePathsWidget extends NoteContextAwareWidget {.filter(notePath => !notePath.isHidden);if (sortedNotePaths.length > 0) {- this.$notePathIntro.text("This note is placed into the following paths:");- }- else {- this.$notePathIntro.text("This note is not yet placed into the note tree.");+ this.$notePathIntro.text(t("note_paths.intro_placed"));+ } else {+ this.$notePathIntro.text(t("note_paths.intro_not_placed"));}const renderedPaths = [];@@ -110,21 +110,20 @@ export default class NotePathsWidget extends NoteContextAwareWidget {if (!notePathRecord || notePathRecord.isInHoistedSubTree) {$noteLink.addClass("path-in-hoisted-subtree");- }- else {- icons.push(`<span class="bx bx-trending-up" title="This path is outside of hoisted note and you would have to unhoist."></span>`);+ } else {+ icons.push(`<span class="bx bx-trending-up" title="${t("note_paths.outside_hoisted")}"></span>`);}if (notePathRecord?.isArchived) {$noteLink.addClass("path-archived");- icons.push(`<span class="bx bx-archive" title="Archived"></span>`);+ icons.push(`<span class="bx bx-archive" title="${t("note_paths.archived")}"></span>`);}if (notePathRecord?.isSearch) {$noteLink.addClass("path-search");- icons.push(`<span class="bx bx-search" title="Search"></span>`);+ icons.push(`<span class="bx bx-search" title="${t("note_paths.search")}"></span>`);}if (icons.length > 0) {diff --git a/src/public/translations/cn/translation.json b/src/public/translations/cn/translation.jsonindex 6ea3d5c44f..ccb3f3d057 100644--- a/src/public/translations/cn/translation.json+++ b/src/public/translations/cn/translation.json@@ -721,5 +721,14 @@"open_full": "展开显示","collapse": "折叠到正常大小","title": "笔记地图"+ },+ "note_paths": {+ "title": "笔记路径",+ "clone_button": "克隆笔记到新位置...",+ "intro_placed": "此笔记放置在以下路径中:",+ "intro_not_placed": "此笔记尚未放入笔记树中。",+ "outside_hoisted": "此路径在提升的笔记之外,您需要取消提升。",+ "archived": "已归档",+ "search": "搜索"}}diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.jsonindex 059dea8077..1d959ee038 100644--- a/src/public/translations/en/translation.json+++ b/src/public/translations/en/translation.json@@ -722,5 +722,14 @@"open_full": "Expand to full","collapse": "Collapse to normal size","title": "Note Map"+ },+ "note_paths": {+ "title": "Note Paths",+ "clone_button": "Clone note to new location...",+ "intro_placed": "This note is placed into the following paths:",+ "intro_not_placed": "This note is not yet placed into the note tree.",+ "outside_hoisted": "This path is outside of hoisted note and you would have to unhoist.",+ "archived": "Archived",+ "search": "Search"}}