i18n: WAY more i18n conversion

This commit is contained in:
Ly-sec
2025-09-24 14:12:12 +02:00
parent df70f0c824
commit 2a23b6afdd
44 changed files with 327 additions and 204 deletions
+3 -3
View File
@@ -99,7 +99,7 @@ NBox {
colorBgHover: Color.mSecondary
colorFgHover: Color.mOnSecondary
enabled: comboBox.currentKey !== ""
tooltipText: "Add widget"
tooltipText: I18n.tr("tooltips.add-widget")
Layout.alignment: Qt.AlignVCenter
Layout.leftMargin: Style.marginS * scaling
onClicked: {
@@ -227,7 +227,7 @@ NBox {
active: BarWidgetRegistry.widgetHasUserSettings(modelData.id)
sourceComponent: NIconButton {
icon: "settings"
tooltipText: "Widget settings"
tooltipText: I18n.tr("tooltips.widget-settings")
baseSize: miniButtonSize
colorBorder: Qt.alpha(Color.mOutline, Style.opacityLight)
colorBg: Color.mOnSurface
@@ -268,7 +268,7 @@ NBox {
NIconButton {
icon: "close"
tooltipText: "Remove widget"
tooltipText: I18n.tr("tooltips.remove-widget")
baseSize: miniButtonSize
colorBorder: Qt.alpha(Color.mOutline, Style.opacityLight)
colorBg: Color.mOnSurface
@@ -28,20 +28,20 @@ ColumnLayout {
label: I18n.tr("bar.widget-settings.battery.display-mode.label")
description: I18n.tr("bar.widget-settings.battery.display-mode.description")
minimumWidth: 134 * scaling
model: ListModel {
ListElement {
key: "onhover"
name: "On hover"
model: [
{
key: "onhover",
name: I18n.tr("options.display-mode.on-hover")
},
{
key: "alwaysShow",
name: I18n.tr("options.display-mode.always-show")
},
{
key: "alwaysHide",
name: I18n.tr("options.display-mode.always-hide")
}
ListElement {
key: "alwaysShow"
name: "Always show"
}
ListElement {
key: "alwaysHide"
name: "Always hide"
}
}
]
currentKey: root.valueDisplayMode
onSelected: key => root.valueDisplayMode = key
}
@@ -26,20 +26,20 @@ ColumnLayout {
label: I18n.tr("bar.widget-settings.brightness.display-mode.label")
description: I18n.tr("bar.widget-settings.brightness.display-mode.description")
minimumWidth: 134 * scaling
model: ListModel {
ListElement {
key: "onhover"
name: "On hover"
model: [
{
key: "onhover",
name: I18n.tr("options.display-mode.on-hover")
},
{
key: "alwaysShow",
name: I18n.tr("options.display-mode.always-show")
},
{
key: "alwaysHide",
name: I18n.tr("options.display-mode.always-hide")
}
ListElement {
key: "alwaysShow"
name: "Always show"
}
ListElement {
key: "alwaysHide"
name: "Always hide"
}
}
]
currentKey: valueDisplayMode
onSelected: key => valueDisplayMode = key
}
@@ -106,7 +106,7 @@ ColumnLayout {
Layout.fillWidth: true
label: I18n.tr("bar.widget-settings.clock.horizontal-bar.label")
description: I18n.tr("bar.widget-settings.clock.horizontal-bar.description")
placeholderText: "HH:mm ddd, MMM dd"
placeholderText: I18n.tr("placeholders.clock-horizontal")
text: valueFormatHorizontal
onTextChanged: valueFormatHorizontal = text
Component.onCompleted: {
@@ -129,7 +129,7 @@ ColumnLayout {
Layout.fillWidth: true
label: I18n.tr("bar.widget-settings.clock.vertical-bar.label")
description: I18n.tr("bar.widget-settings.clock.vertical-bar.description")
placeholderText: "HH mm dd MM"
placeholderText: I18n.tr("placeholders.clock-vertical")
text: valueFormatVertical
onTextChanged: valueFormatVertical = text
Component.onCompleted: {
@@ -59,7 +59,7 @@ ColumnLayout {
id: leftClickExecInput
Layout.fillWidth: true
label: I18n.tr("bar.widget-settings.custom-button.left-click")
placeholderText: "Enter command to execute (app or custom script)"
placeholderText: I18n.tr("placeholders.enter-command")
text: widgetData?.leftClickExec || widgetMetadata.leftClickExec
}
@@ -67,7 +67,7 @@ ColumnLayout {
id: rightClickExecInput
Layout.fillWidth: true
label: I18n.tr("bar.widget-settings.custom-button.right-click")
placeholderText: "Enter command to execute (app or custom script)"
placeholderText: I18n.tr("placeholders.enter-command")
text: widgetData?.rightClickExec || widgetMetadata.rightClickExec
}
@@ -75,7 +75,7 @@ ColumnLayout {
id: middleClickExecInput
Layout.fillWidth: true
label: I18n.tr("bar.widget-settings.custom-button.middle-click")
placeholderText: "Enter command to execute (app or custom script)"
placeholderText: I18n.tr("placeholders.enter-command")
text: widgetData.middleClickExec || widgetMetadata.middleClickExec
}
@@ -92,7 +92,7 @@ ColumnLayout {
Layout.fillWidth: true
label: I18n.tr("bar.widget-settings.custom-button.display-command-output.label")
description: I18n.tr("bar.widget-settings.custom-button.display-command-output.description")
placeholderText: "echo \"Hello World\""
placeholderText: I18n.tr("placeholders.command-example")
text: widgetData?.textCommand || widgetMetadata.textCommand
}
@@ -26,20 +26,20 @@ ColumnLayout {
label: I18n.tr("bar.widget-settings.keyboard-layout.display-mode.label")
description: I18n.tr("bar.widget-settings.keyboard-layout.display-mode.description")
minimumWidth: 134 * scaling
model: ListModel {
ListElement {
key: "onhover"
name: "On hover"
model: [
{
key: "onhover",
name: I18n.tr("options.display-mode.on-hover")
},
{
key: "forceOpen",
name: I18n.tr("options.display-mode.force-open")
},
{
key: "alwaysHide",
name: I18n.tr("options.display-mode.always-hide")
}
ListElement {
key: "forceOpen"
name: "Force Open"
}
ListElement {
key: "alwaysHide"
name: "Always hide"
}
}
]
currentKey: valueDisplayMode
onSelected: key => valueDisplayMode = key
}
@@ -41,20 +41,20 @@ ColumnLayout {
NComboBox {
visible: valueShowVisualizer
label: I18n.tr("bar.widget-settings.media-mini.visualizer-type")
model: ListModel {
ListElement {
key: "linear"
name: "Linear"
model: [
{
key: "linear",
name: I18n.tr("options.visualizer-types.linear")
},
{
key: "mirrored",
name: I18n.tr("options.visualizer-types.mirrored")
},
{
key: "wave",
name: I18n.tr("options.visualizer-types.wave")
}
ListElement {
key: "mirrored"
name: "Mirrored"
}
ListElement {
key: "wave"
name: "Wave"
}
}
]
currentKey: valueVisualizerType
onSelected: key => valueVisualizerType = key
minimumWidth: 200 * scaling
@@ -26,20 +26,20 @@ ColumnLayout {
label: I18n.tr("bar.widget-settings.microphone.display-mode.label")
description: I18n.tr("bar.widget-settings.microphone.display-mode.description")
minimumWidth: 134 * scaling
model: ListModel {
ListElement {
key: "onhover"
name: "On hover"
model: [
{
key: "onhover",
name: I18n.tr("options.display-mode.on-hover")
},
{
key: "alwaysShow",
name: I18n.tr("options.display-mode.always-show")
},
{
key: "alwaysHide",
name: I18n.tr("options.display-mode.always-hide")
}
ListElement {
key: "alwaysShow"
name: "Always show"
}
ListElement {
key: "alwaysHide"
name: "Always hide"
}
}
]
currentKey: valueDisplayMode
onSelected: key => valueDisplayMode = key
}
@@ -25,6 +25,6 @@ ColumnLayout {
label: I18n.tr("bar.widget-settings.spacer.width.label")
description: I18n.tr("bar.widget-settings.spacer.width.description")
text: widgetData.width || widgetMetadata.width
placeholderText: "Enter width in pixels"
placeholderText: I18n.tr("placeholders.enter-width-pixels")
}
}
@@ -26,20 +26,20 @@ ColumnLayout {
label: I18n.tr("bar.widget-settings.volume.display-mode.label")
description: I18n.tr("bar.widget-settings.volume.display-mode.description")
minimumWidth: 134 * scaling
model: ListModel {
ListElement {
key: "onhover"
name: "On hover"
model: [
{
key: "onhover",
name: I18n.tr("options.display-mode.on-hover")
},
{
key: "alwaysShow",
name: I18n.tr("options.display-mode.always-show")
},
{
key: "alwaysHide",
name: I18n.tr("options.display-mode.always-hide")
}
ListElement {
key: "alwaysShow"
name: "Always show"
}
ListElement {
key: "alwaysHide"
name: "Always hide"
}
}
]
currentKey: valueDisplayMode
onSelected: key => valueDisplayMode = key
}
@@ -24,20 +24,20 @@ ColumnLayout {
id: labelModeCombo
label: I18n.tr("bar.widget-settings.workspace.label-mode")
model: ListModel {
ListElement {
key: "none"
name: "None"
model: [
{
key: "none",
name: I18n.tr("options.workspace-labels.none")
},
{
key: "index",
name: I18n.tr("options.workspace-labels.index")
},
{
key: "name",
name: I18n.tr("options.workspace-labels.name")
}
ListElement {
key: "index"
name: "Index"
}
ListElement {
key: "name"
name: "Name"
}
}
]
currentKey: widgetData.labelMode || widgetMetadata.labelMode
onSelected: key => labelModeCombo.currentKey = key
minimumWidth: 200 * scaling
+1 -1
View File
@@ -462,7 +462,7 @@ NPanel {
// Close button
NIconButton {
icon: "close"
tooltipText: "Close"
tooltipText: I18n.tr("tooltips.close")
Layout.alignment: Qt.AlignVCenter
onClicked: root.close()
}
+46 -46
View File
@@ -326,24 +326,24 @@ ColumnLayout {
id: audioVisualizerCombo
label: I18n.tr("settings.audio.media.visualizer-type.label")
description: I18n.tr("settings.audio.media.visualizer-type.description")
model: ListModel {
ListElement {
key: "none"
name: "None"
model: [
{
key: "none",
name: I18n.tr("options.visualizer-types.none")
},
{
key: "linear",
name: I18n.tr("options.visualizer-types.linear")
},
{
key: "mirrored",
name: I18n.tr("options.visualizer-types.mirrored")
},
{
key: "wave",
name: I18n.tr("options.visualizer-types.wave")
}
ListElement {
key: "linear"
name: "Linear"
}
ListElement {
key: "mirrored"
name: "Mirrored"
}
ListElement {
key: "wave"
name: "Wave"
}
}
]
currentKey: Settings.data.audio.visualizerType
onSelected: key => Settings.data.audio.visualizerType = key
}
@@ -351,36 +351,36 @@ ColumnLayout {
NComboBox {
label: I18n.tr("settings.audio.media.frame-rate.label")
description: I18n.tr("settings.audio.media.frame-rate.description")
model: ListModel {
ListElement {
key: "30"
name: "30 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")
}
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"
}
}
]
currentKey: Settings.data.audio.cavaFrameRate
onSelected: key => Settings.data.audio.cavaFrameRate = key
}
+1 -1
View File
@@ -36,7 +36,7 @@ ColumnLayout {
})
description: I18n.tr("settings.general.profile.picture.description")
text: Settings.data.general.avatarImage
placeholderText: "/home/user/.face"
placeholderText: I18n.tr("placeholders.profile-picture-path")
buttonIcon: "photo"
buttonTooltip: "Browse for avatar image"
onInputEditingFinished: Settings.data.general.avatarImage = text
+9 -9
View File
@@ -61,16 +61,16 @@ ColumnLayout {
NComboBox {
label: I18n.tr("settings.screen-recorder.video.video-source.label")
description: I18n.tr("settings.screen-recorder.video.video-source.description")
model: ListModel {
ListElement {
key: "portal"
name: "Portal"
model: [
{
key: "portal",
name: I18n.tr("options.screen-recording.sources.portal")
},
{
key: "screen",
name: I18n.tr("options.screen-recording.sources.screen")
}
ListElement {
key: "screen"
name: "Screen"
}
}
]
currentKey: Settings.data.screenRecorder.videoSource
onSelected: key => Settings.data.screenRecorder.videoSource = key
}