feat: translate all UI strings to English for international release
Complete French→English translation across all frontend pages and backend services — every label, button, header, empty state, toast, and nav item is now in English. Build verified clean (tsc + vite). No i18n library added; direct string replacement throughout. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,8 +8,8 @@ function ReliabilityTable({ data }: { data: any[] }) {
|
||||
return (
|
||||
<div className="card text-center py-10 text-slate-500">
|
||||
<BarChart2 className="w-8 h-8 mx-auto mb-2 opacity-20" />
|
||||
<div>Aucune donnée de fiabilité</div>
|
||||
<div className="text-xs mt-1">Les données apparaissent après 3+ trades matures (≥35% de l'horizon écoulé) par pattern</div>
|
||||
<div>No reliability data</div>
|
||||
<div className="text-xs mt-1">Data appears after 3+ mature trades (≥35% of horizon elapsed) per pattern</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -22,10 +22,10 @@ function ReliabilityTable({ data }: { data: any[] }) {
|
||||
<th className="text-left py-2 pr-3 font-medium">Pattern</th>
|
||||
<th className="text-right py-2 px-2 font-medium">Trades</th>
|
||||
<th className="text-right py-2 px-2 font-medium">Win Rate</th>
|
||||
<th className="text-right py-2 px-2 font-medium">PnL moyen</th>
|
||||
<th className="text-right py-2 px-2 font-medium">Avg PnL</th>
|
||||
<th className="text-right py-2 px-2 font-medium">Max gain</th>
|
||||
<th className="text-right py-2 px-2 font-medium">Max perte</th>
|
||||
<th className="text-right py-2 px-2 font-medium">Score fiabilité</th>
|
||||
<th className="text-right py-2 px-2 font-medium">Max loss</th>
|
||||
<th className="text-right py-2 px-2 font-medium">Reliability score</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="divide-y divide-slate-800/50">
|
||||
@@ -69,8 +69,8 @@ function CalibrationSection({ data }: { data: any }) {
|
||||
return (
|
||||
<div className="card text-center py-10 text-slate-500">
|
||||
<Target className="w-8 h-8 mx-auto mb-2 opacity-20" />
|
||||
<div>Pas encore de données de calibration</div>
|
||||
<div className="text-xs mt-1">Nécessite des trades matures avec probabilité stockée vs résultat réalisé</div>
|
||||
<div>No calibration data yet</div>
|
||||
<div className="text-xs mt-1">Requires mature trades with stored probability vs realized outcome</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -84,31 +84,31 @@ function CalibrationSection({ data }: { data: any }) {
|
||||
<div className="card text-center">
|
||||
<div className={clsx('text-2xl font-bold font-mono', brierColor)}>{brier_score?.toFixed(3) ?? '—'}</div>
|
||||
<div className="text-xs text-slate-500 mt-1">Brier Score</div>
|
||||
<div className="text-xs text-slate-600">(0 = parfait, 1 = nul)</div>
|
||||
<div className="text-xs text-slate-600">(0 = perfect, 1 = null)</div>
|
||||
</div>
|
||||
<div className="card text-center">
|
||||
<div className="text-2xl font-bold text-white">{sample_size}</div>
|
||||
<div className="text-xs text-slate-500 mt-1">Trades analysés</div>
|
||||
<div className="text-xs text-slate-500 mt-1">Trades analyzed</div>
|
||||
</div>
|
||||
<div className="card text-center">
|
||||
<div className={clsx('text-sm font-bold mt-1', brierColor)}>{interpretation ?? '—'}</div>
|
||||
<div className="text-xs text-slate-500 mt-1">Interprétation</div>
|
||||
<div className="text-xs text-slate-500 mt-1">Interpretation</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Calibration buckets */}
|
||||
{buckets && buckets.length > 0 && (
|
||||
<div>
|
||||
<div className="text-xs text-slate-500 mb-2 font-medium">Calibration par décile (prédit vs réalisé)</div>
|
||||
<div className="text-xs text-slate-500 mb-2 font-medium">Calibration by decile (predicted vs realized)</div>
|
||||
<div className="overflow-x-auto">
|
||||
<table className="w-full text-xs">
|
||||
<thead>
|
||||
<tr className="text-slate-500 border-b border-slate-700/30">
|
||||
<th className="text-left py-1.5 pr-3 font-medium">Prob. prédite</th>
|
||||
<th className="text-right py-1.5 px-2 font-medium">Taux réel</th>
|
||||
<th className="text-right py-1.5 px-2 font-medium">Biais</th>
|
||||
<th className="text-left py-1.5 pr-3 font-medium">Predicted prob.</th>
|
||||
<th className="text-right py-1.5 px-2 font-medium">Actual rate</th>
|
||||
<th className="text-right py-1.5 px-2 font-medium">Bias</th>
|
||||
<th className="text-right py-1.5 px-2 font-medium">Trades</th>
|
||||
<th className="py-1.5 pl-3 font-medium">Barre</th>
|
||||
<th className="py-1.5 pl-3 font-medium">Bar</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="divide-y divide-slate-800/50">
|
||||
@@ -142,7 +142,7 @@ function CalibrationSection({ data }: { data: any }) {
|
||||
</table>
|
||||
</div>
|
||||
<div className="text-[10px] text-slate-600 mt-2">
|
||||
Barre grise = prob. prédite · Barre colorée = taux réalisé · Vert si réel ≥ prédit, rouge sinon
|
||||
Grey bar = predicted prob. · Colored bar = realized rate · Green if actual ≥ predicted, red otherwise
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
@@ -166,7 +166,7 @@ export default function Analytics() {
|
||||
<BarChart2 className="w-5 h-5 text-blue-400" /> Analytics & Calibration
|
||||
</h1>
|
||||
<p className="text-xs text-slate-500 mt-0.5">
|
||||
Fiabilité historique des patterns · Calibration probabiliste · Brier score
|
||||
Historical pattern reliability · Probabilistic calibration · Brier score
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -175,18 +175,18 @@ export default function Analytics() {
|
||||
<div className="grid grid-cols-2 gap-4 sm:grid-cols-4">
|
||||
<div className="card">
|
||||
<div className="text-2xl font-bold text-white font-mono">{reliability.length}</div>
|
||||
<div className="text-xs text-slate-500 mt-1">Patterns avec historique</div>
|
||||
<div className="text-xs text-slate-500 mt-1">Patterns with history</div>
|
||||
</div>
|
||||
<div className="card">
|
||||
<div className="text-2xl font-bold text-white font-mono">
|
||||
{reliability.reduce((s: number, r: any) => s + r.trade_count, 0)}
|
||||
</div>
|
||||
<div className="text-xs text-slate-500 mt-1">Trades matures analysés</div>
|
||||
<div className="text-xs text-slate-500 mt-1">Mature trades analyzed</div>
|
||||
</div>
|
||||
{topPatterns[0] && (
|
||||
<div className="card border-emerald-700/30">
|
||||
<div className="text-xs text-slate-500 mb-1 flex items-center gap-1">
|
||||
<TrendingUp className="w-3 h-3 text-emerald-400" /> Meilleur pattern
|
||||
<TrendingUp className="w-3 h-3 text-emerald-400" /> Best pattern
|
||||
</div>
|
||||
<div className="text-sm font-semibold text-emerald-400 truncate">{topPatterns[0].pattern_name}</div>
|
||||
<div className="text-xs font-mono text-slate-400">{topPatterns[0].win_rate_pct}% WR</div>
|
||||
@@ -195,7 +195,7 @@ export default function Analytics() {
|
||||
{bottomPatterns[0] && (
|
||||
<div className="card border-red-700/30">
|
||||
<div className="text-xs text-slate-500 mb-1 flex items-center gap-1">
|
||||
<AlertTriangle className="w-3 h-3 text-red-400" /> À éviter
|
||||
<AlertTriangle className="w-3 h-3 text-red-400" /> To avoid
|
||||
</div>
|
||||
<div className="text-sm font-semibold text-red-400 truncate">{bottomPatterns[0].pattern_name}</div>
|
||||
<div className="text-xs font-mono text-slate-400">{bottomPatterns[0].win_rate_pct}% WR</div>
|
||||
@@ -207,8 +207,8 @@ export default function Analytics() {
|
||||
{/* Reliability table */}
|
||||
<div className="card">
|
||||
<div className="text-sm font-semibold text-white mb-3 flex items-center gap-2">
|
||||
<BarChart2 className="w-4 h-4 text-blue-400" /> Fiabilité par pattern
|
||||
<span className="text-xs text-slate-500 font-normal">(trades ≥35% de l'horizon uniquement)</span>
|
||||
<BarChart2 className="w-4 h-4 text-blue-400" /> Reliability by pattern
|
||||
<span className="text-xs text-slate-500 font-normal">(trades ≥35% of horizon only)</span>
|
||||
</div>
|
||||
{loadingR ? (
|
||||
<div className="space-y-2">{[1,2,3].map(i => <div key={i} className="h-8 bg-dark-700 animate-pulse rounded" />)}</div>
|
||||
@@ -221,17 +221,17 @@ export default function Analytics() {
|
||||
<div className="card">
|
||||
<div className="flex items-center justify-between mb-3">
|
||||
<div className="text-sm font-semibold text-white flex items-center gap-2">
|
||||
<Target className="w-4 h-4 text-blue-400" /> Calibration probabiliste
|
||||
<Target className="w-4 h-4 text-blue-400" /> Probabilistic calibration
|
||||
</div>
|
||||
<select
|
||||
value={calDays}
|
||||
onChange={e => setCalDays(Number(e.target.value))}
|
||||
className="bg-dark-700 border border-slate-700 rounded px-2 py-1 text-xs text-slate-300"
|
||||
>
|
||||
<option value={90}>90 jours</option>
|
||||
<option value={180}>180 jours</option>
|
||||
<option value={365}>1 an</option>
|
||||
<option value={730}>2 ans</option>
|
||||
<option value={90}>90 days</option>
|
||||
<option value={180}>180 days</option>
|
||||
<option value={365}>1 year</option>
|
||||
<option value={730}>2 years</option>
|
||||
</select>
|
||||
</div>
|
||||
{loadingC ? (
|
||||
|
||||
Reference in New Issue
Block a user