diff --git a/src/workspaces/officerdev/src/apps/Dav/CalendarView.tsx b/src/workspaces/officerdev/src/apps/Dav/CalendarView.tsx
index 517e76cc..318f0d52 100644
--- a/src/workspaces/officerdev/src/apps/Dav/CalendarView.tsx
+++ b/src/workspaces/officerdev/src/apps/Dav/CalendarView.tsx
@@ -1,6 +1,7 @@
import type { CalendarEvent } from './shared';
import { CalendarDays, MapPin, Repeat } from 'lucide-react';
import { useCalendarEvents, useSelectedCollection } from './useDavData';
+import { useTranslation } from '../../locales';
// Right panel of /calendar. Deliberately a grouped agenda list, not a month grid: the sidecar returns
// events as they are stored, with RRULE unexpanded, so a grid would have to invent occurrences the server
@@ -26,12 +27,13 @@ const formatTime = (ev: CalendarEvent) => {
};
export const CalendarView = () => {
+ const { t } = useTranslation();
const { selected, isLoading: loadingCollections } = useSelectedCollection('calendar');
const { events, isLoading, error } = useCalendarEvents(selected?.path ?? null);
if (loadingCollections) return ;
if (!selected) return ;
- if (error) return ;
+ if (error) return ;
if (isLoading) return ;
if (events.length === 0) return ;
diff --git a/src/workspaces/officerdev/src/apps/Dav/CollectionNav.tsx b/src/workspaces/officerdev/src/apps/Dav/CollectionNav.tsx
index 72a10566..1a400d0c 100644
--- a/src/workspaces/officerdev/src/apps/Dav/CollectionNav.tsx
+++ b/src/workspaces/officerdev/src/apps/Dav/CollectionNav.tsx
@@ -4,6 +4,7 @@ import { Link, useSearchParams } from 'react-router';
import { CalendarDays, Contact as ContactIcon } from 'lucide-react';
import { davCollectionPath, COLLECTION_PARAM } from './shared';
import { useDavCollections } from './useDavData';
+import { useTranslation } from '../../locales';
// Left panel for both /calendar and /contacts: the list of collections belonging to this user.
//
@@ -22,6 +23,7 @@ type Props = {
const ROW = 'group relative flex items-center gap-3 rounded-lg px-3 py-2 text-left text-sm transition-colors';
const CollectionNav = ({ kind, base, title, icon: Icon }: Props) => {
+ const { t } = useTranslation();
const [params] = useSearchParams();
const { collections, isLoading } = useDavCollections(kind);
const fromUrl = params.get(COLLECTION_PARAM);
@@ -69,19 +71,19 @@ const CollectionNav = ({ kind, base, title, icon: Icon }: Props) => {
);
})}
{!isLoading && collections.length === 0 && (
-
- Nothing here yet. Add one from a phone or desktop client over CalDAV/CardDAV.
-
+ {t('dav.empty')}
)}
);
};
-export const CalendarNav = () => (
-
-);
+export const CalendarNav = () => {
+ const { t } = useTranslation();
+ return ;
+};
-export const ContactsNav = () => (
-
-);
+export const ContactsNav = () => {
+ const { t } = useTranslation();
+ return ;
+};
diff --git a/src/workspaces/officerdev/src/apps/Dav/ContactsView.tsx b/src/workspaces/officerdev/src/apps/Dav/ContactsView.tsx
index b5a64deb..c7ee54fa 100644
--- a/src/workspaces/officerdev/src/apps/Dav/ContactsView.tsx
+++ b/src/workspaces/officerdev/src/apps/Dav/ContactsView.tsx
@@ -1,5 +1,6 @@
import { Building2, Mail, Phone, User } from 'lucide-react';
import { useDavContacts, useSelectedCollection } from './useDavData';
+import { useTranslation } from '../../locales';
// Right panel of /contacts: the selected address book as cards, sorted by name.
//
@@ -16,12 +17,13 @@ const initials = (name: string) =>
.join('') || '?';
export const ContactsView = () => {
+ const { t } = useTranslation();
const { selected, isLoading: loadingCollections } = useSelectedCollection('addressbook');
const { contacts, isLoading, error } = useDavContacts(selected?.path ?? null);
if (loadingCollections) return ;
if (!selected) return ;
- if (error) return ;
+ if (error) return ;
if (isLoading) return ;
if (contacts.length === 0) return ;