diff --git a/src/apps/officer-web/Screens/Dashboard/Settings/ProfileSettings/Languages.tsx b/src/apps/officer-web/Screens/Dashboard/Settings/ProfileSettings/Languages.tsx index 876b3223..c9a1d5a2 100644 --- a/src/apps/officer-web/Screens/Dashboard/Settings/ProfileSettings/Languages.tsx +++ b/src/apps/officer-web/Screens/Dashboard/Settings/ProfileSettings/Languages.tsx @@ -3,6 +3,7 @@ import { X } from 'lucide-react'; import { Label } from '@/components/ui/label'; import { useSettings } from 'state/useSettings'; import { useTranslation } from '@/lib/i18n'; +import { SHIPPED_LOCALES } from '@/lib/locales'; const LANGUAGES = [ { code: 'en', label: 'English' }, @@ -56,7 +57,8 @@ export const Languages = () => { const removeSpoken = (code: string) => { const next = spoken.filter((s) => s !== code); const updates = { ...settings.languages, spoken: next }; - if (defaultLang === code) updates.default = next[0] ?? 'en'; + // `default` (UI localization) draws from SHIPPED_LOCALES, not `spoken` — removing a spoken + // language never leaves it without a valid value. if (translateTo === code) updates.translateTo = next[0] ?? 'en'; save(updates); }; @@ -104,7 +106,7 @@ export const Languages = () => { )} - {/* Default language */} + {/* Default language — UI localization, so it only offers locales that actually ship (D2) */}