mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Sync translation category name from JSON
The category was named 'translation' instead of 'translations'. Contributes to issue CURA-37.
This commit is contained in:
parent
644038af97
commit
6bde0e3404
1 changed files with 3 additions and 3 deletions
|
@ -81,10 +81,10 @@ class LegacyProfileReader(ProfileReader):
|
|||
Logger.log("e", "Could not parse DictionaryOfDoom.json: %s", str(e))
|
||||
return None
|
||||
|
||||
if "translations" not in dict_of_doom:
|
||||
Logger.log("e", "Dictionary of Doom has no translations. Is it the correct JSON file?")
|
||||
if "translation" not in dict_of_doom:
|
||||
Logger.log("e", "Dictionary of Doom has no translation. Is it the correct JSON file?")
|
||||
return None
|
||||
for new_setting, old_setting_expression in dict_of_doom["translations"]: #Evaluate all new settings that would get a value from the translations.
|
||||
for new_setting, old_setting_expression in dict_of_doom["translation"]: #Evaluate all new settings that would get a value from the translations.
|
||||
compiled = compile(old_setting_expression, new_setting, "eval")
|
||||
new_value = eval(compiled, {}, legacy_settings) #Pass the legacy settings as local variables to allow access to in the evaluation.
|
||||
profile.setSettingValue(new_setting, new_value) #Store the setting in the profile!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue