From e6c27e44b63f22248c96dcfa2cb9557f8f69ae94 Mon Sep 17 00:00:00 2001 From: QazCetelic Date: Fri, 20 Oct 2023 12:13:03 +0200 Subject: [PATCH] Use gettext for localization --- pkg/systemd/bootInfo.jsx | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/pkg/systemd/bootInfo.jsx b/pkg/systemd/bootInfo.jsx index d46b87d685e5..836cd8d6ee1f 100644 --- a/pkg/systemd/bootInfo.jsx +++ b/pkg/systemd/bootInfo.jsx @@ -13,6 +13,8 @@ import { import "./bootInfo.scss"; import { EmptyState, EmptyStateBody } from "@patternfly/react-core/dist/esm/components/EmptyState"; +const _ = cockpit.gettext; + export function BootInfo() { const [svg, setSvg] = useState(undefined); const [summary, setSummary] = useState(null); @@ -59,7 +61,7 @@ export function BootInfo() { return (
- + @@ -72,10 +74,10 @@ export function BootInfo() { return (
- + - Are you sure systemd-analyze is available? - systemd-analyze failed to load boot info and returned the following error: + {_("Are you sure systemd-analyze is available?")} + {_("systemd-analyze failed to load boot info and returned the following error:")} {summary.toString()} @@ -95,7 +97,7 @@ export function BootInfo() { return (
- Boot Info + { _("Boot Info") }

{summary} @@ -103,27 +105,27 @@ export function BootInfo() {

- Activating + { _("Activating") }
- Active + { _("Active") }
- Deactivating + { _("Deactivating") }
- Setting up security module + { _("Setting up security module") }
- Generators + { _("Generators") }
- Loading unit files + { _("Loading unit files") }