mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-18 04:07:57 -06: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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue