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/composite | |
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/composite')
3 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/nodes/composite/node_composite_util.cc b/source/blender/nodes/composite/node_composite_util.cc index 21269b92e65..9ea98d2a867 100644 --- a/source/blender/nodes/composite/node_composite_util.cc +++ b/source/blender/nodes/composite/node_composite_util.cc @@ -28,7 +28,7 @@ bool cmp_node_poll_default(bNodeType *UNUSED(ntype), const char **r_disabled_hint) { if (!STREQ(ntree->idname, "CompositorNodeTree")) { - *r_disabled_hint = "Not a compositor node tree"; + *r_disabled_hint = TIP_("Not a compositor node tree"); return false; } return true; diff --git a/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc b/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc index 6657267b016..39fc86e837b 100644 --- a/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc +++ b/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc @@ -298,11 +298,11 @@ static bool node_poll_cryptomatte(bNodeType *UNUSED(ntype), if (scene == nullptr) { *r_disabled_hint = - "The node tree must be the compositing node tree of any scene in the file"; + TIP_("The node tree must be the compositing node tree of any scene in the file"); } return scene != nullptr; } - *r_disabled_hint = "Not a compositor node tree"; + *r_disabled_hint = TIP_("Not a compositor node tree"); return false; } diff --git a/source/blender/nodes/composite/nodes/node_composite_image.cc b/source/blender/nodes/composite/nodes/node_composite_image.cc index 40d4d4563c9..4b53010db30 100644 --- a/source/blender/nodes/composite/nodes/node_composite_image.cc +++ b/source/blender/nodes/composite/nodes/node_composite_image.cc @@ -499,7 +499,7 @@ static bool node_composit_poll_rlayers(bNodeType *UNUSED(ntype), const char **r_disabled_hint) { if (!STREQ(ntree->idname, "CompositorNodeTree")) { - *r_disabled_hint = "Not a compositor node tree"; + *r_disabled_hint = TIP_("Not a compositor node tree"); return false; } @@ -516,7 +516,8 @@ static bool node_composit_poll_rlayers(bNodeType *UNUSED(ntype), } if (scene == nullptr) { - *r_disabled_hint = "The node tree must be the compositing node tree of any scene in the file"; + *r_disabled_hint = TIP_( + "The node tree must be the compositing node tree of any scene in the file"); return false; } return true; |