Translation Popup now added.

Due to some werid thing in Blender 4.2+ where we just can't get descriptions to translate, we now tell the user some translations won't apply unto restart.
This commit is contained in:
Yusarina
2024-07-22 01:56:22 +01:00
parent cce7e986bb
commit ee84ae640a
5 changed files with 43 additions and 5 deletions
+4 -2
View File
@@ -87,8 +87,10 @@ def update_language(self, context):
print(f"Updating language to: {self.avatar_toolkit_language}") # Debug print
save_preference("language", int(self.avatar_toolkit_language))
load_translations()
# Reload the addon
bpy.ops.script.reload()
# Set a flag to indicate that a language change has occurred
context.scene.avatar_toolkit_language_changed = True
# Show popup after language change
bpy.ops.avatar_toolkit.translation_restart_popup('INVOKE_DEFAULT')
# Initial load of translations
print("Performing initial load of translations") # Debug print