"""Tiny localization lookup. All UI text comes from locales/de.json via t().""" import json from pathlib import Path _FILE = Path(__file__).resolve().parent.parent / "locales" / "de.json" _strings = json.loads(_FILE.read_text(encoding="utf-8")) def t(key, **kwargs): text = _strings.get(key, key) return text.format(**kwargs) if kwargs else text