feat(notify): mesaje alertă și comentarii business în română

Toate alertele Discord/Telegram traduse: armat, pregătit, recuperare,
semnal, activ, niveluri, pornit/oprit. Comentariile de business-logic
din main.py traduse în română.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude Agent
2026-04-16 23:09:20 +00:00
parent 51e98ae3d3
commit eca2b39e64
3 changed files with 43 additions and 45 deletions

View File

@@ -92,8 +92,7 @@ def test_handle_tick_prime_buy():
assert notif.alerts[0].kind == "arm"
assert notif.alerts[1].kind == "prime"
assert notif.alerts[1].direction == "BUY"
# Non-catchup prime alert must not mention catchup
assert "catchup" not in notif.alerts[1].title.lower()
assert "recuperare" not in notif.alerts[1].title.lower()
# ---------------------------------------------------------------------------
@@ -133,10 +132,10 @@ def test_handle_tick_catchup_dark_green():
assert len(notif.alerts) == 2
assert notif.alerts[0].kind == "arm"
assert notif.alerts[0].direction == "BUY"
assert "catchup" in notif.alerts[0].title.lower() or "catchup" in notif.alerts[0].body.lower()
assert "recuperare" in notif.alerts[0].title.lower() or "recuperare" in notif.alerts[0].body.lower()
assert notif.alerts[1].kind == "prime"
assert notif.alerts[1].direction == "BUY"
assert "catchup" in notif.alerts[1].title.lower() or "catchup" in notif.alerts[1].body.lower()
assert "recuperare" in notif.alerts[1].title.lower() or "recuperare" in notif.alerts[1].body.lower()
# Audit: both tick entries tagged catchup:true
catchup_events = [e for e in audit.events if e.get("catchup")]
@@ -216,8 +215,8 @@ def test_handle_tick_first_turquoise_no_catchup_label():
assert len(notif.alerts) == 1
assert notif.alerts[0].kind == "arm"
# Decision 3A: cannot distinguish fresh arm from catchup-at-arm-phase
assert "catchup" not in notif.alerts[0].title.lower()
assert "catchup" not in notif.alerts[0].body.lower()
assert "recuperare" not in notif.alerts[0].title.lower()
assert "recuperare" not in notif.alerts[0].body.lower()
# ---------------------------------------------------------------------------
@@ -238,7 +237,7 @@ def test_handle_tick_catchup_dark_red_when_not_first_accepted():
assert len(notif.alerts) == 2
assert notif.alerts[0].kind == "arm"
assert notif.alerts[0].direction == "SELL"
assert "catchup" in (notif.alerts[0].title + notif.alerts[0].body).lower()
assert "recuperare" in (notif.alerts[0].title + notif.alerts[0].body).lower()
assert notif.alerts[1].kind == "prime"
assert notif.alerts[1].direction == "SELL"
@@ -341,7 +340,7 @@ def test_handle_tick_opposite_direction_catchup_after_fire():
assert len(notif.alerts) == baseline_alerts + 2
assert notif.alerts[baseline_alerts].kind == "arm"
assert notif.alerts[baseline_alerts].direction == "SELL"
assert "catchup" in (notif.alerts[baseline_alerts].title + notif.alerts[baseline_alerts].body).lower()
assert "recuperare" in (notif.alerts[baseline_alerts].title + notif.alerts[baseline_alerts].body).lower()
assert notif.alerts[baseline_alerts + 1].kind == "prime"
assert notif.alerts[baseline_alerts + 1].direction == "SELL"