From cbc5d861db77134d438fcd173d184cfdfc8c9891 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 31 Jan 2024 14:56:25 +0100 Subject: [PATCH] Fix #117672: Translation of enum button tooltips broken Caused by 90c4e2e6ec. We are now getting the enum item via `RNA_property_enum_item_from_value_gettexted` (as opposed to `RNA_property_enum_items_gettexted` prior to 90c4e2e6ec). The former does not translate the description (whereas the later does) which I think is just an oversight. To resolve, now add description translation to `RNA_property_enum_item_from_value_gettexted`. Pull Request: https://projects.blender.org/blender/blender/pulls/117693 --- source/blender/makesrna/intern/rna_access.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/makesrna/intern/rna_access.cc b/source/blender/makesrna/intern/rna_access.cc index 29dede4f470..de090bc452c 100644 --- a/source/blender/makesrna/intern/rna_access.cc +++ b/source/blender/makesrna/intern/rna_access.cc @@ -2035,6 +2035,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); } return result;