feat: Complete translation in French

This commit is contained in:
2026-07-05 10:44:40 +02:00
parent 3a6afc28ac
commit 2d742be7df
32 changed files with 1841 additions and 1421 deletions
+7 -5
View File
@@ -1,5 +1,6 @@
import { Antenna, X } from 'lucide-react';
import { cn } from '@/lib/utils';
import { useI18n } from '@/lib/i18n';
export type AGAntenna = { index: number; name: string };
export type AGStatus = {
@@ -26,6 +27,7 @@ export function AntGeniusPanel({ status, onActivate, onClose }: {
onActivate: (port: number, antenna: number) => void; // antenna 0 = deselect
onClose: () => void;
}) {
const { t } = useI18n();
const list = status.antennas ?? [];
const PortBtn = ({ port, index, active, tx }: { port: 1 | 2; index: number; active: boolean; tx: boolean }) => {
@@ -41,7 +43,7 @@ export function AntGeniusPanel({ status, onActivate, onClose }: {
<button
type="button"
onClick={() => onActivate(port, active ? 0 : index)}
title={active ? `Port ${letter} — click to deselect` : `Select on port ${letter}`}
title={active ? t('agp.portDeselect', { letter }) : t('agp.portSelect', { letter })}
className={cn('w-8 shrink-0 rounded-lg text-xs font-bold py-1.5 border transition-all active:scale-95', cls)}
>
{letter}
@@ -57,9 +59,9 @@ export function AntGeniusPanel({ status, onActivate, onClose }: {
<span className="flex-1" />
<span className="inline-flex items-center gap-1.5 text-[10px] font-mono uppercase tracking-wider">
<span className={cn('size-1.5 rounded-full', status.connected ? 'bg-emerald-500 shadow-[0_0_6px_rgba(16,185,129,0.8)] animate-pulse' : 'bg-rose-500')} />
<span className={status.connected ? 'text-emerald-600' : 'text-rose-500'}>{status.connected ? 'online' : 'offline'}</span>
<span className={status.connected ? 'text-emerald-600' : 'text-rose-500'}>{status.connected ? t('agp.online') : t('agp.offline')}</span>
</span>
<button type="button" onClick={onClose} className="ml-1 text-muted-foreground hover:text-foreground transition-colors" title="Close">
<button type="button" onClick={onClose} className="ml-1 text-muted-foreground hover:text-foreground transition-colors" title={t('agp.close')}>
<X className="size-3.5" />
</button>
</div>
@@ -67,11 +69,11 @@ export function AntGeniusPanel({ status, onActivate, onClose }: {
<div className="flex-1 min-h-0 overflow-y-auto p-2 space-y-1.5">
{!status.connected ? (
<div className="text-center py-6 text-xs space-y-2">
<div className="text-muted-foreground italic animate-pulse">Connecting</div>
<div className="text-muted-foreground italic animate-pulse">{t('agp.connecting')}</div>
{status.last_error && <div className="text-rose-500 font-mono text-[10px] break-words px-2">{status.last_error}</div>}
</div>
) : list.length === 0 ? (
<div className="text-muted-foreground italic text-center py-6 text-xs">No antennas configured.</div>
<div className="text-muted-foreground italic text-center py-6 text-xs">{t('agp.noAntennas')}</div>
) : list.map((a) => {
const aActive = status.port_a === a.index;
const bActive = status.port_b === a.index;