Merge branch '4.4' into translations_4.4

This commit is contained in:
Remco Burema 2019-11-19 11:54:08 +01:00
commit 5cae2fd098
No known key found for this signature in database
GPG key ID: 215C49431D43F98C
14 changed files with 107 additions and 34 deletions

View file

@ -1,9 +1,10 @@
#Copyright (c) 2019 Ultimaker B.V.
#Cura is released under the terms of the LGPLv3 or higher.
from PyQt5.QtCore import Qt, QTimer
import collections
from PyQt5.QtCore import Qt, QTimer
from typing import TYPE_CHECKING, Optional, Dict
from cura.Machines.Models.IntentTranslations import intent_translations
from cura.Machines.Models.IntentModel import IntentModel
from cura.Settings.IntentManager import IntentManager
@ -53,7 +54,6 @@ class IntentCategoryModel(ListModel):
}
return cls._translations
## Creates a new model for a certain intent category.
# \param The category to list the intent profiles for.
def __init__(self, intent_category: str) -> None:
@ -110,7 +110,7 @@ class IntentCategoryModel(ListModel):
result.sort(key = lambda k: k["weight"])
self.setItems(result)
## Get a display value for a category. See IntenCategoryModel._translations
## Get a display value for a category.
## for categories and keys
@staticmethod
def translation(category: str, key: str, default: Optional[str] = None):