mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 15:37:27 -06:00
Add translatable strings to empty and unknown material
Contributes to CL-1160.
This commit is contained in:
parent
70b0d16fa4
commit
4949f39c34
1 changed files with 6 additions and 4 deletions
|
@ -617,7 +617,8 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
||||||
# This can happen if the connected machine has no material in one or more extruders (if GUID is empty), or the
|
# This can happen if the connected machine has no material in one or more extruders (if GUID is empty), or the
|
||||||
# material is unknown to Cura, so we should return an "empty" or "unknown" material model.
|
# material is unknown to Cura, so we should return an "empty" or "unknown" material model.
|
||||||
if material_group_list is None:
|
if material_group_list is None:
|
||||||
material_name = "Empty" if len(material_data.get("guid", "")) == 0 else "Unknown"
|
material_name = i18n_catalog.i18nc("@label:material", "Empty") if len(material_data.get("guid", "")) == 0 \
|
||||||
|
else i18n_catalog.i18nc("@label:material", "Unknown")
|
||||||
return MaterialOutputModel(guid = material_data.get("guid", ""),
|
return MaterialOutputModel(guid = material_data.get("guid", ""),
|
||||||
type = material_data.get("type", ""),
|
type = material_data.get("type", ""),
|
||||||
color = material_data.get("color", ""),
|
color = material_data.get("color", ""),
|
||||||
|
@ -649,7 +650,8 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
||||||
color = material_data["color"]
|
color = material_data["color"]
|
||||||
brand = material_data["brand"]
|
brand = material_data["brand"]
|
||||||
material_type = material_data["material"]
|
material_type = material_data["material"]
|
||||||
name = "Empty" if material_data["material"] == "empty" else "Unknown"
|
name = i18n_catalog.i18nc("@label:material", "Empty") if material_data["material"] == "empty" \
|
||||||
|
else i18n_catalog.i18nc("@label:material", "Unknown")
|
||||||
return MaterialOutputModel(guid = material_data["guid"], type = material_type,
|
return MaterialOutputModel(guid = material_data["guid"], type = material_type,
|
||||||
brand = brand, color = color, name = name)
|
brand = brand, color = color, name = name)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue