Make translatePrinter use dict

A translation dictionary makes it much easier to edit the translations. Also this now just translates one printer, instead of a list.

Contributes to issue CURA-844.
This commit is contained in:
Ghostkeeper 2016-07-03 23:58:38 +02:00
parent b5efb2eee8
commit f13db7de10
2 changed files with 15 additions and 9 deletions

View file

@ -85,7 +85,7 @@ class Profile:
if self._weight:
config.set("general", "weight", self._weight)
if self._machine_type_id:
translated_machine = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translatePrinters([self._machine_type_id])[0]
translated_machine = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translatePrinter(self._machine_type_id)
config.set("general", "definition", translated_machine)
else:
config.set("general", "definition", "fdmprinter")