From 22f339037a17cfe3792322fd6c0d06fce80d80bf Mon Sep 17 00:00:00 2001 From: Damien Picard Date: Tue, 7 Oct 2025 17:28:51 +0200 Subject: [PATCH] I18n: Translate node tree subtypes In 73fcbaf7c4, the `node_tree_sub_type` enum was given a custom item function. The items now need to be extracted manually. In addition, the translation context for this property, "ID", was removed since it was not useful at a glance, and likely added by mistake. Reported by Ye Gui in #43295. --- source/blender/makesrna/intern/rna_space.cc | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/source/blender/makesrna/intern/rna_space.cc b/source/blender/makesrna/intern/rna_space.cc index c15a114d3f0..446d526e6c7 100644 --- a/source/blender/makesrna/intern/rna_space.cc +++ b/source/blender/makesrna/intern/rna_space.cc @@ -2678,13 +2678,13 @@ static const EnumPropertyItem *rna_SpaceNodeEditor_node_tree_sub_type_itemf( {SNODE_GEOMETRY_MODIFIER, "MODIFIER", ICON_MODIFIER_DATA, - "Modifier", - "Edit node group from active object's active modifier"}, + N_("Modifier"), + N_("Edit node group from active object's active modifier")}, {SNODE_GEOMETRY_TOOL, "TOOL", ICON_TOOL_SETTINGS, - "Tool", - "Edit any geometry node group for use as an operator"}, + N_("Tool"), + N_("Edit any geometry node group for use as an operator")}, {0, nullptr, 0, nullptr, nullptr}, }; @@ -2692,13 +2692,13 @@ static const EnumPropertyItem *rna_SpaceNodeEditor_node_tree_sub_type_itemf( {SNODE_COMPOSITOR_SCENE, "SCENE", ICON_SCENE_DATA, - "Scene", - "Edit compositing node group for the current scene"}, + N_("Scene"), + N_("Edit compositing node group for the current scene")}, {SNODE_COMPOSITOR_SEQUENCER, "SEQUENCER", ICON_SEQUENCE, - "Sequencer", - "Edit compositing node group for Sequencer strip modifiers"}, + N_("Sequencer"), + N_("Edit compositing node group for Sequencer strip modifiers")}, {0, nullptr, 0, nullptr, nullptr}, }; @@ -8117,7 +8117,6 @@ static void rna_def_space_node(BlenderRNA *brna) RNA_def_property_enum_funcs( prop, nullptr, nullptr, "rna_SpaceNodeEditor_node_tree_sub_type_itemf"); RNA_def_property_ui_text(prop, "Node Tree Sub-Type", ""); - RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_ID); RNA_def_property_update( prop, NC_SPACE | ND_SPACE_NODE, "rna_SpaceNodeEditor_node_tree_sub_type_update");