mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 10:39:00 +01:00
chore(react/collections): use translation
This commit is contained in:
parent
566ffbdde2
commit
c4d771f2c6
@ -2028,5 +2028,8 @@
|
|||||||
"pagination": {
|
"pagination": {
|
||||||
"page_title": "Page of {{startIndex}} - {{endIndex}}",
|
"page_title": "Page of {{startIndex}} - {{endIndex}}",
|
||||||
"total_notes": "{{count}} notes"
|
"total_notes": "{{count}} notes"
|
||||||
|
},
|
||||||
|
"collections": {
|
||||||
|
"rendering_error": "Unable to show content due to an error."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import content_renderer from "../../../services/content_renderer";
|
|||||||
import { Pager, usePagination } from "../Pagination";
|
import { Pager, usePagination } from "../Pagination";
|
||||||
import tree from "../../../services/tree";
|
import tree from "../../../services/tree";
|
||||||
import link from "../../../services/link";
|
import link from "../../../services/link";
|
||||||
|
import { t } from "../../../services/i18n";
|
||||||
|
|
||||||
export function ListView({ note, noteIds: unfilteredNoteIds }: ViewModeProps) {
|
export function ListView({ note, noteIds: unfilteredNoteIds }: ViewModeProps) {
|
||||||
const [ isExpanded ] = useNoteLabelBoolean(note, "expanded");
|
const [ isExpanded ] = useNoteLabelBoolean(note, "expanded");
|
||||||
@ -115,7 +116,7 @@ function NoteContent({ note, trim }: { note: FNote, trim?: boolean }) {
|
|||||||
.catch(e => {
|
.catch(e => {
|
||||||
console.warn(`Caught error while rendering note '${note.noteId}' of type '${note.type}'`);
|
console.warn(`Caught error while rendering note '${note.noteId}' of type '${note.type}'`);
|
||||||
console.error(e);
|
console.error(e);
|
||||||
contentRef.current?.replaceChildren("rendering error");
|
contentRef.current?.replaceChildren(t("collections.rendering_error"));
|
||||||
})
|
})
|
||||||
}, [ note ]);
|
}, [ note ]);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user