auto enable "Manage UI Translations" addon if it's not enabled

This commit is contained in:
Andrej730
2024-01-16 17:34:24 +05:00
parent 1112b102f7
commit ba6ba29da8
@@ -177,7 +177,8 @@ class SetupTranslationUI(bpy.types.Operator):
def execute(self, context):
if not is_addon_loaded("ui_translate"):
raise Exception('"Manage UI translations" addon is not enabled')
addon_utils.enable("ui_translate", default_set=True)
self.report({"INFO"}, '"Manage UI translations" addon was not enabled, it\'s enabled now.')
addon_prefs = context.preferences.addons["ui_translate"].preferences