I18n: fix UI layout operator context extraction

Some operator layout buttons with custom text did not get the proper
context: they'd get * instead of Operator.

This was probably never noticed because the only operator that
actually had this issue was Import Images as Planes in the Add menu.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D15993
This commit is contained in:
Damien Picard
2022-11-15 12:03:18 +01:00
committed by Bastien Montagne
parent 9795f2645c
commit 337dbb1ab0

View File

@@ -570,7 +570,7 @@ def dump_py_messages_from_files(msgs, reports, files, settings):
bag = extract_strings_split(node)
opname, _ = bag[0]
if not opname:
return i18n_contexts.default
return i18n_contexts.operator_default
op = bpy.ops
for n in opname.split('.'):
op = getattr(op, n)