Revert "进一步的 kvmd 国际化(汉化)支持"

This reverts commit 5b25b3661f.
This commit is contained in:
mofeng-git
2024-11-20 11:51:52 +00:00
parent b419641251
commit 433232c845
11 changed files with 90 additions and 599 deletions

View File

@@ -27,8 +27,6 @@ import importlib.machinery
import Xlib.keysymdef
from ..lanuages import Lanuages
from ..logging import get_logger
from .mappings import At1Key
@@ -66,7 +64,7 @@ def build_symmap(path: str) -> dict[int, dict[int, str]]: # x11 keysym -> [(mod
or (web_name in WebModifiers.ALTS and key.altgr)
or (web_name in WebModifiers.CTRLS and key.ctrl)
):
logger.error(Lanuages().gettext("Invalid modifier key at mapping %s: %s / %s"), src, web_name, key)
logger.error("Invalid modifier key at mapping %s: %s / %s", src, web_name, key)
continue
modifiers = (
@@ -119,7 +117,7 @@ def _resolve_keysym(name: str) -> int:
def _read_keyboard_layout(path: str) -> dict[int, list[At1Key]]: # Keysym to evdev (at1)
logger = get_logger(0)
logger.info(Lanuages().gettext("Reading keyboard layout %s ..."), path)
logger.info("Reading keyboard layout %s ...", path)
with open(path) as file:
lines = list(map(str.strip, file.read().split("\n")))