mirror of
https://github.com/TriliumNext/Trilium.git
synced 2025-12-10 03:53:37 -06:00
chore(layout): use translation for badges
This commit is contained in:
parent
ee6512a1a6
commit
668ee219c6
@ -2129,5 +2129,11 @@
|
|||||||
"tab_history_navigation_buttons": {
|
"tab_history_navigation_buttons": {
|
||||||
"go-back": "Go back to previous note",
|
"go-back": "Go back to previous note",
|
||||||
"go-forward": "Go forward to next note"
|
"go-forward": "Go forward to next note"
|
||||||
|
},
|
||||||
|
"breadcrumb_badges": {
|
||||||
|
"read_only_explicit": "Read-only",
|
||||||
|
"read_only_auto": "Auto read-only",
|
||||||
|
"shared_publicly": "Shared publicly",
|
||||||
|
"shared_locally": "Shared locally"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import { useIsNoteReadOnly, useNoteContext } from "./react/hooks";
|
|||||||
import Icon from "./react/Icon";
|
import Icon from "./react/Icon";
|
||||||
import { useShareInfo } from "./shared_info";
|
import { useShareInfo } from "./shared_info";
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
|
import { t } from "../services/i18n";
|
||||||
|
|
||||||
export default function BreadcrumbBadges() {
|
export default function BreadcrumbBadges() {
|
||||||
return (
|
return (
|
||||||
@ -24,7 +25,7 @@ function ReadOnlyBadge() {
|
|||||||
<Badge
|
<Badge
|
||||||
icon="bx bx-lock"
|
icon="bx bx-lock"
|
||||||
onClick={() => enableEditing()}>
|
onClick={() => enableEditing()}>
|
||||||
{isExplicitReadOnly ? "Read-only" : "Auto read-only"}
|
{isExplicitReadOnly ? t("breadcrumb_badges.read_only_explicit") : t("breadcrumb_badges.read_only_auto")}
|
||||||
</Badge>
|
</Badge>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -37,7 +38,7 @@ function ShareBadge() {
|
|||||||
<Badge
|
<Badge
|
||||||
icon={isSharedExternally ? "bx bx-world" : "bx bx-link"}
|
icon={isSharedExternally ? "bx bx-world" : "bx bx-link"}
|
||||||
>
|
>
|
||||||
{isSharedExternally ? "Shared publicly" : "Shared locally"}
|
{isSharedExternally ? t("breadcrumb_badges.shared_publicly") : t("breadcrumb_badges.shared_locally")}
|
||||||
</Badge>
|
</Badge>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user