I18n: translate Repeat Zone in the Add Node menu #110644

Merged
Bastien Montagne merged 1 commits from pioverfour/blender:dp_translate_repeat_zone into main 2023-08-01 18:07:38 +02:00
1 changed files with 2 additions and 7 deletions

View File

@ -62,18 +62,13 @@ def draw_root_assets(layout):
def add_simulation_zone(layout, label):
"""Add simulation zone to a menu."""
target_bl_rna = bpy.types.Node.bl_rna_get_subclass("GeometryNodeSimulationOutput")
if target_bl_rna:
translation_context = target_bl_rna.translation_context
else:
translation_context = i18n_contexts.default
props = layout.operator("node.add_simulation_zone", text=label, text_ctxt=translation_context)
props = layout.operator("node.add_simulation_zone", text=label, text_ctxt=i18n_contexts.default)
props.use_transform = True
return props
def add_repeat_zone(layout, label):
props = layout.operator("node.add_repeat_zone", text=label)
props = layout.operator("node.add_repeat_zone", text=label, text_ctxt=i18n_contexts.default)
props.use_transform = True
return props