mirror of
https://github.com/TriliumNext/Trilium.git
synced 2025-12-11 14:01:38 -06:00
chore(collections/list): use translations for expand depth
This commit is contained in:
parent
45d2e1f5e2
commit
c65b03db41
@ -767,6 +767,9 @@
|
|||||||
"expand_all_children": "Expand all children",
|
"expand_all_children": "Expand all children",
|
||||||
"collapse": "Collapse",
|
"collapse": "Collapse",
|
||||||
"expand": "Expand",
|
"expand": "Expand",
|
||||||
|
"expand_first_level": "Expand direct children",
|
||||||
|
"expand_nth_level": "Expand {{depth}} levels",
|
||||||
|
"expand_all_levels": "Expand all levels",
|
||||||
"book_properties": "Collection Properties",
|
"book_properties": "Collection Properties",
|
||||||
"invalid_view_type": "Invalid view type '{{type}}'",
|
"invalid_view_type": "Invalid view type '{{type}}'",
|
||||||
"calendar": "Calendar",
|
"calendar": "Calendar",
|
||||||
|
|||||||
@ -194,13 +194,13 @@ function ListExpandDepth(context: { note: FNote, parentComponent: Component }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ListExpandDepthButton label="Expand 1 level" depth={1} {...context} checked={currentDepth === ""} />
|
<ListExpandDepthButton label={t("book_properties.expand_first_level")} depth={1} {...context} checked={currentDepth === ""} />
|
||||||
<FormDropdownDivider />
|
<FormDropdownDivider />
|
||||||
{Array.from({ length: 4 }, (_, i) => i + 2).map(depth => [
|
{Array.from({ length: 4 }, (_, i) => i + 2).map(depth => [
|
||||||
<ListExpandDepthButton label={`Expand ${depth} levels`} depth={depth} {...context} checked={!!currentDepth && parseInt(currentDepth, 10) === depth} />
|
<ListExpandDepthButton label={t("book_properties.expand_nth_level", { depth })} depth={depth} {...context} checked={!!currentDepth && parseInt(currentDepth, 10) === depth} />
|
||||||
])}
|
])}
|
||||||
<FormDropdownDivider />
|
<FormDropdownDivider />
|
||||||
<ListExpandDepthButton label="Expand all levels" depth="all" checked={currentDepth === "all"} {...context} />
|
<ListExpandDepthButton label={t("book_properties.expand_all_levels")} depth="all" checked={currentDepth === "all"} {...context} />
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user