i18n: even more things appeared

This commit is contained in:
Ly-sec
2025-09-24 15:31:11 +02:00
parent 24cb5823ee
commit 5de4330199
25 changed files with 402 additions and 298 deletions
+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
@@ -293,7 +293,7 @@ Variants {
}
NText {
text: model.summary || "No summary"
text: model.summary || I18n.tr("general.no-summary")
font.pointSize: Style.fontSizeL * scaling
font.weight: Style.fontWeightMedium
color: Color.mOnSurface
@@ -216,7 +216,7 @@ NPanel {
// Summary
NText {
text: model.summary || "No summary"
text: model.summary || I18n.tr("general.no-summary")
font.pointSize: Style.fontSizeM * scaling
font.weight: Font.Medium
color: Color.mOnSurface
+7 -4
View File
@@ -31,7 +31,7 @@ NPanel {
"action": "lock",
"icon": "lock",
"title": I18n.tr("session-menu.lock"),
"subtitle": "Lock your session"
"subtitle": I18n.tr("session-menu.lock-subtitle")
}, {
"action": "suspend",
"icon": "suspend",
@@ -46,7 +46,7 @@ NPanel {
"action": "logout",
"icon": "logout",
"title": I18n.tr("session-menu.logout"),
"subtitle": "End your session"
"subtitle": I18n.tr("session-menu.end-subtitle")
}, {
"action": "shutdown",
"icon": "shutdown",
@@ -263,7 +263,10 @@ NPanel {
Layout.preferredHeight: Style.baseWidgetSize * 0.8 * scaling
NText {
text: timerActive ? `${pendingAction.charAt(0).toUpperCase() + pendingAction.slice(1)} in ${Math.ceil(timeRemaining / 1000)} seconds...` : "Session Menu"
text: timerActive ? I18n.tr("session-menu.action-in-seconds", {
"action": pendingAction.charAt(0).toUpperCase() + pendingAction.slice(1),
"seconds": Math.ceil(timeRemaining / 1000)
}) : I18n.tr("session-menu.title")
font.weight: Style.fontWeightBold
font.pointSize: Style.fontSizeL * scaling
color: timerActive ? Color.mPrimary : Color.mOnSurface
@@ -419,7 +422,7 @@ NPanel {
NText {
text: {
if (buttonRoot.pending) {
return "Click again to execute immediately"
return I18n.tr("session-menu.click-again")
}
return buttonRoot.subtitle
}
+23 -32
View File
@@ -49,24 +49,19 @@ ColumnLayout {
Layout.fillWidth: true
label: I18n.tr("settings.bar.appearance.position.label")
description: I18n.tr("settings.bar.appearance.position.description")
model: ListModel {
ListElement {
key: "top"
name: "Top"
}
ListElement {
key: "bottom"
name: "Bottom"
}
ListElement {
key: "left"
name: "Left"
}
ListElement {
key: "right"
name: "Right"
}
}
model: [{
"key": "top",
"name": I18n.tr("options.bar.position.top")
}, {
"key": "bottom",
"name": I18n.tr("options.bar.position.bottom")
}, {
"key": "left",
"name": I18n.tr("options.bar.position.left")
}, {
"key": "right",
"name": I18n.tr("options.bar.position.right")
}]
currentKey: Settings.data.bar.position
onSelected: key => Settings.data.bar.position = key
}
@@ -75,20 +70,16 @@ ColumnLayout {
Layout.fillWidth: true
label: I18n.tr("settings.bar.appearance.density.label")
description: I18n.tr("settings.bar.appearance.density.description")
model: ListModel {
ListElement {
key: "compact"
name: "Compact"
}
ListElement {
key: "default"
name: "Default"
}
ListElement {
key: "comfortable"
name: "Comfortable"
}
}
model: [{
"key": "compact",
"name": I18n.tr("options.bar.density.compact")
}, {
"key": "default",
"name": I18n.tr("options.bar.density.default")
}, {
"key": "comfortable",
"name": I18n.tr("options.bar.density.comfortable")
}]
currentKey: Settings.data.bar.density
onSelected: key => Settings.data.bar.density = key
}
+3 -3
View File
@@ -65,10 +65,10 @@ ColumnLayout {
// Matugen exists, enable it
Settings.data.colorSchemes.useWallpaperColors = true
MatugenService.generateFromWallpaper()
ToastService.showNotice("Matugen", "Enabled")
ToastService.showNotice(I18n.tr("settings.color-scheme.color-source.enable-matugen.label"), I18n.tr("toast.matugen.enabled"))
} else {
// Matugen not found
ToastService.showWarning("Matugen", "Not installed")
ToastService.showWarning(I18n.tr("settings.color-scheme.color-source.enable-matugen.label"), I18n.tr("toast.matugen.not-installed"))
}
}
@@ -130,7 +130,7 @@ ColumnLayout {
matugenCheck.running = true
} else {
Settings.data.colorSchemes.useWallpaperColors = false
ToastService.showNotice("Matugen", "Disabled")
ToastService.showNotice(I18n.tr("settings.color-scheme.color-source.enable-matugen.label"), I18n.tr("toast.matugen.disabled"))
if (Settings.data.colorSchemes.predefinedScheme) {
+3 -3
View File
@@ -38,10 +38,10 @@ ColumnLayout {
if (exitCode === 0) {
Settings.data.nightLight.enabled = true
NightLightService.apply()
ToastService.showNotice("Night light", "Enabled")
ToastService.showNotice(I18n.tr("settings.display.night-light.section.label"), I18n.tr("toast.night-light.enabled"))
} else {
Settings.data.nightLight.enabled = false
ToastService.showWarning("Night light", "wlsunset not installed")
ToastService.showWarning(I18n.tr("settings.display.night-light.section.label"), I18n.tr("toast.night-light.not-installed"))
}
}
@@ -234,7 +234,7 @@ ColumnLayout {
Settings.data.nightLight.enabled = false
Settings.data.nightLight.forced = false
NightLightService.apply()
ToastService.showNotice("Night light", "Disabled")
ToastService.showNotice(I18n.tr("settings.display.night-light.section.label"), I18n.tr("toast.night-light.disabled"))
}
}
}
+22 -30
View File
@@ -19,36 +19,28 @@ ColumnLayout {
label: I18n.tr("settings.launcher.settings.position.label")
description: I18n.tr("settings.launcher.settings.position.description")
Layout.fillWidth: true
model: ListModel {
ListElement {
key: "center"
name: "Center (default)"
}
ListElement {
key: "top_left"
name: "Top left"
}
ListElement {
key: "top_right"
name: "Top right"
}
ListElement {
key: "bottom_left"
name: "Bottom left"
}
ListElement {
key: "bottom_right"
name: "Bottom right"
}
ListElement {
key: "bottom_center"
name: "Bottom center"
}
ListElement {
key: "top_center"
name: "Top center"
}
}
model: [{
"key": "center",
"name": I18n.tr("options.launcher.position.center")
}, {
"key": "top_left",
"name": I18n.tr("options.launcher.position.top_left")
}, {
"key": "top_right",
"name": I18n.tr("options.launcher.position.top_right")
}, {
"key": "bottom_left",
"name": I18n.tr("options.launcher.position.bottom_left")
}, {
"key": "bottom_right",
"name": I18n.tr("options.launcher.position.bottom_right")
}, {
"key": "bottom_center",
"name": I18n.tr("options.launcher.position.bottom_center")
}, {
"key": "top_center",
"name": I18n.tr("options.launcher.position.top_center")
}]
currentKey: Settings.data.appLauncher.position
onSelected: function (key) {
Settings.data.appLauncher.position = key
+19 -26
View File
@@ -49,32 +49,25 @@ ColumnLayout {
NComboBox {
label: I18n.tr("settings.notifications.settings.location.label")
description: I18n.tr("settings.notifications.settings.location.description")
model: ListModel {
ListElement {
key: "top"
name: "Top"
}
ListElement {
key: "top_left"
name: "Top left"
}
ListElement {
key: "top_right"
name: "Top right"
}
ListElement {
key: "bottom"
name: "Bottom"
}
ListElement {
key: "bottom_left"
name: "Bottom left"
}
ListElement {
key: "bottom_right"
name: "Bottom right"
}
}
model: [{
"key": "top",
"name": I18n.tr("options.launcher.position.top_center")
}, {
"key": "top_left",
"name": I18n.tr("options.launcher.position.top_left")
}, {
"key": "top_right",
"name": I18n.tr("options.launcher.position.top_right")
}, {
"key": "bottom",
"name": I18n.tr("options.launcher.position.bottom_center")
}, {
"key": "bottom_left",
"name": I18n.tr("options.launcher.position.bottom_left")
}, {
"key": "bottom_right",
"name": I18n.tr("options.launcher.position.bottom_right")
}]
currentKey: Settings.data.notifications.location || "top_right"
onSelected: key => Settings.data.notifications.location = key
}
+75 -104
View File
@@ -76,36 +76,28 @@ ColumnLayout {
NComboBox {
label: I18n.tr("settings.screen-recorder.video.frame-rate.label")
description: I18n.tr("settings.screen-recorder.video.frame-rate.description")
model: ListModel {
ListElement {
key: "30"
name: "30 FPS"
}
ListElement {
key: "60"
name: "60 FPS"
}
ListElement {
key: "100"
name: "100 FPS"
}
ListElement {
key: "120"
name: "120 FPS"
}
ListElement {
key: "144"
name: "144 FPS"
}
ListElement {
key: "165"
name: "165 FPS"
}
ListElement {
key: "240"
name: "240 FPS"
}
}
model: [{
"key": "30",
"name": I18n.tr("options.frame-rates.30-fps")
}, {
"key": "60",
"name": I18n.tr("options.frame-rates.60-fps")
}, {
"key": "100",
"name": I18n.tr("options.frame-rates.100-fps")
}, {
"key": "120",
"name": I18n.tr("options.frame-rates.120-fps")
}, {
"key": "144",
"name": I18n.tr("options.frame-rates.144-fps")
}, {
"key": "165",
"name": I18n.tr("options.frame-rates.165-fps")
}, {
"key": "240",
"name": I18n.tr("options.frame-rates.240-fps")
}]
currentKey: Settings.data.screenRecorder.frameRate
onSelected: key => Settings.data.screenRecorder.frameRate = key
}
@@ -114,24 +106,19 @@ ColumnLayout {
NComboBox {
label: I18n.tr("settings.screen-recorder.video.video-quality.label")
description: I18n.tr("settings.screen-recorder.video.video-quality.description")
model: ListModel {
ListElement {
key: "medium"
name: "Medium"
}
ListElement {
key: "high"
name: "High"
}
ListElement {
key: "very_high"
name: "Very high"
}
ListElement {
key: "ultra"
name: "Ultra"
}
}
model: [{
"key": "medium",
"name": I18n.tr("options.screen-recording.quality.medium")
}, {
"key": "high",
"name": I18n.tr("options.screen-recording.quality.high")
}, {
"key": "very_high",
"name": I18n.tr("options.screen-recording.quality.very-high")
}, {
"key": "ultra",
"name": I18n.tr("options.screen-recording.quality.ultra")
}]
currentKey: Settings.data.screenRecorder.quality
onSelected: key => Settings.data.screenRecorder.quality = key
}
@@ -140,28 +127,22 @@ ColumnLayout {
NComboBox {
label: I18n.tr("settings.screen-recorder.video.video-codec.label")
description: I18n.tr("settings.screen-recorder.video.video-codec.description")
model: ListModel {
ListElement {
key: "h264"
name: "H264"
}
ListElement {
key: "hevc"
name: "HEVC"
}
ListElement {
key: "av1"
name: "AV1"
}
ListElement {
key: "vp8"
name: "VP8"
}
ListElement {
key: "vp9"
name: "VP9"
}
}
model: [{
"key": "h264",
"name": I18n.tr("options.screen-recording.codecs.h264")
}, {
"key": "hevc",
"name": I18n.tr("options.screen-recording.codecs.hevc")
}, {
"key": "av1",
"name": I18n.tr("options.screen-recording.codecs.av1")
}, {
"key": "vp8",
"name": I18n.tr("options.screen-recording.codecs.vp8")
}, {
"key": "vp9",
"name": I18n.tr("options.screen-recording.codecs.vp9")
}]
currentKey: Settings.data.screenRecorder.videoCodec
onSelected: key => Settings.data.screenRecorder.videoCodec = key
}
@@ -170,16 +151,13 @@ ColumnLayout {
NComboBox {
label: I18n.tr("settings.screen-recorder.video.color-range.label")
description: I18n.tr("settings.screen-recorder.video.color-range.description")
model: ListModel {
ListElement {
key: "limited"
name: "Limited"
}
ListElement {
key: "full"
name: "Full"
}
}
model: [{
"key": "limited",
"name": I18n.tr("options.screen-recording.color-range.limited")
}, {
"key": "full",
"name": I18n.tr("options.screen-recording.color-range.full")
}]
currentKey: Settings.data.screenRecorder.colorRange
onSelected: key => Settings.data.screenRecorder.colorRange = key
}
@@ -205,20 +183,16 @@ ColumnLayout {
NComboBox {
label: I18n.tr("settings.screen-recorder.audio.audio-source.label")
description: I18n.tr("settings.screen-recorder.audio.audio-source.description")
model: ListModel {
ListElement {
key: "default_output"
name: "System output"
}
ListElement {
key: "default_input"
name: "Microphone input"
}
ListElement {
key: "both"
name: "System output + microphone input"
}
}
model: [{
"key": "default_output",
"name": I18n.tr("options.screen-recording.audio-sources.system-output")
}, {
"key": "default_input",
"name": I18n.tr("options.screen-recording.audio-sources.microphone-input")
}, {
"key": "both",
"name": I18n.tr("options.screen-recording.audio-sources.both")
}]
currentKey: Settings.data.screenRecorder.audioSource
onSelected: key => Settings.data.screenRecorder.audioSource = key
}
@@ -227,16 +201,13 @@ ColumnLayout {
NComboBox {
label: I18n.tr("settings.screen-recorder.audio.audio-codec.label")
description: I18n.tr("settings.screen-recorder.audio.audio-codec.description")
model: ListModel {
ListElement {
key: "opus"
name: "Opus"
}
ListElement {
key: "aac"
name: "AAC"
}
}
model: [{
"key": "opus",
"name": I18n.tr("options.screen-recording.audio-codecs.opus")
}, {
"key": "aac",
"name": I18n.tr("options.screen-recording.audio-codecs.aac")
}]
currentKey: Settings.data.screenRecorder.audioCodec
onSelected: key => Settings.data.screenRecorder.audioCodec = key
}
+2 -2
View File
@@ -436,13 +436,13 @@ NPanel {
Layout.alignment: Qt.AlignHCenter
}
NText {
text: (wallpaperPanel.filterText && wallpaperPanel.filterText.length > 0) ? "No match found." : "No wallpaper found."
text: (wallpaperPanel.filterText && wallpaperPanel.filterText.length > 0) ? I18n.tr("wallpaper.no-match") : I18n.tr("wallpaper.no-wallpaper")
color: Color.mOnSurface
font.weight: Style.fontWeightBold
Layout.alignment: Qt.AlignHCenter
}
NText {
text: (wallpaperPanel.filterText && wallpaperPanel.filterText.length > 0) ? "Try a different search query." : "Configure your wallpaper directory with images."
text: (wallpaperPanel.filterText && wallpaperPanel.filterText.length > 0) ? I18n.tr("wallpaper.try-different-search") : I18n.tr("wallpaper.configure-directory")
color: Color.mOnSurfaceVariant
wrapMode: Text.WordWrap
Layout.alignment: Qt.AlignHCenter