fix: replace hardcoded French strings in agent-card with i18n t() calls
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 32s
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 32s
- Replace "Prochaine exéc." → t('agents.status.nextRun')
- Replace "Dernier statut" → t('agents.status.lastStatus')
- Replace "Réussi/Échec/En cours/En attente" → t('agents.status.*')
- Replace toggle title "Désactiver/Activer" → t('agents.actions.toggle*')
- Remove unused 'label' from typeConfig (already using t('agents.types.*'))
- Add nextRun/lastStatus keys to all 15 locales
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -51,11 +51,11 @@ interface AgentCardProps {
|
||||
|
||||
// --- Config ---
|
||||
|
||||
const typeConfig: Record<string, { icon: typeof Globe; color: string; bgColor: string; label: string }> = {
|
||||
scraper: { icon: Globe, color: 'text-blue-600 dark:text-blue-400', bgColor: 'bg-blue-50 dark:bg-blue-950', label: 'Veilleur' },
|
||||
researcher: { icon: Search, color: 'text-violet-600 dark:text-violet-400', bgColor: 'bg-violet-50 dark:bg-violet-950', label: 'Chercheur' },
|
||||
monitor: { icon: Eye, color: 'text-amber-600 dark:text-amber-400', bgColor: 'bg-amber-50 dark:bg-amber-950', label: 'Surveillant' },
|
||||
custom: { icon: Settings, color: 'text-emerald-600 dark:text-emerald-400', bgColor: 'bg-emerald-50 dark:bg-emerald-950', label: 'Personnalisé' },
|
||||
const typeConfig: Record<string, { icon: typeof Globe; color: string; bgColor: string }> = {
|
||||
scraper: { icon: Globe, color: 'text-blue-600 dark:text-blue-400', bgColor: 'bg-blue-50 dark:bg-blue-950' },
|
||||
researcher: { icon: Search, color: 'text-violet-600 dark:text-violet-400', bgColor: 'bg-violet-50 dark:bg-violet-950' },
|
||||
monitor: { icon: Eye, color: 'text-amber-600 dark:text-amber-400', bgColor: 'bg-amber-50 dark:bg-amber-950' },
|
||||
custom: { icon: Settings, color: 'text-emerald-600 dark:text-emerald-400', bgColor: 'bg-emerald-50 dark:bg-emerald-950' },
|
||||
}
|
||||
|
||||
const frequencyKeys: Record<string, string> = {
|
||||
@@ -180,7 +180,7 @@ export function AgentCard({ agent, onEdit, onRefresh, onToggle }: AgentCardProps
|
||||
onClick={handleToggle}
|
||||
disabled={isToggling}
|
||||
className="flex-shrink-0 disabled:opacity-50"
|
||||
title={agent.isEnabled ? 'Désactiver' : 'Activer'}
|
||||
title={agent.isEnabled ? t('agents.actions.toggleOff') : t('agents.actions.toggleOn')}
|
||||
>
|
||||
<div className={`relative inline-flex h-5 w-9 items-center rounded-full transition-colors ${
|
||||
agent.isEnabled ? 'bg-primary' : 'bg-muted-foreground/30'
|
||||
@@ -223,14 +223,14 @@ export function AgentCard({ agent, onEdit, onRefresh, onToggle }: AgentCardProps
|
||||
{/* Footer: Next Run + Last Status */}
|
||||
<div className="border-t border-border/30 grid grid-cols-2 divide-x divide-border/30">
|
||||
<div className="px-4 py-2.5">
|
||||
<p className="text-[10px] text-muted-foreground font-medium mb-0.5">Prochaine exéc.</p>
|
||||
<p className="text-[10px] text-muted-foreground font-medium mb-0.5">{t('agents.status.nextRun')}</p>
|
||||
<p className="text-xs font-semibold text-foreground flex items-center gap-1">
|
||||
<Clock className="w-3 h-3 text-muted-foreground/60" />
|
||||
{nextRunLabel}
|
||||
</p>
|
||||
</div>
|
||||
<div className="px-4 py-2.5">
|
||||
<p className="text-[10px] text-muted-foreground font-medium mb-0.5">Dernier statut</p>
|
||||
<p className="text-[10px] text-muted-foreground font-medium mb-0.5">{t('agents.status.lastStatus')}</p>
|
||||
{lastAction ? (
|
||||
<span className={`inline-flex items-center gap-1.5 text-xs font-semibold ${
|
||||
lastAction.status === 'success' ? 'text-emerald-600 dark:text-emerald-400' :
|
||||
@@ -241,10 +241,10 @@ export function AgentCard({ agent, onEdit, onRefresh, onToggle }: AgentCardProps
|
||||
{lastAction.status === 'success' && <CheckCircle2 className="w-3 h-3" />}
|
||||
{lastAction.status === 'failure' && <XCircle className="w-3 h-3" />}
|
||||
{lastAction.status === 'running' && <Loader2 className="w-3 h-3 animate-spin" />}
|
||||
{lastAction.status === 'success' && 'Réussi'}
|
||||
{lastAction.status === 'failure' && 'Échec'}
|
||||
{lastAction.status === 'running' && 'En cours'}
|
||||
{lastAction.status === 'pending' && 'En attente'}
|
||||
{lastAction.status === 'success' && t('agents.status.success')}
|
||||
{lastAction.status === 'failure' && t('agents.status.failure')}
|
||||
{lastAction.status === 'running' && t('agents.status.running')}
|
||||
{lastAction.status === 'pending' && t('agents.status.pending')}
|
||||
</span>
|
||||
) : (
|
||||
<span className="text-xs text-muted-foreground">—</span>
|
||||
|
||||
@@ -1333,7 +1333,9 @@
|
||||
"success": "نجح",
|
||||
"failure": "فشل",
|
||||
"running": "قيد التشغيل",
|
||||
"pending": "قيد الانتظار"
|
||||
"pending": "قيد الانتظار",
|
||||
"nextRun": "التنفيذ التالي",
|
||||
"lastStatus": "آخر حالة"
|
||||
},
|
||||
"actions": {
|
||||
"edit": "تعديل",
|
||||
|
||||
@@ -1356,7 +1356,9 @@
|
||||
"success": "Erfolgreich",
|
||||
"failure": "Fehlgeschlagen",
|
||||
"running": "Läuft",
|
||||
"pending": "Ausstehend"
|
||||
"pending": "Ausstehend",
|
||||
"nextRun": "Nächste Ausf.",
|
||||
"lastStatus": "Letzter Status"
|
||||
},
|
||||
"actions": {
|
||||
"edit": "Bearbeiten",
|
||||
|
||||
@@ -1381,7 +1381,9 @@
|
||||
"success": "Succeeded",
|
||||
"failure": "Failed",
|
||||
"running": "Running",
|
||||
"pending": "Pending"
|
||||
"pending": "Pending",
|
||||
"nextRun": "Next run",
|
||||
"lastStatus": "Last status"
|
||||
},
|
||||
"actions": {
|
||||
"edit": "Edit",
|
||||
|
||||
@@ -1328,7 +1328,9 @@
|
||||
"success": "Exitoso",
|
||||
"failure": "Fallido",
|
||||
"running": "En ejecución",
|
||||
"pending": "Pendiente"
|
||||
"pending": "Pendiente",
|
||||
"nextRun": "Próx. ejec.",
|
||||
"lastStatus": "Último estado"
|
||||
},
|
||||
"actions": {
|
||||
"edit": "Editar",
|
||||
|
||||
@@ -1387,7 +1387,9 @@
|
||||
"success": "موفق",
|
||||
"failure": "ناموفق",
|
||||
"running": "در حال اجرا",
|
||||
"pending": "در انتظار"
|
||||
"pending": "در انتظار",
|
||||
"nextRun": "اجرای بعدی",
|
||||
"lastStatus": "آخرین وضعیت"
|
||||
},
|
||||
"actions": {
|
||||
"edit": "ویرایش",
|
||||
|
||||
@@ -1377,7 +1377,9 @@
|
||||
"success": "Réussi",
|
||||
"failure": "Échoué",
|
||||
"running": "En cours",
|
||||
"pending": "En attente"
|
||||
"pending": "En attente",
|
||||
"nextRun": "Next run",
|
||||
"lastStatus": "Last status"
|
||||
},
|
||||
"actions": {
|
||||
"edit": "Modifier",
|
||||
|
||||
@@ -1333,7 +1333,9 @@
|
||||
"success": "सफल",
|
||||
"failure": "विफल",
|
||||
"running": "चल रहा है",
|
||||
"pending": "लंबित"
|
||||
"pending": "लंबित",
|
||||
"nextRun": "अगला रन",
|
||||
"lastStatus": "अंतिम स्थिति"
|
||||
},
|
||||
"actions": {
|
||||
"edit": "संपादित करें",
|
||||
|
||||
@@ -1378,7 +1378,9 @@
|
||||
"success": "Riuscito",
|
||||
"failure": "Fallito",
|
||||
"running": "In esecuzione",
|
||||
"pending": "In sospeso"
|
||||
"pending": "In sospeso",
|
||||
"nextRun": "Pross. esec.",
|
||||
"lastStatus": "Ultimo stato"
|
||||
},
|
||||
"actions": {
|
||||
"edit": "Modifica",
|
||||
|
||||
@@ -1356,7 +1356,9 @@
|
||||
"success": "成功",
|
||||
"failure": "失敗",
|
||||
"running": "実行中",
|
||||
"pending": "保留中"
|
||||
"pending": "保留中",
|
||||
"nextRun": "次回実行",
|
||||
"lastStatus": "最終ステータス"
|
||||
},
|
||||
"actions": {
|
||||
"edit": "編集",
|
||||
|
||||
@@ -1333,7 +1333,9 @@
|
||||
"success": "성공",
|
||||
"failure": "실패",
|
||||
"running": "실행 중",
|
||||
"pending": "대기 중"
|
||||
"pending": "대기 중",
|
||||
"nextRun": "다음 실행",
|
||||
"lastStatus": "마지막 상태"
|
||||
},
|
||||
"actions": {
|
||||
"edit": "편집",
|
||||
|
||||
@@ -1378,7 +1378,9 @@
|
||||
"success": "Geslaagd",
|
||||
"failure": "Mislukt",
|
||||
"running": "Actief",
|
||||
"pending": "In afwachting"
|
||||
"pending": "In afwachting",
|
||||
"nextRun": "Volgende uitv.",
|
||||
"lastStatus": "Laatste status"
|
||||
},
|
||||
"actions": {
|
||||
"edit": "Bewerken",
|
||||
|
||||
@@ -1400,7 +1400,9 @@
|
||||
"success": "Udane",
|
||||
"failure": "Nieudane",
|
||||
"running": "W trakcie",
|
||||
"pending": "Oczekujące"
|
||||
"pending": "Oczekujące",
|
||||
"nextRun": "Nast. uruch.",
|
||||
"lastStatus": "Ostatni status"
|
||||
},
|
||||
"actions": {
|
||||
"edit": "Edytuj",
|
||||
|
||||
@@ -1328,7 +1328,9 @@
|
||||
"success": "Bem-sucedido",
|
||||
"failure": "Falhou",
|
||||
"running": "Em execução",
|
||||
"pending": "Pendente"
|
||||
"pending": "Pendente",
|
||||
"nextRun": "Próx. exec.",
|
||||
"lastStatus": "Último status"
|
||||
},
|
||||
"actions": {
|
||||
"edit": "Editar",
|
||||
|
||||
@@ -1328,7 +1328,9 @@
|
||||
"success": "Успешно",
|
||||
"failure": "Сбой",
|
||||
"running": "Выполняется",
|
||||
"pending": "Ожидание"
|
||||
"pending": "Ожидание",
|
||||
"nextRun": "След. запуск",
|
||||
"lastStatus": "Последний статус"
|
||||
},
|
||||
"actions": {
|
||||
"edit": "Редактировать",
|
||||
|
||||
@@ -1356,7 +1356,9 @@
|
||||
"success": "成功",
|
||||
"failure": "失败",
|
||||
"running": "运行中",
|
||||
"pending": "等待中"
|
||||
"pending": "等待中",
|
||||
"nextRun": "下次运行",
|
||||
"lastStatus": "最后状态"
|
||||
},
|
||||
"actions": {
|
||||
"edit": "编辑",
|
||||
|
||||
Reference in New Issue
Block a user