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
chore(react/collections): use translation
Elian Doranc4d771f2c6ba
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex d265e02838..81c0cacc74 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -2028,5 +2028,8 @@"pagination": {"page_title": "Page of {{startIndex}} - {{endIndex}}","total_notes": "{{count}} notes"+ },+ "collections": {+ "rendering_error": "Unable to show content due to an error."}}diff --git a/apps/client/src/widgets/collections/legacy/ListView.tsx b/apps/client/src/widgets/collections/legacy/ListView.tsxindex 46450707ea..cc08685cc2 100644--- a/apps/client/src/widgets/collections/legacy/ListView.tsx+++ b/apps/client/src/widgets/collections/legacy/ListView.tsx@@ -9,6 +9,7 @@ import content_renderer from "../../../services/content_renderer";import { Pager, usePagination } from "../Pagination";import tree from "../../../services/tree";import link from "../../../services/link";+import { t } from "../../../services/i18n";export function ListView({ note, noteIds: unfilteredNoteIds }: ViewModeProps) {const [ isExpanded ] = useNoteLabelBoolean(note, "expanded");@@ -115,7 +116,7 @@ function NoteContent({ note, trim }: { note: FNote, trim?: boolean }) {.catch(e => {console.warn(`Caught error while rendering note '${note.noteId}' of type '${note.type}'`);console.error(e);- contentRef.current?.replaceChildren("rendering error");+ contentRef.current?.replaceChildren(t("collections.rendering_error"));})}, [ note ]);