удаления еще раз

This commit is contained in:
2026-08-20 16:08:17 +03:00
parent 7d4f25991c
commit 9429659c14
7 changed files with 86 additions and 24 deletions

View File

@@ -5537,20 +5537,25 @@ class HockeyDataService:
elif state_key not in {"5x5", ""}:
state_label = state_key.replace("x", " on " if language_key == "en" else " на ")
# BUILD91: Mapping captions describe both sides independently. The
# numerical-advantage side keeps the configured PP/state caption, while
# a penalized side that is not the advantage side gets a plain Penalty
# caption. This does not control whether the television penalty plate is
# on air; that remains the single-plate logic in the runtime.
penalty_caption = "Penalty" if language_key == "en" else "Удаление"
# BUILD92: Mapping captions describe the current numerical condition.
# The advantage side keeps its configured state caption (PP, "Power play",
# etc.), while a penalized non-advantage side receives the numerical
# condition itself (5 на 4 / 5 on 4, 5 на 3 / 5 on 3, ...). For an
# equal coincidental state both penalized sides receive the same numerical
# condition. This is Mapping-only data; television output still follows
# the single-penalty-plate runtime logic.
numerical_state_label = (
state_key.replace("x", " on " if language_key == "en" else " на ")
if state_key else ""
)
home_label = (
state_label if advantage_side == "home"
else penalty_caption if home_penalties > 0
else numerical_state_label if home_penalties > 0
else ""
)
away_label = (
state_label if advantage_side == "away"
else penalty_caption if away_penalties > 0
else numerical_state_label if away_penalties > 0
else ""
)
phase_labels = {