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>2013-03-27 23:09:50 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-03-27 23:09:50 +0400
commitc766b0792a114e1a488efee0b944190255beb05e (patch)
tree857c0c4224638b5e21760c473310b1d834f3ac1f /source/blender/editors/space_node/node_buttons.c
parentbf2c46f5bd77977f179bd6c440ff08907608b355 (diff)
I18n fixes for C panels & menus (we have to specify the default bpyrna context here, else we get the horrible "empty" string (as translation_context of panels is an array, not a pointer, so it's never NULL).
Diffstat (limited to 'source/blender/editors/space_node/node_buttons.c')
-rw-r--r--source/blender/editors/space_node/node_buttons.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/editors/space_node/node_buttons.c b/source/blender/editors/space_node/node_buttons.c
index efdb7c0d85d..d0a77e273f0 100644
--- a/source/blender/editors/space_node/node_buttons.c
+++ b/source/blender/editors/space_node/node_buttons.c
@@ -211,13 +211,13 @@ static void node_tree_interface_panel(const bContext *C, Panel *pa)
split = uiLayoutRow(row, TRUE);
col = uiLayoutColumn(split, TRUE);
- uiItemL(col, "Inputs:", ICON_NONE);
+ uiItemL(col, IFACE_("Inputs:"), ICON_NONE);
uiTemplateList(col, (bContext *)C, "NODE_UL_interface_sockets", "", &ptr, "inputs", &ptr, "active_input", 0, 0, 0);
opptr = uiItemFullO(col, "NODE_OT_tree_socket_add", "", ICON_PLUS, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
RNA_enum_set(&opptr, "in_out", SOCK_IN);
col = uiLayoutColumn(split, TRUE);
- uiItemL(col, "Outputs:", ICON_NONE);
+ uiItemL(col, IFACE_("Outputs:"), ICON_NONE);
uiTemplateList(col, (bContext *)C, "NODE_UL_interface_sockets", "", &ptr, "outputs", &ptr, "active_output", 0, 0, 0);
opptr = uiItemFullO(col, "NODE_OT_tree_socket_add", "", ICON_PLUS, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
RNA_enum_set(&opptr, "in_out", SOCK_OUT);
@@ -248,14 +248,16 @@ void node_buttons_register(ARegionType *art)
pt = MEM_callocN(sizeof(PanelType), "spacetype node panel active node");
strcpy(pt->idname, "NODE_PT_item");
- strcpy(pt->label, IFACE_("Active Node"));
+ strcpy(pt->label, N_("Active Node"));
+ strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
pt->draw = active_node_panel;
pt->poll = active_node_poll;
BLI_addtail(&art->paneltypes, pt);
pt = MEM_callocN(sizeof(PanelType), "spacetype node panel node sockets");
strcpy(pt->idname, "NODE_PT_sockets");
- strcpy(pt->label, "Sockets");
+ strcpy(pt->label, N_("Sockets"));
+ strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
pt->draw = node_sockets_panel;
pt->poll = node_sockets_poll;
pt->flag |= PNL_DEFAULT_CLOSED;
@@ -263,14 +265,16 @@ void node_buttons_register(ARegionType *art)
pt = MEM_callocN(sizeof(PanelType), "spacetype node panel tree interface");
strcpy(pt->idname, "NODE_PT_node_tree_interface");
- strcpy(pt->label, "Interface");
+ strcpy(pt->label, N_("Interface"));
+ strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
pt->draw = node_tree_interface_panel;
pt->poll = node_tree_interface_poll;
BLI_addtail(&art->paneltypes, pt);
pt = MEM_callocN(sizeof(PanelType), "spacetype node panel gpencil");
strcpy(pt->idname, "NODE_PT_gpencil");
- strcpy(pt->label, "Grease Pencil");
+ strcpy(pt->label, N_("Grease Pencil"));
+ strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
pt->draw_header = gpencil_panel_standard_header;
pt->draw = gpencil_panel_standard;
pt->poll = active_nodetree_poll;