Fix: Add tooltip translation marker to disabled hints

This was overlooked, as it seems there's no way for these strings to be
translated currently. Generally it's not that clear whether `N_` or
`TIP_` should be used in this case, but `TIP_` seems more consistent.
To avoid the cost of the translation lookup when the UI text isn't
necessary, we could allow the disabled hint argument to be optional.

Differential Revision: https://developer.blender.org/D13141
This commit is contained in:
2021-12-01 21:55:04 -05:00
parent b869da0c10
commit ca9cdba2df
9 changed files with 13 additions and 12 deletions

View File

@@ -23,7 +23,7 @@ static bool fn_node_poll_default(bNodeType *UNUSED(ntype),
{
/* Function nodes are only supported in simulation node trees so far. */
if (!STREQ(ntree->idname, "GeometryNodeTree")) {
*r_disabled_hint = "Not a geometry node tree";
*r_disabled_hint = TIP_("Not a geometry node tree");
return false;
}
return true;