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.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
import { afterEach, describe, expect, it } from 'vitest';
import { DEFAULT_LOCALE, setActiveLocale } from '@/i18n';
import {
getInfrastructureReadOnlyHeaderDescription,
getSettingsHeaderMeta,
SETTINGS_HEADER_META,
} from '../settingsHeaderMeta';
import {
getSettingsNavGroups,
getSettingsNavItem,
SETTINGS_NAV_GROUPS,
} from '../settingsNavCatalog';
import { getSettingsShellCopy } from '@/utils/settingsShellPresentation';
describe('settings localization catalog', () => {
afterEach(() => {
setActiveLocale(DEFAULT_LOCALE);
});
it('keeps the canonical English settings catalog as the static baseline', () => {
expect(SETTINGS_NAV_GROUPS[0]?.label).toBe('Infrastructure');
expect(SETTINGS_HEADER_META['system-billing']).toEqual({
title: 'Plans & Billing',
description: 'Plan, license, and Patrol mode for this instance.',
});
});
it('localizes settings navigation groups and items for German', () => {
const groups = getSettingsNavGroups('de');
expect(groups[0]?.label).toBe('Infrastruktur');
expect(groups[0]?.items[0]?.label).toBe('Infrastruktur');
expect(getSettingsNavItem('system-updates', 'de')?.label).toBe('Updates');
expect(getSettingsNavItem('system-ai-agents', 'de')?.label).toBe('Externe Agenten');
expect(getSettingsNavItem('security-data-handling', 'de')?.label).toBe('Ressourcenschutz');
});
it('localizes settings navigation groups and items for Spanish', () => {
const groups = getSettingsNavGroups('es');
expect(groups.find((group) => group.id === 'system')?.label).toBe('Sistema');
expect(getSettingsNavItem('system-ai', 'es')?.label).toBe('Proveedores y modelos');
expect(getSettingsNavItem('system-ai-patrol', 'es')?.label).toBe('Patrol');
expect(getSettingsNavItem('system-ai-agents', 'es')?.label).toBe('Agentes externos');
expect(getSettingsNavItem('support-diagnostics', 'es')?.label).toBe('Diagnóstico y salud');
});
it('localizes the mobile settings index close action', () => {
expect(getSettingsShellCopy('en').mobileCloseLabel).toBe('Close settings navigation');
expect(getSettingsShellCopy('de').mobileCloseLabel).toBe('Einstellungsnavigation schließen');
expect(getSettingsShellCopy('es').mobileCloseLabel).toBe('Cerrar navegación de ajustes');
});
it('localizes the Pulse Mobile header in every catalog locale', () => {
expect(SETTINGS_HEADER_META['system-relay']).toEqual({
title: 'Pulse Mobile',
description:
'Connect paired Pulse Mobile devices to this instance. Pulse Mobile is being retired on 31 March 2027, and paired phones keep working until then.',
});
expect(getSettingsHeaderMeta('es')['system-relay']).toEqual({
title: 'Pulse Mobile',
description:
'Conecta los dispositivos Pulse Mobile emparejados con esta instancia. Pulse Mobile se retirará el 31 de marzo de 2027 y los teléfonos emparejados seguirán funcionando hasta entonces.',
});
expect(getSettingsHeaderMeta('de')['system-relay']).toEqual({
title: 'Pulse Mobile',
description:
'Verbinden Sie gekoppelte Pulse-Mobile-Geraete mit dieser Instanz. Pulse Mobile wird am 31. Maerz 2027 eingestellt. Gekoppelte Telefone funktionieren bis dahin weiter.',
});
});
it('localizes settings header metadata and read-only infrastructure copy', () => {
const spanishMeta = getSettingsHeaderMeta('es');
expect(spanishMeta['system-network']).toEqual({
title: 'Red',
description: 'Configura la URL pública, CORS, inserción y límites de red para webhooks.',
});
expect(spanishMeta['system-ai']).toEqual({
title: 'Proveedores y modelos',
description:
'Configura proveedores, modelos predeterminados, salud de proveedores, presupuesto y uso para Pulse Intelligence.',
});
expect(spanishMeta['system-ai-agents']).toEqual({
title: 'Agentes externos',
description:
'Conecta Claude Code, Codex y otros clientes MCP con las herramientas gobernadas de Pulse.',
});
expect(spanishMeta['system-billing']).toEqual({
title: 'Planes y facturacion',
description: 'Plan, licencia y modo de Patrol para esta instancia.',
});
expect(getSettingsHeaderMeta('de')['system-ai']).toEqual({
title: 'Anbieter & Modelle',
description:
'Konfigurieren Sie Anbieter, Standardmodelle, Anbieterzustand, Budget und Nutzung fuer Pulse Intelligence.',
});
expect(getSettingsHeaderMeta('de')['system-ai-agents']).toEqual({
title: 'Externe Agenten',
description:
'Verbinden Sie Claude Code, Codex und andere MCP-Clients mit den kontrollierten Tools von Pulse.',
});
expect(getSettingsHeaderMeta('de')['system-billing']).toEqual({
title: 'Plaene & Abrechnung',
description: 'Plan, Lizenz und Patrol-Modus fuer diese Instanz.',
});
expect(getInfrastructureReadOnlyHeaderDescription('es')).toContain('solo lectura');
});
it('uses the active locale when no explicit locale is passed', () => {
setActiveLocale('es');
expect(getSettingsNavGroups().find((group) => group.id === 'security')?.label).toBe(
'Seguridad',
);
expect(getSettingsHeaderMeta()['security-auth'].title).toBe('Autenticación');
});
});