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 | |
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')
-rw-r--r-- | source/blender/nodes/intern/node_common.c | 4 | ||||
-rw-r--r-- | source/blender/nodes/intern/node_util.c | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c index e5571b19614..c039365ec69 100644 --- a/source/blender/nodes/intern/node_common.c +++ b/source/blender/nodes/intern/node_common.c @@ -40,6 +40,8 @@ #include "BLI_string.h" #include "BLI_utildefines.h" +#include "BLF_translation.h" + #include "BKE_action.h" #include "BKE_animsys.h" #include "BKE_global.h" @@ -487,7 +489,7 @@ void node_group_remove_socket(bNodeTree *ngroup, bNodeSocket *gsock, int in_out) /* groups display their internal tree name as label */ const char *node_group_label(bNode *node) { - return (node->id)? node->id->name+2: "Missing Datablock"; + return (node->id)? node->id->name+2: IFACE_("Missing Datablock"); } int node_group_valid(bNodeTree *ntree, bNodeTemplate *ntemp) 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) |