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
This commit is contained in:
Philipp Oeser
2024-01-31 14:56:25 +01:00
committed by Philipp Oeser
parent 9ad46ebd2f
commit cbc5d861db

View File

@@ -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;