diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-03-17 18:42:44 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-03-17 18:42:44 +0400 |
commit | 7bc693d1075a72b2f6c7abb1239432b4c442a92f (patch) | |
tree | 99af4b52dc6fe28aa719917b0ec0829428f39506 /source/blender/nodes/intern/node_util.c | |
parent | 1f6ae5e4fbc4a67afd9655d55f9930c196c9e754 (diff) |
Big step forward nodes UI translation:
*Add menu is now translated.
*Nodes' title is now translated.
*Nodes' sockets' labels are now translated.
However, about the last point, and unless I’m mistaking, we’ll have to add the "i18n tag" N_() to all sockets' names, in the input/ouput templates declaration, in all nodes' files, as those sockets are collections created at runtime, I think po-generating script has no way to access that from bpy.types... Quite a piece of (borring) work. :/
Diffstat (limited to 'source/blender/nodes/intern/node_util.c')
-rw-r--r-- | source/blender/nodes/intern/node_util.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/nodes/intern/node_util.c b/source/blender/nodes/intern/node_util.c index 19b3ba63f9a..7626a3aaa7b 100644 --- a/source/blender/nodes/intern/node_util.c +++ b/source/blender/nodes/intern/node_util.c @@ -36,6 +36,8 @@ #include "BLI_listbase.h" #include "BLI_utildefines.h" +#include "BLF_translation.h" + #include "BKE_colortools.h" #include "BKE_node.h" @@ -74,28 +76,28 @@ const char *node_blend_label(bNode *node) { const char *name; RNA_enum_name(ramp_blend_items, node->custom1, &name); - return name; + return IFACE_(name); } const char *node_math_label(bNode *node) { const char *name; RNA_enum_name(node_math_items, node->custom1, &name); - return name; + return IFACE_(name); } const char *node_vect_math_label(bNode *node) { const char *name; RNA_enum_name(node_vec_math_items, node->custom1, &name); - return name; + return IFACE_(name); } const char *node_filter_label(bNode *node) { const char *name; RNA_enum_name(node_filter_items, node->custom1, &name); - return name; + return IFACE_(name); } ListBase node_internal_connect_default(bNodeTree *ntree, bNode *node) |