WIP: I18n: add per-label translation contexts for nodes #105690

Draft
Damien Picard wants to merge 3 commits from pioverfour/blender:dp_add_i18n_context_socket_label into blender-v3.6-release

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 8 additions and 0 deletions
Showing only changes of commit 29830181ca - Show all commits

View File

@ -251,6 +251,14 @@ PYGETTEXT_KEYWORDS = (() +
tuple(("{}\\((?:[^\"',]+,){{2}}\\s*" + _msg_re + r"\s*(?:\)|,)").format(it)
for it in ("BKE_modifier_set_error",)) +
# Extract messages specific to node sockets declaring labels.
tuple(("{}\\((?:[^\"',]+,)\\s*" + _msg_re + r"\s*\)").format(it)
for it in ("node_sock_label",)) +
# Same as above, but variant with a context.
tuple(("{}\\((?:[^\"',]+,)\\s*" + _msg_re + r"\s*,\s*" + _ctxt_re + r"\s*\)").format(it)
for it in ("node_sock_label",)) +
# This one is a tad more risky, but in practice would not expect a name/uid string parameter
# (the second one in those functions) to ever have a comma in it, so think this is fine.
tuple(("{}\\((?:[^,]+,){{2}}\\s*" + _msg_re + r"\s*(?:\)|,)").format(it)