[Bf-blender-cvs] [dec8854bf31] master: I18n: translate add node operator tooltips

Damien Picard noreply at git.blender.org
Mon Jul 18 15:09:26 CEST 2022


Commit: dec8854bf31df3cedfa0efb5169160ba4a54d202
Author: Damien Picard
Date:   Mon Jul 18 15:09:37 2022 +0200
Branches: master
https://developer.blender.org/rBdec8854bf31df3cedfa0efb5169160ba4a54d202

I18n: translate add node operator tooltips

The tooltips from the Add Node menu were extracted, but not translated.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D15467

===================================================================

M	release/scripts/startup/bl_operators/node.py

===================================================================

diff --git a/release/scripts/startup/bl_operators/node.py b/release/scripts/startup/bl_operators/node.py
index bad12ff4621..df4ca9ef170 100644
--- a/release/scripts/startup/bl_operators/node.py
+++ b/release/scripts/startup/bl_operators/node.py
@@ -14,6 +14,8 @@ from bpy.props import (
     StringProperty,
 )
 
+from bpy.app.translations import pgettext_tip as tip_
+
 
 class NodeSetting(PropertyGroup):
     value: StringProperty(
@@ -134,7 +136,7 @@ class NodeAddOperator:
         nodetype = properties["type"]
         bl_rna = bpy.types.Node.bl_rna_get_subclass(nodetype)
         if bl_rna is not None:
-            return bl_rna.description
+            return tip_(bl_rna.description)
         else:
             return ""



More information about the Bf-blender-cvs mailing list