Merge branch 'i18n'

This commit is contained in:
ItsLemmy
2025-09-24 13:52:29 -04:00
92 changed files with 5121 additions and 1094 deletions
+11 -11
View File
@@ -35,7 +35,7 @@ NPanel {
}
NText {
text: "Bluetooth"
text: I18n.tr("bluetooth.panel.title")
font.pointSize: Style.fontSizeL * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface
@@ -52,7 +52,7 @@ NPanel {
NIconButton {
enabled: Settings.data.network.bluetoothEnabled
icon: BluetoothService.adapter && BluetoothService.adapter.discovering ? "stop" : "refresh"
tooltipText: "Refresh devices"
tooltipText: I18n.tr("tooltips.refresh-devices")
baseSize: Style.baseWidgetSize * 0.8
onClicked: {
if (BluetoothService.adapter) {
@@ -63,7 +63,7 @@ NPanel {
NIconButton {
icon: "close"
tooltipText: "Close"
tooltipText: I18n.tr("tooltips.close")
baseSize: Style.baseWidgetSize * 0.8
onClicked: {
root.close()
@@ -94,14 +94,14 @@ NPanel {
}
NText {
text: "Bluetooth is disabled"
text: I18n.tr("bluetooth.panel.disabled")
font.pointSize: Style.fontSizeL * scaling
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
NText {
text: "Enable Bluetooth to see available devices."
text: I18n.tr("bluetooth.panel.enable-message")
font.pointSize: Style.fontSizeS * scaling
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
@@ -124,7 +124,7 @@ NPanel {
// Connected devices
BluetoothDevicesList {
label: "Connected devices"
label: I18n.tr("bluetooth.panel.connected-devices")
property var items: {
if (!BluetoothService.adapter || !Bluetooth.devices)
return []
@@ -138,8 +138,8 @@ NPanel {
// Known devices
BluetoothDevicesList {
label: "Known devices"
tooltipText: "Left click to connect. Right click to forget."
label: I18n.tr("bluetooth.panel.known-devices")
tooltipText: I18n.tr("tooltips.connect-disconnect-devices")
property var items: {
if (!BluetoothService.adapter || !Bluetooth.devices)
return []
@@ -153,7 +153,7 @@ NPanel {
// Available devices
BluetoothDevicesList {
label: "Available devices"
label: I18n.tr("bluetooth.panel.available-devices")
property var items: {
if (!BluetoothService.adapter || !Bluetooth.devices)
return []
@@ -199,14 +199,14 @@ NPanel {
}
NText {
text: "Scanning for devices..."
text: I18n.tr("bluetooth.panel.scanning")
font.pointSize: Style.fontSizeL * scaling
color: Color.mOnSurface
}
}
NText {
text: "Make sure your device is in pairing mode."
text: I18n.tr("bluetooth.panel.pairing-mode")
font.pointSize: Style.fontSizeM * scaling
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
+3 -3
View File
@@ -31,7 +31,7 @@ NPanel {
NIconButton {
icon: "chevron-left"
tooltipText: "Previous month"
tooltipText: I18n.tr("tooltips.previous-month")
onClicked: {
let newDate = new Date(grid.year, grid.month - 1, 1)
grid.year = newDate.getFullYear()
@@ -50,7 +50,7 @@ NPanel {
NIconButton {
icon: "chevron-right"
tooltipText: "Next month"
tooltipText: I18n.tr("tooltips.next-month")
onClicked: {
let newDate = new Date(grid.year, grid.month + 1, 1)
grid.year = newDate.getFullYear()
@@ -81,7 +81,7 @@ NPanel {
NText {
anchors.centerIn: parent
text: "Week"
text: I18n.tr("calendar.panel.week")
color: Color.mOutline
font.pointSize: Style.fontSizeXS * scaling
font.weight: Style.fontWeightRegular
+24 -22
View File
@@ -40,7 +40,7 @@ NPanel {
}
NText {
text: "Wi-Fi"
text: I18n.tr("wifi.panel.title")
font.pointSize: Style.fontSizeL * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface
@@ -56,7 +56,7 @@ NPanel {
NIconButton {
icon: "refresh"
tooltipText: "Refresh"
tooltipText: I18n.tr("tooltips.refresh")
baseSize: Style.baseWidgetSize * 0.8
enabled: Settings.data.network.wifiEnabled && !NetworkService.scanning
onClicked: NetworkService.scan()
@@ -64,7 +64,7 @@ NPanel {
NIconButton {
icon: "close"
tooltipText: "Close"
tooltipText: I18n.tr("tooltips.close")
baseSize: Style.baseWidgetSize * 0.8
onClicked: root.close()
}
@@ -136,14 +136,14 @@ NPanel {
}
NText {
text: "Wi-Fi is disabled"
text: I18n.tr("wifi.panel.disabled")
font.pointSize: Style.fontSizeL * scaling
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
NText {
text: "Enable Wi-Fi to see available networks."
text: I18n.tr("wifi.panel.enable-message")
font.pointSize: Style.fontSizeS * scaling
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
@@ -172,7 +172,7 @@ NPanel {
}
NText {
text: "Searching for nearby networks..."
text: I18n.tr("wifi.panel.searching")
font.pointSize: Style.fontSizeNormal * scaling
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
@@ -263,7 +263,9 @@ NPanel {
spacing: Style.marginXS * scaling
NText {
text: `${modelData.signal}%`
text: I18n.tr("system.signal-strength", {
"signal": modelData.signal
})
font.pointSize: Style.fontSizeXXS * scaling
color: Color.mOnSurfaceVariant
}
@@ -295,7 +297,7 @@ NPanel {
NText {
id: connectedText
anchors.centerIn: parent
text: "Connected"
text: I18n.tr("wifi.panel.connected")
font.pointSize: Style.fontSizeXXS * scaling
color: Color.mOnPrimary
}
@@ -311,7 +313,7 @@ NPanel {
NText {
id: disconnectingText
anchors.centerIn: parent
text: "Disconnecting..."
text: I18n.tr("wifi.panel.disconnecting")
font.pointSize: Style.fontSizeXXS * scaling
color: Color.mOnPrimary
}
@@ -327,7 +329,7 @@ NPanel {
NText {
id: forgettingText
anchors.centerIn: parent
text: "Forgetting..."
text: I18n.tr("wifi.panel.forgetting")
font.pointSize: Style.fontSizeXXS * scaling
color: Color.mOnPrimary
}
@@ -345,7 +347,7 @@ NPanel {
NText {
id: savedText
anchors.centerIn: parent
text: "Saved"
text: I18n.tr("wifi.panel.saved")
font.pointSize: Style.fontSizeXXS * scaling
color: Color.mOnSurfaceVariant
}
@@ -367,7 +369,7 @@ NPanel {
NIconButton {
visible: (modelData.existing || modelData.cached) && !modelData.connected && NetworkService.connectingTo !== modelData.ssid && NetworkService.forgettingNetwork !== modelData.ssid && NetworkService.disconnectingFrom !== modelData.ssid
icon: "trash"
tooltipText: "Forget network"
tooltipText: I18n.tr("tooltips.forget-network")
baseSize: Style.baseWidgetSize * 0.8
onClicked: expandedSsid = expandedSsid === modelData.ssid ? "" : modelData.ssid
}
@@ -376,10 +378,10 @@ NPanel {
visible: !modelData.connected && NetworkService.connectingTo !== modelData.ssid && passwordSsid !== modelData.ssid && NetworkService.forgettingNetwork !== modelData.ssid && NetworkService.disconnectingFrom !== modelData.ssid
text: {
if (modelData.existing || modelData.cached)
return "Connect"
return I18n.tr("wifi.panel.connect")
if (!NetworkService.isSecured(modelData.security))
return "Connect"
return "Password"
return I18n.tr("wifi.panel.connect")
return I18n.tr("wifi.panel.password")
}
outlined: !hovered
fontSize: Style.fontSizeXS * scaling
@@ -397,7 +399,7 @@ NPanel {
NButton {
visible: modelData.connected && NetworkService.disconnectingFrom !== modelData.ssid
text: "Disconnect"
text: I18n.tr("wifi.panel.disconnect")
outlined: !hovered
fontSize: Style.fontSizeXS * scaling
backgroundColor: Color.mError
@@ -457,7 +459,7 @@ NPanel {
Text {
visible: parent.text.length === 0
anchors.verticalCenter: parent.verticalCenter
text: "Enter password..."
text: I18n.tr("wifi.panel.enter-password")
color: Color.mOnSurfaceVariant
font.pointSize: Style.fontSizeS * scaling
}
@@ -465,7 +467,7 @@ NPanel {
}
NButton {
text: "Connect"
text: I18n.tr("wifi.panel.connect")
fontSize: Style.fontSizeXXS * scaling
enabled: passwordInput.length > 0 && !NetworkService.connecting
outlined: true
@@ -511,7 +513,7 @@ NPanel {
}
NText {
text: "Forget this network?"
text: I18n.tr("wifi.panel.forget-network")
font.pointSize: Style.fontSizeS * scaling
color: Color.mError
Layout.fillWidth: true
@@ -520,7 +522,7 @@ NPanel {
NButton {
id: forgetButton
text: "Forget"
text: I18n.tr("wifi.panel.forget")
fontSize: Style.fontSizeXXS * scaling
backgroundColor: Color.mError
outlined: forgetButton.hovered ? false : true
@@ -561,14 +563,14 @@ NPanel {
}
NText {
text: "No networks found"
text: I18n.tr("wifi.panel.no-networks")
font.pointSize: Style.fontSizeL * scaling
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
NButton {
text: "Scan again"
text: I18n.tr("wifi.panel.scan-again")
icon: "refresh"
Layout.alignment: Qt.AlignHCenter
onClicked: NetworkService.scan()
+3 -1
View File
@@ -54,7 +54,9 @@ Item {
// Only notify once we are a below threshold
if (!charging && !root.hasNotifiedLowBattery && percent <= warningThreshold) {
root.hasNotifiedLowBattery = true
ToastService.showWarning("Low Battery", `Battery is at ${Math.round(percent)}%. Please connect the charger.`)
ToastService.showWarning(I18n.tr("toast.battery.low"), I18n.tr("toast.battery.low-desc", {
"percent": Math.round(percent)
}))
} else if (root.hasNotifiedLowBattery && (charging || percent > warningThreshold + 5)) {
// Reset when charging starts or when battery recovers 5% above threshold
root.hasNotifiedLowBattery = false
+1 -1
View File
@@ -21,7 +21,7 @@ NIconButton {
colorBorderHover: Color.transparent
icon: Settings.data.network.bluetoothEnabled ? "bluetooth" : "bluetooth-off"
tooltipText: "Bluetooth devices"
tooltipText: I18n.tr("tooltips.bluetooth-devices")
onClicked: PanelService.getPanel("bluetoothPanel")?.toggle(this)
onRightClicked: PanelService.getPanel("bluetoothPanel")?.toggle(this)
}
+1 -1
View File
@@ -108,7 +108,7 @@ Rectangle {
}
NTooltip {
id: tooltip
text: "Open calendar"
text: I18n.tr("clock.tooltip")
target: clockContainer
positionAbove: Settings.data.bar.position === "bottom"
}
+1 -1
View File
@@ -35,7 +35,7 @@ NIconButton {
// If we have a custom path or distro logo, don't use the theme icon.
icon: (customIconPath === "" && !useDistroLogo) ? customIcon : ""
tooltipText: "Open side panel"
tooltipText: I18n.tr("tooltips.open-side-panel")
baseSize: Style.capsuleHeight
compact: (Settings.data.bar.density === "compact")
colorBg: (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent)
+1 -1
View File
@@ -10,7 +10,7 @@ NIconButton {
property real scaling: 1.0
icon: "dark-mode"
tooltipText: `Switch to ${Settings.data.colorSchemes.darkMode ? "light" : "dark"} mode`
tooltipText: Settings.data.colorSchemes.darkMode ? I18n.tr("tooltips.switch-to-light-mode") : I18n.tr("tooltips.switch-to-dark-mode")
compact: (Settings.data.bar.density === "compact")
baseSize: Style.capsuleHeight
colorBg: Settings.data.colorSchemes.darkMode ? (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent) : Color.mPrimary
+1 -1
View File
@@ -14,7 +14,7 @@ NIconButton {
baseSize: Style.capsuleHeight
compact: (Settings.data.bar.density === "compact")
icon: IdleInhibitorService.isInhibited ? "keep-awake-on" : "keep-awake-off"
tooltipText: IdleInhibitorService.isInhibited ? "Disable keep awake" : "Enable keep awake"
tooltipText: IdleInhibitorService.isInhibited ? I18n.tr("tooltips.disable-keep-awake") : I18n.tr("tooltips.enable-keep-awake")
colorBg: IdleInhibitorService.isInhibited ? Color.mPrimary : (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent)
colorFg: IdleInhibitorService.isInhibited ? Color.mOnPrimary : Color.mOnSurface
colorBorder: Color.transparent
+3 -1
View File
@@ -48,7 +48,9 @@ Item {
icon: "keyboard"
autoHide: false // Important to be false so we can hover as long as we want
text: currentLayout.toUpperCase()
tooltipText: `${currentLayout.toUpperCase()} keyboard layout`
tooltipText: I18n.tr("tooltips.keyboard-layout", {
"layout": currentLayout.toUpperCase()
})
forceOpen: root.displayMode === "forceOpen"
forceClose: root.displayMode === "alwaysHide"
onClicked: {
+3 -1
View File
@@ -97,7 +97,9 @@ Item {
suffix: "%"
forceOpen: displayMode === "alwaysShow"
forceClose: displayMode === "alwaysHide"
tooltipText: "Microphone volume at " + Math.round(AudioService.inputVolume * 100) + "%\nLeft click to toggle mute. Right click for settings.\nScroll to modify volume."
tooltipText: I18n.tr("tooltips.microphone-volume-at", {
"volume": Math.round(AudioService.inputVolume * 100)
})
onWheel: function (delta) {
wheelAccumulator += delta
+1 -1
View File
@@ -22,7 +22,7 @@ NIconButton {
colorBorderHover: Color.transparent
icon: Settings.data.nightLight.enabled ? (Settings.data.nightLight.forced ? "nightlight-forced" : "nightlight-on") : "nightlight-off"
tooltipText: `Night light is ${Settings.data.nightLight.enabled ? (Settings.data.nightLight.forced ? "forced." : "enabled.") : "disabled."}\nLeft click to cycle mode.\nRight click to access settings.`
tooltipText: Settings.data.nightLight.enabled ? (Settings.data.nightLight.forced ? I18n.tr("tooltips.night-light-forced") : I18n.tr("tooltips.night-light-enabled")) : I18n.tr("tooltips.night-light-disabled")
onClicked: {
if (!Settings.data.nightLight.enabled) {
Settings.data.nightLight.enabled = true
+1 -1
View File
@@ -52,7 +52,7 @@ NIconButton {
baseSize: Style.capsuleHeight
compact: (Settings.data.bar.density === "compact")
icon: Settings.data.notifications.doNotDisturb ? "bell-off" : "bell"
tooltipText: `Open notification history\nRight-click to ${Settings.data.notifications.doNotDisturb ? "disable" : "enable"} "Do not disturb".`
tooltipText: Settings.data.notifications.doNotDisturb ? I18n.tr("tooltips.open-notification-history-disable-dnd") : I18n.tr("tooltips.open-notification-history-enable-dnd")
colorBg: (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent)
colorFg: Color.mOnSurface
colorBorder: Color.transparent
+3 -1
View File
@@ -16,7 +16,9 @@ NIconButton {
visible: PowerProfileService.available
icon: PowerProfileService.getIcon()
tooltipText: `'${PowerProfileService.getName()}' power profile`
tooltipText: I18n.tr("tooltips.power-profile", {
"profile": PowerProfileService.getName()
})
compact: (Settings.data.bar.density === "compact")
colorBg: (PowerProfileService.profile === PowerProfile.Balanced) ? (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent) : Color.mPrimary
colorFg: (PowerProfileService.profile === PowerProfile.Balanced) ? Color.mOnSurface : Color.mOnPrimary
+1 -1
View File
@@ -11,7 +11,7 @@ NIconButton {
property real scaling: 1.0
icon: "camera-video"
tooltipText: ScreenRecorderService.isRecording ? "Click to stop recording" : "Click to start recording"
tooltipText: ScreenRecorderService.isRecording ? I18n.tr("tooltips.click-to-stop-recording") : I18n.tr("tooltips.click-to-start-recording")
compact: (Settings.data.bar.density === "compact")
baseSize: Style.capsuleHeight
colorBg: ScreenRecorderService.isRecording ? Color.mPrimary : (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent)
+1 -1
View File
@@ -14,7 +14,7 @@ NIconButton {
compact: (Settings.data.bar.density === "compact")
baseSize: Style.capsuleHeight
icon: "power"
tooltipText: "Session menu"
tooltipText: I18n.tr("tooltips.session-menu")
colorBg: (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent)
colorFg: Color.mError
colorBorder: Color.transparent
+6 -2
View File
@@ -120,7 +120,9 @@ Rectangle {
columnSpacing: Style.marginXXS * scaling
NText {
text: `${SystemStatService.cpuTemp}°C`
text: I18n.tr("system.cpu-temperature", {
"temp": SystemStatService.cpuTemp
})
font.family: Settings.data.ui.fontFixed
font.pointSize: textSize
font.weight: Style.fontWeightMedium
@@ -283,7 +285,9 @@ Rectangle {
columnSpacing: isVertical ? (Style.marginXXS * scaling) : (Style.marginXS * scaling)
NText {
text: `${SystemStatService.diskPercent}%`
text: I18n.tr("system.disk-usage", {
"percent": SystemStatService.diskPercent
})
font.family: Settings.data.ui.fontFixed
font.pointSize: textSize
font.weight: Style.fontWeightMedium
+3 -1
View File
@@ -83,7 +83,9 @@ Item {
suffix: "%"
forceOpen: displayMode === "alwaysShow"
forceClose: displayMode === "alwaysHide"
tooltipText: "Volume at " + Math.round(AudioService.volume * 100) + "%\nLeft click to toggle mute. Right click for settings.\nScroll to modify volume."
tooltipText: I18n.tr("tooltips.volume-at", {
"volume": Math.round(AudioService.volume * 100)
})
onWheel: function (delta) {
wheelAccumulator += delta
+1 -1
View File
@@ -14,7 +14,7 @@ NIconButton {
baseSize: Style.capsuleHeight
compact: (Settings.data.bar.density === "compact")
icon: "wallpaper-selector"
tooltipText: "Open wallpaper selector"
tooltipText: I18n.tr("tooltips.open-wallpaper-selector")
colorBg: (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent)
colorFg: Color.mOnSurface
colorBorder: Color.transparent
+1 -1
View File
@@ -40,7 +40,7 @@ NIconButton {
return "signal_wifi_bad"
}
}
tooltipText: "Manage Wi-Fi"
tooltipText: I18n.tr("tooltips.manage-wifi")
onClicked: PanelService.getPanel("wifiPanel")?.toggle(this)
onRightClicked: PanelService.getPanel("wifiPanel")?.toggle(this)
}