feat: add German and English language switcher

This commit is contained in:
2026-05-03 23:23:47 +02:00
parent 3df489ba6a
commit 4a407bdbb0
3 changed files with 254 additions and 58 deletions

View File

@@ -11,6 +11,7 @@ type Config struct {
CheckAUR bool `json:"check_aur"`
ReminderIntervalHours int `json:"reminder_interval_hours"`
Terminal string `json:"terminal"`
Language string `json:"language"`
AutoRefreshMinutes int `json:"auto_refresh_minutes"`
ShowIgnored bool `json:"show_ignored"`
NotificationsEnabled bool `json:"notifications_enabled"`
@@ -24,6 +25,7 @@ func Default() Config {
CheckAUR: true,
ReminderIntervalHours: 168,
Terminal: "auto",
Language: "de",
AutoRefreshMinutes: 30,
ShowIgnored: false,
NotificationsEnabled: true,
@@ -88,6 +90,9 @@ func normalize(cfg Config) Config {
if cfg.Terminal == "" {
cfg.Terminal = Default().Terminal
}
if cfg.Language != "de" && cfg.Language != "en" {
cfg.Language = Default().Language
}
if cfg.AutoRefreshMinutes < 0 {
cfg.AutoRefreshMinutes = Default().AutoRefreshMinutes
}