diff --git a/src/workspaces/officerdev/src/apps/SendOff/SendOffPanel.tsx b/src/workspaces/officerdev/src/apps/SendOff/SendOffPanel.tsx index 387def99..dac21d9b 100644 --- a/src/workspaces/officerdev/src/apps/SendOff/SendOffPanel.tsx +++ b/src/workspaces/officerdev/src/apps/SendOff/SendOffPanel.tsx @@ -2,6 +2,7 @@ import { useRef, useState } from 'react'; import { Laptop, Send, Upload, User, X } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { useSendOff, useSendOffSenders, useSendOffTargets } from './useSendOff'; +import { useTranslation } from '../../locales'; const label = (p: { name: string | null; email: string }): string => p.name || p.email.split('@')[0] || p.email; const kb = (n: number): string => @@ -17,6 +18,7 @@ type Target = { kind: 'machine'; name: string } | { kind: 'user'; id: number; na * needed keeping in sync. */ export const SendOffPanel = () => { + const { t } = useTranslation(); const { devices, people, myFolder, isLoading } = useSendOffTargets(); const send = useSendOff(); const [files, setFiles] = useState([]); @@ -41,7 +43,7 @@ export const SendOffPanel = () => {
-

Files

+

{t('sendOff.files')}

{ {kb(f.size)}
-

Where

+

{t('sendOff.where')}

{isLoading ? ( -

Loading…

+

{t('sendOff.loading')}

) : (
{
{/* The server's own message, not a generic one: a file over the limit and a recipient who has revoked you are different problems with different answers. */} {target?.kind === 'user' && myFolder && (

- Lands in their Documents/SendOff/{myFolder}. + {t('sendOff.landsIn')} Documents/SendOff/{myFolder}.

)} {send.error &&

{send.error.message}

} {send.data && (

- Landed in {send.data.path} —{' '} + {t('sendOff.landedIn')} {send.data.path} —{' '} {send.data.files.map((f) => f.name).join(', ')}

)} @@ -195,15 +197,16 @@ const TargetGroup = ({ icon: Icon, heading, empty, options, selected, onSelect } * the answer has to be visible in the same place the question was asked. */ const WhoMaySend = () => { + const { t } = useTranslation(); const { candidates, isLoading, setAllowed, isSaving } = useSendOffSenders(); if (isLoading || candidates.length === 0) return null; return (
-

Who may send to me

+

{t('sendOff.whoMaySend')}

- Files from anyone you allow land in Documents/SendOff/their-name. - Turning someone off stops future sends and leaves what they already sent alone. + {t('sendOff.allowedLandIn')} Documents/SendOff/their-name.{' '} + {t('sendOff.turningOff')}

{candidates.map((p) => (