Ghostkeeper
f13db7de10
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.
2016-07-07 13:51:41 +02:00
Ghostkeeper
b5efb2eee8
Make profile translation use new translateSettingName
...
Forgot about this one.
Contributes to issue CURA-844.
2016-07-07 13:51:41 +02:00
Ghostkeeper
39212a601e
Fix import
...
Didn't see this due to the sea of errors that it gives.
Contributes to issue CURA-844.
2016-07-07 13:51:41 +02:00
Ghostkeeper
a87e756a42
Translate machine names
...
Some names might be changed. I know of at least one: ultimaker2plus -> ultimaker2_plus.
Contributes to issue CURA-844.
2016-07-07 13:51:41 +02:00
Ghostkeeper
7f5b656c68
Update translation of metadata
...
A few fields are different now.
Contributes to issue CURA-844.
2016-07-07 13:51:41 +02:00
Ghostkeeper
07b6507133
Fix calls to translateSettings and translateSettingNames
...
They are one module deeper, due to the way that plug-ins are imported by Uranium.
Contributes to issue CURA-844.
2016-07-07 13:46:40 +02:00
Ghostkeeper
24946d3f13
Fix references to exception classes
...
These were moved to VersionUpgrade module.
Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00
Ghostkeeper
6572d939bf
Convert for+if to list comprehension
...
It's a simple filter, so why not?
Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00
Ghostkeeper
f7ca489877
Rename exportTo -> export
...
Because exportTo doesn't make sense if there is no parameter to which we're exporting.
Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00
Ghostkeeper
f2f993916d
Rename import/export functions
...
They no longer mention the version number in their function names. I'd rather have named them import/export but that gave a name clash with Python's 'import' keyword.
Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00
Ghostkeeper
fdf37c2ab0
Codestyle: Start comments with space
...
Forgot this one.
Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00
Ghostkeeper
7ad2fbc95d
Codestyle: Start comments with space
...
We didn't really discuss this one, but apparently it's in PEP8 so I'd better do it.
Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00
Ghostkeeper
cce642a3e1
Extrapolate settings translations
...
It is now in one place. Or rather, two: There is another function to translate only setting names.
Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00
Ghostkeeper
f7be4831b8
Add translation for combing
...
Combing was made into an enum instead of a boolean.
Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00
Ghostkeeper
17f4703337
Fix self parameter
...
It must have access to self to get the values to store in the file.
Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00
Ghostkeeper
149e873eb6
Pass strings to writing configparser
...
When setting fields in configparser, it must be a string. No ints.
Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00
Ghostkeeper
816e94c760
Fix multiple exceptions
...
Turns out that this syntax needs to be surrounded in brackets.
Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00
Ghostkeeper
724f9ce010
Return None if config file wasn't correct
...
This was actually specified in the original function description.
Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00
Ghostkeeper
0d553c10f1
Fix import of SettingsError
...
It is in a submodule.
Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00
Ghostkeeper
9bc5f97902
Implement conversion of profiles 2.1->2.2
...
This works more or less the same as for machine instances. The code was copied from version 2.1 of the unserialise function of profiles, and optimised a bit. The output function is written from scratch. It has some code duplication. Maybe we have to do something about that.
Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00
Ghostkeeper
2f4e63a944
Add boilerplate version upgrade plug-in
...
This plug-in does nothing at the moment. It merely says that it is able to upgrade configuration from version 2.1 to 2.2, but then raises exceptions when you actually try to use it. This is by design. I will now implement the functions that do the conversion.
Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00