Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2012-03-17 18:42:44 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-03-17 18:42:44 +0400
commit7bc693d1075a72b2f6c7abb1239432b4c442a92f (patch)
tree99af4b52dc6fe28aa719917b0ec0829428f39506 /source/blender/editors/space_node/node_header.c
parent1f6ae5e4fbc4a67afd9655d55f9930c196c9e754 (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/editors/space_node/node_header.c')
-rw-r--r--source/blender/editors/space_node/node_header.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c
index df83afc143e..f450356b288 100644
--- a/source/blender/editors/space_node/node_header.c
+++ b/source/blender/editors/space_node/node_header.c
@@ -214,11 +214,11 @@ static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass)
/* XXX hack: negative numbers used for empty group types */
if (node_tree_has_type(ntree->type, NODE_GROUP))
- uiItemV(layout, "New Group", 0, -NODE_GROUP);
+ uiItemV(layout, IFACE_("New Group"), 0, -NODE_GROUP);
if (node_tree_has_type(ntree->type, NODE_FORLOOP))
- uiItemV(layout, "New For Loop", 0, -NODE_FORLOOP);
+ uiItemV(layout, IFACE_("New For Loop"), 0, -NODE_FORLOOP);
if (node_tree_has_type(ntree->type, NODE_WHILELOOP))
- uiItemV(layout, "New While Loop", 0, -NODE_WHILELOOP);
+ uiItemV(layout, IFACE_("New While Loop"), 0, -NODE_WHILELOOP);
uiItemS(layout);
for(ngroup=bmain->nodetree.first, event=0; ngroup; ngroup= ngroup->id.next, ++event) {
@@ -239,7 +239,7 @@ static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass)
for (ntype=ntreeGetType(ntree->type)->node_types.first; ntype; ntype=ntype->next) {
if (ntype->nclass==nodeclass && ntype->name)
if (!compatibility || (ntype->compatibility & compatibility))
- uiItemV(layout, ntype->name, 0, ntype->type);
+ uiItemV(layout, IFACE_(ntype->name), 0, ntype->type);
}
}
}
@@ -247,7 +247,7 @@ static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass)
static void node_menu_add_foreach_cb(void *calldata, int nclass, const char *name)
{
uiLayout *layout= calldata;
- uiItemMenuF(layout, name, 0, node_add_menu, SET_INT_IN_POINTER(nclass));
+ uiItemMenuF(layout, IFACE_(name), 0, node_add_menu, SET_INT_IN_POINTER(nclass));
}
static void node_menu_add(const bContext *C, Menu *menu)