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