mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
bbim messages parser to also parse gettext
This commit is contained in:
@@ -32,6 +32,10 @@ from bpy.props import (
|
||||
CollectionProperty,
|
||||
)
|
||||
|
||||
import gettext
|
||||
|
||||
_ = gettext
|
||||
|
||||
|
||||
def get_style_types(self, context):
|
||||
if not StylesData.is_loaded:
|
||||
@@ -88,9 +92,9 @@ def update_shader_graph(self, context):
|
||||
|
||||
|
||||
UV_MODES = [
|
||||
("UV", "UV", "Actual UV data presented on the geometry"),
|
||||
("Generated", "Generated", "Automatically-generated UV from the vertex positions of the mesh"),
|
||||
("Camera", "Camera", "UV from position coordinate in camera space"),
|
||||
("UV", "UV", _("Actual UV data presented on the geometry")),
|
||||
("Generated", "Generated", _("Automatically-generated UV from the vertex positions of the mesh")),
|
||||
("Camera", "Camera", _("UV from position coordinate in camera space")),
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@ def blenderbim_strings_parse(addon_directory=None, po_directory=None):
|
||||
r'Property\(.*?name\s*=\s*"(.*?)"', # property names
|
||||
r'report\(\{.*?\}\s*,\s*"(.*?)"', # operator reports
|
||||
r'info\(\{.*?\}\s*,\s*"(.*?)"', # operator info
|
||||
r'\b_\("(.*?)"\)' # gettext called with `_`
|
||||
]
|
||||
regexes = [re.compile(pattern) for pattern in patterns]
|
||||
matched_dict: Dict[str, Message] = dict()
|
||||
|
||||
Reference in New Issue
Block a user