Add translation capability, offer English and French as options

This commit is contained in:
Miguel Jacq 2025-11-12 13:58:58 +11:00
parent 54a6be835f
commit f578d562e6
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
17 changed files with 490 additions and 138 deletions

View file

@ -25,8 +25,14 @@ def load_db_config() -> DBConfig:
idle = s.value("ui/idle_minutes", 15, type=int)
theme = s.value("ui/theme", "system", type=str)
move_todos = s.value("ui/move_todos", False, type=bool)
locale = s.value("ui/locale", "en", type=str)
return DBConfig(
path=path, key=key, idle_minutes=idle, theme=theme, move_todos=move_todos
path=path,
key=key,
idle_minutes=idle,
theme=theme,
move_todos=move_todos,
locale=locale,
)
@ -37,3 +43,4 @@ def save_db_config(cfg: DBConfig) -> None:
s.setValue("ui/idle_minutes", str(cfg.idle_minutes))
s.setValue("ui/theme", str(cfg.theme))
s.setValue("ui/move_todos", str(cfg.move_todos))
s.setValue("ui/locale", str(cfg.locale))