mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 10:11:46 +00:00
register translations dict only if addon is already loaded
This commit is contained in:
@@ -264,6 +264,7 @@ class UpdateTranslationsFromPo(bpy.types.Operator):
|
|||||||
temp_po_dir.cleanup()
|
temp_po_dir.cleanup()
|
||||||
|
|
||||||
# update translations in current Blender session
|
# update translations in current Blender session
|
||||||
|
if is_addon_loaded(ADDON_NAME):
|
||||||
bpy.app.translations.unregister(ADDON_NAME)
|
bpy.app.translations.unregister(ADDON_NAME)
|
||||||
addon_module = importlib.import_module(ADDON_NAME)
|
addon_module = importlib.import_module(ADDON_NAME)
|
||||||
translations_module = getattr(addon_module, "translations")
|
translations_module = getattr(addon_module, "translations")
|
||||||
|
|||||||
Reference in New Issue
Block a user