translations: update qsTrs to Translation.tr and allow translation of notifications

This commit is contained in:
end-4
2025-07-17 13:56:50 +07:00
parent 9ca67f0095
commit 1e7c84a6c1
10 changed files with 104 additions and 41 deletions
@@ -40,7 +40,11 @@ QuickToggleButton {
command: ["warp-cli", "connect"]
onExited: (exitCode, exitStatus) => {
if (exitCode !== 0) {
Quickshell.execDetached(["notify-send", "Cloudflare WARP", "Connection failed. Please inspect manually with the <tt>warp-cli</tt> command", "-a", "Shell"])
Quickshell.execDetached(["notify-send",
Translation.tr("Cloudflare WARP"),
Translation.tr("Connection failed. Please inspect manually with the <tt>warp-cli</tt> command")
, "-a", "Shell"
])
}
}
}
@@ -53,7 +57,11 @@ QuickToggleButton {
if (exitCode === 0) {
connectProc.running = true
} else {
Quickshell.execDetached(["notify-send", "Cloudflare WARP", "Registration failed. Please inspect manually with the <tt>warp-cli</tt> command", "-a", "Shell"])
Quickshell.execDetached(["notify-send",
Translation.tr("Cloudflare WARP"),
Translation.tr("Registration failed. Please inspect manually with the <tt>warp-cli</tt> command"),
"-a", "Shell"
])
}
}
}
@@ -80,6 +88,6 @@ QuickToggleButton {
}
}
StyledToolTip {
content: qsTr("Cloudflare WARP (1.1.1.1)")
content: Translation.tr("Cloudflare WARP (1.1.1.1)")
}
}