feat: add German and English language switcher
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user