b96e144e82
- 全模块补全类型注解 (files, after_update, on_change) - docker: 仅在 WSL 环境禁用 networkd-wait-online - docker: 添加 _is_wsl() 自动检测函数 - zsh/docker: 改进错误输出使用 decman.error - wsl-init: 统一使用 [[ ]] 并格式化代码
17 lines
423 B
Python
17 lines
423 B
Python
import decman
|
|
from decman import File, Module
|
|
|
|
|
|
class LocaleModule(Module):
|
|
def __init__(self):
|
|
super().__init__("locale")
|
|
|
|
def files(self) -> dict[str, File]:
|
|
return {
|
|
"/etc/locale.conf": File(content="LANG=en_US.UTF-8\n"),
|
|
"/etc/locale.gen": File(content="en_US.UTF-8 UTF-8\n"),
|
|
}
|
|
|
|
def on_change(self, store: object) -> None:
|
|
decman.prg(["locale-gen"])
|