@@ -52,7 +54,7 @@ export const JobsIndicator = () => {
diff --git a/src/apps/officer-web/Screens/Dashboard/Layout/Header/ThemeSwitcher.tsx b/src/apps/officer-web/Screens/Dashboard/Layout/Header/ThemeSwitcher.tsx
index 1a1694e8..48a60707 100644
--- a/src/apps/officer-web/Screens/Dashboard/Layout/Header/ThemeSwitcher.tsx
+++ b/src/apps/officer-web/Screens/Dashboard/Layout/Header/ThemeSwitcher.tsx
@@ -5,6 +5,7 @@ import { favouritesFirst, groupByFamily, rotateToSelected } from 'theme';
import * as Dropdown from '@/components/ui/dropdown-menu';
import { useTheme, useThemeKeys } from '@/components/ui/ThemeProvider';
import { useThemeFavorites } from '@/state/useThemeFavorites';
+import { useTranslation } from '@/lib/i18n';
const {
DropdownMenu,
@@ -32,6 +33,7 @@ const {
*/
export const ThemeSwitcher = () => {
const { theme, themeId, setTheme, themes } = useTheme();
+ const { t } = useTranslation();
const { favorites, isFavorite, toggle } = useThemeFavorites();
// Declared before the key hook, which needs the toggle: `f` in the list and `ctrl+shift+f` from anywhere.
const { open, setOpen, focused, setFocused } = useThemeKeys({ onToggleFavorite: toggle });
@@ -50,7 +52,7 @@ export const ThemeSwitcher = () => {
*/
const ordered = useMemo(() => {
const rotated = rotateToSelected(themes, themeId);
- const listed = onlyFavorites ? rotated.filter((t) => favorites.has(t.id)) : rotated;
+ const listed = onlyFavorites ? rotated.filter((entry) => favorites.has(entry.id)) : rotated;
return favouritesFirst(listed, favorites);
// `favorites` is a fresh Set each render; its CONTENTS are what matter, so key on those.
}, [themes, themeId, onlyFavorites, [...favorites].sort().join(',')]);
@@ -62,10 +64,11 @@ export const ThemeSwitcher = () => {
diff --git a/src/apps/officer-web/Screens/Dashboard/Layout/ScreenErrorFallback.tsx b/src/apps/officer-web/Screens/Dashboard/Layout/ScreenErrorFallback.tsx
index 80c46fd6..a87642be 100644
--- a/src/apps/officer-web/Screens/Dashboard/Layout/ScreenErrorFallback.tsx
+++ b/src/apps/officer-web/Screens/Dashboard/Layout/ScreenErrorFallback.tsx
@@ -4,6 +4,7 @@ import { useQueryClient } from '@tanstack/react-query';
import { AlertTriangle } from 'lucide-react';
import { useClient } from 'hooks/useClient';
import { Button } from '@/components/ui/button';
+import { useTranslation } from '@/lib/i18n';
type ScreenErrorFallbackProps = { error: Error; reset: () => void };
@@ -18,6 +19,7 @@ type ScreenErrorFallbackProps = { error: Error; reset: () => void };
export const ScreenErrorFallback = ({ error, reset }: ScreenErrorFallbackProps) => {
const client = useClient();
const queryClient = useQueryClient();
+ const { t } = useTranslation();
const [confirming, setConfirming] = useState(false);
const [resetting, setResetting] = useState(false);
@@ -46,36 +48,34 @@ export const ScreenErrorFallback = ({ error, reset }: ScreenErrorFallbackProps)
-
This screen failed to render
-
- Nothing was lost — this is a display failure, not a data one. Agent transcripts, jobs and files are
- untouched.
-
+
{t('screenError.title')}
+
{t('screenError.description')}
- {error.message || 'Unknown error'}
+
+ {error.message || t('screenError.unknownError')}
+
{error.stack}
- Try again
+ {t('screenError.tryAgain')}
window.location.reload()}>
- Reload
+ {t('screenError.reload')}
- Go home
+ {t('screenError.goHome')}
- If it fails again in the same place, a saved panel layout is the usual cause. Resetting puts every screen's
- panes back to their defaults. Your dashboards are not touched.
+ {t('screenError.resetHint')} {t('screenError.dashboardsSafe')}
- {resetting ? 'Resetting…' : confirming ? 'Yes — reset every screen layout' : 'Reset screen layouts'}
+ {resetting ? t('screenError.resetting') : confirming ? t('screenError.resetConfirm') : t('screenError.reset')}
diff --git a/src/apps/officer-web/Screens/Dashboard/Layout/ShortcutsModal.tsx b/src/apps/officer-web/Screens/Dashboard/Layout/ShortcutsModal.tsx
index 3a79c5a9..8b5c5242 100644
--- a/src/apps/officer-web/Screens/Dashboard/Layout/ShortcutsModal.tsx
+++ b/src/apps/officer-web/Screens/Dashboard/Layout/ShortcutsModal.tsx
@@ -1,6 +1,7 @@
import { useEffect, useState } from 'react';
import { Keyboard } from 'lucide-react';
import { isShortcutsChord, SHORTCUT_SECTIONS } from '@/state/shortcuts';
+import { useTranslation } from '@/lib/i18n';
/*
`Ctrl+?` — every shortcut the shell owns, on one screen.
@@ -27,6 +28,7 @@ const Row = ({ keys, description }: { keys: string; description: string }) => (
export const ShortcutsModal = () => {
const [open, setOpen] = useState(false);
+ const { t } = useTranslation();
useEffect(() => {
const onKey = (ev: KeyboardEvent) => {
@@ -57,8 +59,8 @@ export const ShortcutsModal = () => {
>