From 199f8ad8172fd14099a328b13190328889668134 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Fri, 23 Feb 2024 11:50:30 +0100 Subject: [PATCH] Fix #118643: Translation of enum button tooltip not working in cases Originally caused by 90c4e2e6ec [which did not translate the tooltip descriptions for enum items at all] That was fixed in cbc5d861db [which was working fine for the default translation context -- which is most of the time] Now 7d7318f6c59c added the `BLT_I18NCONTEXT_ID_ID` translation context to `buttons_context_items` (rightfully so) but using this context on the enum item **description** translation does not really make sense. So as a result, the description was not translated in this case. To resolve, now dont use a special translation context for the **description** of enum items at all, this is also what `property_enum_translate` does. Pull Request: https://projects.blender.org/blender/blender/pulls/118653 --- source/blender/makesrna/intern/rna_access.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/makesrna/intern/rna_access.cc b/source/blender/makesrna/intern/rna_access.cc index a707cee14c0..d3b21f0fdb5 100644 --- a/source/blender/makesrna/intern/rna_access.cc +++ b/source/blender/makesrna/intern/rna_access.cc @@ -2039,7 +2039,7 @@ bool RNA_property_enum_item_from_value_gettexted( if (result && !(prop->flag & PROP_ENUM_NO_TRANSLATE)) { r_item->name = BLT_translate_do_iface(prop->translation_context, r_item->name); - r_item->description = BLT_translate_do_tooltip(prop->translation_context, r_item->description); + r_item->description = BLT_translate_do_tooltip(nullptr, r_item->description); } return result;