mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
I18n: Improve message extraction for node socket declaration
Node sockets could already be declared using:
```cpp
add_input<decl::<SOCKET TYPE>>("NAME")
```
They can now additionally be declared with:
```cpp
add_input(socket_type, "NAME")
```
This commit adds the later form to the message extraction regex. Since
they are mutually exclusive, they are now in a non-capturing group
with an | operator.
Reported by Ye Gui in #43295.
This commit is contained in:
parent
fb2f5b3a64
commit
4e034b5ecb
1 changed files with 2 additions and 2 deletions
|
|
@ -282,12 +282,12 @@ PYGETTEXT_KEYWORDS = (() +
|
|||
for it in ("modifier_subpanel_register", "gpencil_modifier_subpanel_register")) +
|
||||
|
||||
# Node socket declarations: context-less names.
|
||||
tuple((r"\.{}<decl::.*?>\(\s*" + _msg_re + r"(?:,[^),]+)*\s*\)"
|
||||
tuple((r"\.{}(?:<decl::.*?>\(|[^,]+,)\s*" + _msg_re + r"(?:,[^),]+)*\s*\)"
|
||||
r"(?![^;]*\.translation_context\()").format(it)
|
||||
for it in ("add_input", "add_output")) +
|
||||
|
||||
# Node socket declarations: names with contexts
|
||||
tuple((r"\.{}<decl::.*?>\(\s*" + _msg_re + r"[^;]*\.translation_context\(\s*" + _ctxt_re + r"\s*\)").format(it)
|
||||
tuple((r"\.{}(?:<decl::.*?>\(|[^,]+,)\s*" + _msg_re + r"[^;]*\.translation_context\(\s*" + _ctxt_re + r"\s*\)").format(it)
|
||||
for it in ("add_input", "add_output")) +
|
||||
|
||||
# Node socket declarations: description and error messages
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue