Add a complete Czech (cs) locale to hermes-webui: full key parity with the English reference (1642/1642 keys), real Czech translations for all string and function-valued keys, Slavic plural helpers for tool/worklog summaries, the cs login-screen locale in api/routes.py, and a dedicated tests/test_czech_locale.py parity+placeholder+diacritics guard mirroring the other per-locale tests. All 15 locale-count assertions bumped 14->15. Co-authored-by: ostravajih <ostravajih@users.noreply.github.com>
49 lines
1.7 KiB
Python
49 lines
1.7 KiB
Python
"""Zeus skin registration and dark-surface affordances."""
|
|
|
|
from pathlib import Path
|
|
|
|
REPO = Path(__file__).parent.parent
|
|
CSS = (REPO / "static" / "style.css").read_text(encoding="utf-8")
|
|
BOOT_JS = (REPO / "static" / "boot.js").read_text(encoding="utf-8")
|
|
CONFIG_PY = (REPO / "api" / "config.py").read_text(encoding="utf-8")
|
|
INDEX_HTML = (REPO / "static" / "index.html").read_text(encoding="utf-8")
|
|
I18N_JS = (REPO / "static" / "i18n.js").read_text(encoding="utf-8")
|
|
|
|
|
|
def test_zeus_skin_is_registered_in_all_files():
|
|
assert "{name:'Zeus'" in BOOT_JS
|
|
assert "zeus:1" in INDEX_HTML
|
|
assert '"zeus"' in CONFIG_PY
|
|
|
|
|
|
def test_zeus_dark_surfaces_are_near_black():
|
|
assert ':root.dark[data-skin="zeus"]' in CSS
|
|
assert "--bg:#0F0F0F" in CSS
|
|
assert "--sidebar:#111111" in CSS
|
|
assert "--surface:#181818" in CSS
|
|
|
|
|
|
def test_zeus_preserves_default_gold_accent():
|
|
# Zeus does NOT redefine --accent; it stays with the default gold.
|
|
# Verify gold-tinted border/focus vars are present instead.
|
|
assert "--border2:rgba(255,215,0,0.18)" in CSS
|
|
assert "--focus-ring:rgba(255,215,0,.4)" in CSS
|
|
assert "--hover-bg:rgba(255,215,0,.06)" in CSS
|
|
|
|
|
|
def test_zeus_active_session_uses_gold_highlight():
|
|
assert ':root.dark[data-skin="zeus"] .session-item.active' in CSS
|
|
assert "border-left:2px solid #FFD700" in CSS
|
|
|
|
|
|
def test_zeus_modals_are_not_navy():
|
|
# Modals/dialogs default to a hardcoded navy gradient — Zeus must override
|
|
assert ':root.dark[data-skin="zeus"] .app-dialog' in CSS
|
|
assert ':root.dark[data-skin="zeus"] .kanban-modal' in CSS
|
|
assert "rgba(24,24,24,.99)" in CSS
|
|
|
|
|
|
def test_zeus_i18n_lists_skin_in_all_locales():
|
|
# There are 12 locales; each should include zeus in the skin list.
|
|
assert I18N_JS.count("/zeus/") == 15
|