From c71148321ae3dafecc6da1cacff9c7fae2441af3 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 21 Mar 2025 15:26:43 +0100 Subject: [PATCH] Translate settings values in recommended screen CURA-11911 For settings inside the screen, they are translated through the SettingDefinitionModel, but we don't use one here, so we have to translate it explicitely --- resources/qml/Widgets/SingleSettingComboBox.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/qml/Widgets/SingleSettingComboBox.qml b/resources/qml/Widgets/SingleSettingComboBox.qml index d917dc2753..d627efd2a9 100644 --- a/resources/qml/Widgets/SingleSettingComboBox.qml +++ b/resources/qml/Widgets/SingleSettingComboBox.qml @@ -12,7 +12,8 @@ import Cura 1.7 as Cura // All of the setting updating logic is handled by this component. // This uses the "options" value of a setting to populate the drop down. This will only work for settings with "options" // If the setting is limited to a single extruder or is settable with different values per extruder use "updateAllExtruders: true" -Cura.ComboBox { +Cura.ComboBox +{ textRole: "text" property alias settingName: propertyProvider.key property alias propertyRemoveUnusedValue: propertyProvider.removeUnusedValue @@ -23,6 +24,8 @@ Cura.ComboBox { // This is only used if updateAllExtruders == true property int defaultExtruderIndex: Cura.ExtruderManager.activeExtruderIndex + UM.I18nCatalog { id: settings_catalog; name: "fdmprinter.def.json" } + model: ListModel { id: comboboxModel @@ -42,6 +45,7 @@ Cura.ComboBox { { var key = propertyProvider.properties["options"].keys()[i] var value = propertyProvider.properties["options"][key] + value = settings_catalog.i18nc(settingName + " option " + key, value) comboboxModel.append({ text: value, code: key}) if (propertyProvider.properties.value === key)