[Bf-blender-cvs] [9b2d6823947] master: I18n: fix popup menus context

Damien Picard noreply at git.blender.org
Mon Oct 10 13:02:55 CEST 2022


Commit: 9b2d6823947b966de0bdb8f67ec97694a1d6952a
Author: Damien Picard
Date:   Mon Oct 10 13:01:13 2022 +0200
Branches: master
https://developer.blender.org/rB9b2d6823947b966de0bdb8f67ec97694a1d6952a

I18n: fix popup menus context

When calling `wm.call_menu_pie` and `wm.call_menu`, the menu context
was ignored when showing its name in the header or pie menu center.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D16195

===================================================================

M	source/blender/editors/interface/interface_region_menu_pie.cc
M	source/blender/editors/interface/interface_region_menu_popup.cc

===================================================================

diff --git a/source/blender/editors/interface/interface_region_menu_pie.cc b/source/blender/editors/interface/interface_region_menu_pie.cc
index 9dd6f95e190..f443dd43a3a 100644
--- a/source/blender/editors/interface/interface_region_menu_pie.cc
+++ b/source/blender/editors/interface/interface_region_menu_pie.cc
@@ -222,7 +222,7 @@ int UI_pie_menu_invoke(struct bContext *C, const char *idname, const wmEvent *ev
     return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH);
   }
 
-  pie = UI_pie_menu_begin(C, IFACE_(mt->label), ICON_NONE, event);
+  pie = UI_pie_menu_begin(C, CTX_IFACE_(mt->translation_context, mt->label), ICON_NONE, event);
   layout = UI_pie_menu_layout(pie);
 
   UI_menutype_draw(C, mt, layout);
diff --git a/source/blender/editors/interface/interface_region_menu_popup.cc b/source/blender/editors/interface/interface_region_menu_popup.cc
index f88cabb2b70..f2057c9f5e8 100644
--- a/source/blender/editors/interface/interface_region_menu_popup.cc
+++ b/source/blender/editors/interface/interface_region_menu_popup.cc
@@ -559,7 +559,7 @@ int UI_popup_menu_invoke(bContext *C, const char *idname, ReportList *reports)
     return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH);
   }
 
-  pup = UI_popup_menu_begin(C, IFACE_(mt->label), ICON_NONE);
+  pup = UI_popup_menu_begin(C, CTX_IFACE_(mt->translation_context, mt->label), ICON_NONE);
   layout = UI_popup_menu_layout(pup);
 
   UI_menutype_draw(C, mt, layout);



More information about the Bf-blender-cvs mailing list