Start of Translations

- This is the start of the translations system, does not yet work as I can't seem to get it to swap languages, I too tired today to fix it but it's a start.
- It also adds properties registration as well.
This commit is contained in:
Yusarina
2024-06-19 02:27:07 +01:00
parent 96d03075c0
commit 01f8363e07
8 changed files with 140 additions and 19 deletions
-4
View File
@@ -13,7 +13,3 @@ else:
for module_name in [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')]:
print("reloading " +module_name)
exec("importlib.reload("+module_name+")")
+19
View File
@@ -0,0 +1,19 @@
import bpy
from ..core.register import register_wrap
from .panel import AvatarToolkitPanel
from ..functions.translations import t
@register_wrap
class AvatarToolkitSettingsPanel(bpy.types.Panel):
bl_label = t("Settings.label")
bl_idname = "OBJECT_PT_avatar_toolkit_settings"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_category = "Avatar Toolkit"
bl_parent_id = "OBJECT_PT_avatar_toolkit"
def draw(self, context):
layout = self.layout
props = context.scene
layout.prop(props, "language")