mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 23:16:06 +08:00
Get translation from list of keys rather than items
Because the category is not in a list of tuples. It's just the key of the dict. Contributes to issue CURA-6597.
This commit is contained in:
parent
a6e3828eaa
commit
0047874f03
@ -58,6 +58,6 @@ class IntentCategoryModel(ListModel):
|
|||||||
result.append({
|
result.append({
|
||||||
"name": self.name_translation.get(category, catalog.i18nc("@label", "Unknown")),
|
"name": self.name_translation.get(category, catalog.i18nc("@label", "Unknown")),
|
||||||
"intent_category": category,
|
"intent_category": category,
|
||||||
"weight": list(self.name_translation.items()).index(category)
|
"weight": list(self.name_translation.keys()).index(category)
|
||||||
})
|
})
|
||||||
super().update(result)
|
super().update(result)
|
Loading…
x
Reference in New Issue
Block a user