Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Localize alerts overview journey

rcourtmanf81d35f3b19c
diff --git a/docs/release-control/v6/internal/records/localized-product-surfaces-alerts-overview-2026-06-14.md b/docs/release-control/v6/internal/records/localized-product-surfaces-alerts-overview-2026-06-14.md
new file mode 100644
index 0000000000..0d2a03c72d
--- /dev/null
+++ b/docs/release-control/v6/internal/records/localized-product-surfaces-alerts-overview-2026-06-14.md
@@ -0,0 +1,29 @@
+# Localized Product Surfaces Alerts Overview - 2026-06-14
+
+## Slice
+
+- Claimed governed slice: `candidate-lane:localized-product-surfaces`.
+- Migrated journey: Alerts Overview operator triage, including the Alerts page shell/header/tab labels, activation toggle labels and feedback, overview stat cards, empty/paused states, active-alert acknowledge controls, incident timeline panel and filters, and Pulse Assistant alert investigation handoff briefing.
+- First-wave locales: German (`de`) and Spanish (`es`).
+
+## Evidence
+
+- `frontend-modern/src/i18n/messages.ts` now includes explicit German and Spanish catalog entries for the migrated Alerts Overview operator journey.
+- `frontend-modern/src/i18n/policy.ts` records Alerts Overview non-translation tokens and marks the migrated alert keys as a first-wave localized journey.
+- `frontend-modern/src/utils/alertOverviewPresentation.ts`, `alertActivationPresentation.ts`, and `alertTabsPresentation.ts` now route user-visible Alerts Overview, activation, tab, timeline, and acknowledgement copy through the canonical i18n layer.
+- `frontend-modern/src/pages/Alerts.tsx`, `frontend-modern/src/features/alerts/AlertOverviewStatsCards.tsx`, `AlertOverviewActiveAlertsSection.tsx`, `AlertOverviewAlertCard.tsx`, `useAlertAcknowledgementState.ts`, `frontend-modern/src/components/Alerts/IncidentTimelinePanel.tsx`, `IncidentEventFilters.tsx`, `InvestigateAlertButton.tsx`, and `alertAssistantHandoffModel.ts` now consume localized alert copy for the migrated journey.
+- Guardrails cover catalog completeness, explicit first-wave translations, unsupported-locale fallback through the shared i18n foundation, source checks that fail if migrated Alerts Overview copy returns to hardcoded English, and machine-facing token preservation for alert identifiers, alert types, resource names, node names, source messages, commands, command output, event payloads, logs, and Assistant model-context labels.
+
+## Verification
+
+- `npm test -- --run src/i18n/__tests__/i18n.test.ts src/utils/__tests__/alertOverviewPresentation.test.ts src/utils/__tests__/alertTabsPresentation.test.ts src/utils/__tests__/alertActivationPresentation.test.ts src/components/Alerts/__tests__/InvestigateAlertButton.test.tsx src/features/alerts/__tests__/alertsLocalization.guardrails.test.ts src/features/alerts/__tests__/OverviewTab.emptystate.test.tsx src/features/alerts/__tests__/OverviewTab.timelineerror.test.tsx src/features/alerts/__tests__/OverviewTab.total24h.test.tsx` passed: 9 files, 96 tests.
+- `npm run type-check` passed.
+- `npm run dev:status` passed: managed dev server healthy at `http://127.0.0.1:5173` with frontend shell, proxy, and backend health checks green.
+- `npm run lint:canonical-platforms` passed.
+- Browser proof passed against the managed dev server at `http://127.0.0.1:5173`. `/alerts/overview` was not auth-blocked and rendered live active alerts. German proof rendered `Warnmeldungsuebersicht`, `Warnmeldungen aktiviert`, `Ausgeloest (24h)`, `Aktive Warnmeldungen`, `Bestaetigen`, `Zeitleiste`, and `Pulse Assistant fragen` while preserving source alert messages such as `VM 'docker' is powered off`, alert type labels such as `(Powered Off)`, resource names such as `docker`, and node/resource strings such as `minipc`. Spanish proof used Settings > General > Language to switch to `Español`, then `/alerts/overview` rendered `Resumen de alertas`, `Alertas activadas`, `Activadas (24h)`, `Alertas activas`, `Reconocer todas (12)`, `Reconocer`, `Linea de tiempo`, and `Preguntar a Pulse Assistant` while preserving the same source alert data. Expanding one active alert timeline rendered the localized `Ocultar linea de tiempo` action and `Cargando linea de tiempo...` loading state; that selected incident request did not resolve to a loaded/empty/error timeline during the browser wait, and browser console errors were empty. Loaded timeline, unavailable timeline, filter, note, event-payload, and machine-token preservation are covered by the targeted unit tests.
+
+## Residuals
+
+- The broader localized-product-surfaces lane remains open. This slice does not translate website/acquisition copy, install and troubleshooting docs, Settings surfaces beyond Settings General, first-session surfaces beyond the already-migrated setup journey, core monitoring tables outside Alerts Overview, alert configuration/history surfaces outside this overview triage flow, mobile handoff copy, commercial trust surfaces, public checkout/account surfaces, or native mobile surfaces.
+- Locale QA remains local guardrail and browser proof for this migrated frontend-modern journey. Broader screenshot review, native speaker review, pseudo-locale coverage, extraction tooling, and future French/Brazilian Portuguese/Japanese/Simplified Chinese/Korean expansion remain separate governed work.
+- Machine-facing payloads, log text, config keys, API fields, commands, source resource names, alert identifiers, event payloads, model-context labels, and user-entered identifiers remain intentionally untranslated.
diff --git a/docs/release-control/v6/internal/status.json b/docs/release-control/v6/internal/status.json
index 1c51e20a21..cf7d5e99d9 100644
--- a/docs/release-control/v6/internal/status.json
+++ b/docs/release-control/v6/internal/status.json
@@ -6929,6 +6929,11 @@
"proposed_resolution": "new-lane",
"coverage_impact": 8,
"evidence": [
+ {
+ "repo": "pulse",
+ "path": "docs/release-control/v6/internal/records/localized-product-surfaces-alerts-overview-2026-06-14.md",
+ "kind": "file"
+ },
{
"repo": "pulse",
"path": "docs/release-control/v6/internal/records/localized-product-surfaces-first-session-monitoring-2026-06-14.md",
@@ -6944,6 +6949,11 @@
"path": "docs/release-control/v6/internal/subsystems/agent-lifecycle.md",
"kind": "file"
},
+ {
+ "repo": "pulse",
+ "path": "docs/release-control/v6/internal/subsystems/alerts.md",
+ "kind": "file"
+ },
{
"repo": "pulse",
"path": "docs/release-control/v6/internal/subsystems/cloud-paid.md",
@@ -6954,6 +6964,31 @@
"path": "docs/release-control/v6/internal/subsystems/frontend-primitives.md",
"kind": "file"
},
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/components/Alerts/__tests__/InvestigateAlertButton.test.tsx",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/components/Alerts/alertAssistantHandoffModel.ts",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/components/Alerts/IncidentEventFilters.tsx",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/components/Alerts/IncidentTimelinePanel.tsx",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/components/Alerts/InvestigateAlertButton.tsx",
+ "kind": "file"
+ },
{
"repo": "pulse",
"path": "frontend-modern/src/components/Settings/__tests__/GeneralSettingsPanel.guardrails.test.ts",
@@ -7014,6 +7049,46 @@
"path": "frontend-modern/src/components/SetupWizard/steps/WelcomeStep.tsx",
"kind": "file"
},
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/features/alerts/__tests__/alertsLocalization.guardrails.test.ts",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/features/alerts/__tests__/OverviewTab.emptystate.test.tsx",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/features/alerts/__tests__/OverviewTab.timelineerror.test.tsx",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/features/alerts/__tests__/OverviewTab.total24h.test.tsx",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/features/alerts/AlertOverviewActiveAlertsSection.tsx",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/features/alerts/AlertOverviewAlertCard.tsx",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/features/alerts/AlertOverviewStatsCards.tsx",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/features/alerts/useAlertAcknowledgementState.ts",
+ "kind": "file"
+ },
{
"repo": "pulse",
"path": "frontend-modern/src/i18n/__tests__/i18n.test.ts",
@@ -7029,10 +7104,45 @@
"path": "frontend-modern/src/i18n/policy.ts",
"kind": "file"
},
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/pages/Alerts.tsx",
+ "kind": "file"
+ },
{
"repo": "pulse",
"path": "frontend-modern/src/pages/RuntimeHome.tsx",
"kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/utils/__tests__/alertActivationPresentation.test.ts",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/utils/__tests__/alertOverviewPresentation.test.ts",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/utils/__tests__/alertTabsPresentation.test.ts",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/utils/alertActivationPresentation.ts",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/utils/alertOverviewPresentation.ts",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/utils/alertTabsPresentation.ts",
+ "kind": "file"
}
]
}
diff --git a/docs/release-control/v6/internal/subsystems/alerts.md b/docs/release-control/v6/internal/subsystems/alerts.md
index a898b8e27c..2e1c9e288f 100644
--- a/docs/release-control/v6/internal/subsystems/alerts.md
+++ b/docs/release-control/v6/internal/subsystems/alerts.md
@@ -506,6 +506,28 @@ timeline, filter-chip, note-editor, and resource-incident panel presentation.
Future alert presentation work must extend those helpers through the alerts
contract instead of leaving alert-facing wording or styling inlined in page or
feature shells while the registry treats the helpers as unowned.
+German and Spanish localization for the Alerts Overview operator journey is
+owned by the canonical i18n layer plus the alert presentation helpers:
+`frontend-modern/src/i18n/messages.ts` and
+`frontend-modern/src/i18n/policy.ts` own the catalog and non-translation
+policy, while `frontend-modern/src/utils/alertOverviewPresentation.ts`,
+`frontend-modern/src/utils/alertActivationPresentation.ts`, and
+`frontend-modern/src/utils/alertTabsPresentation.ts` own the translated
+operator-facing alert overview, activation, tab, timeline, and acknowledgement
+copy consumed by `frontend-modern/src/pages/Alerts.tsx`,
+`frontend-modern/src/features/alerts/AlertOverviewStatsCards.tsx`,
+`frontend-modern/src/features/alerts/AlertOverviewActiveAlertsSection.tsx`,
+`frontend-modern/src/features/alerts/AlertOverviewAlertCard.tsx`,
+`frontend-modern/src/features/alerts/useAlertAcknowledgementState.ts`,
+`frontend-modern/src/components/Alerts/IncidentTimelinePanel.tsx`,
+`frontend-modern/src/components/Alerts/IncidentEventFilters.tsx`,
+`frontend-modern/src/components/Alerts/InvestigateAlertButton.tsx`, and
+`frontend-modern/src/components/Alerts/alertAssistantHandoffModel.ts`.
+Machine-facing alert identifiers, alert types, resource IDs, resource names,
+node names, source-system messages, commands, command output, event payloads,
+log text, and the English Assistant model-context labels must remain
+untranslated; only the user-visible briefing labels and alert controls may use
+the active app locale.
The remaining alert configuration and history presentation helpers now also
have explicit alerts ownership. `frontend-modern/src/utils/alertActivationPresentation.ts`,
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index f1df5ba5a4..3a87a48e3f 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -205,7 +205,14 @@ including the Setup Wizard shell, welcome/security steps, setup completion
handoff, and runtime-home loading handoff, follow the same catalog path; their
guardrails must fail if the migrated journey returns to page-local English or
translates commands, URLs, generated credentials, product/source identifiers, or
-reported resource names.
+reported resource names. Migrated Alerts Overview surfaces, including the page
+shell, overview stat cards, active-alert triage list, acknowledgement actions,
+incident timeline panel/filter controls, and Pulse Assistant alert handoff
+briefing, must also route user-visible copy through the catalog and
+alert-owned presentation helpers. Alert IDs, alert types, resource IDs,
+resource names, node names, source messages, event payloads, commands, command
+output, logs, and Assistant model-context labels stay machine-stable and
+untranslated.
Alert thresholds consume the shared FilterBar primitive and route state, while
the alerts subsystem owns the resource data and platform-specific threshold
diff --git a/frontend-modern/src/components/Alerts/IncidentEventFilters.tsx b/frontend-modern/src/components/Alerts/IncidentEventFilters.tsx
index 4f7d5971bd..1fe76394f8 100644
--- a/frontend-modern/src/components/Alerts/IncidentEventFilters.tsx
+++ b/frontend-modern/src/components/Alerts/IncidentEventFilters.tsx
@@ -1,5 +1,10 @@
import { For, type Accessor } from 'solid-js';
-import { INCIDENT_EVENT_LABELS, INCIDENT_EVENT_TYPES } from '@/features/alerts/types';
+import { INCIDENT_EVENT_TYPES } from '@/features/alerts/types';
+import {
+ getAlertTimelineEventTypeLabel,
+ getAlertTimelineFilterLabel,
+ getAlertTimelineQuickFilterLabel,
+} from '@/utils/alertOverviewPresentation';
import {
getAlertIncidentEventFilterActionButtonClass,
getAlertIncidentEventFilterChipClass,
@@ -26,21 +31,26 @@ export function IncidentEventFilters(props: IncidentEventFiltersProps) {
props.setFilters(next);
};
- const label = () => (props.variant === 'panel' ? 'Filter events:' : 'Filters');
+ const quickSelectionActions = [
+ { id: 'all', label: () => getAlertTimelineQuickFilterLabel('all') },
+ { id: 'none', label: () => getAlertTimelineQuickFilterLabel('none') },
+ ] as const;
return (
<div class={getAlertIncidentEventFilterContainerClass(props.variant)}>
- <span class={getAlertIncidentEventFilterLabelClass(props.variant)}>{label()}</span>
- <For each={props.showQuickSelection ? ['All', 'None'] : []}>
+ <span class={getAlertIncidentEventFilterLabelClass(props.variant)}>
+ {getAlertTimelineFilterLabel(props.variant)}
+ </span>
+ <For each={props.showQuickSelection ? quickSelectionActions : []}>
{(action) => (
<button
type="button"
class={getAlertIncidentEventFilterActionButtonClass()}
onClick={() =>
- props.setFilters(action === 'All' ? new Set(INCIDENT_EVENT_TYPES) : new Set())
+ props.setFilters(action.id === 'all' ? new Set(INCIDENT_EVENT_TYPES) : new Set())
}
>
- {action}
+ {action.label()}
</button>
)}
</For>
@@ -53,7 +63,7 @@ export function IncidentEventFilters(props: IncidentEventFiltersProps) {
class={getAlertIncidentEventFilterChipClass(selected(), props.variant)}
onClick={() => toggleFilter(type)}
>
- {INCIDENT_EVENT_LABELS[type]}
+ {getAlertTimelineEventTypeLabel(type)}
</button>
);
}}
diff --git a/frontend-modern/src/components/Alerts/IncidentTimelinePanel.tsx b/frontend-modern/src/components/Alerts/IncidentTimelinePanel.tsx
index 87afecc49c..39b3c6468e 100644
--- a/frontend-modern/src/components/Alerts/IncidentTimelinePanel.tsx
+++ b/frontend-modern/src/components/Alerts/IncidentTimelinePanel.tsx
@@ -7,9 +7,16 @@ import { IncidentTimelineEventCard } from '@/components/Alerts/IncidentTimelineE
import { FormTextarea } from '@/components/shared/FormTextarea';
import {
getAlertTimelineEmptyState,
+ getAlertTimelineAcknowledgedLabel,
+ getAlertTimelineClosedAtLabel,
getAlertTimelineFailureState,
getAlertTimelineFilterEmptyState,
+ getAlertTimelineHeading,
getAlertTimelineLoadingState,
+ getAlertTimelineNoteLabel,
+ getAlertTimelineNotePlaceholder,
+ getAlertTimelineOpenedAtLabel,
+ getAlertTimelineSaveNoteLabel,
getAlertTimelineUnavailableState,
} from '@/utils/alertOverviewPresentation';
import {
@@ -19,8 +26,6 @@ import {
getAlertIncidentNoteTextareaClass,
getAlertIncidentTimelineHeadingClass,
getAlertIncidentTimelineMetaRowClass,
- getAlertResourceIncidentNotePlaceholder,
- getAlertResourceIncidentSaveNoteLabel,
} from '@/utils/alertIncidentPresentation';
export interface IncidentTimelinePanelProps {
@@ -53,17 +58,27 @@ export function IncidentTimelinePanel(props: IncidentTimelinePanelProps) {
<div class="space-y-3">
<div class="flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between">
<div class={getAlertIncidentTimelineMetaRowClass()}>
- <span class={getAlertIncidentTimelineHeadingClass()}>Incident</span>
+ <span class={getAlertIncidentTimelineHeadingClass()}>
+ {getAlertTimelineHeading()}
+ </span>
<span>{loadedTimeline().status}</span>
<Show when={loadedTimeline().acknowledged}>
- <span class={getAlertIncidentAcknowledgedBadgeClass()}>acknowledged</span>
+ <span class={getAlertIncidentAcknowledgedBadgeClass()}>
+ {getAlertTimelineAcknowledgedLabel()}
+ </span>
</Show>
<Show when={loadedTimeline().openedAt}>
- <span>opened {new Date(loadedTimeline().openedAt).toLocaleString()}</span>
+ <span>
+ {getAlertTimelineOpenedAtLabel(
+ new Date(loadedTimeline().openedAt).toLocaleString(),
+ )}
+ </span>
</Show>
<Show when={loadedTimeline().closedAt}>
<span>
- closed {new Date(loadedTimeline().closedAt as string).toLocaleString()}
+ {getAlertTimelineClosedAtLabel(
+ new Date(loadedTimeline().closedAt as string).toLocaleString(),
+ )}
</span>
</Show>
</div>
@@ -94,12 +109,12 @@ export function IncidentTimelinePanel(props: IncidentTimelinePanelProps) {
</Show>
<div class="flex flex-col gap-2">
<FormTextarea
- label="Incident note"
+ label={getAlertTimelineNoteLabel()}
labelClass="sr-only"
fieldBaseClass="contents"
textareaBaseClass={getAlertIncidentNoteTextareaClass()}
rows={2}
- placeholder={getAlertResourceIncidentNotePlaceholder()}
+ placeholder={getAlertTimelineNotePlaceholder()}
value={props.noteDraft}
onInput={(event) => props.onNoteDraftChange(event.currentTarget.value)}
/>
@@ -109,7 +124,7 @@ export function IncidentTimelinePanel(props: IncidentTimelinePanelProps) {
disabled={props.noteSaving || !props.noteDraft.trim()}
onClick={() => props.onSaveNote()}
>
- {getAlertResourceIncidentSaveNoteLabel(props.noteSaving)}
+ {getAlertTimelineSaveNoteLabel(props.noteSaving)}
</button>
</div>
</div>
diff --git a/frontend-modern/src/components/Alerts/InvestigateAlertButton.tsx b/frontend-modern/src/components/Alerts/InvestigateAlertButton.tsx
index a2807e350a..20dc2e673a 100644
--- a/frontend-modern/src/components/Alerts/InvestigateAlertButton.tsx
+++ b/frontend-modern/src/components/Alerts/InvestigateAlertButton.tsx
@@ -1,5 +1,6 @@
import { Show, createSignal } from 'solid-js';
import { aiChatStore } from '@/stores/aiChat';
+import { t } from '@/i18n';
import type { Alert } from '@/types/api';
import { useUpgradeNavigation } from '@/components/shared/useUpgradeNavigation';
import { getUpgradeActionDestination } from '@/stores/licenseCommercial';
@@ -28,10 +29,9 @@ export function InvestigateAlertButton(props: InvestigateAlertButtonProps) {
const canShowUpgradePrompt = () => !presentationPolicyHidesUpgradePrompts();
const lockedTitle = () =>
canShowUpgradePrompt()
- ? 'Pro required to investigate alerts with Pulse Assistant'
- : 'Pulse Assistant alert investigation is not available for this alert';
- const buttonTitle = () =>
- isLocked() ? lockedTitle() : 'Ask Pulse Assistant to investigate this alert';
+ ? t('alerts.assistant.locked.proRequired')
+ : t('alerts.assistant.locked.unavailable');
+ const buttonTitle = () => (isLocked() ? lockedTitle() : t('alerts.assistant.unlockedTitle'));
// Don't render if AI is not enabled
if (aiChatStore.enabled !== true) {
return null;
@@ -133,7 +133,7 @@ export function InvestigateAlertButton(props: InvestigateAlertButtonProps) {
d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"
/>
</svg>
- <span class="text-xs font-medium">Ask Pulse Assistant</span>
+ <span class="text-xs font-medium">{t('alerts.assistant.button.text')}</span>
</button>
);
}
@@ -164,7 +164,7 @@ export function InvestigateAlertButton(props: InvestigateAlertButtonProps) {
d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"
/>
</svg>
- <span>Investigate with Pulse Assistant</span>
+ <span>{t('alerts.assistant.button.full')}</span>
<Show when={isHovered()}>
<span class="text-xs opacity-80">→</span>
</Show>
diff --git a/frontend-modern/src/components/Alerts/__tests__/InvestigateAlertButton.test.tsx b/frontend-modern/src/components/Alerts/__tests__/InvestigateAlertButton.test.tsx
index be1f684bb4..745c619785 100644
--- a/frontend-modern/src/components/Alerts/__tests__/InvestigateAlertButton.test.tsx
+++ b/frontend-modern/src/components/Alerts/__tests__/InvestigateAlertButton.test.tsx
@@ -1,5 +1,6 @@
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';
+import { DEFAULT_LOCALE, setActiveLocale } from '@/i18n';
import type { Alert } from '@/types/api';
import { getPublicPricingUrl } from '@/utils/pricingHandoff';
@@ -105,9 +106,11 @@ function openedBriefing(): { statusLabel?: string; detailLines?: string[]; subje
afterEach(() => {
cleanup();
vi.restoreAllMocks();
+ setActiveLocale(DEFAULT_LOCALE);
});
beforeEach(() => {
+ setActiveLocale(DEFAULT_LOCALE);
openMock.mockReset();
formatAlertValueMock.mockClear();
openUpgradeDestinationMock.mockReset();
@@ -336,6 +339,54 @@ describe('InvestigateAlertButton', () => {
expect(JSON.stringify(context.briefing)).not.toContain('systemctl');
});
+ it('localizes the visible briefing while preserving machine identifiers and source values', async () => {
+ setActiveLocale('de');
+
+ const alert = makeAlert({
+ id: 'alert:vm-101:cpu',
+ resourceName: 'db-vm-01',
+ node: 'pve1',
+ nodeDisplayName: 'PVE Node 1',
+ type: 'cpu',
+ message: 'CPU usage is high',
+ });
+ render(() => <InvestigateAlertButton alert={alert} variant="text" />);
+
+ expect(screen.getByRole('button')).toHaveTextContent('Pulse Assistant fragen');
+
+ await fireEvent.click(screen.getByRole('button'));
+
+ const context = openedContext();
+ const briefing = openedBriefing();
+
+ expect(briefing).toMatchObject({
+ sourceLabel: 'Pulse Alerts',
+ title: 'Warnungsanalyse angehaengt',
+ subject: 'Warnung cpu auf db-vm-01',
+ actionLabel: 'Warnmeldung alert:vm-101:cpu untersuchen',
+ safetyNote: 'Diagnosen und Behebungen erfordern die Freigabe durch einen Operator.',
+ });
+ expect(briefing.statusLabel).toContain('Warnung-Warnmeldung');
+ expect(briefing.detailLines).toEqual(
+ expect.arrayContaining([
+ 'Aktueller Wert 82.5%; Schwellwert 80.0%',
+ 'Knoten: PVE Node 1',
+ 'Meldung: CPU usage is high',
+ ]),
+ );
+ expect(context.context).toMatchObject({
+ alertIdentifier: 'alert:vm-101:cpu',
+ alertType: 'cpu',
+ alertMessage: 'CPU usage is high',
+ guestName: 'db-vm-01',
+ node: 'pve1',
+ });
+ expect(context.handoffContext).toContain('Alert Identifier: alert:vm-101:cpu');
+ expect(context.handoffContext).toContain('Alert Level: Warning');
+ expect(context.handoffContext).toContain('Resource: db-vm-01');
+ expect(context.handoffContext).toContain('Message: CPU usage is high');
+ });
+
it('does not open the upgrade destination when unlocked', async () => {
render(() => <InvestigateAlertButton alert={makeAlert()} />);
await fireEvent.click(screen.getByRole('button'));
diff --git a/frontend-modern/src/components/Alerts/alertAssistantHandoffModel.ts b/frontend-modern/src/components/Alerts/alertAssistantHandoffModel.ts
index 78ecae7a8b..a006e379af 100644
--- a/frontend-modern/src/components/Alerts/alertAssistantHandoffModel.ts
+++ b/frontend-modern/src/components/Alerts/alertAssistantHandoffModel.ts
@@ -1,5 +1,6 @@
import type { Alert } from '@/types/api';
import type { AIChatContext } from '@/stores/aiChat';
+import { DEFAULT_LOCALE, t, type SupportedLocale } from '@/i18n';
import { getCanonicalAlertId } from '@/features/alerts/identity';
import { formatAlertValue } from '@/utils/alertFormatters';
import { isMetricAlertType } from '@/utils/alerts';
@@ -24,6 +25,7 @@ export function buildAlertAssistantHandoff({
}: BuildAlertAssistantHandoffInput): AlertAssistantHandoff {
const alertIdentifier = getCanonicalAlertId(alert);
const durationText = formatAlertDuration(alert.startTime, now);
+ const modelDurationText = formatAlertDuration(alert.startTime, now, DEFAULT_LOCALE);
// State alerts (powered-off, unreachable, container-state, etc.) are
// binary or enumerated conditions, not threshold crossings. Backend
// sends value=0 and threshold=0 for those; rendering "current 0.0% /
@@ -35,6 +37,7 @@ export function buildAlertAssistantHandoff({
const thresholdValue = hasMetricValues ? formatAlertValue(alert.threshold, alert.type) : '';
const nodeLabel = alert.node ? alert.nodeDisplayName || alert.node : '';
const levelLabel = formatAlertLevel(alert.level);
+ const modelLevelLabel = formatAlertLevel(alert.level, DEFAULT_LOCALE);
const targetType = resolveAlertTargetType({
alertType: alert.type,
resourceType,
@@ -49,9 +52,9 @@ export function buildAlertAssistantHandoff({
alertIdentifier,
currentValue,
thresholdValue,
- durationText,
+ durationText: modelDurationText,
nodeLabel,
- levelLabel,
+ levelLabel: modelLevelLabel,
});
return {
@@ -69,19 +72,31 @@ export function buildAlertAssistantHandoff({
},
],
briefing: {
- sourceLabel: 'Pulse Alerts',
- title: 'Alert investigation attached',
- subject: `${levelLabel} ${alert.type} on ${alert.resourceName}`,
- statusLabel: `${levelLabel} alert · Active ${durationText}`,
+ sourceLabel: t('alerts.assistant.sourceLabel'),
+ title: t('alerts.assistant.title'),
+ subject: t('alerts.assistant.subject', {
+ level: levelLabel,
+ alertType: alert.type,
+ resourceName: alert.resourceName,
+ }),
+ statusLabel: t('alerts.assistant.statusLabel', {
+ level: levelLabel,
+ duration: durationText,
+ }),
detailLines: [
hasMetricValues
- ? `Current value ${currentValue}; threshold ${thresholdValue}`
+ ? t('alerts.assistant.detail.currentMetric', {
+ currentValue,
+ thresholdValue,
+ })
+ : undefined,
+ nodeLabel ? t('alerts.assistant.detail.node', { node: nodeLabel }) : undefined,
+ alert.message
+ ? t('alerts.assistant.detail.message', { message: alert.message })
: undefined,
- nodeLabel ? `Node: ${nodeLabel}` : undefined,
- alert.message ? `Message: ${alert.message}` : undefined,
].filter((line): line is string => Boolean(line)),
- actionLabel: `Investigate alert ${alertIdentifier}`,
- safetyNote: 'Diagnostics and remediation require operator approval.',
+ actionLabel: t('alerts.assistant.action.investigate', { alertIdentifier }),
+ safetyNote: t('alerts.assistant.safetyNote'),
},
context: {
alertIdentifier,
@@ -139,21 +154,39 @@ function formatContextLine(label: string, value?: string | number | null): strin
return text ? `${label}: ${text}` : undefined;
}
-function formatAlertDuration(startTime: string, now: Date): string {
+function formatAlertDuration(startTime: string, now: Date, locale?: SupportedLocale): string {
const startedAt = new Date(startTime).getTime();
const nowMs = now.getTime();
if (!Number.isFinite(startedAt) || !Number.isFinite(nowMs)) {
- return 'unknown duration';
+ return t('alerts.assistant.duration.unknown', {}, locale);
}
const durationMs = Math.max(0, nowMs - startedAt);
const durationMins = Math.floor(durationMs / 60000);
if (durationMins < 60) {
- return `${durationMins} min${durationMins !== 1 ? 's' : ''}`;
+ return t(
+ durationMins === 1 ? 'alerts.assistant.duration.minute' : 'alerts.assistant.duration.minutes',
+ { count: durationMins },
+ locale,
+ );
}
- return `${Math.floor(durationMins / 60)}h ${durationMins % 60}m`;
+ return t(
+ 'alerts.assistant.duration.hoursMinutes',
+ {
+ hours: Math.floor(durationMins / 60),
+ minutes: durationMins % 60,
+ },
+ locale,
+ );
}
-function formatAlertLevel(level: Alert['level']): string {
- return level.charAt(0).toUpperCase() + level.slice(1);
+function formatAlertLevel(level: Alert['level'], locale?: SupportedLocale): string {
+ const normalizedLevel = String(level);
+ if (normalizedLevel === 'critical') {
+ return t('alerts.assistant.level.critical', {}, locale);
+ }
+ if (normalizedLevel === 'info') {
+ return t('alerts.assistant.level.info', {}, locale);
+ }
+ return t('alerts.assistant.level.warning', {}, locale);
}
diff --git a/frontend-modern/src/features/alerts/AlertOverviewActiveAlertsSection.tsx b/frontend-modern/src/features/alerts/AlertOverviewActiveAlertsSection.tsx
index eed1902d7a..4606984905 100644
--- a/frontend-modern/src/features/alerts/AlertOverviewActiveAlertsSection.tsx
+++ b/frontend-modern/src/features/alerts/AlertOverviewActiveAlertsSection.tsx
@@ -3,8 +3,11 @@ import { For, Show } from 'solid-js';
import { SectionHeader } from '@/components/shared/SectionHeader';
import type { Alert } from '@/types/api';
import {
- ALERTS_EMPTY_STATE,
- ALERTS_THRESHOLD_HINT,
+ getAlertOverviewAcknowledgedToggleLabel,
+ getAlertOverviewActiveSectionTitle,
+ getAlertOverviewBulkAcknowledgeLabel,
+ getAlertOverviewEmptyState,
+ getAlertOverviewPausedState,
getAlertListEmptyState,
} from '@/utils/alertOverviewPresentation';
@@ -24,7 +27,7 @@ interface AlertOverviewActiveAlertsSectionProps {
export function AlertOverviewActiveAlertsSection(props: AlertOverviewActiveAlertsSectionProps) {
return (
<div>
- <SectionHeader title="Active Alerts" size="md" class="mb-3" />
+ <SectionHeader title={getAlertOverviewActiveSectionTitle()} size="md" class="mb-3" />
<Show
when={Object.keys(props.activeAlerts).length > 0}
fallback={
@@ -41,20 +44,11 @@ export function AlertOverviewActiveAlertsSection(props: AlertOverviewActiveAlert
viewBox="0 0 24 24"
>
<circle cx="12" cy="12" r="10" stroke-width="2" />
- <line
- x1="4"
- y1="4"
- x2="20"
- y2="20"
- stroke-width="2"
- stroke-linecap="round"
- />
+ <line x1="4" y1="4" x2="20" y2="20" stroke-width="2" stroke-linecap="round" />
</svg>
</div>
- <p class="text-sm">Alerting is paused</p>
- <p class="text-xs mt-1">
- Toggle alerts on to resume monitoring and unlock configuration tabs
- </p>
+ <p class="text-sm">{getAlertOverviewPausedState().title}</p>
+ <p class="text-xs mt-1">{getAlertOverviewPausedState().description}</p>
</>
}
>
@@ -81,20 +75,22 @@ export function AlertOverviewActiveAlertsSection(props: AlertOverviewActiveAlert
/>
</svg>
</div>
- <p class="text-sm">{ALERTS_EMPTY_STATE}</p>
- <p class="text-xs mt-1">{ALERTS_THRESHOLD_HINT}</p>
+ <p class="text-sm">{getAlertOverviewEmptyState().title}</p>
+ <p class="text-xs mt-1">{getAlertOverviewEmptyState().description}</p>
</Show>
</div>
}
>
- <Show when={props.state.alertStats().acknowledged > 0 || props.state.alertStats().active > 0}>
+ <Show
+ when={props.state.alertStats().acknowledged > 0 || props.state.alertStats().active > 0}
+ >
<div class="flex flex-wrap items-center justify-between gap-1.5 p-1.5 bg-surface-alt rounded-t-lg border border-border">
<Show when={props.state.alertStats().acknowledged > 0}>
<button
onClick={() => props.setShowAcknowledged(!props.showAcknowledged)}
class="text-xs text-muted hover:text-base-content transition-colors"
>
- {props.showAcknowledged ? 'Hide' : 'Show'} acknowledged
+ {getAlertOverviewAcknowledgedToggleLabel(props.showAcknowledged)}
</button>
</Show>
<Show when={props.state.alertStats().active > 0}>
@@ -106,9 +102,10 @@ export function AlertOverviewActiveAlertsSection(props: AlertOverviewActiveAlert
void props.state.handleBulkAcknowledge();
}}
>
- {props.state.bulkAckProcessing()
- ? 'Acknowledging…'
- : `Acknowledge all (${props.state.alertStats().active})`}
+ {getAlertOverviewBulkAcknowledgeLabel(
+ props.state.alertStats().active,
+ props.state.bulkAckProcessing(),
+ )}
</button>
</Show>
</div>
diff --git a/frontend-modern/src/features/alerts/AlertOverviewAlertCard.tsx b/frontend-modern/src/features/alerts/AlertOverviewAlertCard.tsx
index 9ca2175ed4..bdb4d1b90d 100644
--- a/frontend-modern/src/features/alerts/AlertOverviewAlertCard.tsx
+++ b/frontend-modern/src/features/alerts/AlertOverviewAlertCard.tsx
@@ -5,10 +5,15 @@ import { IncidentTimelinePanel } from '@/components/Alerts/IncidentTimelinePanel
import type { Alert } from '@/types/api';
import {
getAlertOverviewAcknowledgedBadgeClass,
+ getAlertOverviewAcknowledgedBadgeLabel,
getAlertOverviewCardPresentation,
+ getAlertOverviewNodeLabel,
+ getAlertOverviewPrimaryActionLabel,
getAlertOverviewPrimaryActionClass,
getAlertOverviewSecondaryActionClass,
+ getAlertOverviewStartedAtLabel,
getAlertOverviewStartedAtClass,
+ getAlertOverviewTimelineActionLabel,
} from '@/utils/alertOverviewPresentation';
import { alertTypeDisplayLabel } from './helpers';
@@ -58,20 +63,24 @@ export function AlertOverviewAlertCard(props: AlertOverviewAlertCardProps) {
</div>
<div class="flex-1 min-w-0">
<div class="flex flex-wrap items-center gap-2">
- <span class={alertCardPresentation().resourceClassName}>{props.alert.resourceName}</span>
+ <span class={alertCardPresentation().resourceClassName}>
+ {props.alert.resourceName}
+ </span>
<span class="text-xs text-muted">({alertTypeDisplayLabel(props.alert.type)})</span>
<Show when={props.alert.node}>
<span class="text-xs text-muted">
- on {props.alert.nodeDisplayName || props.alert.node}
+ {getAlertOverviewNodeLabel(props.alert.nodeDisplayName || props.alert.node)}
</span>
</Show>
<Show when={props.alert.acknowledged}>
- <span class={getAlertOverviewAcknowledgedBadgeClass()}>Acknowledged</span>
+ <span class={getAlertOverviewAcknowledgedBadgeClass()}>
+ {getAlertOverviewAcknowledgedBadgeLabel()}
+ </span>
</Show>
</div>
<p class="text-sm text-base-content mt-1 break-words">{props.alert.message}</p>
<p class={getAlertOverviewStartedAtClass()}>
- Started: {new Date(props.alert.startTime).toLocaleString()}
+ {getAlertOverviewStartedAtLabel(new Date(props.alert.startTime).toLocaleString())}
</p>
</div>
</div>
@@ -85,11 +94,10 @@ export function AlertOverviewAlertCard(props: AlertOverviewAlertCardProps) {
await props.state.handleAlertAcknowledgement(props.alert);
}}
>
- {props.state.processingAlerts().has(alertKey())
- ? 'Processing...'
- : props.alert.acknowledged
- ? 'Unacknowledge'
- : 'Acknowledge'}
+ {getAlertOverviewPrimaryActionLabel({
+ acknowledged: props.alert.acknowledged,
+ processing: props.state.processingAlerts().has(alertKey()),
+ })}
</button>
<button
class={getAlertOverviewSecondaryActionClass()}
@@ -97,7 +105,9 @@ export function AlertOverviewAlertCard(props: AlertOverviewAlertCardProps) {
void props.timelineState.toggleIncidentTimeline(alertKey(), props.alert.startTime);
}}
>
- {props.timelineState.expandedIncidents().has(alertKey()) ? 'Hide Timeline' : 'Timeline'}
+ {getAlertOverviewTimelineActionLabel(
+ props.timelineState.expandedIncidents().has(alertKey()),
+ )}
</button>
<InvestigateAlertButton
alert={props.alert}
@@ -122,7 +132,9 @@ export function AlertOverviewAlertCard(props: AlertOverviewAlertCardProps) {
filterVariant="panel"
eventCardVariant="alt"
noteDraft={props.timelineState.incidentNoteDrafts()[alertKey()] || ''}
- onNoteDraftChange={(value) => props.timelineState.setIncidentNoteDraft(alertKey(), value)}
+ onNoteDraftChange={(value) =>
+ props.timelineState.setIncidentNoteDraft(alertKey(), value)
+ }
noteSaving={props.timelineState.incidentNoteSaving().has(alertKey())}
onSaveNote={() => {
void props.timelineState.saveIncidentNote(alertKey(), props.alert.startTime);
diff --git a/frontend-modern/src/features/alerts/AlertOverviewStatsCards.tsx b/frontend-modern/src/features/alerts/AlertOverviewStatsCards.tsx
index be86e19dd3..18413500d5 100644
--- a/frontend-modern/src/features/alerts/AlertOverviewStatsCards.tsx
+++ b/frontend-modern/src/features/alerts/AlertOverviewStatsCards.tsx
@@ -1,16 +1,7 @@
import { Card } from '@/components/shared/Card';
import { StatusDot } from '@/components/shared/StatusDot';
-import {
- Table,
- TableBody,
- TableCell,
- TableRow,
-} from '@/components/shared/Table';
-import {
- ALERT_OVERVIEW_ACKNOWLEDGED_LABEL,
- ALERT_OVERVIEW_LAST_24_HOURS_LABEL,
- ALERT_OVERVIEW_WORKLOAD_OVERRIDES_LABEL,
-} from '@/utils/alertOverviewPresentation';
+import { Table, TableBody, TableCell, TableRow } from '@/components/shared/Table';
+import { getAlertOverviewStatsLabels } from '@/utils/alertOverviewPresentation';
import type { StatusIndicatorVariant } from '@/utils/status';
import type { AlertOverviewState } from './useAlertOverviewState';
@@ -28,12 +19,12 @@ const VARIANT_ACTIVE: Record<'triggered' | 'acknowledged', StatusIndicatorVarian
acknowledged: 'success',
};
-const variantForCount = (
- count: number,
- active: StatusIndicatorVariant,
-): StatusIndicatorVariant => (count > 0 ? active : 'muted');
+const variantForCount = (count: number, active: StatusIndicatorVariant): StatusIndicatorVariant =>
+ count > 0 ? active : 'muted';
export function AlertOverviewStatsCards(props: AlertOverviewStatsCardsProps) {
+ const labels = () => getAlertOverviewStatsLabels();
+
return (
<Card padding="none" tone="card" class="overflow-hidden">
<Table class="min-w-full text-xs">
@@ -49,7 +40,7 @@ export function AlertOverviewStatsCards(props: AlertOverviewStatsCardsProps) {
ariaHidden
/>
</TableCell>
- <TableCell class={labelCellClass}>{ALERT_OVERVIEW_LAST_24_HOURS_LABEL}</TableCell>
+ <TableCell class={labelCellClass}>{labels().last24Hours}</TableCell>
<TableCell class={valueCellClass} data-testid="alert-overview-stat-value">
{props.state.alertStats().total24h}
</TableCell>
@@ -65,7 +56,7 @@ export function AlertOverviewStatsCards(props: AlertOverviewStatsCardsProps) {
ariaHidden
/>
</TableCell>
- <TableCell class={labelCellClass}>{ALERT_OVERVIEW_ACKNOWLEDGED_LABEL}</TableCell>
+ <TableCell class={labelCellClass}>{labels().acknowledged}</TableCell>
<TableCell class={valueCellClass} data-testid="alert-overview-stat-value">
{props.state.alertStats().acknowledged}
</TableCell>
@@ -74,7 +65,7 @@ export function AlertOverviewStatsCards(props: AlertOverviewStatsCardsProps) {
<TableCell class={dotCellClass}>
<StatusDot variant="muted" size="sm" ariaHidden />
</TableCell>
- <TableCell class={labelCellClass}>{ALERT_OVERVIEW_WORKLOAD_OVERRIDES_LABEL}</TableCell>
+ <TableCell class={labelCellClass}>{labels().workloadOverrides}</TableCell>
<TableCell class={valueCellClass} data-testid="alert-overview-stat-value">
{props.state.alertStats().overrides}
</TableCell>
diff --git a/frontend-modern/src/features/alerts/__tests__/OverviewTab.emptystate.test.tsx b/frontend-modern/src/features/alerts/__tests__/OverviewTab.emptystate.test.tsx
index fb21ee4c9f..fb373367c8 100644
--- a/frontend-modern/src/features/alerts/__tests__/OverviewTab.emptystate.test.tsx
+++ b/frontend-modern/src/features/alerts/__tests__/OverviewTab.emptystate.test.tsx
@@ -1,5 +1,6 @@
import { afterEach, describe, expect, it, vi } from 'vitest';
import { cleanup, render, screen } from '@solidjs/testing-library';
+import { DEFAULT_LOCALE, setActiveLocale } from '@/i18n';
vi.mock('@solidjs/router', () => ({
useLocation: () => ({ hash: '', pathname: '/alerts', search: '', query: {} }),
@@ -40,9 +41,11 @@ function defaultProps(overrides: Record<string, unknown> = {}) {
describe('OverviewTab empty state', () => {
afterEach(() => {
cleanup();
+ setActiveLocale(DEFAULT_LOCALE);
});
it('shows "No active alerts" when alerts are enabled and none exist', () => {
+ setActiveLocale(DEFAULT_LOCALE);
render(() => <OverviewTab {...defaultProps()} />);
expect(screen.getByText('No active alerts')).toBeInTheDocument();
@@ -53,6 +56,7 @@ describe('OverviewTab empty state', () => {
});
it('shows "Alerting is paused" when alerts are disabled', () => {
+ setActiveLocale(DEFAULT_LOCALE);
render(() => <OverviewTab {...defaultProps({ alertsDisabled: () => true })} />);
expect(screen.getByText('Alerting is paused')).toBeInTheDocument();
@@ -61,4 +65,27 @@ describe('OverviewTab empty state', () => {
).toBeInTheDocument();
expect(screen.queryByText('No active alerts')).not.toBeInTheDocument();
});
+
+ it('localizes the enabled and paused empty states through the active locale', () => {
+ setActiveLocale('es');
+ const { unmount } = render(() => <OverviewTab {...defaultProps()} />);
+
+ expect(screen.getByText('No hay alertas activas')).toBeInTheDocument();
+ expect(
+ screen.getByText('Las alertas apareceran aqui cuando se superen los umbrales'),
+ ).toBeInTheDocument();
+ expect(screen.queryByText('No active alerts')).not.toBeInTheDocument();
+
+ unmount();
+
+ render(() => <OverviewTab {...defaultProps({ alertsDisabled: () => true })} />);
+
+ expect(screen.getByText('Las alertas estan pausadas')).toBeInTheDocument();
+ expect(
+ screen.getByText(
+ 'Activa las alertas para reanudar la monitorizacion y desbloquear las pestañas de configuracion',
+ ),
+ ).toBeInTheDocument();
+ expect(screen.queryByText('Alerting is paused')).not.toBeInTheDocument();
+ });
});
diff --git a/frontend-modern/src/features/alerts/__tests__/OverviewTab.timelineerror.test.tsx b/frontend-modern/src/features/alerts/__tests__/OverviewTab.timelineerror.test.tsx
index 8b7e9ee870..affb211097 100644
--- a/frontend-modern/src/features/alerts/__tests__/OverviewTab.timelineerror.test.tsx
+++ b/frontend-modern/src/features/alerts/__tests__/OverviewTab.timelineerror.test.tsx
@@ -1,5 +1,6 @@
import { afterEach, describe, expect, it, vi } from 'vitest';
import { cleanup, render, screen, fireEvent, waitFor } from '@solidjs/testing-library';
+import { DEFAULT_LOCALE, setActiveLocale } from '@/i18n';
import type { Alert } from '@/types/api';
const mockGetIncidentTimeline = vi.fn();
@@ -61,9 +62,11 @@ describe('OverviewTab incident timeline error state', () => {
afterEach(() => {
cleanup();
vi.clearAllMocks();
+ setActiveLocale(DEFAULT_LOCALE);
});
it('shows error message with Retry button when timeline fetch fails', async () => {
+ setActiveLocale(DEFAULT_LOCALE);
mockGetIncidentTimeline.mockRejectedValueOnce(new Error('Network error'));
render(() => <OverviewTab {...defaultProps()} />);
@@ -81,6 +84,7 @@ describe('OverviewTab incident timeline error state', () => {
});
it('retries and shows timeline on successful retry after error', async () => {
+ setActiveLocale(DEFAULT_LOCALE);
mockGetIncidentTimeline.mockRejectedValueOnce(new Error('Network error'));
render(() => <OverviewTab {...defaultProps()} />);
@@ -116,6 +120,7 @@ describe('OverviewTab incident timeline error state', () => {
});
it('shows "No incident timeline available." when fetch succeeds with null', async () => {
+ setActiveLocale(DEFAULT_LOCALE);
mockGetIncidentTimeline.mockResolvedValueOnce(null);
render(() => <OverviewTab {...defaultProps()} />);
@@ -131,6 +136,7 @@ describe('OverviewTab incident timeline error state', () => {
});
it('renders the shared incident event card when the timeline loads successfully', async () => {
+ setActiveLocale(DEFAULT_LOCALE);
mockGetIncidentTimeline.mockResolvedValueOnce({
id: 'inc-1',
status: 'open',
@@ -164,4 +170,48 @@ describe('OverviewTab incident timeline error state', () => {
expect(screen.getByText('systemctl status pulse')).toBeInTheDocument();
expect(screen.getByText('Active: active (running)')).toBeInTheDocument();
});
+
+ it('localizes timeline controls while preserving source event payloads', async () => {
+ setActiveLocale('de');
+ mockGetIncidentTimeline.mockResolvedValueOnce({
+ id: 'inc-1',
+ status: 'open',
+ acknowledged: true,
+ openedAt: '2026-01-01T00:00:00Z',
+ closedAt: null,
+ events: [
+ {
+ id: 'evt-1',
+ type: 'command',
+ timestamp: '2026-01-01T00:05:00Z',
+ summary: 'Command executed',
+ details: {
+ note: 'checked service health',
+ command: 'systemctl status pulse',
+ output_excerpt: 'Active: active (running)',
+ },
+ },
+ ],
+ });
+
+ render(() => <OverviewTab {...defaultProps()} />);
+
+ fireEvent.click(screen.getByText('Zeitleiste'));
+
+ await waitFor(() => {
+ expect(screen.getByText('Vorfall')).toBeInTheDocument();
+ });
+ expect(screen.getByText('bestaetigt')).toBeInTheDocument();
+ expect(screen.getByText('Ereignisse filtern:')).toBeInTheDocument();
+ expect(screen.getByText('Befehl')).toBeInTheDocument();
+ expect(
+ screen.getByPlaceholderText('Notiz fuer diesen Vorfall hinzufuegen...'),
+ ).toBeInTheDocument();
+ expect(screen.getByText('Notiz speichern')).toBeInTheDocument();
+
+ expect(screen.getByText('Command executed')).toBeInTheDocument();
+ expect(screen.getByText('checked service health')).toBeInTheDocument();
+ expect(screen.getByText('systemctl status pulse')).toBeInTheDocument();
+ expect(screen.getByText('Active: active (running)')).toBeInTheDocument();
+ });
});
diff --git a/frontend-modern/src/features/alerts/__tests__/OverviewTab.total24h.test.tsx b/frontend-modern/src/features/alerts/__tests__/OverviewTab.total24h.test.tsx
index e5f1484ff6..25b650aa1e 100644
--- a/frontend-modern/src/features/alerts/__tests__/OverviewTab.total24h.test.tsx
+++ b/frontend-modern/src/features/alerts/__tests__/OverviewTab.total24h.test.tsx
@@ -1,5 +1,6 @@
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { cleanup, render, screen } from '@solidjs/testing-library';
+import { DEFAULT_LOCALE, setActiveLocale } from '@/i18n';
import type { Alert } from '@/types/api';
vi.mock('@solidjs/router', () => ({
@@ -54,6 +55,7 @@ function defaultProps(overrides: Record<string, unknown> = {}) {
describe('OverviewTab Last 24 Hours stat', () => {
beforeEach(() => {
+ setActiveLocale(DEFAULT_LOCALE);
vi.useFakeTimers();
vi.setSystemTime(new Date('2026-03-06T12:00:00Z'));
});
@@ -61,6 +63,7 @@ describe('OverviewTab Last 24 Hours stat', () => {
afterEach(() => {
cleanup();
vi.useRealTimers();
+ setActiveLocale(DEFAULT_LOCALE);
});
it('counts only alerts with startTime within the last 24 hours', () => {
@@ -76,7 +79,9 @@ describe('OverviewTab Last 24 Hours stat', () => {
render(() => <OverviewTab {...defaultProps({ activeAlerts })} />);
const label = screen.getByText('Triggered (24h)');
- const statValue = label.closest('tr')?.querySelector('[data-testid="alert-overview-stat-value"]');
+ const statValue = label
+ .closest('tr')
+ ?.querySelector('[data-testid="alert-overview-stat-value"]');
expect(statValue?.textContent).toBe('1');
});
@@ -92,7 +97,9 @@ describe('OverviewTab Last 24 Hours stat', () => {
render(() => <OverviewTab {...defaultProps({ activeAlerts })} />);
const label = screen.getByText('Triggered (24h)');
- const statValue = label.closest('tr')?.querySelector('[data-testid="alert-overview-stat-value"]');
+ const statValue = label
+ .closest('tr')
+ ?.querySelector('[data-testid="alert-overview-stat-value"]');
expect(statValue?.textContent).toBe('0');
});
@@ -109,7 +116,9 @@ describe('OverviewTab Last 24 Hours stat', () => {
render(() => <OverviewTab {...defaultProps({ activeAlerts })} />);
const label = screen.getByText('Triggered (24h)');
- const statValue = label.closest('tr')?.querySelector('[data-testid="alert-overview-stat-value"]');
+ const statValue = label
+ .closest('tr')
+ ?.querySelector('[data-testid="alert-overview-stat-value"]');
expect(statValue?.textContent).toBe('3');
});
@@ -123,7 +132,9 @@ describe('OverviewTab Last 24 Hours stat', () => {
render(() => <OverviewTab {...defaultProps({ activeAlerts })} />);
const label = screen.getByText('Triggered (24h)');
- const statValue = label.closest('tr')?.querySelector('[data-testid="alert-overview-stat-value"]');
+ const statValue = label
+ .closest('tr')
+ ?.querySelector('[data-testid="alert-overview-stat-value"]');
expect(statValue?.textContent).toBe('0');
});
@@ -138,7 +149,9 @@ describe('OverviewTab Last 24 Hours stat', () => {
render(() => <OverviewTab {...defaultProps({ activeAlerts })} />);
const label = screen.getByText('Triggered (24h)');
- const statValue = label.closest('tr')?.querySelector('[data-testid="alert-overview-stat-value"]');
+ const statValue = label
+ .closest('tr')
+ ?.querySelector('[data-testid="alert-overview-stat-value"]');
expect(statValue?.textContent).toBe('1');
// Advance time by 2 minutes — alert is now 24h 1m old, outside the window
@@ -160,4 +173,24 @@ describe('OverviewTab Last 24 Hours stat', () => {
expect(screen.getAllByText('Acknowledged').length).toBeGreaterThan(0);
expect(container.querySelector('#alert-acknowledged.bg-surface-alt')).toBeTruthy();
});
+
+ it('localizes stats and active alert card controls without translating source fields', () => {
+ setActiveLocale('es');
+ const recentTime = new Date(Date.now() - 1_800_000).toISOString();
+
+ const activeAlerts: Record<string, Alert> = {
+ recent: makeAlert('recent', recentTime),
+ };
+
+ render(() => <OverviewTab {...defaultProps({ activeAlerts })} />);
+
+ expect(screen.getByText('Activadas (24h)')).toBeInTheDocument();
+ expect(screen.getByText('Reconocidas')).toBeInTheDocument();
+ expect(screen.getByText('Alertas activas')).toBeInTheDocument();
+ expect(screen.getByText('Reconocer')).toBeInTheDocument();
+ expect(screen.getByText('Linea de tiempo')).toBeInTheDocument();
+ expect(screen.getByText('en node1')).toBeInTheDocument();
+ expect(screen.getByText('VM recent')).toBeInTheDocument();
+ expect(screen.getByText('High CPU on VM recent')).toBeInTheDocument();
+ });
});
diff --git a/frontend-modern/src/features/alerts/__tests__/alertsLocalization.guardrails.test.ts b/frontend-modern/src/features/alerts/__tests__/alertsLocalization.guardrails.test.ts
new file mode 100644
index 0000000000..da010dd49d
--- /dev/null
+++ b/frontend-modern/src/features/alerts/__tests__/alertsLocalization.guardrails.test.ts
@@ -0,0 +1,72 @@
+import { describe, expect, it } from 'vitest';
+import alertsPageSource from '@/pages/Alerts.tsx?raw';
+import activeAlertsSectionSource from '@/features/alerts/AlertOverviewActiveAlertsSection.tsx?raw';
+import alertCardSource from '@/features/alerts/AlertOverviewAlertCard.tsx?raw';
+import statsCardsSource from '@/features/alerts/AlertOverviewStatsCards.tsx?raw';
+import acknowledgementStateSource from '@/features/alerts/useAlertAcknowledgementState.ts?raw';
+import incidentFiltersSource from '@/components/Alerts/IncidentEventFilters.tsx?raw';
+import incidentTimelineSource from '@/components/Alerts/IncidentTimelinePanel.tsx?raw';
+import investigateButtonSource from '@/components/Alerts/InvestigateAlertButton.tsx?raw';
+import assistantHandoffSource from '@/components/Alerts/alertAssistantHandoffModel.ts?raw';
+
+const migratedAlertsSurfaceSources = [
+ alertsPageSource,
+ activeAlertsSectionSource,
+ alertCardSource,
+ statsCardsSource,
+ acknowledgementStateSource,
+ incidentFiltersSource,
+ incidentTimelineSource,
+ investigateButtonSource,
+ assistantHandoffSource,
+] as const;
+
+const migratedAlertsOverviewCopy = [
+ 'Alerts enabled',
+ 'Alerts disabled',
+ 'Alerts navigation',
+ 'Toggle alerts',
+ 'Active Alerts',
+ 'Alerting is paused',
+ 'Toggle alerts on to resume monitoring and unlock configuration tabs',
+ 'No active alerts',
+ 'No unacknowledged alerts',
+ 'Acknowledge all',
+ 'Acknowledging',
+ 'Unacknowledge',
+ 'Hide Timeline',
+ 'Triggered (24h)',
+ 'Workload Overrides',
+ 'Alert acknowledged',
+ 'Alert restored',
+ 'Failed to acknowledge alerts',
+ 'Investigate with Pulse Assistant',
+ 'Ask Pulse Assistant',
+ 'Pro required to investigate alerts with Pulse Assistant',
+ 'Alert investigation attached',
+ 'Diagnostics and remediation require operator approval',
+ 'No incident timeline available',
+ 'Filter events:',
+ 'Incident note',
+ 'Save Note',
+] as const;
+
+describe('alerts overview localization guardrails', () => {
+ it('prevents migrated alerts overview copy from reverting to hardcoded English', () => {
+ for (const source of migratedAlertsSurfaceSources) {
+ for (const copy of migratedAlertsOverviewCopy) {
+ expect(source).not.toContain(copy);
+ }
+ }
+
+ expect(alertsPageSource).toContain('alerts.nav.toggleAlerts');
+ expect(activeAlertsSectionSource).toContain('getAlertOverviewActiveSectionTitle');
+ expect(alertCardSource).toContain('getAlertOverviewPrimaryActionLabel');
+ expect(statsCardsSource).toContain('getAlertOverviewStatsLabels');
+ expect(acknowledgementStateSource).toContain('getAlertOverviewAcknowledgedNotification');
+ expect(investigateButtonSource).toContain('alerts.assistant.button.full');
+ expect(assistantHandoffSource).toContain('alerts.assistant.subject');
+ expect(incidentTimelineSource).toContain('getAlertTimelineNotePlaceholder');
+ expect(incidentFiltersSource).toContain('getAlertTimelineEventTypeLabel');
+ });
+});
diff --git a/frontend-modern/src/features/alerts/useAlertAcknowledgementState.ts b/frontend-modern/src/features/alerts/useAlertAcknowledgementState.ts
index 9482d6690b..c1199c86fb 100644
--- a/frontend-modern/src/features/alerts/useAlertAcknowledgementState.ts
+++ b/frontend-modern/src/features/alerts/useAlertAcknowledgementState.ts
@@ -4,6 +4,14 @@ import type { Accessor } from 'solid-js';
import { AlertsAPI } from '@/api/alerts';
import { notificationStore } from '@/stores/notifications';
import type { Alert } from '@/types/api';
+import {
+ getAlertOverviewAcknowledgedNotification,
+ getAlertOverviewAcknowledgementFailureNotification,
+ getAlertOverviewBulkAcknowledgedNotification,
+ getAlertOverviewBulkAcknowledgeFailureNotification,
+ getAlertOverviewBulkAcknowledgeGenericFailureNotification,
+ getAlertOverviewRestoredNotification,
+} from '@/utils/alertOverviewPresentation';
import { logger } from '@/utils/logger';
import { getCanonicalAlertId } from './identity';
@@ -114,7 +122,7 @@ export function useAlertAcknowledgementState(props: UseAlertAcknowledgementState
ackTime: undefined,
ackUser: undefined,
});
- notificationStore.success('Alert restored');
+ notificationStore.success(getAlertOverviewRestoredNotification());
} else {
await AlertsAPI.acknowledge(alertIdentifier);
applyAlertUpdate(alertIdentifier, {
@@ -122,14 +130,11 @@ export function useAlertAcknowledgementState(props: UseAlertAcknowledgementState
ackTime: new Date().toISOString(),
ackUser: undefined,
});
- notificationStore.success('Alert acknowledged');
+ notificationStore.success(getAlertOverviewAcknowledgedNotification());
}
} catch (error) {
- logger.error(
- `Failed to ${wasAcknowledged ? 'unacknowledge' : 'acknowledge'} alert:`,
- error,
- );
- notificationStore.error(`Failed to ${wasAcknowledged ? 'restore' : 'acknowledge'} alert`);
+ logger.error(`Failed to ${wasAcknowledged ? 'unacknowledge' : 'acknowledge'} alert:`, error);
+ notificationStore.error(getAlertOverviewAcknowledgementFailureNotification(wasAcknowledged));
} finally {
releaseAlertProcessing(alertIdentifier);
}
@@ -163,19 +168,17 @@ export function useAlertAcknowledgementState(props: UseAlertAcknowledgementState
});
if (successes.length > 0) {
- notificationStore.success(
- `Acknowledged ${successes.length} ${successes.length === 1 ? 'alert' : 'alerts'}.`,
- );
+ notificationStore.success(getAlertOverviewBulkAcknowledgedNotification(successes.length));
}
if (failures.length > 0) {
notificationStore.error(
- `Failed to acknowledge ${failures.length} ${failures.length === 1 ? 'alert' : 'alerts'}.`,
+ getAlertOverviewBulkAcknowledgeFailureNotification(failures.length),
);
}
} catch (error) {
logger.error('Bulk acknowledge failed', error);
- notificationStore.error('Failed to acknowledge alerts');
+ notificationStore.error(getAlertOverviewBulkAcknowledgeGenericFailureNotification());
} finally {
setBulkAckProcessing(false);
}
diff --git a/frontend-modern/src/i18n/__tests__/i18n.test.ts b/frontend-modern/src/i18n/__tests__/i18n.test.ts
index 6e8be7bf53..ec53502e46 100644
--- a/frontend-modern/src/i18n/__tests__/i18n.test.ts
+++ b/frontend-modern/src/i18n/__tests__/i18n.test.ts
@@ -1,11 +1,14 @@
import { afterEach, describe, expect, it } from 'vitest';
import {
+ ALERTS_OVERVIEW_ALLOWED_IDENTICAL_TRANSLATIONS,
+ ALERTS_OVERVIEW_NON_TRANSLATABLE_TOKENS,
DEFAULT_LOCALE,
FIRST_SESSION_MONITORING_ALLOWED_IDENTICAL_TRANSLATIONS,
FIRST_SESSION_MONITORING_NON_TRANSLATABLE_TOKENS,
FIRST_LOCALIZATION_LOCALES,
I18N_MESSAGES,
LOCALIZATION_FOUNDATION,
+ LOCALIZED_ALERTS_OVERVIEW_JOURNEY_KEYS,
LOCALIZED_FIRST_SESSION_MONITORING_JOURNEY_KEYS,
LOCALIZED_SETTINGS_GENERAL_JOURNEY_KEYS,
NEVER_TRANSLATE_COPY_RULES,
@@ -150,6 +153,21 @@ describe('i18n foundation', () => {
'pct exec',
]),
);
+ expect(ALERTS_OVERVIEW_NON_TRANSLATABLE_TOKENS).toEqual(
+ expect.arrayContaining([
+ 'Pulse',
+ 'Pulse Assistant',
+ 'Pulse Alerts',
+ 'Pro',
+ 'API',
+ 'alertIdentifier',
+ 'alertType',
+ 'resourceId',
+ 'resourceName',
+ 'node',
+ 'systemctl',
+ ]),
+ );
});
it('requires explicit first-wave translations for the migrated settings general journey', () => {
@@ -224,4 +242,62 @@ describe('i18n foundation', () => {
expect(I18N_MESSAGES[locale]['setup.security.nextScreen.itemApiToken']).toContain('API');
}
});
+
+ it('requires explicit first-wave translations for the migrated alerts overview journey', () => {
+ for (const locale of FIRST_LOCALIZATION_LOCALES) {
+ const allowedIdenticalKeys: ReadonlySet<I18nMessageKey> = new Set([
+ ...((SETTINGS_GENERAL_ALLOWED_IDENTICAL_TRANSLATIONS[locale] ??
+ []) as readonly I18nMessageKey[]),
+ ...((FIRST_SESSION_MONITORING_ALLOWED_IDENTICAL_TRANSLATIONS[locale] ??
+ []) as readonly I18nMessageKey[]),
+ ...((ALERTS_OVERVIEW_ALLOWED_IDENTICAL_TRANSLATIONS[locale] ??
+ []) as readonly I18nMessageKey[]),
+ ]);
+ for (const key of LOCALIZED_ALERTS_OVERVIEW_JOURNEY_KEYS) {
+ expect(I18N_MESSAGES[locale][key], `${locale}:${key}`).toBeTruthy();
+ if (!allowedIdenticalKeys.has(key)) {
+ expect(I18N_MESSAGES[locale][key], `${locale}:${key}`).not.toBe(I18N_MESSAGES.en[key]);
+ }
+ }
+ }
+ });
+
+ it('keeps machine-facing identifiers unchanged in alerts overview catalog copy', () => {
+ for (const locale of FIRST_LOCALIZATION_LOCALES) {
+ expect(I18N_MESSAGES[locale]['alerts.assistant.button.full']).toContain('Pulse Assistant');
+ expect(I18N_MESSAGES[locale]['alerts.assistant.sourceLabel']).toBe('Pulse Alerts');
+ expect(I18N_MESSAGES[locale]['alerts.assistant.locked.proRequired']).toContain('Pro');
+ expect(
+ t(
+ 'alerts.assistant.action.investigate',
+ {
+ alertIdentifier: 'alert:vm-101:cpu',
+ },
+ locale,
+ ),
+ ).toContain('alert:vm-101:cpu');
+ expect(
+ t(
+ 'alerts.assistant.subject',
+ {
+ level: 'warning',
+ alertType: 'cpu',
+ resourceName: 'db-vm-01',
+ },
+ locale,
+ ),
+ ).toContain('db-vm-01');
+ expect(
+ t(
+ 'alerts.assistant.subject',
+ {
+ level: 'warning',
+ alertType: 'cpu',
+ resourceName: 'db-vm-01',
+ },
+ locale,
+ ),
+ ).toContain('cpu');
+ }
+ });
});
diff --git a/frontend-modern/src/i18n/index.ts b/frontend-modern/src/i18n/index.ts
index f4007d1899..29f93b3e37 100644
--- a/frontend-modern/src/i18n/index.ts
+++ b/frontend-modern/src/i18n/index.ts
@@ -139,9 +139,12 @@ export {
type SupportedLocale,
} from './locales';
export {
+ ALERTS_OVERVIEW_ALLOWED_IDENTICAL_TRANSLATIONS,
+ ALERTS_OVERVIEW_NON_TRANSLATABLE_TOKENS,
FIRST_SESSION_MONITORING_ALLOWED_IDENTICAL_TRANSLATIONS,
FIRST_SESSION_MONITORING_NON_TRANSLATABLE_TOKENS,
LOCALIZATION_FOUNDATION,
+ LOCALIZED_ALERTS_OVERVIEW_JOURNEY_KEYS,
LOCALIZED_FIRST_SESSION_MONITORING_JOURNEY_KEYS,
LOCALIZED_SETTINGS_GENERAL_JOURNEY_KEYS,
NEVER_TRANSLATE_COPY_RULES,
diff --git a/frontend-modern/src/i18n/messages.ts b/frontend-modern/src/i18n/messages.ts
index dac49958c1..457c33faa5 100644
--- a/frontend-modern/src/i18n/messages.ts
+++ b/frontend-modern/src/i18n/messages.ts
@@ -92,6 +92,126 @@ export const EN_MESSAGES = {
'setup.step.security': 'Security',
'setup.step.unlockServer': 'Unlock server',
'setup.wizard.ariaLabel': 'Pulse Setup Wizard',
+ 'alerts.activation.label.enabled': 'Alerts enabled',
+ 'alerts.activation.label.disabled': 'Alerts disabled',
+ 'alerts.activation.toast.activated':
+ "Alerts activated! You'll now receive alerts when issues are detected.",
+ 'alerts.activation.toast.activateFailed': 'Unable to activate alerts. Please try again.',
+ 'alerts.activation.toast.deactivated':
+ 'Alerts deactivated. Nothing will be sent until you activate them again.',
+ 'alerts.activation.toast.deactivateFailed': 'Unable to deactivate alerts. Please try again.',
+ 'alerts.assistant.action.investigate': 'Investigate alert {alertIdentifier}',
+ 'alerts.assistant.button.full': 'Investigate with Pulse Assistant',
+ 'alerts.assistant.button.text': 'Ask Pulse Assistant',
+ 'alerts.assistant.detail.currentMetric':
+ 'Current value {currentValue}; threshold {thresholdValue}',
+ 'alerts.assistant.detail.message': 'Message: {message}',
+ 'alerts.assistant.detail.node': 'Node: {node}',
+ 'alerts.assistant.duration.hoursMinutes': '{hours}h {minutes}m',
+ 'alerts.assistant.duration.minute': '{count} min',
+ 'alerts.assistant.duration.minutes': '{count} mins',
+ 'alerts.assistant.duration.unknown': 'unknown duration',
+ 'alerts.assistant.level.critical': 'Critical',
+ 'alerts.assistant.level.info': 'Info',
+ 'alerts.assistant.level.warning': 'Warning',
+ 'alerts.assistant.locked.proRequired': 'Pro required to investigate alerts with Pulse Assistant',
+ 'alerts.assistant.locked.unavailable':
+ 'Pulse Assistant alert investigation is not available for this alert',
+ 'alerts.assistant.safetyNote': 'Diagnostics and remediation require operator approval.',
+ 'alerts.assistant.sourceLabel': 'Pulse Alerts',
+ 'alerts.assistant.statusLabel': '{level} alert · Active {duration}',
+ 'alerts.assistant.subject': '{level} {alertType} on {resourceName}',
+ 'alerts.assistant.title': 'Alert investigation attached',
+ 'alerts.assistant.unlockedTitle': 'Ask Pulse Assistant to investigate this alert',
+ 'alerts.nav.ariaLabel': 'Alerts navigation',
+ 'alerts.nav.collapseSidebar': 'Collapse sidebar',
+ 'alerts.nav.expandSidebar': 'Expand sidebar',
+ 'alerts.nav.title': 'Alerts',
+ 'alerts.nav.toggleAlerts': 'Toggle alerts',
+ 'alerts.overview.action.acknowledge': 'Acknowledge',
+ 'alerts.overview.action.acknowledgeAll': 'Acknowledge all ({count})',
+ 'alerts.overview.action.acknowledging': 'Acknowledging...',
+ 'alerts.overview.action.hideAcknowledged': 'Hide acknowledged',
+ 'alerts.overview.action.hideTimeline': 'Hide Timeline',
+ 'alerts.overview.action.processing': 'Processing...',
+ 'alerts.overview.action.showAcknowledged': 'Show acknowledged',
+ 'alerts.overview.action.timeline': 'Timeline',
+ 'alerts.overview.action.unacknowledge': 'Unacknowledge',
+ 'alerts.overview.acknowledgedBadge': 'Acknowledged',
+ 'alerts.overview.empty.description': 'Alerts will appear here when thresholds are exceeded',
+ 'alerts.overview.empty.title': 'No active alerts',
+ 'alerts.overview.filteredEmpty.all': 'No active alerts',
+ 'alerts.overview.filteredEmpty.unacknowledged': 'No unacknowledged alerts',
+ 'alerts.overview.nodePrefix': 'on {node}',
+ 'alerts.overview.notification.acknowledged': 'Alert acknowledged',
+ 'alerts.overview.notification.acknowledgeFailed': 'Failed to acknowledge alert',
+ 'alerts.overview.notification.bulkFailure.singular': 'Failed to acknowledge {count} alert.',
+ 'alerts.overview.notification.bulkFailure.plural': 'Failed to acknowledge {count} alerts.',
+ 'alerts.overview.notification.bulkFailureGeneric': 'Failed to acknowledge alerts',
+ 'alerts.overview.notification.bulkSuccess.singular': 'Acknowledged {count} alert.',
+ 'alerts.overview.notification.bulkSuccess.plural': 'Acknowledged {count} alerts.',
+ 'alerts.overview.notification.restored': 'Alert restored',
+ 'alerts.overview.notification.restoreFailed': 'Failed to restore alert',
+ 'alerts.overview.paused.description':
+ 'Toggle alerts on to resume monitoring and unlock configuration tabs',
+ 'alerts.overview.paused.title': 'Alerting is paused',
+ 'alerts.overview.section.activeAlerts': 'Active Alerts',
+ 'alerts.overview.startedAt': 'Started: {startedAt}',
+ 'alerts.overview.stats.acknowledged': 'Acknowledged',
+ 'alerts.overview.stats.triggered24h': 'Triggered (24h)',
+ 'alerts.overview.stats.workloadOverrides': 'Workload Overrides',
+ 'alerts.page.default.description':
+ 'Review active incidents, inspect alert history, and manage thresholds, notifications, and schedules.',
+ 'alerts.page.default.title': 'Alerts',
+ 'alerts.page.destinations.description':
+ 'Route alert notifications to email, Apprise, and webhook destinations.',
+ 'alerts.page.destinations.title': 'Notifications',
+ 'alerts.page.history.description':
+ 'Search prior alerts, review incident timelines, and inspect alert frequency over time.',
+ 'alerts.page.history.title': 'Alert History',
+ 'alerts.page.overview.description':
+ 'Review active incidents, confirm alert coverage, and control whether alerts are actively monitoring this install.',
+ 'alerts.page.overview.title': 'Alerts Overview',
+ 'alerts.page.schedule.description':
+ 'Define quiet hours, grouping, cooldowns, recovery, and escalation behavior for alert delivery.',
+ 'alerts.page.schedule.title': 'Maintenance Schedule',
+ 'alerts.page.thresholds.description':
+ 'Tune thresholds and scoped overrides for infrastructure, workloads, and integrations.',
+ 'alerts.page.thresholds.title': 'Alert Thresholds',
+ 'alerts.tabs.disabledTitle': 'Enable alerts to configure this setting',
+ 'alerts.tabs.group.configuration': 'Configuration',
+ 'alerts.tabs.group.status': 'Status',
+ 'alerts.tabs.destinations': 'Notifications',
+ 'alerts.tabs.history': 'History',
+ 'alerts.tabs.overview': 'Overview',
+ 'alerts.tabs.schedule': 'Schedule',
+ 'alerts.tabs.thresholds': 'Thresholds',
+ 'alerts.timeline.acknowledged': 'acknowledged',
+ 'alerts.timeline.closedAt': 'closed {closedAt}',
+ 'alerts.timeline.empty': 'No timeline events yet.',
+ 'alerts.timeline.failure': 'Failed to load timeline.',
+ 'alerts.timeline.filterEmpty': 'No timeline events match the selected filters.',
+ 'alerts.timeline.filterLabel.compact': 'Filters',
+ 'alerts.timeline.filterLabel.panel': 'Filter events:',
+ 'alerts.timeline.heading': 'Incident',
+ 'alerts.timeline.loading': 'Loading timeline...',
+ 'alerts.timeline.event.alertAcknowledged': 'Ack',
+ 'alerts.timeline.event.alertFired': 'Fired',
+ 'alerts.timeline.event.alertResolved': 'Resolved',
+ 'alerts.timeline.event.alertUnacknowledged': 'Unack',
+ 'alerts.timeline.event.aiAnalysis': 'Patrol',
+ 'alerts.timeline.event.command': 'Cmd',
+ 'alerts.timeline.event.note': 'Note',
+ 'alerts.timeline.event.runbook': 'Runbook',
+ 'alerts.timeline.noteLabel': 'Incident note',
+ 'alerts.timeline.notePlaceholder': 'Add a note for this incident...',
+ 'alerts.timeline.openedAt': 'opened {openedAt}',
+ 'alerts.timeline.quickFilter.all': 'All',
+ 'alerts.timeline.quickFilter.none': 'None',
+ 'alerts.timeline.retry': 'Retry',
+ 'alerts.timeline.saveNote': 'Save Note',
+ 'alerts.timeline.savingNote': 'Saving...',
+ 'alerts.timeline.unavailable': 'No incident timeline available.',
'setup.welcome.action.continueSecurity': 'Continue to Security',
'setup.welcome.action.verifyToken': 'Verify bootstrap token',
'setup.welcome.action.verifyingToken': 'Verifying bootstrap token...',
@@ -481,10 +601,253 @@ export const FIRST_SESSION_MONITORING_MIGRATED_MESSAGE_KEYS = [
'setup.welcome.tokenHelp.title',
] as const satisfies readonly I18nMessageKey[];
+export const ALERTS_OVERVIEW_MIGRATED_MESSAGE_KEYS = [
+ 'alerts.activation.label.enabled',
+ 'alerts.activation.label.disabled',
+ 'alerts.activation.toast.activated',
+ 'alerts.activation.toast.activateFailed',
+ 'alerts.activation.toast.deactivated',
+ 'alerts.activation.toast.deactivateFailed',
+ 'alerts.assistant.action.investigate',
+ 'alerts.assistant.button.full',
+ 'alerts.assistant.button.text',
+ 'alerts.assistant.detail.currentMetric',
+ 'alerts.assistant.detail.message',
+ 'alerts.assistant.detail.node',
+ 'alerts.assistant.duration.hoursMinutes',
+ 'alerts.assistant.duration.minute',
+ 'alerts.assistant.duration.minutes',
+ 'alerts.assistant.duration.unknown',
+ 'alerts.assistant.level.critical',
+ 'alerts.assistant.level.info',
+ 'alerts.assistant.level.warning',
+ 'alerts.assistant.locked.proRequired',
+ 'alerts.assistant.locked.unavailable',
+ 'alerts.assistant.safetyNote',
+ 'alerts.assistant.sourceLabel',
+ 'alerts.assistant.statusLabel',
+ 'alerts.assistant.subject',
+ 'alerts.assistant.title',
+ 'alerts.assistant.unlockedTitle',
+ 'alerts.nav.ariaLabel',
+ 'alerts.nav.collapseSidebar',
+ 'alerts.nav.expandSidebar',
+ 'alerts.nav.title',
+ 'alerts.nav.toggleAlerts',
+ 'alerts.overview.action.acknowledge',
+ 'alerts.overview.action.acknowledgeAll',
+ 'alerts.overview.action.acknowledging',
+ 'alerts.overview.action.hideAcknowledged',
+ 'alerts.overview.action.hideTimeline',
+ 'alerts.overview.action.processing',
+ 'alerts.overview.action.showAcknowledged',
+ 'alerts.overview.action.timeline',
+ 'alerts.overview.action.unacknowledge',
+ 'alerts.overview.acknowledgedBadge',
+ 'alerts.overview.empty.description',
+ 'alerts.overview.empty.title',
+ 'alerts.overview.filteredEmpty.all',
+ 'alerts.overview.filteredEmpty.unacknowledged',
+ 'alerts.overview.nodePrefix',
+ 'alerts.overview.notification.acknowledged',
+ 'alerts.overview.notification.acknowledgeFailed',
+ 'alerts.overview.notification.bulkFailure.singular',
+ 'alerts.overview.notification.bulkFailure.plural',
+ 'alerts.overview.notification.bulkFailureGeneric',
+ 'alerts.overview.notification.bulkSuccess.singular',
+ 'alerts.overview.notification.bulkSuccess.plural',
+ 'alerts.overview.notification.restored',
+ 'alerts.overview.notification.restoreFailed',
+ 'alerts.overview.paused.description',
+ 'alerts.overview.paused.title',
+ 'alerts.overview.section.activeAlerts',
+ 'alerts.overview.startedAt',
+ 'alerts.overview.stats.acknowledged',
+ 'alerts.overview.stats.triggered24h',
+ 'alerts.overview.stats.workloadOverrides',
+ 'alerts.page.default.description',
+ 'alerts.page.default.title',
+ 'alerts.page.destinations.description',
+ 'alerts.page.destinations.title',
+ 'alerts.page.history.description',
+ 'alerts.page.history.title',
+ 'alerts.page.overview.description',
+ 'alerts.page.overview.title',
+ 'alerts.page.schedule.description',
+ 'alerts.page.schedule.title',
+ 'alerts.page.thresholds.description',
+ 'alerts.page.thresholds.title',
+ 'alerts.tabs.disabledTitle',
+ 'alerts.tabs.group.configuration',
+ 'alerts.tabs.group.status',
+ 'alerts.tabs.destinations',
+ 'alerts.tabs.history',
+ 'alerts.tabs.overview',
+ 'alerts.tabs.schedule',
+ 'alerts.tabs.thresholds',
+ 'alerts.timeline.acknowledged',
+ 'alerts.timeline.closedAt',
+ 'alerts.timeline.empty',
+ 'alerts.timeline.failure',
+ 'alerts.timeline.filterEmpty',
+ 'alerts.timeline.filterLabel.compact',
+ 'alerts.timeline.filterLabel.panel',
+ 'alerts.timeline.heading',
+ 'alerts.timeline.loading',
+ 'alerts.timeline.event.alertAcknowledged',
+ 'alerts.timeline.event.alertFired',
+ 'alerts.timeline.event.alertResolved',
+ 'alerts.timeline.event.alertUnacknowledged',
+ 'alerts.timeline.event.aiAnalysis',
+ 'alerts.timeline.event.command',
+ 'alerts.timeline.event.note',
+ 'alerts.timeline.event.runbook',
+ 'alerts.timeline.noteLabel',
+ 'alerts.timeline.notePlaceholder',
+ 'alerts.timeline.openedAt',
+ 'alerts.timeline.quickFilter.all',
+ 'alerts.timeline.quickFilter.none',
+ 'alerts.timeline.retry',
+ 'alerts.timeline.saveNote',
+ 'alerts.timeline.savingNote',
+ 'alerts.timeline.unavailable',
+] as const satisfies readonly I18nMessageKey[];
+
export const I18N_MESSAGES: I18nCatalogs = {
en: EN_MESSAGES,
de: {
...EN_MESSAGES,
+ 'alerts.activation.label.enabled': 'Warnmeldungen aktiviert',
+ 'alerts.activation.label.disabled': 'Warnmeldungen deaktiviert',
+ 'alerts.activation.toast.activated':
+ 'Warnmeldungen aktiviert. Sie erhalten jetzt Warnungen, wenn Probleme erkannt werden.',
+ 'alerts.activation.toast.activateFailed':
+ 'Warnmeldungen konnten nicht aktiviert werden. Bitte versuchen Sie es erneut.',
+ 'alerts.activation.toast.deactivated':
+ 'Warnmeldungen deaktiviert. Es wird nichts gesendet, bis Sie sie wieder aktivieren.',
+ 'alerts.activation.toast.deactivateFailed':
+ 'Warnmeldungen konnten nicht deaktiviert werden. Bitte versuchen Sie es erneut.',
+ 'alerts.assistant.action.investigate': 'Warnmeldung {alertIdentifier} untersuchen',
+ 'alerts.assistant.button.full': 'Mit Pulse Assistant untersuchen',
+ 'alerts.assistant.button.text': 'Pulse Assistant fragen',
+ 'alerts.assistant.detail.currentMetric':
+ 'Aktueller Wert {currentValue}; Schwellwert {thresholdValue}',
+ 'alerts.assistant.detail.message': 'Meldung: {message}',
+ 'alerts.assistant.detail.node': 'Knoten: {node}',
+ 'alerts.assistant.duration.hoursMinutes': '{hours}h {minutes}m',
+ 'alerts.assistant.duration.minute': '{count} Min.',
+ 'alerts.assistant.duration.minutes': '{count} Min.',
+ 'alerts.assistant.duration.unknown': 'unbekannte Dauer',
+ 'alerts.assistant.level.critical': 'Kritisch',
+ 'alerts.assistant.level.info': 'Info',
+ 'alerts.assistant.level.warning': 'Warnung',
+ 'alerts.assistant.locked.proRequired':
+ 'Pro erforderlich, um Warnmeldungen mit Pulse Assistant zu untersuchen',
+ 'alerts.assistant.locked.unavailable':
+ 'Pulse Assistant-Warnungsanalyse ist fuer diese Warnmeldung nicht verfuegbar',
+ 'alerts.assistant.safetyNote':
+ 'Diagnosen und Behebungen erfordern die Freigabe durch einen Operator.',
+ 'alerts.assistant.sourceLabel': 'Pulse Alerts',
+ 'alerts.assistant.statusLabel': '{level}-Warnmeldung · Aktiv seit {duration}',
+ 'alerts.assistant.subject': '{level} {alertType} auf {resourceName}',
+ 'alerts.assistant.title': 'Warnungsanalyse angehaengt',
+ 'alerts.assistant.unlockedTitle': 'Pulse Assistant bitten, diese Warnmeldung zu untersuchen',
+ 'alerts.nav.ariaLabel': 'Warnmeldungsnavigation',
+ 'alerts.nav.collapseSidebar': 'Seitenleiste einklappen',
+ 'alerts.nav.expandSidebar': 'Seitenleiste ausklappen',
+ 'alerts.nav.title': 'Warnmeldungen',
+ 'alerts.nav.toggleAlerts': 'Warnmeldungen umschalten',
+ 'alerts.overview.action.acknowledge': 'Bestaetigen',
+ 'alerts.overview.action.acknowledgeAll': 'Alle bestaetigen ({count})',
+ 'alerts.overview.action.acknowledging': 'Wird bestaetigt...',
+ 'alerts.overview.action.hideAcknowledged': 'Bestaetigte ausblenden',
+ 'alerts.overview.action.hideTimeline': 'Zeitleiste ausblenden',
+ 'alerts.overview.action.processing': 'Wird verarbeitet...',
+ 'alerts.overview.action.showAcknowledged': 'Bestaetigte anzeigen',
+ 'alerts.overview.action.timeline': 'Zeitleiste',
+ 'alerts.overview.action.unacknowledge': 'Bestaetigung aufheben',
+ 'alerts.overview.acknowledgedBadge': 'Bestaetigt',
+ 'alerts.overview.empty.description':
+ 'Warnmeldungen erscheinen hier, wenn Schwellwerte ueberschritten werden',
+ 'alerts.overview.empty.title': 'Keine aktiven Warnmeldungen',
+ 'alerts.overview.filteredEmpty.all': 'Keine aktiven Warnmeldungen',
+ 'alerts.overview.filteredEmpty.unacknowledged': 'Keine unbestaetigten Warnmeldungen',
+ 'alerts.overview.nodePrefix': 'auf {node}',
+ 'alerts.overview.notification.acknowledged': 'Warnmeldung bestaetigt',
+ 'alerts.overview.notification.acknowledgeFailed': 'Warnmeldung konnte nicht bestaetigt werden',
+ 'alerts.overview.notification.bulkFailure.singular':
+ '{count} Warnmeldung konnte nicht bestaetigt werden.',
+ 'alerts.overview.notification.bulkFailure.plural':
+ '{count} Warnmeldungen konnten nicht bestaetigt werden.',
+ 'alerts.overview.notification.bulkFailureGeneric':
+ 'Warnmeldungen konnten nicht bestaetigt werden',
+ 'alerts.overview.notification.bulkSuccess.singular': '{count} Warnmeldung bestaetigt.',
+ 'alerts.overview.notification.bulkSuccess.plural': '{count} Warnmeldungen bestaetigt.',
+ 'alerts.overview.notification.restored': 'Warnmeldung wiederhergestellt',
+ 'alerts.overview.notification.restoreFailed':
+ 'Warnmeldung konnte nicht wiederhergestellt werden',
+ 'alerts.overview.paused.description':
+ 'Schalten Sie Warnmeldungen ein, um die Ueberwachung fortzusetzen und Konfigurationstabs freizugeben',
+ 'alerts.overview.paused.title': 'Warnmeldungen sind pausiert',
+ 'alerts.overview.section.activeAlerts': 'Aktive Warnmeldungen',
+ 'alerts.overview.startedAt': 'Gestartet: {startedAt}',
+ 'alerts.overview.stats.acknowledged': 'Bestaetigt',
+ 'alerts.overview.stats.triggered24h': 'Ausgeloest (24h)',
+ 'alerts.overview.stats.workloadOverrides': 'Workload-Ausnahmen',
+ 'alerts.page.default.description':
+ 'Pruefen Sie aktive Vorfaelle, Warnungsverlauf, Schwellwerte, Benachrichtigungen und Zeitplaene.',
+ 'alerts.page.default.title': 'Warnmeldungen',
+ 'alerts.page.destinations.description':
+ 'Leiten Sie Warnmeldungen an E-Mail-, Apprise- und Webhook-Ziele weiter.',
+ 'alerts.page.destinations.title': 'Benachrichtigungen',
+ 'alerts.page.history.description':
+ 'Suchen Sie fruehere Warnmeldungen, pruefen Sie Vorfall-Zeitleisten und beobachten Sie Warnungshaeufigkeit ueber Zeit.',
+ 'alerts.page.history.title': 'Warnungsverlauf',
+ 'alerts.page.overview.description':
+ 'Pruefen Sie aktive Vorfaelle, Warnungsabdeckung und ob Warnmeldungen diese Installation aktiv ueberwachen.',
+ 'alerts.page.overview.title': 'Warnmeldungsuebersicht',
+ 'alerts.page.schedule.description':
+ 'Definieren Sie Ruhezeiten, Gruppierung, Abklingzeiten, Wiederherstellung und Eskalation fuer Warnmeldungen.',
+ 'alerts.page.schedule.title': 'Wartungszeitplan',
+ 'alerts.page.thresholds.description':
+ 'Passen Sie Schwellwerte und gezielte Ausnahmen fuer Infrastruktur, Workloads und Integrationen an.',
+ 'alerts.page.thresholds.title': 'Warnungsschwellwerte',
+ 'alerts.tabs.disabledTitle':
+ 'Aktivieren Sie Warnmeldungen, um diese Einstellung zu konfigurieren',
+ 'alerts.tabs.group.configuration': 'Konfiguration',
+ 'alerts.tabs.group.status': 'Status',
+ 'alerts.tabs.destinations': 'Benachrichtigungen',
+ 'alerts.tabs.history': 'Verlauf',
+ 'alerts.tabs.overview': 'Uebersicht',
+ 'alerts.tabs.schedule': 'Zeitplan',
+ 'alerts.tabs.thresholds': 'Schwellwerte',
+ 'alerts.timeline.acknowledged': 'bestaetigt',
+ 'alerts.timeline.closedAt': 'geschlossen {closedAt}',
+ 'alerts.timeline.empty': 'Noch keine Zeitleistenereignisse.',
+ 'alerts.timeline.failure': 'Zeitleiste konnte nicht geladen werden.',
+ 'alerts.timeline.filterEmpty':
+ 'Keine Zeitleistenereignisse entsprechen den ausgewaehlten Filtern.',
+ 'alerts.timeline.filterLabel.compact': 'Filter',
+ 'alerts.timeline.filterLabel.panel': 'Ereignisse filtern:',
+ 'alerts.timeline.heading': 'Vorfall',
+ 'alerts.timeline.loading': 'Zeitleiste wird geladen...',
+ 'alerts.timeline.event.alertAcknowledged': 'Bestaetigt',
+ 'alerts.timeline.event.alertFired': 'Ausgeloest',
+ 'alerts.timeline.event.alertResolved': 'Behoben',
+ 'alerts.timeline.event.alertUnacknowledged': 'Unbestaetigt',
+ 'alerts.timeline.event.aiAnalysis': 'Patrol',
+ 'alerts.timeline.event.command': 'Befehl',
+ 'alerts.timeline.event.note': 'Notiz',
+ 'alerts.timeline.event.runbook': 'Runbook',
+ 'alerts.timeline.noteLabel': 'Vorfallsnotiz',
+ 'alerts.timeline.notePlaceholder': 'Notiz fuer diesen Vorfall hinzufuegen...',
+ 'alerts.timeline.openedAt': 'geoeffnet {openedAt}',
+ 'alerts.timeline.quickFilter.all': 'Alle',
+ 'alerts.timeline.quickFilter.none': 'Keine',
+ 'alerts.timeline.retry': 'Erneut versuchen',
+ 'alerts.timeline.saveNote': 'Notiz speichern',
+ 'alerts.timeline.savingNote': 'Wird gespeichert...',
+ 'alerts.timeline.unavailable': 'Keine Vorfall-Zeitleiste verfuegbar.',
'runtimeHome.openingWorkspace': 'Arbeitsbereich wird geoeffnet...',
'setup.completion.action.addInfrastructure': 'Infrastruktur hinzufuegen',
'setup.completion.action.downloadCredentials': 'Zugangsdaten herunterladen',
@@ -807,6 +1170,131 @@ export const I18N_MESSAGES: I18nCatalogs = {
},
es: {
...EN_MESSAGES,
+ 'alerts.activation.label.enabled': 'Alertas activadas',
+ 'alerts.activation.label.disabled': 'Alertas desactivadas',
+ 'alerts.activation.toast.activated':
+ 'Alertas activadas. Ahora recibiras avisos cuando se detecten problemas.',
+ 'alerts.activation.toast.activateFailed':
+ 'No se pudieron activar las alertas. Intentalo de nuevo.',
+ 'alerts.activation.toast.deactivated':
+ 'Alertas desactivadas. No se enviara nada hasta que las vuelvas a activar.',
+ 'alerts.activation.toast.deactivateFailed':
+ 'No se pudieron desactivar las alertas. Intentalo de nuevo.',
+ 'alerts.assistant.action.investigate': 'Investigar alerta {alertIdentifier}',
+ 'alerts.assistant.button.full': 'Investigar con Pulse Assistant',
+ 'alerts.assistant.button.text': 'Preguntar a Pulse Assistant',
+ 'alerts.assistant.detail.currentMetric': 'Valor actual {currentValue}; umbral {thresholdValue}',
+ 'alerts.assistant.detail.message': 'Mensaje: {message}',
+ 'alerts.assistant.detail.node': 'Nodo: {node}',
+ 'alerts.assistant.duration.hoursMinutes': '{hours}h {minutes}m',
+ 'alerts.assistant.duration.minute': '{count} min',
+ 'alerts.assistant.duration.minutes': '{count} min',
+ 'alerts.assistant.duration.unknown': 'duracion desconocida',
+ 'alerts.assistant.level.critical': 'Critica',
+ 'alerts.assistant.level.info': 'Informativa',
+ 'alerts.assistant.level.warning': 'Advertencia',
+ 'alerts.assistant.locked.proRequired':
+ 'Se requiere Pro para investigar alertas con Pulse Assistant',
+ 'alerts.assistant.locked.unavailable':
+ 'La investigacion de alertas de Pulse Assistant no esta disponible para esta alerta',
+ 'alerts.assistant.safetyNote':
+ 'Los diagnosticos y la correccion requieren aprobacion del operador.',
+ 'alerts.assistant.sourceLabel': 'Pulse Alerts',
+ 'alerts.assistant.statusLabel': '{level} alerta · Activa desde hace {duration}',
+ 'alerts.assistant.subject': '{level} {alertType} en {resourceName}',
+ 'alerts.assistant.title': 'Investigacion de alerta adjunta',
+ 'alerts.assistant.unlockedTitle': 'Pedir a Pulse Assistant que investigue esta alerta',
+ 'alerts.nav.ariaLabel': 'Navegacion de alertas',
+ 'alerts.nav.collapseSidebar': 'Contraer barra lateral',
+ 'alerts.nav.expandSidebar': 'Expandir barra lateral',
+ 'alerts.nav.title': 'Alertas',
+ 'alerts.nav.toggleAlerts': 'Alternar alertas',
+ 'alerts.overview.action.acknowledge': 'Reconocer',
+ 'alerts.overview.action.acknowledgeAll': 'Reconocer todas ({count})',
+ 'alerts.overview.action.acknowledging': 'Reconociendo...',
+ 'alerts.overview.action.hideAcknowledged': 'Ocultar reconocidas',
+ 'alerts.overview.action.hideTimeline': 'Ocultar linea de tiempo',
+ 'alerts.overview.action.processing': 'Procesando...',
+ 'alerts.overview.action.showAcknowledged': 'Mostrar reconocidas',
+ 'alerts.overview.action.timeline': 'Linea de tiempo',
+ 'alerts.overview.action.unacknowledge': 'Quitar reconocimiento',
+ 'alerts.overview.acknowledgedBadge': 'Reconocida',
+ 'alerts.overview.empty.description':
+ 'Las alertas apareceran aqui cuando se superen los umbrales',
+ 'alerts.overview.empty.title': 'No hay alertas activas',
+ 'alerts.overview.filteredEmpty.all': 'No hay alertas activas',
+ 'alerts.overview.filteredEmpty.unacknowledged': 'No hay alertas sin reconocer',
+ 'alerts.overview.nodePrefix': 'en {node}',
+ 'alerts.overview.notification.acknowledged': 'Alerta reconocida',
+ 'alerts.overview.notification.acknowledgeFailed': 'No se pudo reconocer la alerta',
+ 'alerts.overview.notification.bulkFailure.singular': 'No se pudo reconocer {count} alerta.',
+ 'alerts.overview.notification.bulkFailure.plural': 'No se pudieron reconocer {count} alertas.',
+ 'alerts.overview.notification.bulkFailureGeneric': 'No se pudieron reconocer las alertas',
+ 'alerts.overview.notification.bulkSuccess.singular': '{count} alerta reconocida.',
+ 'alerts.overview.notification.bulkSuccess.plural': '{count} alertas reconocidas.',
+ 'alerts.overview.notification.restored': 'Alerta restaurada',
+ 'alerts.overview.notification.restoreFailed': 'No se pudo restaurar la alerta',
+ 'alerts.overview.paused.description':
+ 'Activa las alertas para reanudar la monitorizacion y desbloquear las pestañas de configuracion',
+ 'alerts.overview.paused.title': 'Las alertas estan pausadas',
+ 'alerts.overview.section.activeAlerts': 'Alertas activas',
+ 'alerts.overview.startedAt': 'Inicio: {startedAt}',
+ 'alerts.overview.stats.acknowledged': 'Reconocidas',
+ 'alerts.overview.stats.triggered24h': 'Activadas (24h)',
+ 'alerts.overview.stats.workloadOverrides': 'Excepciones de cargas',
+ 'alerts.page.default.description':
+ 'Revisa incidentes activos, el historial de alertas, umbrales, notificaciones y programaciones.',
+ 'alerts.page.default.title': 'Alertas',
+ 'alerts.page.destinations.description':
+ 'Enruta notificaciones de alerta a destinos de email, Apprise y webhook.',
+ 'alerts.page.destinations.title': 'Notificaciones',
+ 'alerts.page.history.description':
+ 'Busca alertas anteriores, revisa lineas de tiempo de incidentes e inspecciona la frecuencia de alertas.',
+ 'alerts.page.history.title': 'Historial de alertas',
+ 'alerts.page.overview.description':
+ 'Revisa incidentes activos, confirma la cobertura de alertas y controla si las alertas monitorizan activamente esta instalacion.',
+ 'alerts.page.overview.title': 'Resumen de alertas',
+ 'alerts.page.schedule.description':
+ 'Define horas de silencio, agrupacion, enfriamiento, recuperacion y escalado para la entrega de alertas.',
+ 'alerts.page.schedule.title': 'Programacion de mantenimiento',
+ 'alerts.page.thresholds.description':
+ 'Ajusta umbrales y excepciones especificas para infraestructura, cargas e integraciones.',
+ 'alerts.page.thresholds.title': 'Umbrales de alerta',
+ 'alerts.tabs.disabledTitle': 'Activa las alertas para configurar este ajuste',
+ 'alerts.tabs.group.configuration': 'Configuracion',
+ 'alerts.tabs.group.status': 'Estado',
+ 'alerts.tabs.destinations': 'Notificaciones',
+ 'alerts.tabs.history': 'Historial',
+ 'alerts.tabs.overview': 'Resumen',
+ 'alerts.tabs.schedule': 'Programacion',
+ 'alerts.tabs.thresholds': 'Umbrales',
+ 'alerts.timeline.acknowledged': 'reconocida',
+ 'alerts.timeline.closedAt': 'cerrado {closedAt}',
+ 'alerts.timeline.empty': 'Aun no hay eventos en la linea de tiempo.',
+ 'alerts.timeline.failure': 'No se pudo cargar la linea de tiempo.',
+ 'alerts.timeline.filterEmpty':
+ 'Ningun evento de la linea de tiempo coincide con los filtros seleccionados.',
+ 'alerts.timeline.filterLabel.compact': 'Filtros',
+ 'alerts.timeline.filterLabel.panel': 'Filtrar eventos:',
+ 'alerts.timeline.heading': 'Incidente',
+ 'alerts.timeline.loading': 'Cargando linea de tiempo...',
+ 'alerts.timeline.event.alertAcknowledged': 'Reconocida',
+ 'alerts.timeline.event.alertFired': 'Activada',
+ 'alerts.timeline.event.alertResolved': 'Resuelta',
+ 'alerts.timeline.event.alertUnacknowledged': 'Sin reconocer',
+ 'alerts.timeline.event.aiAnalysis': 'Patrol',
+ 'alerts.timeline.event.command': 'Comando',
+ 'alerts.timeline.event.note': 'Nota',
+ 'alerts.timeline.event.runbook': 'Runbook',
+ 'alerts.timeline.noteLabel': 'Nota del incidente',
+ 'alerts.timeline.notePlaceholder': 'Añade una nota para este incidente...',
+ 'alerts.timeline.openedAt': 'abierto {openedAt}',
+ 'alerts.timeline.quickFilter.all': 'Todas',
+ 'alerts.timeline.quickFilter.none': 'Ninguna',
+ 'alerts.timeline.retry': 'Reintentar',
+ 'alerts.timeline.saveNote': 'Guardar nota',
+ 'alerts.timeline.savingNote': 'Guardando...',
+ 'alerts.timeline.unavailable': 'No hay linea de tiempo de incidente disponible.',
'runtimeHome.openingWorkspace': 'Abriendo el espacio de trabajo...',
'setup.completion.action.addInfrastructure': 'Agregar infraestructura',
'setup.completion.action.downloadCredentials': 'Descargar credenciales',
diff --git a/frontend-modern/src/i18n/policy.ts b/frontend-modern/src/i18n/policy.ts
index b938e3d601..0b84dc7a7b 100644
--- a/frontend-modern/src/i18n/policy.ts
+++ b/frontend-modern/src/i18n/policy.ts
@@ -5,6 +5,7 @@ import {
type SupportedLocale,
} from './locales';
import {
+ ALERTS_OVERVIEW_MIGRATED_MESSAGE_KEYS,
FIRST_SESSION_MONITORING_MIGRATED_MESSAGE_KEYS,
SETTINGS_GENERAL_MIGRATED_MESSAGE_KEYS,
type I18nMessageKey,
@@ -63,12 +64,29 @@ export const FIRST_SESSION_MONITORING_NON_TRANSLATABLE_TOKENS = [
'pct exec',
] as const;
+export const ALERTS_OVERVIEW_NON_TRANSLATABLE_TOKENS = [
+ 'Pulse',
+ 'Pulse Assistant',
+ 'Pulse Alerts',
+ 'Pro',
+ 'API',
+ 'alertIdentifier',
+ 'alertType',
+ 'resourceId',
+ 'resourceName',
+ 'node',
+ 'systemctl',
+] as const;
+
export const LOCALIZED_SETTINGS_GENERAL_JOURNEY_KEYS =
SETTINGS_GENERAL_MIGRATED_MESSAGE_KEYS satisfies readonly I18nMessageKey[];
export const LOCALIZED_FIRST_SESSION_MONITORING_JOURNEY_KEYS =
FIRST_SESSION_MONITORING_MIGRATED_MESSAGE_KEYS satisfies readonly I18nMessageKey[];
+export const LOCALIZED_ALERTS_OVERVIEW_JOURNEY_KEYS =
+ ALERTS_OVERVIEW_MIGRATED_MESSAGE_KEYS satisfies readonly I18nMessageKey[];
+
export const SETTINGS_GENERAL_ALLOWED_IDENTICAL_TRANSLATIONS = {
de: ['settings.nav.group.system', 'settings.general.theme.option.system'],
es: ['settings.header.systemGeneral.title', 'settings.nav.item.general'],
@@ -78,3 +96,26 @@ export const FIRST_SESSION_MONITORING_ALLOWED_IDENTICAL_TRANSLATIONS = {
de: ['setup.completion.sourceOptions.agent.title', 'setup.security.placeholder.username'],
es: ['setup.completion.sourceOptions.agent.title', 'setup.security.placeholder.username'],
} as const satisfies Partial<Record<SupportedLocale, readonly I18nMessageKey[]>>;
+
+export const ALERTS_OVERVIEW_ALLOWED_IDENTICAL_TRANSLATIONS = {
+ de: [
+ 'alerts.assistant.duration.hoursMinutes',
+ 'alerts.assistant.level.info',
+ 'alerts.assistant.sourceLabel',
+ 'alerts.tabs.group.configuration',
+ 'alerts.tabs.group.status',
+ 'alerts.timeline.event.aiAnalysis',
+ 'alerts.timeline.event.runbook',
+ ],
+ es: [
+ 'alerts.assistant.duration.hoursMinutes',
+ 'alerts.assistant.duration.minute',
+ 'alerts.assistant.duration.minutes',
+ 'alerts.assistant.sourceLabel',
+ 'alerts.nav.title',
+ 'alerts.page.default.title',
+ 'alerts.tabs.destinations',
+ 'alerts.timeline.event.aiAnalysis',
+ 'alerts.timeline.event.runbook',
+ ],
+} as const satisfies Partial<Record<SupportedLocale, readonly I18nMessageKey[]>>;
diff --git a/frontend-modern/src/pages/Alerts.tsx b/frontend-modern/src/pages/Alerts.tsx
index 6d9e8f6468..347414dec2 100644
--- a/frontend-modern/src/pages/Alerts.tsx
+++ b/frontend-modern/src/pages/Alerts.tsx
@@ -4,6 +4,7 @@ import type { JSX } from 'solid-js';
import { useLocation, useNavigate } from '@solidjs/router';
import { logger } from '@/utils/logger';
+import { t } from '@/i18n';
import { Card } from '@/components/shared/Card';
import { PageHeader } from '@/components/shared/PageHeader';
@@ -106,9 +107,9 @@ export function Alerts() {
const [activeTab, setActiveTab] = createSignal<AlertTab>(tabFromPath(location.pathname));
const [overviewOverrides, setOverviewOverrides] = createSignal<Override[]>([]);
- const alertsPageHeaderMeta = getAlertsPageHeaderMeta();
+ const alertsPageHeaderMeta = createMemo(() => getAlertsPageHeaderMeta());
- const headerMeta = () => alertsPageHeaderMeta[activeTab()] ?? alertsPageHeaderMeta.default;
+ const headerMeta = () => alertsPageHeaderMeta()[activeTab()] ?? alertsPageHeaderMeta().default;
createEffect(() => {
const currentPath = location.pathname;
@@ -228,7 +229,7 @@ export function Alerts() {
{alertActivationPresentation().label}
</span>
<label class="relative inline-flex items-center cursor-pointer">
- <span class="sr-only">Toggle alerts</span>
+ <span class="sr-only">{t('alerts.nav.toggleAlerts')}</span>
<input
type="checkbox"
class="sr-only peer"
@@ -254,7 +255,7 @@ export function Alerts() {
<Card padding="none" class="relative lg:flex overflow-hidden">
<div
class={`hidden lg:flex lg:flex-col ${sidebarCollapsed() ? 'w-16' : 'w-72'} ${sidebarCollapsed() ? 'lg:min-w-[4rem] lg:max-w-[4rem] lg:basis-[4rem]' : 'lg:min-w-[18rem] lg:max-w-[18rem] lg:basis-[18rem]'} relative border-b border-border lg:border-b-0 lg:border-r lg:align-top flex-shrink-0 transition-all duration-200`}
- aria-label="Alerts navigation"
+ aria-label={t('alerts.nav.ariaLabel')}
aria-expanded={!sidebarCollapsed()}
>
<div
@@ -262,12 +263,12 @@ export function Alerts() {
>
<Show when={!sidebarCollapsed()}>
<div class="flex items-center justify-between pb-2 border-b border-border">
- <h2 class="text-sm font-semibold text-base-content">Alerts</h2>
+ <h2 class="text-sm font-semibold text-base-content">{t('alerts.nav.title')}</h2>
<button
type="button"
onClick={() => setSidebarCollapsed(true)}
class="p-1 rounded-md hover:bg-surface-hover transition-colors"
- aria-label="Collapse sidebar"
+ aria-label={t('alerts.nav.collapseSidebar')}
>
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path
@@ -285,7 +286,7 @@ export function Alerts() {
type="button"
onClick={() => setSidebarCollapsed(false)}
class="w-full p-2 rounded-md hover:bg-surface-hover transition-colors"
- aria-label="Expand sidebar"
+ aria-label={t('alerts.nav.expandSidebar')}
>
<svg class="w-5 h-5 mx-auto" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path
@@ -402,10 +403,7 @@ export function Alerts() {
</Show>
<Show when={activeTab() === 'history'}>
- <HistoryTab
- getResource={getResource}
- allResources={allResources}
- />
+ <HistoryTab getResource={getResource} allResources={allResources} />
</Show>
</div>
</div>
diff --git a/frontend-modern/src/utils/__tests__/alertActivationPresentation.test.ts b/frontend-modern/src/utils/__tests__/alertActivationPresentation.test.ts
index c853fddc6d..98be3468ce 100644
--- a/frontend-modern/src/utils/__tests__/alertActivationPresentation.test.ts
+++ b/frontend-modern/src/utils/__tests__/alertActivationPresentation.test.ts
@@ -1,4 +1,5 @@
-import { describe, expect, it } from 'vitest';
+import { afterEach, beforeEach, describe, expect, it } from 'vitest';
+import { DEFAULT_LOCALE, setActiveLocale } from '@/i18n';
import {
ALERT_ACTIVATION_FAILURE,
ALERT_ACTIVATION_SUCCESS,
@@ -12,6 +13,14 @@ import {
} from '@/utils/alertActivationPresentation';
describe('getAlertActivationPresentation', () => {
+ beforeEach(() => {
+ setActiveLocale(DEFAULT_LOCALE);
+ });
+
+ afterEach(() => {
+ setActiveLocale(DEFAULT_LOCALE);
+ });
+
it('returns the active alerts presentation', () => {
expect(getAlertActivationPresentation({ isActive: true })).toEqual({
label: 'Alerts enabled',
@@ -46,4 +55,23 @@ describe('getAlertActivationPresentation', () => {
expect(getAlertDeactivationSuccess()).toBe(ALERT_DEACTIVATION_SUCCESS);
expect(getAlertDeactivationFailure()).toBe(ALERT_DEACTIVATION_FAILURE);
});
+
+ it('localizes activation labels and feedback through the active locale', () => {
+ setActiveLocale('es');
+
+ expect(getAlertActivationPresentation({ isActive: true }).label).toBe('Alertas activadas');
+ expect(getAlertActivationPresentation({ isActive: false }).label).toBe('Alertas desactivadas');
+ expect(getAlertActivationSuccess()).toBe(
+ 'Alertas activadas. Ahora recibiras avisos cuando se detecten problemas.',
+ );
+ expect(getAlertActivationFailure()).toBe(
+ 'No se pudieron activar las alertas. Intentalo de nuevo.',
+ );
+ expect(getAlertDeactivationSuccess()).toBe(
+ 'Alertas desactivadas. No se enviara nada hasta que las vuelvas a activar.',
+ );
+ expect(getAlertDeactivationFailure()).toBe(
+ 'No se pudieron desactivar las alertas. Intentalo de nuevo.',
+ );
+ });
});
diff --git a/frontend-modern/src/utils/__tests__/alertOverviewPresentation.test.ts b/frontend-modern/src/utils/__tests__/alertOverviewPresentation.test.ts
index b808f6add1..ba1c430d96 100644
--- a/frontend-modern/src/utils/__tests__/alertOverviewPresentation.test.ts
+++ b/frontend-modern/src/utils/__tests__/alertOverviewPresentation.test.ts
@@ -1,4 +1,5 @@
-import { describe, expect, it } from 'vitest';
+import { afterEach, beforeEach, describe, expect, it } from 'vitest';
+import { DEFAULT_LOCALE, setActiveLocale } from '@/i18n';
import {
ALERT_BUCKET_EMPTY_LABEL,
ALERT_HISTORY_ALL_TIME_FILTER_LABEL,
@@ -30,36 +31,83 @@ import {
ALERT_TIMELINE_UNAVAILABLE_STATE,
ALERTS_THRESHOLD_HINT,
getAlertOverviewAcknowledgedBadgeClass,
+ getAlertOverviewAcknowledgedBadgeLabel,
+ getAlertOverviewAcknowledgedNotification,
+ getAlertOverviewAcknowledgedToggleLabel,
+ getAlertOverviewActiveSectionTitle,
+ getAlertOverviewBulkAcknowledgeFailureNotification,
+ getAlertOverviewBulkAcknowledgeGenericFailureNotification,
+ getAlertOverviewBulkAcknowledgeLabel,
+ getAlertOverviewBulkAcknowledgedNotification,
getAlertOverviewCardPresentation,
+ getAlertOverviewEmptyState,
+ getAlertOverviewNodeLabel,
+ getAlertOverviewPausedState,
getAlertOverviewPrimaryActionClass,
+ getAlertOverviewPrimaryActionLabel,
+ getAlertOverviewRestoredNotification,
getAlertOverviewSecondaryActionClass,
+ getAlertOverviewStartedAtLabel,
getAlertOverviewStartedAtClass,
+ getAlertOverviewStatsLabels,
+ getAlertOverviewTimelineActionLabel,
getAlertHistoryEmptyState,
getAlertHistoryLoadingState,
getAlertHistorySearchPlaceholder,
getAlertBucketCountLabel,
getAlertFilteredEmptyState,
+ getAlertTimelineAcknowledgedLabel,
+ getAlertTimelineClosedAtLabel,
getAlertTimelineEmptyState,
+ getAlertTimelineEventTypeLabel,
getAlertTimelineFailureState,
getAlertTimelineFilterEmptyState,
+ getAlertTimelineFilterLabel,
+ getAlertTimelineHeading,
getAlertTimelineLoadingState,
+ getAlertTimelineNoteLabel,
+ getAlertTimelineNotePlaceholder,
+ getAlertTimelineOpenedAtLabel,
+ getAlertTimelineQuickFilterLabel,
+ getAlertTimelineSaveNoteLabel,
getAlertTimelineUnavailableState,
getAlertListEmptyState,
getAlertsPageHeaderMeta,
} from '@/utils/alertOverviewPresentation';
describe('alertOverviewPresentation', () => {
+ beforeEach(() => {
+ setActiveLocale(DEFAULT_LOCALE);
+ });
+
+ afterEach(() => {
+ setActiveLocale(DEFAULT_LOCALE);
+ });
+
it('returns canonical alert overview empty-state copy', () => {
expect(ALERTS_EMPTY_STATE).toBe('No active alerts');
expect(ALERTS_THRESHOLD_HINT).toBe('Alerts will appear here when thresholds are exceeded');
expect(getAlertListEmptyState(true)).toBe('No active alerts');
expect(getAlertListEmptyState(false)).toBe('No unacknowledged alerts');
+ expect(getAlertOverviewEmptyState()).toEqual({
+ title: 'No active alerts',
+ description: 'Alerts will appear here when thresholds are exceeded',
+ });
+ expect(getAlertOverviewPausedState()).toEqual({
+ title: 'Alerting is paused',
+ description: 'Toggle alerts on to resume monitoring and unlock configuration tabs',
+ });
});
it('returns canonical alert overview stat labels', () => {
expect(ALERT_OVERVIEW_ACKNOWLEDGED_LABEL).toBe('Acknowledged');
expect(ALERT_OVERVIEW_LAST_24_HOURS_LABEL).toBe('Triggered (24h)');
expect(ALERT_OVERVIEW_WORKLOAD_OVERRIDES_LABEL).toBe('Workload Overrides');
+ expect(getAlertOverviewStatsLabels()).toEqual({
+ last24Hours: 'Triggered (24h)',
+ acknowledged: 'Acknowledged',
+ workloadOverrides: 'Workload Overrides',
+ });
});
it('returns canonical alert history search and empty-state copy', () => {
@@ -168,6 +216,20 @@ describe('alertOverviewPresentation', () => {
text: ALERT_TIMELINE_FAILURE_STATE,
actionLabel: ALERT_TIMELINE_RETRY_LABEL,
});
+ expect(getAlertTimelineHeading()).toBe('Incident');
+ expect(getAlertTimelineAcknowledgedLabel()).toBe('acknowledged');
+ expect(getAlertTimelineOpenedAtLabel('1/1/2026')).toBe('opened 1/1/2026');
+ expect(getAlertTimelineClosedAtLabel('1/2/2026')).toBe('closed 1/2/2026');
+ expect(getAlertTimelineNoteLabel()).toBe('Incident note');
+ expect(getAlertTimelineNotePlaceholder()).toBe('Add a note for this incident...');
+ expect(getAlertTimelineSaveNoteLabel(false)).toBe('Save Note');
+ expect(getAlertTimelineSaveNoteLabel(true)).toBe('Saving...');
+ expect(getAlertTimelineFilterLabel('panel')).toBe('Filter events:');
+ expect(getAlertTimelineFilterLabel('compact')).toBe('Filters');
+ expect(getAlertTimelineQuickFilterLabel('all')).toBe('All');
+ expect(getAlertTimelineQuickFilterLabel('none')).toBe('None');
+ expect(getAlertTimelineEventTypeLabel('command')).toBe('Cmd');
+ expect(getAlertTimelineEventTypeLabel('unknown_event')).toBe('unknown_event');
});
it('returns canonical active alert card presentation', () => {
@@ -197,4 +259,60 @@ describe('alertOverviewPresentation', () => {
'px-3 py-1.5 text-xs font-medium border rounded-md transition-all bg-surface text-base-content border-border hover:bg-surface-hover',
);
});
+
+ it('localizes alert overview helper copy through the active locale', () => {
+ setActiveLocale('es');
+
+ expect(getAlertsPageHeaderMeta().overview.title).toBe('Resumen de alertas');
+ expect(getAlertOverviewActiveSectionTitle()).toBe('Alertas activas');
+ expect(getAlertOverviewStatsLabels()).toEqual({
+ last24Hours: 'Activadas (24h)',
+ acknowledged: 'Reconocidas',
+ workloadOverrides: 'Excepciones de cargas',
+ });
+ expect(getAlertOverviewEmptyState()).toEqual({
+ title: 'No hay alertas activas',
+ description: 'Las alertas apareceran aqui cuando se superen los umbrales',
+ });
+ expect(getAlertOverviewPausedState().title).toBe('Las alertas estan pausadas');
+ expect(getAlertListEmptyState(false)).toBe('No hay alertas sin reconocer');
+ expect(getAlertOverviewAcknowledgedToggleLabel(true)).toBe('Ocultar reconocidas');
+ expect(getAlertOverviewBulkAcknowledgeLabel(2, false)).toBe('Reconocer todas (2)');
+ expect(getAlertOverviewBulkAcknowledgeLabel(2, true)).toBe('Reconociendo...');
+ expect(getAlertOverviewAcknowledgedBadgeLabel()).toBe('Reconocida');
+ expect(getAlertOverviewNodeLabel('pve-01')).toBe('en pve-01');
+ expect(getAlertOverviewStartedAtLabel('1/1/2026')).toBe('Inicio: 1/1/2026');
+ expect(getAlertOverviewPrimaryActionLabel({ acknowledged: false, processing: false })).toBe(
+ 'Reconocer',
+ );
+ expect(getAlertOverviewPrimaryActionLabel({ acknowledged: true, processing: false })).toBe(
+ 'Quitar reconocimiento',
+ );
+ expect(getAlertOverviewPrimaryActionLabel({ acknowledged: false, processing: true })).toBe(
+ 'Procesando...',
+ );
+ expect(getAlertOverviewTimelineActionLabel(false)).toBe('Linea de tiempo');
+ expect(getAlertOverviewAcknowledgedNotification()).toBe('Alerta reconocida');
+ expect(getAlertOverviewRestoredNotification()).toBe('Alerta restaurada');
+ expect(getAlertOverviewBulkAcknowledgedNotification(2)).toBe('2 alertas reconocidas.');
+ expect(getAlertOverviewBulkAcknowledgeFailureNotification(1)).toBe(
+ 'No se pudo reconocer 1 alerta.',
+ );
+ expect(getAlertOverviewBulkAcknowledgeGenericFailureNotification()).toBe(
+ 'No se pudieron reconocer las alertas',
+ );
+ expect(getAlertTimelineFailureState()).toEqual({
+ text: 'No se pudo cargar la linea de tiempo.',
+ actionLabel: 'Reintentar',
+ });
+ expect(getAlertTimelineFilterLabel('panel')).toBe('Filtrar eventos:');
+ expect(getAlertTimelineQuickFilterLabel('none')).toBe('Ninguna');
+ expect(getAlertTimelineEventTypeLabel('command')).toBe('Comando');
+
+ setActiveLocale('de');
+
+ expect(getAlertOverviewActiveSectionTitle()).toBe('Aktive Warnmeldungen');
+ expect(getAlertTimelineHeading()).toBe('Vorfall');
+ expect(getAlertTimelineEventTypeLabel('alert_resolved')).toBe('Behoben');
+ });
});
diff --git a/frontend-modern/src/utils/__tests__/alertTabsPresentation.test.ts b/frontend-modern/src/utils/__tests__/alertTabsPresentation.test.ts
index 48b7ed3230..06b63bd060 100644
--- a/frontend-modern/src/utils/__tests__/alertTabsPresentation.test.ts
+++ b/frontend-modern/src/utils/__tests__/alertTabsPresentation.test.ts
@@ -1,4 +1,5 @@
-import { describe, expect, it } from 'vitest';
+import { afterEach, beforeEach, describe, expect, it } from 'vitest';
+import { DEFAULT_LOCALE, setActiveLocale } from '@/i18n';
import {
ALERT_TAB_DESTINATIONS_LABEL,
ALERT_TAB_GROUP_CONFIGURATION_LABEL,
@@ -15,6 +16,14 @@ import {
} from '@/utils/alertTabsPresentation';
describe('alertTabsPresentation', () => {
+ beforeEach(() => {
+ setActiveLocale(DEFAULT_LOCALE);
+ });
+
+ afterEach(() => {
+ setActiveLocale(DEFAULT_LOCALE);
+ });
+
it('returns active sidebar presentation', () => {
expect(getAlertsSidebarTabClass({ isActive: true, isDisabled: false })).toBe(
'flex w-full items-center rounded-md text-sm font-medium transition-colors gap-2.5 px-3 py-2 bg-blue-50 text-blue-600 dark:bg-blue-900 dark:text-blue-200',
@@ -88,4 +97,31 @@ describe('alertTabsPresentation', () => {
expect(isAlertsConfigurationTab('destinations')).toBe(true);
expect(isAlertsConfigurationTab('schedule')).toBe(true);
});
+
+ it('localizes alerts tab groups and disabled titles through the active locale', () => {
+ setActiveLocale('de');
+
+ expect(getAlertsTabTitle({ isDisabled: true, label: 'Overview' })).toBe(
+ 'Aktivieren Sie Warnmeldungen, um diese Einstellung zu konfigurieren',
+ );
+ expect(getAlertsTabGroups()).toEqual([
+ {
+ id: 'status',
+ label: 'Status',
+ items: [
+ { id: 'overview', label: 'Uebersicht' },
+ { id: 'history', label: 'Verlauf' },
+ ],
+ },
+ {
+ id: 'configuration',
+ label: 'Konfiguration',
+ items: [
+ { id: 'thresholds', label: 'Schwellwerte' },
+ { id: 'destinations', label: 'Benachrichtigungen' },
+ { id: 'schedule', label: 'Zeitplan' },
+ ],
+ },
+ ]);
+ });
});
diff --git a/frontend-modern/src/utils/alertActivationPresentation.ts b/frontend-modern/src/utils/alertActivationPresentation.ts
index 681b8ce440..628877e0b4 100644
--- a/frontend-modern/src/utils/alertActivationPresentation.ts
+++ b/frontend-modern/src/utils/alertActivationPresentation.ts
@@ -1,3 +1,5 @@
+import { t } from '@/i18n';
+
export interface AlertActivationPresentationOptions {
isActive: boolean;
isBusy?: boolean;
@@ -22,7 +24,7 @@ export function getAlertActivationPresentation({
isBusy = false,
}: AlertActivationPresentationOptions): AlertActivationPresentation {
return {
- label: isActive ? 'Alerts enabled' : 'Alerts disabled',
+ label: isActive ? t('alerts.activation.label.enabled') : t('alerts.activation.label.disabled'),
labelClass: isActive ? 'text-green-600 dark:text-green-400' : 'text-muted',
trackClass: `relative h-6 w-11 rounded-full transition ${
isActive ? 'bg-blue-600' : 'bg-surface-hover'
@@ -34,17 +36,17 @@ export function getAlertActivationPresentation({
}
export function getAlertActivationSuccess() {
- return ALERT_ACTIVATION_SUCCESS;
+ return t('alerts.activation.toast.activated');
}
export function getAlertActivationFailure() {
- return ALERT_ACTIVATION_FAILURE;
+ return t('alerts.activation.toast.activateFailed');
}
export function getAlertDeactivationSuccess() {
- return ALERT_DEACTIVATION_SUCCESS;
+ return t('alerts.activation.toast.deactivated');
}
export function getAlertDeactivationFailure() {
- return ALERT_DEACTIVATION_FAILURE;
+ return t('alerts.activation.toast.deactivateFailed');
}
diff --git a/frontend-modern/src/utils/alertOverviewPresentation.ts b/frontend-modern/src/utils/alertOverviewPresentation.ts
index ddd32ed559..4644f2ba45 100644
--- a/frontend-modern/src/utils/alertOverviewPresentation.ts
+++ b/frontend-modern/src/utils/alertOverviewPresentation.ts
@@ -1,3 +1,4 @@
+import { t } from '@/i18n';
import { getAllFilterOptionLabel } from '@/components/shared/filterOptionPresentation';
export const ALERTS_EMPTY_STATE = 'No active alerts';
@@ -45,67 +46,233 @@ export interface AlertOverviewCardPresentation {
export function getAlertsPageHeaderMeta() {
return {
overview: {
- title: ALERTS_PAGE_OVERVIEW_TITLE,
- description: ALERTS_PAGE_OVERVIEW_DESCRIPTION,
+ title: t('alerts.page.overview.title'),
+ description: t('alerts.page.overview.description'),
},
thresholds: {
- title: ALERTS_PAGE_THRESHOLDS_TITLE,
- description: ALERTS_PAGE_THRESHOLDS_DESCRIPTION,
+ title: t('alerts.page.thresholds.title'),
+ description: t('alerts.page.thresholds.description'),
},
destinations: {
- title: ALERTS_PAGE_DESTINATIONS_TITLE,
- description: ALERTS_PAGE_DESTINATIONS_DESCRIPTION,
+ title: t('alerts.page.destinations.title'),
+ description: t('alerts.page.destinations.description'),
},
schedule: {
- title: ALERTS_PAGE_SCHEDULE_TITLE,
- description: ALERTS_PAGE_SCHEDULE_DESCRIPTION,
+ title: t('alerts.page.schedule.title'),
+ description: t('alerts.page.schedule.description'),
},
history: {
- title: ALERTS_PAGE_HISTORY_TITLE,
- description: ALERTS_PAGE_HISTORY_DESCRIPTION,
+ title: t('alerts.page.history.title'),
+ description: t('alerts.page.history.description'),
},
default: {
- title: ALERTS_PAGE_DEFAULT_TITLE,
- description: ALERTS_PAGE_DEFAULT_DESCRIPTION,
+ title: t('alerts.page.default.title'),
+ description: t('alerts.page.default.description'),
},
} as const;
}
export function getAlertListEmptyState(showAcknowledged: boolean): string {
- return showAcknowledged ? ALERTS_EMPTY_STATE : 'No unacknowledged alerts';
+ return showAcknowledged
+ ? t('alerts.overview.filteredEmpty.all')
+ : t('alerts.overview.filteredEmpty.unacknowledged');
+}
+
+export function getAlertOverviewEmptyState() {
+ return {
+ title: t('alerts.overview.empty.title'),
+ description: t('alerts.overview.empty.description'),
+ } as const;
+}
+
+export function getAlertOverviewPausedState() {
+ return {
+ title: t('alerts.overview.paused.title'),
+ description: t('alerts.overview.paused.description'),
+ } as const;
+}
+
+export function getAlertOverviewStatsLabels() {
+ return {
+ last24Hours: t('alerts.overview.stats.triggered24h'),
+ acknowledged: t('alerts.overview.stats.acknowledged'),
+ workloadOverrides: t('alerts.overview.stats.workloadOverrides'),
+ } as const;
+}
+
+export function getAlertOverviewActiveSectionTitle(): string {
+ return t('alerts.overview.section.activeAlerts');
+}
+
+export function getAlertOverviewAcknowledgedToggleLabel(showAcknowledged: boolean): string {
+ return showAcknowledged
+ ? t('alerts.overview.action.hideAcknowledged')
+ : t('alerts.overview.action.showAcknowledged');
+}
+
+export function getAlertOverviewBulkAcknowledgeLabel(count: number, processing: boolean): string {
+ return processing
+ ? t('alerts.overview.action.acknowledging')
+ : t('alerts.overview.action.acknowledgeAll', { count });
+}
+
+export function getAlertOverviewAcknowledgedBadgeLabel(): string {
+ return t('alerts.overview.acknowledgedBadge');
+}
+
+export function getAlertOverviewNodeLabel(node: string): string {
+ return t('alerts.overview.nodePrefix', { node });
+}
+
+export function getAlertOverviewStartedAtLabel(startedAt: string): string {
+ return t('alerts.overview.startedAt', { startedAt });
+}
+
+export function getAlertOverviewPrimaryActionLabel({
+ acknowledged,
+ processing,
+}: {
+ acknowledged: boolean;
+ processing: boolean;
+}): string {
+ if (processing) return t('alerts.overview.action.processing');
+ return acknowledged
+ ? t('alerts.overview.action.unacknowledge')
+ : t('alerts.overview.action.acknowledge');
+}
+
+export function getAlertOverviewTimelineActionLabel(isExpanded: boolean): string {
+ return isExpanded
+ ? t('alerts.overview.action.hideTimeline')
+ : t('alerts.overview.action.timeline');
+}
+
+export function getAlertOverviewRestoredNotification(): string {
+ return t('alerts.overview.notification.restored');
+}
+
+export function getAlertOverviewAcknowledgedNotification(): string {
+ return t('alerts.overview.notification.acknowledged');
+}
+
+export function getAlertOverviewAcknowledgementFailureNotification(
+ wasAcknowledged: boolean,
+): string {
+ return wasAcknowledged
+ ? t('alerts.overview.notification.restoreFailed')
+ : t('alerts.overview.notification.acknowledgeFailed');
+}
+
+export function getAlertOverviewBulkAcknowledgedNotification(count: number): string {
+ return count === 1
+ ? t('alerts.overview.notification.bulkSuccess.singular', { count })
+ : t('alerts.overview.notification.bulkSuccess.plural', { count });
+}
+
+export function getAlertOverviewBulkAcknowledgeFailureNotification(count: number): string {
+ return count === 1
+ ? t('alerts.overview.notification.bulkFailure.singular', { count })
+ : t('alerts.overview.notification.bulkFailure.plural', { count });
+}
+
+export function getAlertOverviewBulkAcknowledgeGenericFailureNotification(): string {
+ return t('alerts.overview.notification.bulkFailureGeneric');
}
export function getAlertTimelineLoadingState() {
return {
- text: ALERT_TIMELINE_LOADING_STATE,
+ text: t('alerts.timeline.loading'),
} as const;
}
export function getAlertTimelineFilterEmptyState() {
return {
- text: ALERT_TIMELINE_FILTER_EMPTY_STATE,
+ text: t('alerts.timeline.filterEmpty'),
} as const;
}
+export function getAlertTimelineFilterLabel(variant: 'panel' | 'compact'): string {
+ return variant === 'panel'
+ ? t('alerts.timeline.filterLabel.panel')
+ : t('alerts.timeline.filterLabel.compact');
+}
+
+export function getAlertTimelineQuickFilterLabel(action: 'all' | 'none'): string {
+ return action === 'all'
+ ? t('alerts.timeline.quickFilter.all')
+ : t('alerts.timeline.quickFilter.none');
+}
+
+export function getAlertTimelineEventTypeLabel(type: string): string {
+ switch (type) {
+ case 'alert_fired':
+ return t('alerts.timeline.event.alertFired');
+ case 'alert_acknowledged':
+ return t('alerts.timeline.event.alertAcknowledged');
+ case 'alert_unacknowledged':
+ return t('alerts.timeline.event.alertUnacknowledged');
+ case 'alert_resolved':
+ return t('alerts.timeline.event.alertResolved');
+ case 'ai_analysis':
+ return t('alerts.timeline.event.aiAnalysis');
+ case 'command':
+ return t('alerts.timeline.event.command');
+ case 'runbook':
+ return t('alerts.timeline.event.runbook');
+ case 'note':
+ return t('alerts.timeline.event.note');
+ default:
+ return type;
+ }
+}
+
export function getAlertTimelineEmptyState() {
return {
- text: ALERT_TIMELINE_EMPTY_STATE,
+ text: t('alerts.timeline.empty'),
} as const;
}
export function getAlertTimelineUnavailableState() {
return {
- text: ALERT_TIMELINE_UNAVAILABLE_STATE,
+ text: t('alerts.timeline.unavailable'),
} as const;
}
export function getAlertTimelineFailureState() {
return {
- text: ALERT_TIMELINE_FAILURE_STATE,
- actionLabel: ALERT_TIMELINE_RETRY_LABEL,
+ text: t('alerts.timeline.failure'),
+ actionLabel: t('alerts.timeline.retry'),
} as const;
}
+export function getAlertTimelineHeading(): string {
+ return t('alerts.timeline.heading');
+}
+
+export function getAlertTimelineAcknowledgedLabel(): string {
+ return t('alerts.timeline.acknowledged');
+}
+
+export function getAlertTimelineOpenedAtLabel(openedAt: string): string {
+ return t('alerts.timeline.openedAt', { openedAt });
+}
+
+export function getAlertTimelineClosedAtLabel(closedAt: string): string {
+ return t('alerts.timeline.closedAt', { closedAt });
+}
+
+export function getAlertTimelineNoteLabel(): string {
+ return t('alerts.timeline.noteLabel');
+}
+
+export function getAlertTimelineNotePlaceholder(): string {
+ return t('alerts.timeline.notePlaceholder');
+}
+
+export function getAlertTimelineSaveNoteLabel(noteSaving: boolean): string {
+ return noteSaving ? t('alerts.timeline.savingNote') : t('alerts.timeline.saveNote');
+}
+
export function getAlertHistorySearchPlaceholder() {
return ALERT_HISTORY_SEARCH_PLACEHOLDER;
}
diff --git a/frontend-modern/src/utils/alertTabsPresentation.ts b/frontend-modern/src/utils/alertTabsPresentation.ts
index 98f216f1dd..0b4641756e 100644
--- a/frontend-modern/src/utils/alertTabsPresentation.ts
+++ b/frontend-modern/src/utils/alertTabsPresentation.ts
@@ -1,3 +1,4 @@
+import { t } from '@/i18n';
import type { AlertTab } from '@/features/alerts/types';
export interface AlertTabPresentationOptions {
@@ -20,38 +21,43 @@ export const ALERT_TAB_THRESHOLDS_LABEL = 'Thresholds';
export const ALERT_TAB_DESTINATIONS_LABEL = 'Notifications';
export const ALERT_TAB_SCHEDULE_LABEL = 'Schedule';
-const ALERT_TAB_GROUPS: AlertTabGroup[] = [
- {
- id: 'status',
- label: ALERT_TAB_GROUP_STATUS_LABEL,
- items: [
- { id: 'overview', label: ALERT_TAB_OVERVIEW_LABEL },
- { id: 'history', label: ALERT_TAB_HISTORY_LABEL },
- ],
- },
- {
- id: 'configuration',
- label: ALERT_TAB_GROUP_CONFIGURATION_LABEL,
- items: [
- { id: 'thresholds', label: ALERT_TAB_THRESHOLDS_LABEL },
- { id: 'destinations', label: ALERT_TAB_DESTINATIONS_LABEL },
- { id: 'schedule', label: ALERT_TAB_SCHEDULE_LABEL },
- ],
- },
-];
+function getLocalizedAlertTabGroups(): AlertTabGroup[] {
+ return [
+ {
+ id: 'status',
+ label: t('alerts.tabs.group.status'),
+ items: [
+ { id: 'overview', label: t('alerts.tabs.overview') },
+ { id: 'history', label: t('alerts.tabs.history') },
+ ],
+ },
+ {
+ id: 'configuration',
+ label: t('alerts.tabs.group.configuration'),
+ items: [
+ { id: 'thresholds', label: t('alerts.tabs.thresholds') },
+ { id: 'destinations', label: t('alerts.tabs.destinations') },
+ { id: 'schedule', label: t('alerts.tabs.schedule') },
+ ],
+ },
+ ];
+}
export function isAlertsConfigurationTab(tab: AlertTab): boolean {
return tab === 'thresholds' || tab === 'destinations' || tab === 'schedule';
}
export function getAlertsTabGroups(options?: { readOnly?: boolean }): AlertTabGroup[] {
+ const groups = getLocalizedAlertTabGroups();
if (options?.readOnly) {
- return ALERT_TAB_GROUPS.filter((group) => group.id === 'status').map((group) => ({
- ...group,
- items: [...group.items],
- }));
+ return groups
+ .filter((group) => group.id === 'status')
+ .map((group) => ({
+ ...group,
+ items: [...group.items],
+ }));
}
- return ALERT_TAB_GROUPS.map((group) => ({
+ return groups.map((group) => ({
...group,
items: [...group.items],
}));
@@ -93,7 +99,7 @@ export function getAlertsTabTitle({
label: string;
}): string | undefined {
if (isDisabled) {
- return 'Enable alerts to configure this setting';
+ return t('alerts.tabs.disabledTitle');
}
if (collapsed) {
return label;