I18n fixes for C panels & menus (we have to specify the default bpyrna context here...
authorBastien Montagne <montagne29@wanadoo.fr>
Wed, 27 Mar 2013 19:09:50 +0000 (19:09 +0000)
committerBastien Montagne <montagne29@wanadoo.fr>
Wed, 27 Mar 2013 19:09:50 +0000 (19:09 +0000)
13 files changed:
source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_clip/clip_buttons.c
source/blender/editors/space_clip/clip_toolbar.c
source/blender/editors/space_file/file_panels.c
source/blender/editors/space_graph/graph_buttons.c
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_info/space_info.c
source/blender/editors/space_nla/nla_buttons.c
source/blender/editors/space_node/node_buttons.c
source/blender/editors/space_node/node_header.c
source/blender/editors/space_sequencer/sequencer_buttons.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_toolbar.c

index 0bdae9e32f4c8b7db695bff1b5a3c578835b5e7f..a22a8cbb0a497d401a390ebacaa0b409172cd911 100644 (file)
@@ -1072,6 +1072,7 @@ void buttons_context_register(ARegionType *art)
        pt = MEM_callocN(sizeof(PanelType), "spacetype buttons panel context");
        strcpy(pt->idname, "BUTTONS_PT_context");
        strcpy(pt->label, N_("Context"));  /* XXX C panels are not available through RNA (bpy.types)! */
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw = buttons_panel_context;
        pt->flag = PNL_NO_HEADER;
        BLI_addtail(&art->paneltypes, pt);
index 9409ce42d3a40b2cd36998172a3e8b8be2ae0bc8..8d863193b760259147eb45134a0d0fbf1301e401 100644 (file)
@@ -79,7 +79,8 @@ void ED_clip_buttons_register(ARegionType *art)
 
        pt = MEM_callocN(sizeof(PanelType), "spacetype clip panel gpencil");
        strcpy(pt->idname, "CLIP_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->flag |= PNL_DEFAULT_CLOSED;
index 10175d07300abc43543462ffd78884340b7ccca5..42300f88a4f6a59399306b50fb3529c679f6fc1b 100644 (file)
@@ -257,7 +257,8 @@ void ED_clip_tool_props_register(ARegionType *art)
 
        pt = MEM_callocN(sizeof(PanelType), "spacetype clip panel last operator");
        strcpy(pt->idname, "CLIP_PT_last_operator");
-       strcpy(pt->label, "Operator");
+       strcpy(pt->label, N_("Operator"));
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw_header = clip_panel_operator_redo_header;
        pt->draw = clip_panel_operator_redo;
        BLI_addtail(&art->paneltypes, pt);
index 9a7f528be788025ed5af1ce2dcff99e80c1987c8..35179511563c85bdb2bcbeaa56e843a133c29832 100644 (file)
@@ -219,30 +219,35 @@ void file_panels_register(ARegionType *art)
        pt = MEM_callocN(sizeof(PanelType), "spacetype file system directories");
        strcpy(pt->idname, "FILE_PT_system");
        strcpy(pt->label, N_("System"));
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw = file_panel_system;
        BLI_addtail(&art->paneltypes, pt);
 
        pt = MEM_callocN(sizeof(PanelType), "spacetype file system bookmarks");
        strcpy(pt->idname, "FILE_PT_system_bookmarks");
        strcpy(pt->label, N_("System Bookmarks"));
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw = file_panel_system_bookmarks;
        BLI_addtail(&art->paneltypes, pt);
 
        pt = MEM_callocN(sizeof(PanelType), "spacetype file bookmarks");
        strcpy(pt->idname, "FILE_PT_bookmarks");
        strcpy(pt->label, N_("Bookmarks"));
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw = file_panel_bookmarks;
        BLI_addtail(&art->paneltypes, pt);
 
        pt = MEM_callocN(sizeof(PanelType), "spacetype file recent directories");
        strcpy(pt->idname, "FILE_PT_recent");
        strcpy(pt->label, N_("Recent"));
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw = file_panel_recent;
        BLI_addtail(&art->paneltypes, pt);
 
        pt = MEM_callocN(sizeof(PanelType), "spacetype file operator properties");
        strcpy(pt->idname, "FILE_PT_operator");
        strcpy(pt->label, N_("Operator"));
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->poll = file_panel_operator_poll;
        pt->draw_header = file_panel_operator_header;
        pt->draw = file_panel_operator;
index f1501857b13b5b9ab3a6ad7584ac23da8f82b88f..f7ec8e8682dbe01c41c2a8ff2d9b43df10fc8a1e 100644 (file)
@@ -803,6 +803,7 @@ void graph_buttons_register(ARegionType *art)
        pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel view");
        strcpy(pt->idname, "GRAPH_PT_view");
        strcpy(pt->label, N_("View Properties"));
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw = graph_panel_view;
        pt->flag |= PNL_DEFAULT_CLOSED;
        BLI_addtail(&art->paneltypes, pt);
@@ -810,6 +811,7 @@ void graph_buttons_register(ARegionType *art)
        pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel properties");
        strcpy(pt->idname, "GRAPH_PT_properties");
        strcpy(pt->label, N_("Active F-Curve"));
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw = graph_panel_properties;
        pt->poll = graph_panel_poll;
        BLI_addtail(&art->paneltypes, pt);
@@ -817,6 +819,7 @@ void graph_buttons_register(ARegionType *art)
        pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel properties");
        strcpy(pt->idname, "GRAPH_PT_key_properties");
        strcpy(pt->label, N_("Active Keyframe"));
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw = graph_panel_key_properties;
        pt->poll = graph_panel_poll;
        BLI_addtail(&art->paneltypes, pt);
@@ -825,6 +828,7 @@ void graph_buttons_register(ARegionType *art)
        pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel drivers");
        strcpy(pt->idname, "GRAPH_PT_drivers");
        strcpy(pt->label, N_("Drivers"));
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw = graph_panel_drivers;
        pt->poll = graph_panel_drivers_poll;
        BLI_addtail(&art->paneltypes, pt);
@@ -832,6 +836,7 @@ void graph_buttons_register(ARegionType *art)
        pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel modifiers");
        strcpy(pt->idname, "GRAPH_PT_modifiers");
        strcpy(pt->label, N_("Modifiers"));
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw = graph_panel_modifiers;
        pt->poll = graph_panel_poll;
        BLI_addtail(&art->paneltypes, pt);
index 70001b5952876883d2e05892f7f2272f9870d8d9..5398f886396b15567bf32764edab22997a71eb01 100644 (file)
@@ -880,7 +880,8 @@ void image_buttons_register(ARegionType *art)
 
        pt = MEM_callocN(sizeof(PanelType), "spacetype image panel gpencil");
        strcpy(pt->idname, "IMAGE_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;
        BLI_addtail(&art->paneltypes, pt);
index 1577ac338e762606c7ee04cb56dcd942f3853104..a3eb7c0687605aa347c3c549ae2ade505e9a0b34 100644 (file)
@@ -300,6 +300,7 @@ static void recent_files_menu_register(void)
        mt = MEM_callocN(sizeof(MenuType), "spacetype info menu recent files");
        strcpy(mt->idname, "INFO_MT_file_open_recent");
        strcpy(mt->label, N_("Open Recent..."));
+       strcpy(mt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        mt->draw = recent_files_menu_draw;
        WM_menutype_add(mt);
 }
index e952bec0dd074b102b28deaf85ce4dc027d5a7b6..41ec02975601d68ab90f987d654a74503be23a7a 100644 (file)
@@ -501,7 +501,8 @@ void nla_buttons_register(ARegionType *art)
        
        pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel animdata");
        strcpy(pt->idname, "NLA_PT_animdata");
-       strcpy(pt->label, "Animation Data");
+       strcpy(pt->label, N_("Animation Data"));
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw = nla_panel_animdata;
        pt->poll = nla_animdata_panel_poll;
        pt->flag = PNL_DEFAULT_CLOSED;
@@ -509,35 +510,40 @@ void nla_buttons_register(ARegionType *art)
        
        pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel track");
        strcpy(pt->idname, "NLA_PT_track");
-       strcpy(pt->label, "Active Track");
+       strcpy(pt->label, N_("Active Track"));
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw = nla_panel_track;
        pt->poll = nla_track_panel_poll;
        BLI_addtail(&art->paneltypes, pt);
        
        pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel properties");
        strcpy(pt->idname, "NLA_PT_properties");
-       strcpy(pt->label, "Active Strip");
+       strcpy(pt->label, N_("Active Strip"));
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw = nla_panel_properties;
        pt->poll = nla_strip_panel_poll;
        BLI_addtail(&art->paneltypes, pt);
        
        pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel properties");
        strcpy(pt->idname, "NLA_PT_actionclip");
-       strcpy(pt->label, "Action Clip");
+       strcpy(pt->label, N_("Action Clip"));
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw = nla_panel_actclip;
        pt->poll = nla_strip_actclip_panel_poll;
        BLI_addtail(&art->paneltypes, pt);
        
        pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel evaluation");
        strcpy(pt->idname, "NLA_PT_evaluation");
-       strcpy(pt->label, "Evaluation");
+       strcpy(pt->label, N_("Evaluation"));
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw = nla_panel_evaluation;
        pt->poll = nla_strip_eval_panel_poll;
        BLI_addtail(&art->paneltypes, pt);
        
        pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel modifiers");
        strcpy(pt->idname, "NLA_PT_modifiers");
-       strcpy(pt->label, "Modifiers");
+       strcpy(pt->label, N_("Modifiers"));
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw = nla_panel_modifiers;
        pt->poll = nla_strip_eval_panel_poll;
        BLI_addtail(&art->paneltypes, pt);
index efdb7c0d85d5dbf0a5493093f2dfb91171b3a4e2..d0a77e273f0a4217333c62241c41edff66cfe4b1 100644 (file)
@@ -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;
index 175bbce756e3a20dcda764f1d72f155b8eb5757a..8de2daf9e42992902eb62bf47c8c654afbd41413 100644 (file)
@@ -81,7 +81,8 @@ void node_menus_register(void)
 
        mt = MEM_callocN(sizeof(MenuType), "spacetype node menu add");
        strcpy(mt->idname, "NODE_MT_add");
-       strcpy(mt->label, "Add");
+       strcpy(mt->label, N_("Add"));
+       strcpy(mt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        mt->draw = node_menu_add;
        WM_menutype_add(mt);
 }
index 21128408a97950ff6a65ee91f02d0b8624347bdc..197cc64dea47edc2e584b79ad6309541684ce555 100644 (file)
@@ -67,6 +67,7 @@ void sequencer_buttons_register(ARegionType *art)
        pt = MEM_callocN(sizeof(PanelType), "spacetype sequencer panel gpencil");
        strcpy(pt->idname, "SEQUENCER_PT_gpencil");
        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 = sequencer_grease_pencil_panel_poll;
index 533bb30d8d13cff5723b52b2ee010f8c0de9e6ca..a439b5b5b87b216f7ed13e81d84abe79957ed6c6 100644 (file)
@@ -1270,12 +1270,14 @@ void view3d_buttons_register(ARegionType *art)
        pt = MEM_callocN(sizeof(PanelType), "spacetype view3d panel object");
        strcpy(pt->idname, "VIEW3D_PT_object");
        strcpy(pt->label, N_("Transform"));  /* XXX C panels not  available through RNA (bpy.types)! */
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw = view3d_panel_object;
        BLI_addtail(&art->paneltypes, pt);
 
        pt = MEM_callocN(sizeof(PanelType), "spacetype view3d panel gpencil");
        strcpy(pt->idname, "VIEW3D_PT_gpencil");
        strcpy(pt->label, N_("Grease Pencil"));  /* XXX C panels are not available through RNA (bpy.types)! */
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw_header = gpencil_panel_standard_header;
        pt->draw = gpencil_panel_standard;
        BLI_addtail(&art->paneltypes, pt);
@@ -1283,6 +1285,7 @@ void view3d_buttons_register(ARegionType *art)
        pt = MEM_callocN(sizeof(PanelType), "spacetype view3d panel vgroup");
        strcpy(pt->idname, "VIEW3D_PT_vgroup");
        strcpy(pt->label, N_("Vertex Groups"));  /* XXX C panels are not available through RNA (bpy.types)! */
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw = view3d_panel_vgroup;
        pt->poll = view3d_panel_vgroup_poll;
        BLI_addtail(&art->paneltypes, pt);
index d3bf8a30792e20e8eb2765ae0b4125e42efbc19b..603d9a1595c5eed7f4db5d5c1e60acfafe037d4f 100644 (file)
@@ -238,7 +238,8 @@ void view3d_toolshelf_register(ARegionType *art)
 
        pt = MEM_callocN(sizeof(PanelType), "spacetype view3d panel tools");
        strcpy(pt->idname, "VIEW3D_PT_tool_shelf");
-       strcpy(pt->label, "Tool Shelf");
+       strcpy(pt->label, N_("Tool Shelf"));
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw = view3d_panel_tool_shelf;
        BLI_addtail(&art->paneltypes, pt);
 }
@@ -249,7 +250,8 @@ void view3d_tool_props_register(ARegionType *art)
        
        pt = MEM_callocN(sizeof(PanelType), "spacetype view3d panel last operator");
        strcpy(pt->idname, "VIEW3D_PT_last_operator");
-       strcpy(pt->label, "Operator");
+       strcpy(pt->label, N_("Operator"));
+       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
        pt->draw_header = view3d_panel_operator_redo_header;
        pt->draw = view3d_panel_operator_redo;
        BLI_addtail(&art->paneltypes, pt);