chore(react/collections): use translation

This commit is contained in:
Elian Doran 2025-08-30 17:30:35 +03:00
parent 566ffbdde2
commit c4d771f2c6
No known key found for this signature in database
2 changed files with 5 additions and 1 deletions

View File

@ -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."
}
}

View File

@ -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 ]);