plugins/colorblindnesscorrection: set translation domain in config ui

By default the translation domain of KQuickManagedConfigModule is the
unique identifier within the namespace of the plugin, but those i18n
strings belong to kwin.po.
This commit is contained in:
Fushan Wen 2024-02-15 00:08:41 +08:00
parent f650ebe2fc
commit f303ba4b59
No known key found for this signature in database
GPG key ID: 2E48D1487C91DCAA

View file

@ -29,10 +29,10 @@ KCM.SimpleKCM {
Repeater {
model: [
{ name: i18n("Red"), colors: ["Red", "Orange", "Yellow"] },
{ name: i18n("Green"), colors: ["Green", "LimeGreen", "Lime"] },
{ name: i18n("Blue"), colors: ["Blue", "DeepSkyBlue", "Aqua"] },
{ name: i18n("Purple"), colors: ["Purple", "Fuchsia", "Violet"] },
{ name: i18nd("kwin", "Red"), colors: ["Red", "Orange", "Yellow"] },
{ name: i18nd("kwin", "Green"), colors: ["Green", "LimeGreen", "Lime"] },
{ name: i18nd("kwin", "Blue"), colors: ["Blue", "DeepSkyBlue", "Aqua"] },
{ name: i18nd("kwin", "Purple"), colors: ["Purple", "Fuchsia", "Violet"] },
]
delegate: Column {
@ -68,21 +68,21 @@ KCM.SimpleKCM {
QQC.ComboBox {
id: colorComboBox
Kirigami.FormData.label: i18nc("@label", "Mode:")
Kirigami.FormData.label: i18ndc("kwin", "@label", "Mode:")
currentIndex: kcm.settings.mode
textRole: "text"
valueRole: "value"
model: [
{ value: 0, text: i18nc("@option", "Protanopia (red weak)") },
{ value: 1, text: i18nc("@option", "Deuteranopia (green weak)") },
{ value: 2, text: i18nc("@option", "Tritanopia (blue-yellow)") },
{ value: 0, text: i18ndc("kwin", "@option", "Protanopia (red weak)") },
{ value: 1, text: i18ndc("kwin", "@option", "Deuteranopia (green weak)") },
{ value: 2, text: i18ndc("kwin", "@option", "Tritanopia (blue-yellow)") },
]
onActivated: kcm.settings.mode = currentValue
}
QQC.Slider {
Kirigami.FormData.label: i18nc("@label", "Intensity:")
Kirigami.FormData.label: i18ndc("kwin", "@label", "Intensity:")
Layout.preferredWidth: colorComboBox.implicitWidth
from: 0.0
to: 1.0