Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2022-06-01 12:07:01 +0300
committerJaime van Kessel <nallath@gmail.com>2022-06-01 12:07:01 +0300
commite6551821aaf6ab69f2fb4e1f735427506ead22b5 (patch)
tree92debbbddf76c1aecd4bbd605a40b1025c53acf2 /cura/Settings
parent8579a6baf34b7f55e7453112770de041aa2d6380 (diff)
Use intent category if no translation is availableCURA-9297_show_custom_intent_names
Previously we would only accept intents that had a translation. If we could not find one, we would use "unknown" as the intent category. However, we didn't really do this consistently. In some places it would show unkown and in others we'd show the intent type. This should make the behavior the same across the board. It will try to get a translation for the intent category and show that. If it's unable to find that it will use the category instead. Note that it will use the python title function to ensure it has nice capitalisation CURA-9297
Diffstat (limited to 'cura/Settings')
-rwxr-xr-xcura/Settings/MachineManager.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py
index 1c7a8f0e98..9b98179bff 100755
--- a/cura/Settings/MachineManager.py
+++ b/cura/Settings/MachineManager.py
@@ -1611,7 +1611,7 @@ class MachineManager(QObject):
if intent_category != "default":
intent_display_name = IntentCategoryModel.translation(intent_category,
"name",
- catalog.i18nc("@label", "Unknown"))
+ intent_category.title())
display_name = "{intent_name} - {the_rest}".format(intent_name = intent_display_name,
the_rest = display_name)