fix(nix-monitor): fix settings translation wording and variable naming

This commit is contained in:
avivbintangaringga
2026-07-15 23:13:20 +07:00
parent 04ad49cf45
commit 48e3adf052
3 changed files with 16 additions and 16 deletions
+6 -6
View File
@@ -44,7 +44,7 @@ local closureSizeFile = stateDir .. "/closureSize"
local remotePidFile = stateDir .. "/remoteHash.pid"
local storePidFile = stateDir .. "/storeSize.pid"
local closurePidFile = stateDir .. "/closureSize.pid"
local showUpdateNotification = true
local showUpdateAvailableNotification = true
local localHashCmd = "nixos-version --hash 2> /dev/null | cut -c -7"
local remoteHashCmd = "git ls-remote https://github.com/NixOS/nixpkgs " .. branch .. " 2>/dev/null | cut -c 1-7"
@@ -102,7 +102,7 @@ function checkRemoteHash(delay: number?)
setState("isRemoteCheckRunning", true)
setState("lastRemoteCheckRunTime", os.time())
if cfg("show_checking_notification") then
if cfg("show_update_check_notification") then
noctalia.notify(tr("notification.checking_update"))
end
@@ -122,7 +122,7 @@ function checkRemoteStatus()
end
function onRemoteHashCheckCompleted()
if cfg("show_checking_notification") then
if cfg("show_update_check_notification") then
noctalia.notify(tr("notification.update_check_completed"))
end
@@ -253,13 +253,13 @@ function update()
then
setState("isUpdateAvailable", true)
if cfg("show_update_notification") and showUpdateNotification then
if cfg("show_update_available_notification") and showUpdateAvailableNotification then
noctalia.notify(tr("notification.update_is_available"))
showUpdateNotification = false
showUpdateAvailableNotification = false
end
else
setState("isUpdateAvailable", false)
showUpdateNotification = true
showUpdateAvailableNotification = true
end
-- Generations check
+6 -6
View File
@@ -111,17 +111,17 @@ default = 10
min = 5
[[setting]]
key = "show_checking_notification"
key = "show_update_check_notification"
type = "bool"
label_key = "setting.checking_notification.label"
description_key = "setting.checking_notification.description"
label_key = "setting.show_update_check_notification.label"
description_key = "setting.show_update_check_notification.description"
default = false
[[setting]]
key = "show_update_notification"
key = "show_update_available_notification"
type = "bool"
label_key = "setting.show_update_notification.label"
description_key = "setting.show_update_notification.description"
label_key = "setting.show_update_available_notification.label"
description_key = "setting.show_update_available_notification.description"
default = true
[[setting]]
+4 -4
View File
@@ -38,10 +38,10 @@
"setting.check_duration_threshold.description": "Cancel check if it took too long (in minutes)",
"setting.system_stats_check_interval.label": "System stats check interval",
"setting.system_stats_check_interval.description": "How often to check for system stats (in minutes)",
"setting.checking_notification.label": "Show checking update notification",
"setting.checking_notification.description": "Whether to show a notification whenever checking is in progress",
"setting.show_update_notification.label": "Show update notification",
"setting.show_update_notification.description": "Whether to show a notification whenever update is available",
"setting.show_update_check_notification.label": "Show update check notification",
"setting.show_update_check_notification.description": "Whether to show a notification whenever update check is in progress and completed",
"setting.show_update_available_notification.label": "Show update available notification",
"setting.show_update_available_notification.description": "Whether to show a notification whenever an update is available",
"setting.branch.label": "Branch",
"setting.branch.description": "Which nixpkgs branch to use",
"setting.update_command.label": "Update command",