refactor(locale): 提取 locale 配置为 decman Module

This commit is contained in:
2026-03-26 11:10:39 +08:00
parent 976be7b75d
commit 4118392c64
3 changed files with 22 additions and 12 deletions
+16
View File
@@ -0,0 +1,16 @@
import decman
from decman import File, Module
class LocaleModule(Module):
def __init__(self):
super().__init__("locale")
def files(self):
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):
decman.prg(["locale-gen"])