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:
@@ -49,7 +49,7 @@ def _max_similarity_vs_existing(candidate_kws: List[str], existing: List[Dict])
|
||||
return max((_jaccard(candidate_kws, p.get("keywords") or []) for p in existing), default=0.0)
|
||||
|
||||
|
||||
_EMBED_SIM_THRESHOLD = 0.75 # seuil cosinus pour considérer deux patterns comme doublons
|
||||
_EMBED_SIM_THRESHOLD = 0.75 # cosine threshold to consider two patterns as duplicates
|
||||
|
||||
|
||||
def _is_duplicate_pattern(
|
||||
@@ -59,8 +59,8 @@ def _is_duplicate_pattern(
|
||||
jaccard_threshold: float = 0.30,
|
||||
) -> bool:
|
||||
"""
|
||||
Retourne True si le candidat est trop similaire à un pattern existant.
|
||||
Essaie les embeddings cosinus (Sprint 4.3) avec fallback Jaccard.
|
||||
Returns True if the candidate is too similar to an existing pattern.
|
||||
Tries cosine embeddings (Sprint 4.3) with Jaccard fallback.
|
||||
"""
|
||||
if not existing:
|
||||
return False
|
||||
@@ -77,7 +77,7 @@ def _is_duplicate_pattern(
|
||||
api_key=api_key,
|
||||
candidate_id=candidate.get("id"),
|
||||
)
|
||||
if sim > 0: # embedding a fonctionné
|
||||
if sim > 0: # embedding worked
|
||||
return sim >= _EMBED_SIM_THRESHOLD
|
||||
except Exception as _emb_err:
|
||||
logger.debug(f"[Cycle] Embedding failed, fallback Jaccard: {_emb_err}")
|
||||
@@ -104,13 +104,13 @@ def _run_portfolio_monitor(risk: dict, cycle_id: str) -> dict:
|
||||
n_alerts = len(risk.get("alerts", []))
|
||||
|
||||
system_prompt = (
|
||||
"Tu es un risk manager spécialisé dans les portefeuilles d'options géopolitiques. "
|
||||
"Analyse l'état du portefeuille simulé ci-dessous et génère des recommandations concrètes. "
|
||||
"Réponds en JSON avec ce schéma exact: "
|
||||
'{"assessment": "<2 phrases max sur l\'état global>", '
|
||||
"You are a risk manager specializing in geopolitical options portfolios. "
|
||||
"Analyze the state of the simulated portfolio below and generate concrete recommendations. "
|
||||
"Respond in JSON with this exact schema: "
|
||||
'{"assessment": "<max 2 sentences on the overall state>", '
|
||||
'"actions": [{"priority": "high|medium", "type": "close_trade|rebalance|monitor", '
|
||||
'"trade_id": <int ou null>, "underlying": "<ticker>", "reason": "<raison courte>"}], '
|
||||
'"rebalance_suggestion": "<suggestion concrète de rééquilibrage en 1 phrase>"}'
|
||||
'"trade_id": <int or null>, "underlying": "<ticker>", "reason": "<short reason>"}], '
|
||||
'"rebalance_suggestion": "<concrete rebalancing suggestion in 1 sentence>"}'
|
||||
)
|
||||
user_prompt = context
|
||||
|
||||
|
||||
Reference in New Issue
Block a user