diff options
author | Hans Goudey <h.goudey@me.com> | 2021-12-02 05:55:04 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-12-02 05:55:04 +0300 |
commit | ca9cdba2df8231e88575c0d56df1f72efc819950 (patch) | |
tree | ceb4a32246ac04c5e52e12a9002ed4f41061060e /source/blender/nodes/shader | |
parent | b869da0c1089e37a363f32beffc734cbc53578e3 (diff) |
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
Diffstat (limited to 'source/blender/nodes/shader')
-rw-r--r-- | source/blender/nodes/shader/node_shader_util.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/shader/node_shader_util.cc b/source/blender/nodes/shader/node_shader_util.cc index 3b064bdf3ac..1d875e86b44 100644 --- a/source/blender/nodes/shader/node_shader_util.cc +++ b/source/blender/nodes/shader/node_shader_util.cc @@ -30,7 +30,7 @@ bool sh_node_poll_default(bNodeType *UNUSED(ntype), bNodeTree *ntree, const char **r_disabled_hint) { if (!STREQ(ntree->idname, "ShaderNodeTree")) { - *r_disabled_hint = "Not a shader node tree"; + *r_disabled_hint = TIP_("Not a shader node tree"); return false; } return true; @@ -41,7 +41,7 @@ static bool sh_fn_poll_default(bNodeType *UNUSED(ntype), const char **r_disabled_hint) { if (!STR_ELEM(ntree->idname, "ShaderNodeTree", "GeometryNodeTree")) { - *r_disabled_hint = "Not a shader or geometry node tree"; + *r_disabled_hint = TIP_("Not a shader or geometry node tree"); return false; } return true; |