I18n: Translate "Hide Hotkey List" in Node Wrangler preferences

The button used a custom text that could be the same as the default,
properly extracted text ("Show Hotkey Text"), or a different
one ("Hide Hotkey Text"), and was thus not always shown.

Reported by Ye Gui in #43295.
This commit is contained in:
Damien Picard
2025-10-07 13:31:18 +02:00
committed by Bastien Montagne
parent b9401637c8
commit 09f9edb38c

View File

@@ -139,10 +139,8 @@ class NWNodeWrangler(bpy.types.AddonPreferences):
box = layout.box()
col = box.column(align=True)
hotkey_button_name = "Show Hotkey List"
if self.show_hotkey_list:
hotkey_button_name = "Hide Hotkey List"
col.prop(self, "show_hotkey_list", text=hotkey_button_name, toggle=True)
hotkey_button_name = iface_("Show Hotkey List") if self.show_hotkey_list else iface_("Hide Hotkey List")
col.prop(self, "show_hotkey_list", text=hotkey_button_name, translate=False, toggle=True)
if self.show_hotkey_list:
col.prop(self, "hotkey_list_filter", icon="VIEWZOOM")
col.separator()