Files
archlinux-config/modules/locale.py
T
imbytecat b96e144e82 refactor(modules): 添加类型注解并优化 WSL 检测
- 全模块补全类型注解 (files, after_update, on_change)
- docker: 仅在 WSL 环境禁用 networkd-wait-online
- docker: 添加 _is_wsl() 自动检测函数
- zsh/docker: 改进错误输出使用 decman.error
- wsl-init: 统一使用 [[ ]] 并格式化代码
2026-04-09 12:09:00 +08:00

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"])