From 90e2dfd2e326a51260dbf9e1d6a0cf918028d8c3 Mon Sep 17 00:00:00 2001 From: Damien Picard Date: Tue, 14 Oct 2025 17:12:42 +0200 Subject: [PATCH] I18n: Translate dynamic operator descriptions The descriptions for `POSELIB_OT_asset_modify` and `GEOMETRY_OT_execute_node_group` are dynamic. They were already extracted, but the translation did not happen in the description function. This commit adds the appropriate `TIP_` translation macro. Reported by Ye Gui in #43295. --- source/blender/editors/animation/anim_asset_ops.cc | 2 +- source/blender/editors/space_node/node_sync_sockets.cc | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/source/blender/editors/animation/anim_asset_ops.cc b/source/blender/editors/animation/anim_asset_ops.cc index aa7c4aa3d46..9f8b93b39a1 100644 --- a/source/blender/editors/animation/anim_asset_ops.cc +++ b/source/blender/editors/animation/anim_asset_ops.cc @@ -708,7 +708,7 @@ static std::string pose_asset_modify_description(bContext * /* C */, PointerRNA *ptr) { const int mode = RNA_enum_get(ptr, "mode"); - return std::string(prop_asset_overwrite_modes[mode].description); + return TIP_(std::string(prop_asset_overwrite_modes[mode].description)); } /* Calling it overwrite instead of save because we aren't actually saving an opened asset. */ diff --git a/source/blender/editors/space_node/node_sync_sockets.cc b/source/blender/editors/space_node/node_sync_sockets.cc index 6d08070c1bd..f84991b07f7 100644 --- a/source/blender/editors/space_node/node_sync_sockets.cc +++ b/source/blender/editors/space_node/node_sync_sockets.cc @@ -18,6 +18,8 @@ #include "BKE_node_runtime.hh" #include "BKE_node_tree_update.hh" +#include "BLT_translation.hh" + #include "ED_node.hh" #include "ED_screen.hh" @@ -80,12 +82,12 @@ static std::string sockets_sync_get_description(bContext *C, wmOperatorType *ot, { Vector nodes_to_sync = get_nodes_to_sync(*C, ptr); if (nodes_to_sync.size() != 1) { - return ot->description; + return TIP_(ot->description); } const bNode &node = *nodes_to_sync.first(); std::string description = nodes::sync_node_description_get(*C, node); if (description.empty()) { - return ot->description; + return TIP_(ot->description); } return description; }