mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
open .po directory operator
This commit is contained in:
@@ -297,6 +297,18 @@ class DisableEnableAddon(bpy.types.Operator):
|
|||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
|
class OpenPoDirectory(bpy.types.Operator):
|
||||||
|
bl_idname = "bim.open_po_directory"
|
||||||
|
bl_label = "Open Directory With .po Files"
|
||||||
|
bl_options = set()
|
||||||
|
|
||||||
|
def execute(self, context):
|
||||||
|
import webbrowser
|
||||||
|
|
||||||
|
webbrowser.open(BRANCHES_DIR)
|
||||||
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
class BBIM_PT_translations(bpy.types.Panel):
|
class BBIM_PT_translations(bpy.types.Panel):
|
||||||
bl_label = "BlenderBIM Translations"
|
bl_label = "BlenderBIM Translations"
|
||||||
bl_idname = "BBIM_PT_translations"
|
bl_idname = "BBIM_PT_translations"
|
||||||
@@ -316,6 +328,7 @@ class BBIM_PT_translations(bpy.types.Panel):
|
|||||||
icon="QUIT" if addon_enabled else "PLUGIN",
|
icon="QUIT" if addon_enabled else "PLUGIN",
|
||||||
text="Disable Addon And Restart Blender" if addon_enabled else "Enable Addon")
|
text="Disable Addon And Restart Blender" if addon_enabled else "Enable Addon")
|
||||||
layout.separator()
|
layout.separator()
|
||||||
|
layout.operator("bim.open_po_directory", icon="FILE_FOLDER")
|
||||||
layout.operator("bim.convert_translations_to_po", icon="EXPORT")
|
layout.operator("bim.convert_translations_to_po", icon="EXPORT")
|
||||||
layout.operator("bim.update_translations_from_po", icon="IMPORT")
|
layout.operator("bim.update_translations_from_po", icon="IMPORT")
|
||||||
|
|
||||||
@@ -326,6 +339,7 @@ classes = (
|
|||||||
UpdateTranslationsFromPo,
|
UpdateTranslationsFromPo,
|
||||||
SetupTranslationUI,
|
SetupTranslationUI,
|
||||||
DisableEnableAddon,
|
DisableEnableAddon,
|
||||||
|
OpenPoDirectory,
|
||||||
BBIM_PT_translations,
|
BBIM_PT_translations,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user