UI side Translations complete

This commit is contained in:
Yusarina
2024-07-25 02:46:13 +01:00
parent 05cc6c830c
commit b6beae7ba1
7 changed files with 103 additions and 93 deletions
+80 -59
View File
@@ -1,63 +1,84 @@
{
"authors": ["Avatar Toolkit Team"],
"messages": {
"Language.auto": "Automatic",
"Language.en_US": "English",
"Language.ja_JP": "日本語",
"Quick_Access.label": "Quick Access",
"Quick_Access.import_export.label": "Import/Export",
"Quick_Access.options": "Quick Access Options",
"Quick_Access.import_menu.label": "Import Menu",
"Quick_Access.import": "Import",
"Quick_Access.export": "Export",
"Quick_Access.import_menu.desc": "Import a Model",
"Quick_Access.import_pmx": "Import PMX",
"Quick_Access.import_pmx.desc": "Import MMD PMX Model",
"Quick_Access.import_pmd": "Import PMD",
"Quick_Access.import_pmd.desc": "Import MMD PMD Model",
"Quick_Access.export_menu.label": "Export Menu",
"Quick_Access.select_export.label": "Select Export Method",
"Quick_Access.select_export_resonite.label": "Resonite",
"Export.resonite.label": "Export to Resonite",
"Export.resonite.desc": "Export a GLB with all animations and materials. For animation data see:",
"Optimization.label": "Optimization",
"Optimization.options.label": "Optimization Options",
"Optimization.combine_materials.label": "Combine Materials",
"Optimization.combine_materials.desc": "Combine similar materials to optimize the model",
"Optimization.join_all_meshes.label": "Join All Meshes",
"Optimization.join_all_meshes.desc": "Join all meshes into one",
"Optimization.join_selected_meshes.label": "Join Selected Mehses",
"Optimization.join_selected_meshes.desc": "Join all currntly Selected Mehses into one",
"Tools.tools_title.label": "Tools",
"Tools.convert_to_resonite.label": "Convert to Resonite",
"Tools.convert_to_resonite.desc": "Converts bone names on a model to names compatable with Resonite",
"VisemePanel.label": "Visemes",
"VisemePanel.error.noMesh": "No mesh selected",
"VisemePanel.error.noShapekeys": "Selected mesh has no shape keys",
"VisemePanel.info.selectMesh": "Select a mesh to create visemes",
"VisemePanel.mouth_a.label": "Mouth A",
"VisemePanel.mouth_o.label": "Mouth O",
"VisemePanel.mouth_ch.label": "Mouth CH",
"AutoVisemeButton.label": "Create Visemes",
"AutoVisemeButton.desc": "Create visemes automatically, based on shape keys",
"AutoVisemeButton.error.noShapekeys": "No shape keys found",
"AutoVisemeButton.error.selectShapekeys": "Please Select shape keys",
"AutoVisemeButton.success": "Visemes created successfully",
"Settings.translation_restart_popup.label": "Translation Update",
"Settings.label": "Settings",
"Settings.language.label": "Language",
"Settings.language.desc": "Select the language for the addon's UI",
"Settings.translation_restart_popup.description": "Information about translation updates",
"Settings.translation_restart_popup.message1": "Some translations may not apply",
"Settings.translation_restart_popup.message2": "until you restart Blender.",
"Importing.need_importer":"You do not have the required importer for the {extension} type! Opening web browser for importer search term...",
"Importer.mmd_anim_importer.label":"MMD Animation",
"Importer.mmd_anim_importer.desc":"Import a MMD Animation (.vmd)",
"Importing.importer_search_term":"https://search.brave.com/search?q=blender+{extension}+importer+addon&source=web",
"Importer.export_resonite.label":"Export to Resonite",
"Importer.export_resonite.desc":"Export to Resonite as a GLTF. Make sure your model is to scale in blender, and import as meters in Resonite.",
"Importer.export_vrchat.label":"Export to VRChat",
"Importer.export_vrchat.desc":"Export to VRChat, may also work for ChilloutVR. Is similar to Cats export."
}
"Language.auto": "Automatic",
"Language.en_US": "English",
"Language.ja_JP": "日本語",
"AvatarToolkit.label": "Avatar Toolkit",
"AvatarToolkit.welcome": "Welcome to Avatar Toolkit, a tool for",
"AvatarToolkit.description": "creating and editing avatars in blender,",
"AvatarToolkit.alpha_warning": "This is an early alpha version, so expect bugs and issues.",
"Quick_Access.label": "Quick Access",
"Quick_Access.import_export.label": "Import/Export",
"Quick_Access.options": "Quick Access Options",
"Quick_Access.import_menu.label": "Import Menu",
"Quick_Access.import": "Import",
"Quick_Access.export": "Export",
"Quick_Access.import_menu.desc": "Import a Model",
"Quick_Access.import_pmx": "Import PMX",
"Quick_Access.import_pmx.desc": "Import MMD PMX Model",
"Quick_Access.import_pmd": "Import PMD",
"Quick_Access.import_pmd.desc": "Import MMD PMD Model",
"Quick_Access.export_menu.label": "Export Menu",
"Quick_Access.select_export.label": "Select Export Method",
"Quick_Access.select_export_resonite.label": "Resonite",
"Quick_Access.export_fbx.label": "Export FBX",
"Quick_Access.export_fbx.desc": "Export the model as FBX",
"Export.resonite.label": "Export to Resonite",
"Export.resonite.desc": "Export a GLB with all animations and materials. For animation data see:",
"Optimization.label": "Optimization",
"Optimization.options.label": "Optimization Options",
"Optimization.combine_materials.label": "Combine Materials",
"Optimization.combine_materials.desc": "Combine similar materials to optimize the model",
"Optimization.join_all_meshes.label": "Join All Meshes",
"Optimization.join_all_meshes.desc": "Join all meshes into one",
"Optimization.join_selected_meshes.label": "Join Selected Meshes",
"Optimization.join_selected_meshes.desc": "Join all currently Selected Meshes into one",
"Optimization.remove_doubles_safely.label": "Remove Doubles Safely",
"Optimization.select_armature": "Please select an armature in Quick Access",
"Tools.label": "Tools",
"Tools.tools_title.label": "Tools",
"Tools.convert_to_resonite.label": "Convert to Resonite",
"Tools.convert_to_resonite.desc": "Converts bone names on a model to names compatible with Resonite",
"Tools.remove_doubles_safely.label": "Remove Doubles Safely",
"Tools.create_digitigrade_legs.label": "Create Digitigrade Legs",
"Tools.select_armature": "Please select an armature in Quick Access",
"TextureAtlas.label": "Texture Atlasing",
"TextureAtlas.material_list_label": "Texture Atlas Material List Material",
"TextureAtlas.reload_list": "Reload Texture Atlas Material List",
"TextureAtlas.loaded_list": "Loaded Texture Atlas Material List",
"TextureAtlas.atlas_materials": "Atlas Materials!",
"VisemePanel.label": "Visemes",
"VisemePanel.select_mesh": "Select Mesh",
"VisemePanel.mouth_a.label": "Mouth A",
"VisemePanel.mouth_o.label": "Mouth O",
"VisemePanel.mouth_ch.label": "Mouth CH",
"VisemePanel.shape_intensity": "Shape Intensity",
"VisemePanel.create_visemes": "Create Visemes",
"VisemePanel.error.noMesh": "No mesh selected",
"VisemePanel.error.noShapekeys": "Selected mesh has no shape keys",
"VisemePanel.error.selectMesh": "Select a mesh to create visemes",
"VisemePanel.error.noArmature": "No armature selected",
"VisemePanel.info.selectMesh": "Select a mesh to create visemes",
"AutoVisemeButton.label": "Create Visemes",
"AutoVisemeButton.desc": "Create visemes automatically, based on shape keys",
"AutoVisemeButton.error.noShapekeys": "No shape keys found",
"AutoVisemeButton.error.selectShapekeys": "Please Select shape keys",
"AutoVisemeButton.success": "Visemes created successfully",
"Settings.label": "Settings",
"Settings.language.label": "Language",
"Settings.language.desc": "Select the language for the addon's UI",
"Settings.translation_restart_popup.label": "Translation Update",
"Settings.translation_restart_popup.description": "Information about translation updates",
"Settings.translation_restart_popup.message1": "Some translations may not apply",
"Settings.translation_restart_popup.message2": "until you restart Blender.",
"Importing.need_importer": "You do not have the required importer for the {extension} type! Opening web browser for importer search term...",
"Importer.mmd_anim_importer.label": "MMD Animation",
"Importer.mmd_anim_importer.desc": "Import a MMD Animation (.vmd)",
"Importing.importer_search_term": "https://search.brave.com/search?q=blender+{extension}+importer+addon&source=web",
"Importer.export_resonite.label": "Export to Resonite",
"Importer.export_resonite.desc": "Export to Resonite as a GLTF. Make sure your model is to scale in blender, and import as meters in Resonite.",
"Importer.export_vrchat.label": "Export to VRChat",
"Importer.export_vrchat.desc": "Export to VRChat, may also work for ChilloutVR. Is similar to Cats export."
}
}
+5 -15
View File
@@ -4,7 +4,7 @@ from ..core.register import register_wrap
from .panel import AvatarToolkitPanel
from ..core.common import SceneMatClass, material_list_bool
from ..functions.atlas_materials import Atlas_Materials
from ..functions.translations import t
@register_wrap
class ExpandSection_Materials(Operator):
@@ -16,9 +16,7 @@ class ExpandSection_Materials(Operator):
def poll(cls, context: Context) -> bool:
return True
def execute(self, context: Context) -> set:
if not context.scene.texture_atlas_Has_Mat_List_Shown:
context.scene.materials.clear()
newlist: list[Material] = []
@@ -37,14 +35,12 @@ class ExpandSection_Materials(Operator):
@register_wrap
class MaterialTextureAtlasProperties(UIList):
bl_label = "Texture Atlas Material List Material"
bl_label = t("TextureAtlas.material_list_label")
bl_idname = "Material_UL_avatar_toolkit_texture_atlas_mat_list_mat"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
def draw_item(self , context: Context, layout: UILayout, data: bpy.types.Object, item:SceneMatClass, icon, active_data, active_propname, index):
if context.scene.texture_atlas_Has_Mat_List_Shown:
box = layout.box()
row = box.row()
@@ -62,12 +58,9 @@ class MaterialTextureAtlasProperties(UIList):
col = box.row()
col.prop(item.mat, "texture_atlas_roughness")
@register_wrap
class TextureAtlasPanel(Panel):
bl_label = "Texture Atlasing"
bl_label = t("TextureAtlas.label")
bl_idname = "OBJECT_PT_avatar_toolkit_texture_atlas"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
@@ -81,13 +74,10 @@ class TextureAtlasPanel(Panel):
boxoutter = row.box()
direction_icon = 'RIGHTARROW' if not context.scene.texture_atlas_Has_Mat_List_Shown else 'DOWNARROW_HLT'
row = boxoutter.row()
row.operator(ExpandSection_Materials.bl_idname, text=("Reload Texture Atlas Material List" if not context.scene.texture_atlas_Has_Mat_List_Shown else "Loaded Texture Atlas Material List"), icon=direction_icon)
row.operator(ExpandSection_Materials.bl_idname, text=(t("TextureAtlas.reload_list") if not context.scene.texture_atlas_Has_Mat_List_Shown else t("TextureAtlas.loaded_list")), icon=direction_icon)
if context.scene.texture_atlas_Has_Mat_List_Shown:
#get_texture_node_list(bpy.context)
row = boxoutter.row()
row.template_list(MaterialTextureAtlasProperties.bl_idname, 'material_list', context.scene, 'materials',
context.scene, 'texture_atlas_material_index', rows=12, type='DEFAULT')
row = layout.row()
row.operator(Atlas_Materials.bl_idname, text="Atlas Materials!")
row.operator(Atlas_Materials.bl_idname, text=t("TextureAtlas.atlas_materials"))
+3 -2
View File
@@ -31,6 +31,7 @@ class AvatarToolkitOptimizationPanel(bpy.types.Panel):
row.scale_y = 1.2
row.operator("avatar_toolkit.join_all_meshes", text=t("Optimization.join_all_meshes.label"))
row.operator("avatar_toolkit.join_selected_meshes", text=t("Optimization.join_selected_meshes.label"))
row.operator("avatar_toolkit.remove_doubles_safely", text="Remove Doubles Safely")
row.operator("avatar_toolkit.remove_doubles_safely", text=t("Optimization.remove_doubles_safely.label"))
else:
layout.label(text="Please select an armature in Quick Access")
layout.label(text=t("Optimization.select_armature"))
+4 -5
View File
@@ -4,7 +4,7 @@ from ..functions.translations import t
@register_wrap
class AvatarToolkitPanel(bpy.types.Panel):
bl_label = "Avatar Toolkit"
bl_label = t("AvatarToolkit.label")
bl_idname = "OBJECT_PT_avatar_toolkit"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
@@ -12,9 +12,8 @@ class AvatarToolkitPanel(bpy.types.Panel):
def draw(self, context):
layout = self.layout
layout.label(text="Welcome to Avatar Toolkit, a tool for")
layout.label(text="creating and editing avatars in blender,")
layout.label(text="This is an early alpha version, so expect")
layout.label(text="bugs and issues.")
layout.label(text=t("AvatarToolkit.welcome"))
layout.label(text=t("AvatarToolkit.description"))
layout.label(text=t("AvatarToolkit.alpha_warning"))
#print("Avatar Toolkit Panel is being drawn")
+4 -3
View File
@@ -56,15 +56,16 @@ class AVATAR_TOOLKIT_OT_export_menu(bpy.types.Operator):
layout = self.layout
layout.label(text=t("Quick_Access.select_export.label"))
layout.operator("avatar_toolkit.export_resonite", text=t("Quick_Access.select_export_resonite.label"))
layout.operator("avatar_toolkit.export_fbx", text="Export FBX")
layout.operator("avatar_toolkit.export_fbx", text=t("Quick_Access.export_fbx.label"))
@register_wrap
class AVATAR_TOOLKIT_OT_export_fbx(bpy.types.Operator):
bl_idname = 'avatar_toolkit.export_fbx'
bl_label = "Export FBX"
bl_description = "Export the model as FBX"
bl_label = t("Quick_Access.export_fbx.label")
bl_description = t("Quick_Access.export_fbx.desc")
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
def execute(self, context):
bpy.ops.export_scene.fbx('INVOKE_DEFAULT')
return {'FINISHED'}
+4 -4
View File
@@ -8,7 +8,7 @@ from ..core.common import get_selected_armature
@register_wrap
class AvatarToolkitToolsPanel(bpy.types.Panel):
bl_label = "Tools"
bl_label = t("Tools.label")
bl_idname = "OBJECT_PT_avatar_toolkit_tools"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
@@ -28,8 +28,8 @@ class AvatarToolkitToolsPanel(bpy.types.Panel):
row.scale_y = 1.5
row.operator("avatar_toolkit.convert_to_resonite", text=t("Tools.convert_to_resonite.label"))
row = layout.row(align=True)
row.operator("avatar_toolkit.remove_doubles_safely", text="Remove Doubles Safely")
row.operator("avatar_toolkit.remove_doubles_safely", text=t("Tools.remove_doubles_safely.label"))
row = layout.row(align=True)
row.operator(CreateDigitigradeLegs.bl_idname, text="Create Digitigrade Legs")
row.operator(CreateDigitigradeLegs.bl_idname, text=t("Tools.create_digitigrade_legs.label"))
else:
layout.label(text="Please select an armature in Quick Access")
layout.label(text=t("Tools.select_armature"))
+3 -5
View File
@@ -18,7 +18,7 @@ class AvatarToolkitVisemePanel(bpy.types.Panel):
armature = get_selected_armature(context)
if armature:
layout.prop(context.scene, "selected_mesh", text="Select Mesh")
layout.prop(context.scene, "selected_mesh", text=t("VisemePanel.select_mesh"))
mesh = bpy.data.objects.get(context.scene.selected_mesh)
if mesh and mesh.type == 'MESH':
@@ -27,9 +27,9 @@ class AvatarToolkitVisemePanel(bpy.types.Panel):
layout.prop_search(context.scene, "mouth_o", mesh.data.shape_keys, "key_blocks", text=t('VisemePanel.mouth_o.label'))
layout.prop_search(context.scene, "mouth_ch", mesh.data.shape_keys, "key_blocks", text=t('VisemePanel.mouth_ch.label'))
layout.prop(context.scene, 'shape_intensity')
layout.prop(context.scene, 'shape_intensity', text=t('VisemePanel.shape_intensity'))
layout.operator("avatar_toolkit.create_visemes", icon='TRIA_RIGHT')
layout.operator("avatar_toolkit.create_visemes", text=t('VisemePanel.create_visemes'), icon='TRIA_RIGHT')
else:
layout.label(text=t('VisemePanel.error.noShapekeys'), icon='ERROR')
else:
@@ -39,5 +39,3 @@ class AvatarToolkitVisemePanel(bpy.types.Panel):
layout.separator()
layout.label(text=t('VisemePanel.info.selectMesh'))