From 79c129647e2a8c5d5efd2fc1226e3980f356e663 Mon Sep 17 00:00:00 2001 From: Xiao Xiangquan Date: Fri, 24 Jun 2011 04:22:27 +0000 Subject: right panel done --- source/blender/editors/animation/anim_markers.c | 4 +- source/blender/editors/animation/anim_ops.c | 4 +- source/blender/editors/animation/keyframing.c | 4 +- source/blender/editors/curve/editcurve.c | 128 +++++++++--------- source/blender/editors/gpencil/CMakeLists.txt | 1 + source/blender/editors/gpencil/SConscript | 2 +- source/blender/editors/gpencil/gpencil_paint.c | 12 +- .../blender/editors/interface/interface_regions.c | 2 +- .../editors/interface/interface_templates.c | 42 +++--- source/blender/editors/object/object_add.c | 40 +++--- source/blender/editors/object/object_edit.c | 14 +- source/blender/editors/object/object_transform.c | 12 +- source/blender/editors/screen/screen_ops.c | 28 ++-- .../blender/editors/space_buttons/CMakeLists.txt | 1 + source/blender/editors/space_buttons/SConscript | 2 +- source/blender/editors/space_buttons/buttons_ops.c | 14 +- source/blender/editors/space_file/file_draw.c | 6 +- source/blender/editors/space_file/file_ops.c | 70 +++++----- source/blender/editors/space_info/info_ops.c | 2 +- source/blender/editors/space_outliner/outliner.c | 38 +++--- source/blender/editors/space_time/CMakeLists.txt | 1 + source/blender/editors/space_time/SConscript | 2 +- source/blender/editors/space_time/time_ops.c | 6 +- source/blender/editors/space_view3d/view3d_edit.c | 78 +++++------ .../blender/editors/space_view3d/view3d_header.c | 34 ++--- source/blender/editors/space_view3d/view3d_view.c | 14 +- source/blender/editors/transform/transform_ops.c | 54 ++++---- .../editors/transform/transform_orientations.c | 6 +- source/blender/makesrna/RNA_access.h | 1 + source/blender/makesrna/intern/rna_ID.c | 56 ++++---- source/blender/makesrna/intern/rna_access.c | 17 ++- source/blender/makesrna/intern/rna_render.c | 6 +- source/blender/makesrna/intern/rna_scene.c | 139 ++++++++++---------- source/blender/makesrna/intern/rna_space.c | 144 ++++++++++----------- source/blender/makesrna/intern/rna_userdef.c | 48 +++---- source/blender/makesrna/intern/rna_wm.c | 86 ++++++------ source/blender/windowmanager/intern/wm_operators.c | 57 ++++---- 37 files changed, 607 insertions(+), 568 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index 3aee5f1ab5a..ce3110dab3d 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -1437,8 +1437,8 @@ static int ed_marker_camera_bind_exec(bContext *C, wmOperator *UNUSED(op)) static void MARKER_OT_camera_bind(wmOperatorType *ot) { /* identifiers */ - ot->name= "Bind Camera to Markers"; - ot->description= "Bind the active camera to selected markers(s)"; + ot->name= _("Bind Camera to Markers"); + ot->description= _("Bind the active camera to selected markers(s)"); ot->idname= "MARKER_OT_camera_bind"; /* api callbacks */ diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index f938fcfa39f..1a69f88b382 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -333,9 +333,9 @@ static int toggle_time_exec(bContext *C, wmOperator *UNUSED(op)) static void ANIM_OT_time_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Frames/Seconds"; + ot->name= _("Toggle Frames/Seconds"); ot->idname= "ANIM_OT_time_toggle"; - ot->description= "Toggle whether timing is displayed in frames or seconds for active timeline view"; + ot->description= _("Toggle whether timing is displayed in frames or seconds for active timeline view"); /* api callbacks */ ot->exec= toggle_time_exec; diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index ec60ddbfa1c..5c4a79217c2 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -1197,7 +1197,7 @@ void ANIM_OT_keyframe_insert_menu (wmOperatorType *ot) /* identifiers */ ot->name= "Insert Keyframe Menu"; ot->idname= "ANIM_OT_keyframe_insert_menu"; - ot->description= "Insert Keyframes for specified Keying Set, with menu of available Keying Sets if undefined"; + ot->description= _("Insert Keyframes for specified Keying Set, with menu of available Keying Sets if undefined"); /* callbacks */ ot->invoke= insert_key_menu_invoke; @@ -1362,7 +1362,7 @@ void ANIM_OT_keyframe_delete_v3d (wmOperatorType *ot) { /* identifiers */ ot->name= "Delete Keyframe"; - ot->description= "Remove keyframes on current frame for selected object"; + ot->description= _("Remove keyframes on current frame for selected object"); ot->idname= "ANIM_OT_keyframe_delete_v3d"; /* callbacks */ diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 9dc0acb4131..18544d4d154 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -2036,8 +2036,8 @@ static int switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_switch_direction(wmOperatorType *ot) { /* identifiers */ - ot->name= "Switch Direction"; - ot->description= "Switch direction of selected splines"; + ot->name= _("Switch Direction"); + ot->description= _("Switch direction of selected splines"); ot->idname= "CURVE_OT_switch_direction"; /* api callbacks */ @@ -2084,8 +2084,8 @@ static int set_goal_weight_exec(bContext *C, wmOperator *op) void CURVE_OT_spline_weight_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Goal Weight"; - ot->description= "Set softbody goal weight for selected points"; + ot->name= _("Set Goal Weight"); + ot->description= _("Set softbody goal weight for selected points"); ot->idname= "CURVE_OT_spline_weight_set"; /* api callbacks */ @@ -2136,8 +2136,8 @@ static int set_radius_exec(bContext *C, wmOperator *op) void CURVE_OT_radius_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Curve Radius"; - ot->description= "Set per-point radius which is used for bevel tapering"; + ot->name= _("Set Curve Radius"); + ot->description= _("Set per-point radius which is used for bevel tapering"); ot->idname= "CURVE_OT_radius_set"; /* api callbacks */ @@ -2212,8 +2212,8 @@ static int smooth_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_smooth(wmOperatorType *ot) { /* identifiers */ - ot->name= "Smooth"; - ot->description= "Flatten angles of selected points"; + ot->name= _("Smooth"); + ot->description= _("Flatten angles of selected points"); ot->idname= "CURVE_OT_smooth"; /* api callbacks */ @@ -2378,8 +2378,8 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_smooth_radius(wmOperatorType *ot) { /* identifiers */ - ot->name= "Smooth Curve Radius"; - ot->description= "Flatten radiuses of selected points"; + ot->name= _("Smooth Curve Radius"); + ot->description= _("Flatten radiuses of selected points"); ot->idname= "CURVE_OT_smooth_radius"; /* api clastbacks */ @@ -2532,7 +2532,7 @@ static int de_select_first_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_de_select_first(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select or Deselect First"; + ot->name= _("Select or Deselect First"); ot->idname= "CURVE_OT_de_select_first"; /* api cfirstbacks */ @@ -2556,7 +2556,7 @@ static int de_select_last_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_de_select_last(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select or Deselect Last"; + ot->name= _("Select or Deselect Last"); ot->idname= "CURVE_OT_de_select_last"; /* api clastbacks */ @@ -2634,7 +2634,7 @@ static int de_select_all_exec(bContext *C, wmOperator *op) void CURVE_OT_select_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select or Deselect All"; + ot->name= _("Select or Deselect All"); ot->idname= "CURVE_OT_select_all"; /* api callbacks */ @@ -2708,7 +2708,7 @@ static int hide_exec(bContext *C, wmOperator *op) void CURVE_OT_hide(wmOperatorType *ot) { /* identifiers */ - ot->name= "Hide Selected"; + ot->name= _("Hide Selected"); ot->idname= "CURVE_OT_hide"; /* api callbacks */ @@ -2768,7 +2768,7 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_reveal(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reveal Hidden"; + ot->name= _("Reveal Hidden"); ot->idname= "CURVE_OT_reveal"; /* api callbacks */ @@ -2826,7 +2826,7 @@ static int select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_select_inverse(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Inverse"; + ot->name= _("Select Inverse"); ot->idname= "CURVE_OT_select_inverse"; /* api callbacks */ @@ -3265,8 +3265,8 @@ static int subdivide_exec(bContext *C, wmOperator *op) void CURVE_OT_subdivide(wmOperatorType *ot) { /* identifiers */ - ot->name= "Subdivide"; - ot->description= "Subdivide selected segments"; + ot->name= _("Subdivide"); + ot->description= _("Subdivide selected segments"); ot->idname= "CURVE_OT_subdivide"; /* api callbacks */ @@ -3583,8 +3583,8 @@ void CURVE_OT_spline_type_set(wmOperatorType *ot) {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Set Spline Type"; - ot->description = "Set type of active spline"; + ot->name= _("Set Spline Type"); + ot->description = _("Set type of active spline"); ot->idname= "CURVE_OT_spline_type_set"; /* api callbacks */ @@ -4161,7 +4161,7 @@ static int make_segment_exec(bContext *C, wmOperator *op) void CURVE_OT_make_segment(wmOperatorType *ot) { /* identifiers */ - ot->name= "Make Segment"; + ot->name= _("Make Segment"); ot->idname= "CURVE_OT_make_segment"; /* api callbacks */ @@ -4702,7 +4702,7 @@ static int add_vertex_invoke(bContext *C, wmOperator *op, wmEvent *event) void CURVE_OT_vertex_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Vertex"; + ot->name= _("Add Vertex"); ot->idname= "CURVE_OT_vertex_add"; /* api callbacks */ @@ -4762,8 +4762,8 @@ static int extrude_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) void CURVE_OT_extrude(wmOperatorType *ot) { /* identifiers */ - ot->name= "Extrude"; - ot->description = "Extrude selected control point(s) and move"; + ot->name= _("Extrude"); + ot->description = _("Extrude selected control point(s) and move"); ot->idname= "CURVE_OT_extrude"; /* api callbacks */ @@ -4891,8 +4891,8 @@ void CURVE_OT_cyclic_toggle(wmOperatorType *ot) {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Toggle Cyclic"; - ot->description = "Make active spline closed/opened loop"; + ot->name= _("Toggle Cyclic"); + ot->description = _("Make active spline closed/opened loop"); ot->idname= "CURVE_OT_cyclic_toggle"; /* api callbacks */ @@ -4968,7 +4968,7 @@ static int select_linked_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve void CURVE_OT_select_linked(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Linked All"; + ot->name= _("Select Linked All"); ot->idname= "CURVE_OT_select_linked"; /* api callbacks */ @@ -5028,7 +5028,7 @@ static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event void CURVE_OT_select_linked_pick(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Linked"; + ot->name= _("Select Linked"); ot->idname= "CURVE_OT_select_linked_pick"; /* api callbacks */ @@ -5106,7 +5106,7 @@ static int select_row_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_select_row(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Control Point Row"; + ot->name= _("Select Control Point Row"); ot->idname= "CURVE_OT_select_row"; /* api callbacks */ @@ -5133,7 +5133,7 @@ static int select_next_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_select_next(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Next"; + ot->name= _("Select Next"); ot->idname= "CURVE_OT_select_next"; /* api callbacks */ @@ -5160,7 +5160,7 @@ static int select_previous_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_select_previous(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Previous"; + ot->name= _("Select Previous"); ot->idname= "CURVE_OT_select_previous"; /* api callbacks */ @@ -5247,7 +5247,7 @@ static int select_more_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_select_more(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select More"; + ot->name= _("Select More"); ot->idname= "CURVE_OT_select_more"; /* api callbacks */ @@ -5408,7 +5408,7 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_select_less(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Less"; + ot->name= _("Select Less"); ot->idname= "CURVE_OT_select_less"; /* api callbacks */ @@ -5471,7 +5471,7 @@ static int select_random_exec(bContext *C, wmOperator *op) void CURVE_OT_select_random(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Random"; + ot->name= _("Select Random"); ot->idname= "CURVE_OT_select_random"; /* api callbacks */ @@ -5596,7 +5596,7 @@ static int select_nth_exec(bContext *C, wmOperator *op) void CURVE_OT_select_nth(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Nth"; + ot->name= _("Select Nth"); ot->description= ""; ot->idname= "CURVE_OT_select_nth"; @@ -5635,8 +5635,8 @@ static int duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) void CURVE_OT_duplicate(wmOperatorType *ot) { /* identifiers */ - ot->name= "Duplicate Curve"; - ot->description = "Duplicate selected control points and segments between them"; + ot->name= _("Duplicate Curve"); + ot->description = _("Duplicate selected control points and segments between them"); ot->idname= "CURVE_OT_duplicate"; /* api callbacks */ @@ -6001,8 +6001,8 @@ void CURVE_OT_delete(wmOperatorType *ot) {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Delete"; - ot->description = "Delete selected control points or segments"; + ot->name= _("Delete"); + ot->description = _("Delete selected control points or segments"); ot->idname= "CURVE_OT_delete"; /* api callbacks */ @@ -6045,7 +6045,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op) void CURVE_OT_shade_smooth(wmOperatorType *ot) { /* identifiers */ - ot->name= "Shade Smooth"; + ot->name= _("Shade Smooth"); ot->idname= "CURVE_OT_shade_smooth"; /* api callbacks */ @@ -6059,7 +6059,7 @@ void CURVE_OT_shade_smooth(wmOperatorType *ot) void CURVE_OT_shade_flat(wmOperatorType *ot) { /* identifiers */ - ot->name= "Shade Flat"; + ot->name= _("Shade Flat"); ot->idname= "CURVE_OT_shade_flat"; /* api callbacks */ @@ -6638,8 +6638,8 @@ static int add_primitive_bezier_exec(bContext *C, wmOperator *op) void CURVE_OT_primitive_bezier_curve_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Bezier"; - ot->description= "Construct a Bezier Curve"; + ot->name= _("Add Bezier"); + ot->description= _("Construct a Bezier Curve"); ot->idname= "CURVE_OT_primitive_bezier_curve_add"; /* api callbacks */ @@ -6661,8 +6661,8 @@ static int add_primitive_bezier_circle_exec(bContext *C, wmOperator *op) void CURVE_OT_primitive_bezier_circle_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Bezier Circle"; - ot->description= "Construct a Bezier Circle"; + ot->name= _("Add Bezier Circle"); + ot->description= _("Construct a Bezier Circle"); ot->idname= "CURVE_OT_primitive_bezier_circle_add"; /* api callbacks */ @@ -6684,8 +6684,8 @@ static int add_primitive_nurbs_curve_exec(bContext *C, wmOperator *op) void CURVE_OT_primitive_nurbs_curve_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Nurbs Curve"; - ot->description= "Construct a Nurbs Curve"; + ot->name= _("Add Nurbs Curve"); + ot->description= _("Construct a Nurbs Curve"); ot->idname= "CURVE_OT_primitive_nurbs_curve_add"; /* api callbacks */ @@ -6707,8 +6707,8 @@ static int add_primitive_nurbs_circle_exec(bContext *C, wmOperator *op) void CURVE_OT_primitive_nurbs_circle_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Nurbs Circle"; - ot->description= "Construct a Nurbs Circle"; + ot->name= _("Add Nurbs Circle"); + ot->description= _("Construct a Nurbs Circle"); ot->idname= "CURVE_OT_primitive_nurbs_circle_add"; /* api callbacks */ @@ -6730,8 +6730,8 @@ static int add_primitive_curve_path_exec(bContext *C, wmOperator *op) void CURVE_OT_primitive_nurbs_path_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Path"; - ot->description= "Construct a Path"; + ot->name= _("Add Path"); + ot->description= _("Construct a Path"); ot->idname= "CURVE_OT_primitive_nurbs_path_add"; /* api callbacks */ @@ -6754,8 +6754,8 @@ static int add_primitive_nurbs_surface_curve_exec(bContext *C, wmOperator *op) void SURFACE_OT_primitive_nurbs_surface_curve_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Surface Curve"; - ot->description= "Construct a Nurbs surface Curve"; + ot->name= _("Add Surface Curve"); + ot->description= _("Construct a Nurbs surface Curve"); ot->idname= "SURFACE_OT_primitive_nurbs_surface_curve_add"; /* api callbacks */ @@ -6777,8 +6777,8 @@ static int add_primitive_nurbs_surface_circle_exec(bContext *C, wmOperator *op) void SURFACE_OT_primitive_nurbs_surface_circle_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Surface Circle"; - ot->description= "Construct a Nurbs surface Circle"; + ot->name= _("Add Surface Circle"); + ot->description= _("Construct a Nurbs surface Circle"); ot->idname= "SURFACE_OT_primitive_nurbs_surface_circle_add"; /* api callbacks */ @@ -6800,8 +6800,8 @@ static int add_primitive_nurbs_surface_surface_exec(bContext *C, wmOperator *op) void SURFACE_OT_primitive_nurbs_surface_surface_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Surface Patch"; - ot->description= "Construct a Nurbs surface Patch"; + ot->name= _("Add Surface Patch"); + ot->description= _("Construct a Nurbs surface Patch"); ot->idname= "SURFACE_OT_primitive_nurbs_surface_surface_add"; /* api callbacks */ @@ -6823,8 +6823,8 @@ static int add_primitive_nurbs_surface_cylinder_exec(bContext *C, wmOperator *op void SURFACE_OT_primitive_nurbs_surface_cylinder_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Surface Cylinder"; - ot->description= "Construct a Nurbs surface Cylinder"; + ot->name= _("Add Surface Cylinder"); + ot->description= _("Construct a Nurbs surface Cylinder"); ot->idname= "SURFACE_OT_primitive_nurbs_surface_cylinder_add"; /* api callbacks */ @@ -6846,8 +6846,8 @@ static int add_primitive_nurbs_surface_sphere_exec(bContext *C, wmOperator *op) void SURFACE_OT_primitive_nurbs_surface_sphere_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Surface Sphere"; - ot->description= "Construct a Nurbs surface Sphere"; + ot->name= _("Add Surface Sphere"); + ot->description= _("Construct a Nurbs surface Sphere"); ot->idname= "SURFACE_OT_primitive_nurbs_surface_sphere_add"; /* api callbacks */ @@ -6869,8 +6869,8 @@ static int add_primitive_nurbs_surface_torus_exec(bContext *C, wmOperator *op) void SURFACE_OT_primitive_nurbs_surface_torus_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Surface Torus"; - ot->description= "Construct a Nurbs surface Torus"; + ot->name= _("Add Surface Torus"); + ot->description= _("Construct a Nurbs surface Torus"); ot->idname= "SURFACE_OT_primitive_nurbs_surface_torus_add"; /* api callbacks */ @@ -6924,7 +6924,7 @@ static int clear_tilt_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_tilt_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Tilt"; + ot->name= _("Clear Tilt"); ot->idname= "CURVE_OT_tilt_clear"; /* api callbacks */ diff --git a/source/blender/editors/gpencil/CMakeLists.txt b/source/blender/editors/gpencil/CMakeLists.txt index 352960d285a..fe5e35cc763 100644 --- a/source/blender/editors/gpencil/CMakeLists.txt +++ b/source/blender/editors/gpencil/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenloader ../../blenlib diff --git a/source/blender/editors/gpencil/SConscript b/source/blender/editors/gpencil/SConscript index d2fd9e5fe9d..7847744a6f1 100644 --- a/source/blender/editors/gpencil/SConscript +++ b/source/blender/editors/gpencil/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../gpu ../../blenloader' incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern' diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index f4da734473d..2acc97417de 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -42,6 +42,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_gpencil.h" #include "BKE_context.h" #include "BKE_global.h" @@ -1756,9 +1758,9 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event) /* ------------------------------- */ static EnumPropertyItem prop_gpencil_drawmodes[] = { - {GP_PAINTMODE_DRAW, "DRAW", 0, "Draw Freehand", ""}, - {GP_PAINTMODE_DRAW_STRAIGHT, "DRAW_STRAIGHT", 0, "Draw Straight Lines", ""}, - {GP_PAINTMODE_ERASER, "ERASER", 0, "Eraser", ""}, + {GP_PAINTMODE_DRAW, "DRAW", 0, N_("Draw Freehand"), ""}, + {GP_PAINTMODE_DRAW_STRAIGHT, "DRAW_STRAIGHT", 0, N_("Draw Straight Lines"), ""}, + {GP_PAINTMODE_ERASER, "ERASER", 0, N_("Eraser"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -1767,7 +1769,7 @@ void GPENCIL_OT_draw (wmOperatorType *ot) /* identifiers */ ot->name= "Grease Pencil Draw"; ot->idname= "GPENCIL_OT_draw"; - ot->description= "Make annotations on the active data"; + ot->description= _("Make annotations on the active data"); /* api callbacks */ ot->exec= gpencil_draw_exec; @@ -1780,7 +1782,7 @@ void GPENCIL_OT_draw (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; /* settings for drawing */ - RNA_def_enum(ot->srna, "mode", prop_gpencil_drawmodes, 0, "Mode", "Way to intepret mouse movements."); + RNA_def_enum(ot->srna, "mode", RNA_enum_items_gettexted(prop_gpencil_drawmodes), 0, "Mode", "Way to intepret mouse movements."); RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", ""); } diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 62043f240e4..fbc0c2ceb3b 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -403,7 +403,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) prop= (but->opptr)? but->opptr->data: NULL; if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, buf, sizeof(buf))) { - BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Shortcut: %s", buf); + BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), _("Shortcut: %s"), buf); data->color[data->totline]= 0x888888; data->totline++; } diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 3985b728c8e..c1f34f15aee 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -300,29 +300,29 @@ static const char *template_id_browse_tip(StructRNA *type) { if(type) { switch(RNA_type_to_ID_code(type)) { - case ID_SCE: return "Browse Scene to be linked"; - case ID_OB: return "Browse Object to be linked"; - case ID_ME: return "Browse Mesh Data to be linked"; - case ID_CU: return "Browse Curve Data to be linked"; - case ID_MB: return "Browse MetaBall Data to be linked"; - case ID_MA: return "Browse Material to be linked"; - case ID_TE: return "Browse Texture to be linked"; - case ID_IM: return "Browse Image to be linked"; - case ID_LA: return "Browse Lattice Data to be linked"; - case ID_CA: return "Browse Camera Data to be linked"; - case ID_WO: return "Browse World Settings to be linked"; - case ID_SCR: return "Choose Screen lay-out"; - case ID_TXT: return "Browse Text to be linked"; - case ID_SO: return "Browse Sound to be linked"; - case ID_AR: return "Browse Armature data to be linked"; - case ID_AC: return "Browse Action to be linked"; - case ID_NT: return "Browse Node Tree to be linked"; - case ID_BR: return "Browse Brush to be linked"; - case ID_PA: return "Browse Particle System to be linked"; - case ID_GD: return "Browse Grease Pencil Data to be linked"; + case ID_SCE: return _("Browse Scene to be linked"); + case ID_OB: return _("Browse Object to be linked"); + case ID_ME: return _("Browse Mesh Data to be linked"); + case ID_CU: return _("Browse Curve Data to be linked"); + case ID_MB: return _("Browse MetaBall Data to be linked"); + case ID_MA: return _("Browse Material to be linked"); + case ID_TE: return _("Browse Texture to be linked"); + case ID_IM: return _("Browse Image to be linked"); + case ID_LA: return _("Browse Lattice Data to be linked"); + case ID_CA: return _("Browse Camera Data to be linked"); + case ID_WO: return _("Browse World Settings to be linked"); + case ID_SCR: return _("Choose Screen lay-out"); + case ID_TXT: return _("Browse Text to be linked"); + case ID_SO: return _("Browse Sound to be linked"); + case ID_AR: return _("Browse Armature data to be linked"); + case ID_AC: return _("Browse Action to be linked"); + case ID_NT: return _("Browse Node Tree to be linked"); + case ID_BR: return _("Browse Brush to be linked"); + case ID_PA: return _("Browse Particle System to be linked"); + case ID_GD: return _("Browse Grease Pencil Data to be linked"); } } - return "Browse ID data to be linked"; + return _("Browse ID data to be linked"); } static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, StructRNA *type, int flag, const char *newop, const char *openop, const char *unlinkop) diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index a9fe4ce95e1..57ab39e32b2 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -183,8 +183,8 @@ void ED_object_add_generic_props(wmOperatorType *ot, int do_editmode) RNA_def_property_flag(prop, PROP_HIDDEN); } - RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Location for the newly added object", -FLT_MAX, FLT_MAX); - RNA_def_float_rotation(ot->srna, "rotation", 3, NULL, -FLT_MAX, FLT_MAX, "Rotation", "Rotation for the newly added object", -FLT_MAX, FLT_MAX); + RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, _("Location"), _("Location for the newly added object"), -FLT_MAX, FLT_MAX); + RNA_def_float_rotation(ot->srna, "rotation", 3, NULL, -FLT_MAX, FLT_MAX, _("Rotation"), _("Rotation for the newly added object"), -FLT_MAX, FLT_MAX); prop = RNA_def_boolean_layer_member(ot->srna, "layers", 20, NULL, "Layer", ""); RNA_def_property_flag(prop, PROP_HIDDEN); @@ -338,8 +338,8 @@ static int object_add_exec(bContext *C, wmOperator *op) void OBJECT_OT_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Object"; - ot->description = "Add an object to the scene"; + ot->name= _("Add Object"); + ot->description = _("Add an object to the scene"); ot->idname= "OBJECT_OT_add"; /* api callbacks */ @@ -430,8 +430,8 @@ static int effector_add_exec(bContext *C, wmOperator *op) void OBJECT_OT_effector_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Effector"; - ot->description = "Add an empty object with a physics effector to the scene"; + ot->name= _("Add Effector"); + ot->description = _("Add an empty object with a physics effector to the scene"); ot->idname= "OBJECT_OT_effector_add"; /* api callbacks */ @@ -485,8 +485,8 @@ void OBJECT_OT_camera_add(wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Add Camera"; - ot->description = "Add a camera object to the scene"; + ot->name= _("Add Camera"); + ot->description = _("Add a camera object to the scene"); ot->idname= "OBJECT_OT_camera_add"; /* api callbacks */ @@ -563,8 +563,8 @@ static int object_metaball_add_invoke(bContext *C, wmOperator *op, wmEvent *UNUS void OBJECT_OT_metaball_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Metaball"; - ot->description= "Add an metaball object to the scene"; + ot->name= _("Add Metaball"); + ot->description= _("Add an metaball object to the scene"); ot->idname= "OBJECT_OT_metaball_add"; /* api callbacks */ @@ -603,8 +603,8 @@ static int object_add_text_exec(bContext *C, wmOperator *op) void OBJECT_OT_text_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Text"; - ot->description = "Add a text object to the scene"; + ot->name= _("Add Text"); + ot->description = _("Add a text object to the scene"); ot->idname= "OBJECT_OT_text_add"; /* api callbacks */ @@ -772,8 +772,8 @@ void OBJECT_OT_group_instance_add(wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Add Group Instance"; - ot->description = "Add a dupligroup instance"; + ot->name= _("Add Group Instance"); + ot->description = _("Add a dupligroup instance"); ot->idname= "OBJECT_OT_group_instance_add"; /* api callbacks */ @@ -1704,8 +1704,8 @@ void OBJECT_OT_duplicate(wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Duplicate Objects"; - ot->description = "Duplicate selected objects"; + ot->name= _("Duplicate Objects"); + ot->description = _("Duplicate selected objects"); ot->idname= "OBJECT_OT_duplicate"; /* api callbacks */ @@ -1775,8 +1775,8 @@ static int add_named_exec(bContext *C, wmOperator *op) void OBJECT_OT_add_named(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Named Object"; - ot->description = "Add named object"; + ot->name= _("Add Named Object"); + ot->description = _("Add named object"); ot->idname= "OBJECT_OT_add_named"; /* api callbacks */ @@ -1882,8 +1882,8 @@ static int join_shapes_exec(bContext *C, wmOperator *op) void OBJECT_OT_join_shapes(wmOperatorType *ot) { /* identifiers */ - ot->name= "Join as Shapes"; - ot->description = "Merge selected objects to shapes of active object"; + ot->name= _("Join as Shapes"); + ot->description = _("Merge selected objects to shapes of active object"); ot->idname= "OBJECT_OT_join_shapes"; /* api callbacks */ diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 1fc7c02fd74..5ee920734bf 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -1587,9 +1587,9 @@ static int object_calculate_paths_exec (bContext *C, wmOperator *UNUSED(op)) void OBJECT_OT_paths_calculate (wmOperatorType *ot) { /* identifiers */ - ot->name= "Calculate Object Paths"; + ot->name= _("Calculate Object Paths"); ot->idname= "OBJECT_OT_paths_calculate"; - ot->description= "Calculate paths for the selected bones"; + ot->description= _("Calculate paths for the selected bones"); /* api callbacks */ ot->exec= object_calculate_paths_exec; @@ -1633,7 +1633,7 @@ void OBJECT_OT_paths_clear (wmOperatorType *ot) /* identifiers */ ot->name= "Clear Object Paths"; ot->idname= "OBJECT_OT_paths_clear"; - ot->description= "Clear path caches for selected bones"; + ot->description= _("Clear path caches for selected bones"); /* api callbacks */ ot->exec= object_clear_paths_exec; @@ -1690,8 +1690,8 @@ static int shade_poll(bContext *C) void OBJECT_OT_shade_flat(wmOperatorType *ot) { /* identifiers */ - ot->name= "Shade Flat"; - ot->description= "Display faces 'smooth' (using vertext normals)"; + ot->name= _("Shade Flat"); + ot->description= _("Display faces 'smooth' (using vertext normals)"); ot->idname= "OBJECT_OT_shade_flat"; /* api callbacks */ @@ -1705,8 +1705,8 @@ void OBJECT_OT_shade_flat(wmOperatorType *ot) void OBJECT_OT_shade_smooth(wmOperatorType *ot) { /* identifiers */ - ot->name= "Shade Smooth"; - ot->description= "Display faces 'flat'"; + ot->name= _("Shade Smooth"); + ot->description= _("Display faces 'flat'"); ot->idname= "OBJECT_OT_shade_smooth"; /* api callbacks */ diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 6a379d1171d..dfe0b6e96bc 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -918,9 +918,9 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) void OBJECT_OT_origin_set(wmOperatorType *ot) { static EnumPropertyItem prop_set_center_types[] = { - {GEOMETRY_TO_ORIGIN, "GEOMETRY_ORIGIN", 0, "Geometry to Origin", "Move object geometry to object origin"}, - {ORIGIN_TO_GEOMETRY, "ORIGIN_GEOMETRY", 0, "Origin to Geometry", "Move object origin to center of object geometry"}, - {ORIGIN_TO_CURSOR, "ORIGIN_CURSOR", 0, "Origin to 3D Cursor", "Move object origin to position of the 3d cursor"}, + {GEOMETRY_TO_ORIGIN, "GEOMETRY_ORIGIN", 0, N_("Geometry to Origin"), N_("Move object geometry to object origin")}, + {ORIGIN_TO_GEOMETRY, "ORIGIN_GEOMETRY", 0, N_("Origin to Geometry"), N_("Move object origin to center of object geometry")}, + {ORIGIN_TO_CURSOR, "ORIGIN_CURSOR", 0, N_("Origin to 3D Cursor"), N_("Move object origin to position of the 3d cursor")}, {0, NULL, 0, NULL, NULL} }; @@ -931,8 +931,8 @@ void OBJECT_OT_origin_set(wmOperatorType *ot) }; /* identifiers */ - ot->name= "Set Origin"; - ot->description = "Set the object's origin, by either moving the data, or set to center of data, or use 3d cursor"; + ot->name= _("Set Origin"); + ot->description = _("Set the object's origin, by either moving the data, or set to center of data, or use 3d cursor"); ot->idname= "OBJECT_OT_origin_set"; /* api callbacks */ @@ -944,7 +944,7 @@ void OBJECT_OT_origin_set(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - ot->prop= RNA_def_enum(ot->srna, "type", prop_set_center_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_set_center_types), 0, "Type", ""); RNA_def_enum(ot->srna, "center", prop_set_bounds_types, V3D_CENTROID, "Center", ""); } diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 1a3e4d8a50f..3c406c80926 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2447,7 +2447,7 @@ static void SCREEN_OT_repeat_history(wmOperatorType *ot) { /* identifiers */ ot->name= "Repeat History"; - ot->description= "Display menu for previous actions performed"; + ot->description= _("Display menu for previous actions performed"); ot->idname= "SCREEN_OT_repeat_history"; /* api callbacks */ @@ -3168,7 +3168,7 @@ static void SCREEN_OT_new(wmOperatorType *ot) { /* identifiers */ ot->name= "New Screen"; - ot->description= "Add a new screen"; + ot->description= _("Add a new screen"); ot->idname= "SCREEN_OT_new"; /* api callbacks */ @@ -3193,8 +3193,8 @@ static int screen_delete_exec(bContext *C, wmOperator *UNUSED(op)) static void SCREEN_OT_delete(wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete Screen"; //was scene - ot->description= "Delete active screen"; + ot->name= _("Delete Screen"); //was scene + ot->description= _("Delete active screen"); ot->idname= "SCREEN_OT_delete"; /* api callbacks */ @@ -3240,16 +3240,16 @@ static int scene_new_exec(bContext *C, wmOperator *op) static void SCENE_OT_new(wmOperatorType *ot) { static EnumPropertyItem type_items[]= { - {SCE_COPY_NEW, "NEW", 0, "New", "Add new scene"}, - {SCE_COPY_EMPTY, "EMPTY", 0, "Copy Settings", "Make a copy without any objects"}, - {SCE_COPY_LINK_OB, "LINK_OBJECTS", 0, "Link Objects", "Link to the objects from the current scene"}, - {SCE_COPY_LINK_DATA, "LINK_OBJECT_DATA", 0, "Link Object Data", "Copy objects linked to data from the current scene"}, - {SCE_COPY_FULL, "FULL_COPY", 0, "Full Copy", "Make a full copy of the current scene"}, + {SCE_COPY_NEW, "NEW", 0, N_("New"), N_("Add new scene")}, + {SCE_COPY_EMPTY, "EMPTY", 0, N_("Copy Settings"), N_("Make a copy without any objects")}, + {SCE_COPY_LINK_OB, "LINK_OBJECTS", 0, N_("Link Objects"), N_("Link to the objects from the current scene")}, + {SCE_COPY_LINK_DATA, "LINK_OBJECT_DATA", 0, N_("Link Object Data"), N_("Copy objects linked to data from the current scene")}, + {SCE_COPY_FULL, "FULL_COPY", 0, N_("Full Copy"), N_("Make a full copy of the current scene")}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "New Scene"; - ot->description= "Add new scene by type"; + ot->name= _("New Scene"); + ot->description= _("Add new scene by type"); ot->idname= "SCENE_OT_new"; /* api callbacks */ @@ -3260,7 +3260,7 @@ static void SCENE_OT_new(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", type_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(type_items), 0, "Type", ""); } /********************* delete scene operator *********************/ @@ -3277,8 +3277,8 @@ static int scene_delete_exec(bContext *C, wmOperator *UNUSED(op)) static void SCENE_OT_delete(wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete Scene"; - ot->description= "Delete active scene"; + ot->name= _("Delete Scene"); + ot->description= _("Delete active scene"); ot->idname= "SCENE_OT_delete"; /* api callbacks */ diff --git a/source/blender/editors/space_buttons/CMakeLists.txt b/source/blender/editors/space_buttons/CMakeLists.txt index 0a4f251e46f..71eee0aaeba 100644 --- a/source/blender/editors/space_buttons/CMakeLists.txt +++ b/source/blender/editors/space_buttons/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenloader ../../blenlib diff --git a/source/blender/editors/space_buttons/SConscript b/source/blender/editors/space_buttons/SConscript index a4270f1f59a..740353bc1f0 100644 --- a/source/blender/editors/space_buttons/SConscript +++ b/source/blender/editors/space_buttons/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../makesrna ../../render/extern/include ../../blenloader' diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index 99e5c6d693e..346531b2b11 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -43,6 +43,8 @@ #include "BLI_string.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_global.h" #include "BKE_main.h" @@ -83,8 +85,8 @@ static int toolbox_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(e void BUTTONS_OT_toolbox(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toolbox"; - ot->description="Display button panel toolbox"; + ot->name= _("Toolbox"); + ot->description=_("Display button panel toolbox"); ot->idname= "BUTTONS_OT_toolbox"; /* api callbacks */ @@ -216,8 +218,8 @@ static int file_browse_invoke(bContext *C, wmOperator *op, wmEvent *event) void BUTTONS_OT_file_browse(wmOperatorType *ot) { /* identifiers */ - ot->name= "Accept"; - ot->description="Open a file browser, Hold Shift to open the file, Alt to browse containing directory"; + ot->name= _("Accept"); + ot->description=_("Open a file browser, Hold Shift to open the file, Alt to browse containing directory"); ot->idname= "BUTTONS_OT_file_browse"; /* api callbacks */ @@ -233,8 +235,8 @@ void BUTTONS_OT_file_browse(wmOperatorType *ot) void BUTTONS_OT_directory_browse(wmOperatorType *ot) { /* identifiers */ - ot->name= "Accept"; - ot->description="Open a directory browser, Hold Shift to open the file, Alt to browse containing directory"; + ot->name= _("Accept"); + ot->description=_("Open a directory browser, Hold Shift to open the file, Alt to browse containing directory"); ot->idname= "BUTTONS_OT_directory_browse"; /* api callbacks */ diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 185a13358f3..899442a8d5a 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -181,7 +181,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar) but = uiDefButTextO(block, TEX, "FILE_OT_directory", 0, "", min_x, line1_y, line1_w-chan_offs, btn_h, params->dir, 0.0, (float)FILE_MAX-1, 0, 0, - "File path."); + _("File path.")); uiButSetCompleteFunc(but, autocomplete_directory, NULL); uiButSetFlag(but, UI_BUT_NO_UTF8); @@ -209,13 +209,13 @@ void file_draw_buttons(const bContext *C, ARegion *ar) but = uiDefIconButO(block, BUT, "FILE_OT_filenum", 0, ICON_ZOOMOUT, min_x + line2_w + separator - chan_offs, line2_y, btn_fn_w, btn_h, - "Decrement the filename number"); + _("Decrement the filename number")); RNA_int_set(uiButGetOperatorPtrRNA(but), "increment", -1); but = uiDefIconButO(block, BUT, "FILE_OT_filenum", 0, ICON_ZOOMIN, min_x + line2_w + separator + btn_fn_w - chan_offs, line2_y, btn_fn_w, btn_h, - "Increment the filename number"); + _("Increment the filename number")); RNA_int_set(uiButGetOperatorPtrRNA(but), "increment", 1); uiBlockEndAlign(block); } diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index fc685657253..41d87ac0e08 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -295,8 +295,8 @@ static int file_border_select_exec(bContext *C, wmOperator *op) void FILE_OT_select_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Activate/Select File"; - ot->description= "Activate/select the file(s) contained in the border"; + ot->name= _("Activate/Select File"); + ot->description= _("Activate/select the file(s) contained in the border"); ot->idname= "FILE_OT_select_border"; /* api callbacks */ @@ -346,8 +346,8 @@ static int file_select_invoke(bContext *C, wmOperator *op, wmEvent *event) void FILE_OT_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Activate/Select File"; - ot->description= "Activate/select file"; + ot->name= _("Activate/Select File"); + ot->description= _("Activate/select file"); ot->idname= "FILE_OT_select"; /* api callbacks */ @@ -393,8 +393,8 @@ static int file_select_all_exec(bContext *C, wmOperator *UNUSED(op)) void FILE_OT_select_all_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select/Deselect All Files"; - ot->description= "Select/deselect all files"; + ot->name= _("Select/Deselect All Files"); + ot->description= _("Select/deselect all files"); ot->idname= "FILE_OT_select_all_toggle"; /* api callbacks */ @@ -430,8 +430,8 @@ static int bookmark_select_exec(bContext *C, wmOperator *op) void FILE_OT_select_bookmark(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Directory"; - ot->description= "Select a bookmarked directory"; + ot->name= _("Select Directory"); + ot->description= _("Select a bookmarked directory"); ot->idname= "FILE_OT_select_bookmark"; /* api callbacks */ @@ -463,7 +463,7 @@ static int bookmark_add_exec(bContext *C, wmOperator *UNUSED(op)) void FILE_OT_bookmark_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Bookmark"; + ot->name= _("Add Bookmark"); ot->description= _("Add a bookmark for the selected/active directory"); ot->idname= "FILE_OT_bookmark_add"; @@ -496,8 +496,8 @@ static int bookmark_delete_exec(bContext *C, wmOperator *op) void FILE_OT_delete_bookmark(wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete Bookmark"; - ot->description= "Delete selected bookmark"; + ot->name= _("Delete Bookmark"); + ot->description= _("Delete selected bookmark"); ot->idname= "FILE_OT_delete_bookmark"; /* api callbacks */ @@ -558,8 +558,8 @@ static int file_highlight_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *e void FILE_OT_highlight(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Highlight File"; - ot->description= "Highlight selected file(s)"; + ot->name= _("Highlight File"); + ot->description= _("Highlight selected file(s)"); ot->idname= "FILE_OT_highlight"; /* api callbacks */ @@ -592,8 +592,8 @@ static int file_operator_poll(bContext *C) void FILE_OT_cancel(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Cancel File Load"; - ot->description= "Cancel loading of selected file"; + ot->name= _("Cancel File Load"); + ot->description= _("Cancel loading of selected file"); ot->idname= "FILE_OT_cancel"; /* api callbacks */ @@ -752,8 +752,8 @@ int file_exec(bContext *C, wmOperator *exec_op) void FILE_OT_execute(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Execute File Window"; - ot->description= "Execute selected file"; + ot->name= _("Execute File Window"); + ot->description= _("Execute selected file"); ot->idname= "FILE_OT_execute"; /* api callbacks */ @@ -785,8 +785,8 @@ int file_parent_exec(bContext *C, wmOperator *UNUSED(unused)) void FILE_OT_parent(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Parent File"; - ot->description= "Move to parent directory"; + ot->name= _("Parent File"); + ot->description= _("Move to parent directory"); ot->idname= "FILE_OT_parent"; /* api callbacks */ @@ -810,8 +810,8 @@ static int file_refresh_exec(bContext *C, wmOperator *UNUSED(unused)) void FILE_OT_previous(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Previous Folder"; - ot->description= "Move to previous folder"; + ot->name= _("Previous Folder"); + ot->description= _("Move to previous folder"); ot->idname= "FILE_OT_previous"; /* api callbacks */ @@ -841,8 +841,8 @@ int file_previous_exec(bContext *C, wmOperator *UNUSED(unused)) void FILE_OT_next(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Next Folder"; - ot->description= "Move to next folder"; + ot->name= _("Next Folder"); + ot->description= _("Move to next folder"); ot->idname= "FILE_OT_next"; /* api callbacks */ @@ -968,9 +968,9 @@ void FILE_OT_smoothscroll(wmOperatorType *ot) { /* identifiers */ - ot->name= "Smooth Scroll"; + ot->name= _("Smooth Scroll"); ot->idname= "FILE_OT_smoothscroll"; - ot->description="Smooth scroll to make editable file visible."; + ot->description=_("Smooth scroll to make editable file visible."); /* api callbacks */ ot->invoke= file_smoothscroll_invoke; @@ -1192,8 +1192,8 @@ static int file_hidedot_exec(bContext *C, wmOperator *UNUSED(unused)) void FILE_OT_hidedot(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Hide Dot Files"; - ot->description= "Toggle hide hidden dot files"; + ot->name= _("Toggle Hide Dot Files"); + ot->description= _("Toggle hide hidden dot files"); ot->idname= "FILE_OT_hidedot"; /* api callbacks */ @@ -1242,8 +1242,8 @@ static int file_bookmark_toggle_exec(bContext *C, wmOperator *UNUSED(unused)) void FILE_OT_bookmark_toggle(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Bookmarks"; - ot->description= "Toggle bookmarks display"; + ot->name= _("Toggle Bookmarks"); + ot->description= _("Toggle bookmarks display"); ot->idname= "FILE_OT_bookmark_toggle"; /* api callbacks */ @@ -1272,8 +1272,8 @@ static int file_filenum_exec(bContext *C, wmOperator *op) void FILE_OT_filenum(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Increment Number in Filename"; - ot->description= "Increment number in filename"; + ot->name= _("Increment Number in Filename"); + ot->description= _("Increment number in filename"); ot->idname= "FILE_OT_filenum"; /* api callbacks */ @@ -1326,8 +1326,8 @@ static int file_rename_poll(bContext *C) void FILE_OT_rename(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Rename File or Directory"; - ot->description= "Rename file or file directory"; + ot->name= _("Rename File or Directory"); + ot->description= _("Rename file or file directory"); ot->idname= "FILE_OT_rename"; /* api callbacks */ @@ -1378,8 +1378,8 @@ int file_delete_exec(bContext *C, wmOperator *UNUSED(op)) void FILE_OT_delete(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete File"; - ot->description= "Delete selected file"; + ot->name= _("Delete File"); + ot->description= _("Delete selected file"); ot->idname= "FILE_OT_delete"; /* api callbacks */ diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c index 0fb17498443..1fef6d3846e 100644 --- a/source/blender/editors/space_info/info_ops.c +++ b/source/blender/editors/space_info/info_ops.c @@ -412,7 +412,7 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wm void INFO_OT_reports_display_update(wmOperatorType *ot) { /* identifiers */ - ot->name= "Update Reports Display"; + ot->name= _("Update Reports Display"); ot->idname= "INFO_OT_reports_display_update"; /* api callbacks */ diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index ea3263e0021..1ec4d42d453 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -450,7 +450,7 @@ static void outliner_add_passes(SpaceOops *soops, TreeElement *tenla, ID *id, Sc * in order to not overflow short tselem->nr */ te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_COMBINED)); - te->name= "Combined"; + te->name= _("Combined"); te->directdata= &srl->passflag; /* save cpu cycles, but we add the first to invoke an open/close triangle */ @@ -463,11 +463,11 @@ static void outliner_add_passes(SpaceOops *soops, TreeElement *tenla, ID *id, Sc te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_VECTOR)); - te->name= "Vector"; + te->name= _("Vector"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_NORMAL)); - te->name= "Normal"; + te->name= _("Normal"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_UV)); @@ -475,27 +475,27 @@ static void outliner_add_passes(SpaceOops *soops, TreeElement *tenla, ID *id, Sc te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_MIST)); - te->name= "Mist"; + te->name= _("Mist"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_INDEXOB)); - te->name= "Index Object"; + te->name= _("Index Object"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_RGBA)); - te->name= "Color"; + te->name= _("Color"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_DIFFUSE)); - te->name= "Diffuse"; + te->name= _("Diffuse"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_SPEC)); - te->name= "Specular"; + te->name= _("Specular"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_SHADOW)); - te->name= "Shadow"; + te->name= _("Shadow"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_AO)); @@ -503,23 +503,23 @@ static void outliner_add_passes(SpaceOops *soops, TreeElement *tenla, ID *id, Sc te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_REFLECT)); - te->name= "Reflection"; + te->name= _("Reflection"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_REFRACT)); - te->name= "Refraction"; + te->name= _("Refraction"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_INDIRECT)); - te->name= "Indirect"; + te->name= _("Indirect"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_ENVIRONMENT)); - te->name= "Environment"; + te->name= _("Environment"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_EMIT)); - te->name= "Emit"; + te->name= _("Emit"); te->directdata= &srl->passflag; } @@ -546,7 +546,7 @@ static void outliner_add_scene_contents(SpaceOops *soops, ListBase *lb, Scene *s TreeElement *tenla= outliner_add_element(soops, lb, sce, te, TSE_R_LAYER_BASE, 0); int a; - tenla->name= "RenderLayers"; + tenla->name= _("RenderLayers"); for(a=0, srl= sce->r.layers.first; srl; srl= srl->next, a++) { TreeElement *tenlay= outliner_add_element(soops, &tenla->subtree, sce, te, TSE_R_LAYER, a); tenlay->name= srl->name; @@ -2814,9 +2814,9 @@ static int outliner_show_active_exec(bContext *C, wmOperator *UNUSED(op)) void OUTLINER_OT_show_active(wmOperatorType *ot) { /* identifiers */ - ot->name= "Show Active"; + ot->name= _("Show Active"); ot->idname= "OUTLINER_OT_show_active"; - ot->description= "Adjust the view so that the active Object is shown centered"; + ot->description= _("Adjust the view so that the active Object is shown centered"); /* callbacks */ ot->exec= outliner_show_active_exec; @@ -3044,9 +3044,9 @@ static int outliner_show_hierarchy_exec(bContext *C, wmOperator *UNUSED(op)) void OUTLINER_OT_show_hierarchy(wmOperatorType *ot) { /* identifiers */ - ot->name= "Show Hierarchy"; + ot->name= _("Show Hierarchy"); ot->idname= "OUTLINER_OT_show_hierarchy"; - ot->description= "Open all object entries and close all others"; + ot->description= _("Open all object entries and close all others"); /* callbacks */ ot->exec= outliner_show_hierarchy_exec; diff --git a/source/blender/editors/space_time/CMakeLists.txt b/source/blender/editors/space_time/CMakeLists.txt index 79081c7cfd4..965f7e541b8 100644 --- a/source/blender/editors/space_time/CMakeLists.txt +++ b/source/blender/editors/space_time/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenloader ../../blenlib diff --git a/source/blender/editors/space_time/SConscript b/source/blender/editors/space_time/SConscript index c08339ba692..ec59d774f65 100644 --- a/source/blender/editors/space_time/SConscript +++ b/source/blender/editors/space_time/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../makesrna ../../blenloader' diff --git a/source/blender/editors/space_time/time_ops.c b/source/blender/editors/space_time/time_ops.c index e9559426b81..b6a3afb23ca 100644 --- a/source/blender/editors/space_time/time_ops.c +++ b/source/blender/editors/space_time/time_ops.c @@ -39,6 +39,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "ED_screen.h" @@ -161,9 +163,9 @@ static int time_view_all_exec (bContext *C, wmOperator *UNUSED(op)) static void TIME_OT_view_all (wmOperatorType *ot) { /* identifiers */ - ot->name= "View All"; + ot->name= _("View All"); ot->idname= "TIME_OT_view_all"; - ot->description= "Show the entire playable frame range"; + ot->description= _("Show the entire playable frame range"); /* api callbacks */ ot->exec= time_view_all_exec; diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 033d9cd4312..1f3fed02c85 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -917,8 +917,8 @@ void VIEW3D_OT_rotate(wmOperatorType *ot) { /* identifiers */ - ot->name= "Rotate view"; - ot->description = "Rotate the view"; + ot->name= _("Rotate view"); + ot->description = _("Rotate the view"); ot->idname= "VIEW3D_OT_rotate"; /* api callbacks */ @@ -1079,8 +1079,8 @@ void VIEW3D_OT_move(wmOperatorType *ot) { /* identifiers */ - ot->name= "Move view"; - ot->description = "Move the view"; + ot->name= _("Move view"); + ot->description = _("Move the view"); ot->idname= "VIEW3D_OT_move"; /* api callbacks */ @@ -1442,8 +1442,8 @@ static int viewzoom_cancel(bContext *C, wmOperator *op) void VIEW3D_OT_zoom(wmOperatorType *ot) { /* identifiers */ - ot->name= "Zoom View"; - ot->description = "Zoom in/out in the view"; + ot->name= _("Zoom View"); + ot->description = _("Zoom in/out in the view"); ot->idname= "VIEW3D_OT_zoom"; /* api callbacks */ @@ -1676,8 +1676,8 @@ static int viewdolly_cancel(bContext *C, wmOperator *op) void VIEW3D_OT_dolly(wmOperatorType *ot) { /* identifiers */ - ot->name= "Dolly view"; - ot->description = "Dolly in/out in the view"; + ot->name= _("Dolly view"); + ot->description = _("Dolly in/out in the view"); ot->idname= "VIEW3D_OT_dolly"; /* api callbacks */ @@ -2006,8 +2006,8 @@ static int view3d_center_camera_exec(bContext *C, wmOperator *UNUSED(op)) /* was void VIEW3D_OT_view_center_camera(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Camera Center"; - ot->description = "Center the camera view"; + ot->name= _("View Camera Center"); + ot->description = _("Center the camera view"); ot->idname= "VIEW3D_OT_view_center_camera"; /* api callbacks */ @@ -2071,8 +2071,8 @@ static int render_border_exec(bContext *C, wmOperator *op) void VIEW3D_OT_render_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Render Border"; - ot->description = "Set the boundaries of the border render and enables border render "; + ot->name= _("Set Render Border"); + ot->description = _("Set the boundaries of the border render and enables border render "); ot->idname= "VIEW3D_OT_render_border"; /* api callbacks */ @@ -2227,8 +2227,8 @@ static int view3d_zoom_border_invoke(bContext *C, wmOperator *op, wmEvent *event void VIEW3D_OT_zoom_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Border Zoom"; - ot->description = "Zoom in the view to the nearest object contained in the border"; + ot->name= _("Border Zoom"); + ot->description = _("Zoom in the view to the nearest object contained in the border"); ot->idname= "VIEW3D_OT_zoom_border"; /* api callbacks */ @@ -2278,8 +2278,8 @@ static int view3d_zoom_1_to_1_camera_exec(bContext *C, wmOperator *UNUSED(op)) void VIEW3D_OT_zoom_camera_1_to_1(wmOperatorType *ot) { /* identifiers */ - ot->name= "Zoom Camera 1:1"; - ot->description = "Match the camera to 1:1 to the render output"; + ot->name= _("Zoom Camera 1:1"); + ot->description = _("Match the camera to 1:1 to the render output"); ot->idname= "VIEW3D_OT_zoom_camera_1_to_1"; /* api callbacks */ @@ -2293,13 +2293,13 @@ void VIEW3D_OT_zoom_camera_1_to_1(wmOperatorType *ot) /* ********************* Changing view operator ****************** */ static EnumPropertyItem prop_view_items[] = { - {RV3D_VIEW_FRONT, "FRONT", 0, "Front", "View From the Front"}, - {RV3D_VIEW_BACK, "BACK", 0, "Back", "View From the Back"}, - {RV3D_VIEW_LEFT, "LEFT", 0, "Left", "View From the Left"}, - {RV3D_VIEW_RIGHT, "RIGHT", 0, "Right", "View From the Right"}, - {RV3D_VIEW_TOP, "TOP", 0, "Top", "View From the Top"}, - {RV3D_VIEW_BOTTOM, "BOTTOM", 0, "Bottom", "View From the Bottom"}, - {RV3D_VIEW_CAMERA, "CAMERA", 0, "Camera", "View From the active amera"}, + {RV3D_VIEW_FRONT, "FRONT", 0, N_("Front"), N_("View From the Front")}, + {RV3D_VIEW_BACK, "BACK", 0, N_("Back"), N_("View From the Back")}, + {RV3D_VIEW_LEFT, "LEFT", 0, N_("Left"), N_("View From the Left")}, + {RV3D_VIEW_RIGHT, "RIGHT", 0, N_("Right"), N_("View From the Right")}, + {RV3D_VIEW_TOP, "TOP", 0, N_("Top"), N_("View From the Top")}, + {RV3D_VIEW_BOTTOM, "BOTTOM", 0, N_("Bottom"), N_("View From the Bottom")}, + {RV3D_VIEW_CAMERA, "CAMERA", 0, N_("Camera"), N_("View From the active amera")}, {0, NULL, 0, NULL, NULL}}; @@ -2569,8 +2569,8 @@ static int vieworbit_exec(bContext *C, wmOperator *op) void VIEW3D_OT_view_orbit(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Orbit"; - ot->description = "Orbit the view"; + ot->name= _("View Orbit"); + ot->description = _("Orbit the view"); ot->idname= "VIEW3D_OT_view_orbit"; /* api callbacks */ @@ -2617,8 +2617,8 @@ static int viewpan_exec(bContext *C, wmOperator *op) void VIEW3D_OT_view_pan(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Pan"; - ot->description = "Pan the view"; + ot->name= _("View Pan"); + ot->description = _("Pan the view"); ot->idname= "VIEW3D_OT_view_pan"; /* api callbacks */ @@ -2726,8 +2726,8 @@ static int background_image_add_invoke(bContext *C, wmOperator *op, wmEvent *UNU void VIEW3D_OT_background_image_add(wmOperatorType *ot) { /* identifiers */ - ot->name = "Add Background Image"; - ot->description= "Add a new background image"; + ot->name = _("Add Background Image"); + ot->description= _("Add a new background image"); ot->idname = "VIEW3D_OT_background_image_add"; /* api callbacks */ @@ -2739,8 +2739,8 @@ void VIEW3D_OT_background_image_add(wmOperatorType *ot) ot->flag = 0; /* properties */ - RNA_def_string(ot->srna, "name", "Image", 24, "Name", "Image name to assign."); - RNA_def_string(ot->srna, "filepath", "Path", FILE_MAX, "Filepath", "Path to image file"); + RNA_def_string(ot->srna, "name", "Image", 24, _("Name"), _("Image name to assign.")); + RNA_def_string(ot->srna, "filepath", "Path", FILE_MAX, _("Filepath"), _("Path to image file")); } @@ -2767,8 +2767,8 @@ static int background_image_remove_exec(bContext *C, wmOperator *op) void VIEW3D_OT_background_image_remove(wmOperatorType *ot) { /* identifiers */ - ot->name = "Remove Background Image"; - ot->description= "Remove a background image from the 3D view"; + ot->name = _("Remove Background Image"); + ot->description= _("Remove a background image from the 3D view"); ot->idname = "VIEW3D_OT_background_image_remove"; /* api callbacks */ @@ -2866,8 +2866,8 @@ void VIEW3D_OT_clip_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clipping Border"; - ot->description = "Set the view clipping border"; + ot->name= _("Clipping Border"); + ot->description = _("Set the view clipping border"); ot->idname= "VIEW3D_OT_clip_border"; /* api callbacks */ @@ -2959,8 +2959,8 @@ void VIEW3D_OT_cursor3d(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set 3D Cursor"; - ot->description = "Set the location of the 3D cursor"; + ot->name= _("Set 3D Cursor"); + ot->description = _("Set the location of the 3D cursor"); ot->idname= "VIEW3D_OT_cursor3d"; /* api callbacks */ @@ -3001,8 +3001,8 @@ void VIEW3D_OT_manipulator(wmOperatorType *ot) { /* identifiers */ - ot->name= "3D Manipulator"; - ot->description = "Manipulate selected item by axis"; + ot->name= _("3D Manipulator"); + ot->description = _("Manipulate selected item by axis"); ot->idname= "VIEW3D_OT_manipulator"; /* api callbacks */ diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 56ea3e8abd3..32c2ba32b93 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -278,9 +278,9 @@ static char *view3d_modeselect_pup(Scene *scene) static char formatstr[] = "|%s %%x%d %%i%d"; char *str = string; - str += sprintf(str, "Mode: %%t"); + str += sprintf(str, _("Mode: %%t")); - str += sprintf(str, formatstr, "Object Mode", OB_MODE_OBJECT, ICON_OBJECT_DATA); + str += sprintf(str, formatstr, _("Object Mode"), OB_MODE_OBJECT, ICON_OBJECT_DATA); if(ob==NULL) return string; @@ -289,31 +289,31 @@ static char *view3d_modeselect_pup(Scene *scene) || (ob->type == OB_CURVE) || (ob->type == OB_SURF) || (ob->type == OB_FONT) || (ob->type == OB_MBALL) || (ob->type == OB_LATTICE))) { - str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT, ICON_EDITMODE_HLT); + str += sprintf(str, formatstr, _("Edit Mode"), OB_MODE_EDIT, ICON_EDITMODE_HLT); } else if (ob->type == OB_ARMATURE) { if (ob->mode & OB_MODE_POSE) - str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT|OB_MODE_POSE, ICON_EDITMODE_HLT); + str += sprintf(str, formatstr, _("Edit Mode"), OB_MODE_EDIT|OB_MODE_POSE, ICON_EDITMODE_HLT); else - str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT, ICON_EDITMODE_HLT); + str += sprintf(str, formatstr, _("Edit Mode"), OB_MODE_EDIT, ICON_EDITMODE_HLT); } if (ob->type == OB_MESH) { - str += sprintf(str, formatstr, "Sculpt Mode", OB_MODE_SCULPT, ICON_SCULPTMODE_HLT); - str += sprintf(str, formatstr, "Vertex Paint", OB_MODE_VERTEX_PAINT, ICON_VPAINT_HLT); - str += sprintf(str, formatstr, "Texture Paint", OB_MODE_TEXTURE_PAINT, ICON_TPAINT_HLT); - str += sprintf(str, formatstr, "Weight Paint", OB_MODE_WEIGHT_PAINT, ICON_WPAINT_HLT); + str += sprintf(str, formatstr, _("Sculpt Mode"), OB_MODE_SCULPT, ICON_SCULPTMODE_HLT); + str += sprintf(str, formatstr, _("Vertex Paint"), OB_MODE_VERTEX_PAINT, ICON_VPAINT_HLT); + str += sprintf(str, formatstr, _("Texture Paint"), OB_MODE_TEXTURE_PAINT, ICON_TPAINT_HLT); + str += sprintf(str, formatstr, _("Weight Paint"), OB_MODE_WEIGHT_PAINT, ICON_WPAINT_HLT); } /* if active object is an armature */ if (ob->type==OB_ARMATURE) { - str += sprintf(str, formatstr, "Pose Mode", OB_MODE_POSE, ICON_POSE_HLT); + str += sprintf(str, formatstr, _("Pose Mode"), OB_MODE_POSE, ICON_POSE_HLT); } if (ob->particlesystem.first || modifiers_findByType(ob, eModifierType_Cloth) || modifiers_findByType(ob, eModifierType_Softbody)) { - str += sprintf(str, formatstr, "Particle Mode", OB_MODE_PARTICLE_EDIT, ICON_PARTICLEMODE); + str += sprintf(str, formatstr, _("Particle Mode"), OB_MODE_PARTICLE_EDIT, ICON_PARTICLEMODE); } (void)str; return (string); @@ -487,7 +487,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) uiBlockBeginAlign(block); uiDefIconTextButS(block, MENU, B_MODESELECT, object_mode_icon(v3d->modeselect), view3d_modeselect_pup(scene) , - 0,0,126 * dpi_fac, UI_UNIT_Y, &(v3d->modeselect), 0, 0, 0, 0, "Mode"); + 0,0,126 * dpi_fac, UI_UNIT_Y, &(v3d->modeselect), 0, 0, 0, 0, _("Mode")); uiBlockEndAlign(block); /* Draw type */ @@ -524,17 +524,17 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) block= uiLayoutGetBlock(row); if(v3d->twflag & V3D_USE_MANIPULATOR) { - uiDefIconButBitC(block, TOG, V3D_MANIP_TRANSLATE, B_MAN_TRANS, ICON_MAN_TRANS, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, "Translate manipulator mode"); - uiDefIconButBitC(block, TOG, V3D_MANIP_ROTATE, B_MAN_ROT, ICON_MAN_ROT, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, "Rotate manipulator mode"); - uiDefIconButBitC(block, TOG, V3D_MANIP_SCALE, B_MAN_SCALE, ICON_MAN_SCALE, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, "Scale manipulator mode"); + uiDefIconButBitC(block, TOG, V3D_MANIP_TRANSLATE, B_MAN_TRANS, ICON_MAN_TRANS, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, _("Translate manipulator mode")); + uiDefIconButBitC(block, TOG, V3D_MANIP_ROTATE, B_MAN_ROT, ICON_MAN_ROT, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, _("Rotate manipulator mode")); + uiDefIconButBitC(block, TOG, V3D_MANIP_SCALE, B_MAN_SCALE, ICON_MAN_SCALE, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, _("Scale manipulator mode")); } if (v3d->twmode > (BIF_countTransformOrientation(C) - 1) + V3D_MANIP_CUSTOM) { v3d->twmode = 0; } - str_menu = BIF_menustringTransformOrientation(C, "Orientation"); - uiDefButC(block, MENU, B_MAN_MODE, str_menu,0,0,70 * dpi_fac, UI_UNIT_Y, &v3d->twmode, 0, 0, 0, 0, "Transform Orientation"); + str_menu = BIF_menustringTransformOrientation(C, _("Orientation")); + uiDefButC(block, MENU, B_MAN_MODE, str_menu,0,0,70 * dpi_fac, UI_UNIT_Y, &v3d->twmode, 0, 0, 0, 0, _("Transform Orientation")); MEM_freeN((void *)str_menu); } diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index eaae865156e..9c7462ea747 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -358,9 +358,9 @@ void VIEW3D_OT_smoothview(wmOperatorType *ot) { /* identifiers */ - ot->name= "Smooth View"; + ot->name= _("Smooth View"); ot->idname= "VIEW3D_OT_smoothview"; - ot->description="The time to animate the change of view (in milliseconds)"; + ot->description=_("The time to animate the change of view (in milliseconds)"); /* api callbacks */ ot->invoke= view3d_smoothview_invoke; @@ -408,8 +408,8 @@ void VIEW3D_OT_setcameratoview(wmOperatorType *ot) { /* identifiers */ - ot->name= "Align Camera To View"; - ot->description= "Set camera view to active view"; + ot->name= _("Align Camera To View"); + ot->description= _("Set camera view to active view"); ot->idname= "VIEW3D_OT_camera_to_view"; /* api callbacks */ @@ -1611,7 +1611,7 @@ void VIEW3D_OT_localview(wmOperatorType *ot) { /* identifiers */ - ot->name= "Local View"; + ot->name= _("Local View"); ot->description= _("Toggle display of selected object(s) separately and centered in view"); ot->idname= "VIEW3D_OT_localview"; @@ -1837,8 +1837,8 @@ void VIEW3D_OT_game_start(wmOperatorType *ot) { /* identifiers */ - ot->name= "Start Game Engine"; - ot->description= "Start game engine"; + ot->name= _("Start Game Engine"); + ot->description= _("Start game engine"); ot->idname= "VIEW3D_OT_game_start"; /* api callbacks */ diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 861feb73f48..bb2ba654d9c 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -217,7 +217,7 @@ static void TRANSFORM_OT_select_orientation(struct wmOperatorType *ot) ot->poll = ED_operator_view3d_active; prop= RNA_def_property(ot->srna, "orientation", PROP_ENUM, PROP_NONE); - RNA_def_property_ui_text(prop, "Orientation", "Transformation orientation"); + RNA_def_property_ui_text(prop, _("Orientation"), _("Transformation orientation")); RNA_def_enum_funcs(prop, rna_TransformOrientation_itemf); } @@ -526,8 +526,8 @@ void TRANSFORM_OT_translate(struct wmOperatorType *ot) void TRANSFORM_OT_resize(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Resize"; - ot->description= "Resize selected items"; + ot->name = _("Resize"); + ot->description= _("Resize selected items"); ot->idname = OP_RESIZE; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -547,8 +547,8 @@ void TRANSFORM_OT_resize(struct wmOperatorType *ot) void TRANSFORM_OT_trackball(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Trackball"; - ot->description= "Trackball style rotation of selected items"; + ot->name = _("Trackball"); + ot->description= _("Trackball style rotation of selected items"); ot->idname = OP_TRACKBALL; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -587,11 +587,11 @@ void TRANSFORM_OT_rotate(struct wmOperatorType *ot) void TRANSFORM_OT_tilt(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Tilt"; + ot->name = _("Tilt"); /*optionals - "Tilt selected vertices." "Specify an extra axis rotation for selected vertices of 3d curve." */ - ot->description= "Tilt selected control vertices of 3d curve"; + ot->description= _("Tilt selected control vertices of 3d curve"); ot->idname = OP_TILT; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -610,8 +610,8 @@ void TRANSFORM_OT_tilt(struct wmOperatorType *ot) void TRANSFORM_OT_warp(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Warp"; - ot->description= "Warp selected items around the cursor"; + ot->name = _("Warp"); + ot->description= _("Warp selected items around the cursor"); ot->idname = OP_WARP; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -631,8 +631,8 @@ void TRANSFORM_OT_warp(struct wmOperatorType *ot) void TRANSFORM_OT_shear(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Shear"; - ot->description= "Shear selected items along the horizontal screen axis"; + ot->name = _("Shear"); + ot->description= _("Shear selected items along the horizontal screen axis"); ot->idname = OP_SHEAR; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -652,8 +652,8 @@ void TRANSFORM_OT_shear(struct wmOperatorType *ot) void TRANSFORM_OT_push_pull(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Push/Pull"; - ot->description= "Push/Pull selected items"; + ot->name = _("Push/Pull"); + ot->description= _("Push/Pull selected items"); ot->idname = OP_PUSH_PULL; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -672,8 +672,8 @@ void TRANSFORM_OT_push_pull(struct wmOperatorType *ot) void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Shrink/Fatten"; - ot->description= "Shrink/fatten selected vertices along normals"; + ot->name = _("Shrink/Fatten"); + ot->description= _("Shrink/fatten selected vertices along normals"); ot->idname = OP_SHRINK_FATTEN; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -692,9 +692,9 @@ void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot) void TRANSFORM_OT_tosphere(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "To Sphere"; + ot->name = _("To Sphere"); //added "around mesh center" to differentiate between "MESH_OT_vertices_to_sphere()" - ot->description= "Move selected vertices outward in a spherical shape around mesh center"; + ot->description= _("Move selected vertices outward in a spherical shape around mesh center"); ot->idname = OP_TOSPHERE; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -713,8 +713,8 @@ void TRANSFORM_OT_tosphere(struct wmOperatorType *ot) void TRANSFORM_OT_mirror(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Mirror"; - ot->description= "Mirror selected vertices around one or more axes"; + ot->name = _("Mirror"); + ot->description= _("Mirror selected vertices around one or more axes"); ot->idname = OP_MIRROR; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -731,8 +731,8 @@ void TRANSFORM_OT_mirror(struct wmOperatorType *ot) void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Edge Slide"; - ot->description= "Slide an edge loop along a mesh"; + ot->name = _("Edge Slide"); + ot->description= _("Slide an edge loop along a mesh"); ot->idname = OP_EDGE_SLIDE; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -751,8 +751,8 @@ void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot) void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Edge Crease"; - ot->description= "Change the crease of edges"; + ot->name = _("Edge Crease"); + ot->description= _("Change the crease of edges"); ot->idname = OP_EDGE_CREASE; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -771,8 +771,8 @@ void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot) void TRANSFORM_OT_seq_slide(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Sequence Slide"; - ot->description= "Slide a sequence strip in time"; + ot->name = _("Sequence Slide"); + ot->description= _("Slide a sequence strip in time"); ot->idname = OP_SEQ_SLIDE; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -793,8 +793,8 @@ void TRANSFORM_OT_transform(struct wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name = "Transform"; - ot->description= "Transform selected items by mode type"; + ot->name = _("Transform"); + ot->description= _("Transform selected items by mode type"); ot->idname = "TRANSFORM_OT_transform"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 2d539055db3..35053cf3b97 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -49,6 +49,8 @@ #include "BLI_editVert.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + //#include "BIF_editmesh.h" //#include "BIF_interface.h" //#include "BIF_space.h" @@ -407,14 +409,14 @@ EnumPropertyItem *BIF_enumTransformOrientation(bContext *C) } const char * BIF_menustringTransformOrientation(const bContext *C, const char *title) { - char menu[] = "%t|Global%x0|Local%x1|Gimbal%x4|Normal%x2|View%x3"; + char* menu = _("%t|Global%x0|Local%x1|Gimbal%x4|Normal%x2|View%x3"); ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces; TransformOrientation *ts; int i = V3D_MANIP_CUSTOM; char *str_menu, *p; - str_menu = MEM_callocN(strlen(menu) + strlen(title) + 1 + 40 * BIF_countTransformOrientation(C), "UserTransSpace from matrix"); + str_menu = MEM_callocN(strlen(menu) + strlen(title) + 1 + 40 * BIF_countTransformOrientation(C), _("UserTransSpace from matrix")); p = str_menu; p += sprintf(str_menu, "%s", title); diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index d66a6666ac6..a18fd99626e 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -548,6 +548,7 @@ extern StructRNA RNA_UnknownType; extern StructRNA RNA_UserPreferences; extern StructRNA RNA_UserPreferencesEdit; extern StructRNA RNA_UserPreferencesFilePaths; +extern StructRNA RNA_UserPreferencesInput; extern StructRNA RNA_UserPreferencesSystem; extern StructRNA RNA_UserPreferencesView; extern StructRNA RNA_UserSolidLight; diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 174cf95e755..c0ce687bf9e 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -33,6 +33,8 @@ #include "RNA_access.h" #include "RNA_define.h" +#include "BLF_api.h" + #include "DNA_ID.h" #include "DNA_vfont_types.h" #include "DNA_object_types.h" @@ -45,32 +47,32 @@ * NOTE: need to keep this in line with the other defines for these */ EnumPropertyItem id_type_items[] = { - {ID_AC, "ACTION", ICON_ACTION, "Action", ""}, - {ID_AR, "ARMATURE", ICON_ARMATURE_DATA, "Armature", ""}, - {ID_BR, "BRUSH", ICON_BRUSH_DATA, "Brush", ""}, - {ID_CA, "CAMERA", ICON_CAMERA_DATA, "Camera", ""}, - {ID_CU, "CURVE", ICON_CURVE_DATA, "Curve", ""}, - {ID_VF, "FONT", ICON_FONT_DATA, "Font", ""}, - {ID_GD, "GREASEPENCIL", ICON_GREASEPENCIL, "Grease Pencil", ""}, - {ID_GR, "GROUP", ICON_GROUP, "Group", ""}, - {ID_IM, "IMAGE", ICON_IMAGE_DATA, "Image", ""}, - {ID_KE, "KEY", ICON_SHAPEKEY_DATA, "Key", ""}, - {ID_LA, "LAMP", ICON_LAMP_DATA, "Lamp", ""}, - {ID_LI, "LIBRARY", ICON_LIBRARY_DATA_DIRECT, "Library", ""}, - {ID_LT, "LATTICE", ICON_LATTICE_DATA, "Lattice", ""}, - {ID_MA, "MATERIAL", ICON_MATERIAL_DATA, "Material", ""}, - {ID_MB, "META", ICON_META_DATA, "MetaBall", ""}, - {ID_ME, "MESH", ICON_MESH_DATA, "Mesh", ""}, - {ID_NT, "NODETREE", ICON_NODETREE, "NodeTree", ""}, - {ID_OB, "OBJECT", ICON_OBJECT_DATA, "Object", ""}, - {ID_PA, "PARTICLE", ICON_PARTICLE_DATA, "Particle", ""}, - {ID_SCE, "SCENE", ICON_SCENE_DATA, "Scene", ""}, - {ID_SCR, "SCREEN", ICON_SPLITSCREEN, "Screen", ""}, - {ID_SO, "SOUND", ICON_PLAY_AUDIO, "Sound", ""}, - {ID_TXT, "TEXT", ICON_TEXT, "Text", ""}, - {ID_TE, "TEXTURE", ICON_TEXTURE_DATA, "Texture", ""}, - {ID_WO, "WORLD", ICON_WORLD_DATA, "World", ""}, - {ID_WM, "WINDOWMANAGER", ICON_FULLSCREEN, "Window Manager", ""}, + {ID_AC, "ACTION", ICON_ACTION, N_("Action"), ""}, + {ID_AR, "ARMATURE", ICON_ARMATURE_DATA, N_("Armature"), ""}, + {ID_BR, "BRUSH", ICON_BRUSH_DATA, N_("Brush"), ""}, + {ID_CA, "CAMERA", ICON_CAMERA_DATA, N_("Camera"), ""}, + {ID_CU, "CURVE", ICON_CURVE_DATA, N_("Curve"), ""}, + {ID_VF, "FONT", ICON_FONT_DATA, N_("Font"), ""}, + {ID_GD, "GREASEPENCIL", ICON_GREASEPENCIL, N_("Grease Pencil"), ""}, + {ID_GR, "GROUP", ICON_GROUP, N_("Group"), ""}, + {ID_IM, "IMAGE", ICON_IMAGE_DATA, N_("Image"), ""}, + {ID_KE, "KEY", ICON_SHAPEKEY_DATA, N_("Key"), ""}, + {ID_LA, "LAMP", ICON_LAMP_DATA, N_("Lamp"), ""}, + {ID_LI, "LIBRARY", ICON_LIBRARY_DATA_DIRECT, N_("Library"), ""}, + {ID_LT, "LATTICE", ICON_LATTICE_DATA, N_("Lattice"), ""}, + {ID_MA, "MATERIAL", ICON_MATERIAL_DATA, N_("Material"), ""}, + {ID_MB, "META", ICON_META_DATA, N_("MetaBall"), ""}, + {ID_ME, "MESH", ICON_MESH_DATA, N_("Mesh"), ""}, + {ID_NT, "NODETREE", ICON_NODETREE, N_("NodeTree"), ""}, + {ID_OB, "OBJECT", ICON_OBJECT_DATA, N_("Object"), ""}, + {ID_PA, "PARTICLE", ICON_PARTICLE_DATA, N_("Particle"), ""}, + {ID_SCE, "SCENE", ICON_SCENE_DATA, N_("Scene"), ""}, + {ID_SCR, "SCREEN", ICON_SPLITSCREEN, N_("Screen"), ""}, + {ID_SO, "SOUND", ICON_PLAY_AUDIO, N_("Sound"), ""}, + {ID_TXT, "TEXT", ICON_TEXT, N_("Text"), ""}, + {ID_TE, "TEXTURE", ICON_TEXTURE_DATA, N_("Texture"), ""}, + {ID_WO, "WORLD", ICON_WORLD_DATA, N_("World"), ""}, + {ID_WM, "WINDOWMANAGER", ICON_FULLSCREEN, N_("Window Manager"), ""}, {0, NULL, 0, NULL, NULL}}; #ifdef RNA_RUNTIME @@ -441,7 +443,7 @@ static void rna_def_ID(BlenderRNA *brna) RNA_def_struct_idprops_func(srna, "rna_ID_idprops"); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); - RNA_def_property_ui_text(prop, "Name", "Unique datablock ID name"); + RNA_def_property_ui_text(prop, "Name", N_("Unique datablock ID name")); RNA_def_property_string_funcs(prop, "rna_ID_name_get", "rna_ID_name_length", "rna_ID_name_set"); RNA_def_property_string_maxlength(prop, MAX_ID_NAME-2); RNA_def_property_editable_func(prop, "rna_ID_name_editable"); diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 391f681a832..4ab62a4d1b7 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -126,7 +126,22 @@ void RNA_struct_gettexted( StructRNA* ptr ) void RNA_types_init_gettext() { - StructRNA* target_struct[] = { &RNA_UserPreferences, &RNA_Theme, NULL }; + StructRNA* target_struct[] = { + &RNA_UserPreferences, &RNA_UserPreferencesEdit, &RNA_UserPreferencesFilePaths, + &RNA_UserPreferencesInput, &RNA_UserPreferencesSystem, &RNA_UserPreferencesView, + + &RNA_RenderLayer, &RNA_RenderSettings, + &RNA_SpaceOutliner, &RNA_SpaceView3D, &RNA_SpaceTimeline, &RNA_SpaceUserPreferences, + &RNA_Theme, &RNA_ThemeBoneColorSet, &RNA_ThemeWidgetColors, + + &RNA_ToolSettings, + &RNA_ID, + &RNA_FileSelectParams, + &RNA_KeyMapItem, + + /* for test */ + NULL + }; int i=0; for( i=0; target_struct[i]!=NULL; i++ ) { diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index 6638a9d76d3..f01d0a3a286 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -35,6 +35,8 @@ #include "rna_internal.h" +#include "BLF_api.h" + #include "RE_pipeline.h" #include "BKE_utildefines.h" @@ -51,10 +53,10 @@ /* RenderEngine */ static RenderEngineType internal_render_type = { - NULL, NULL, "BLENDER_RENDER", "Blender Render", RE_INTERNAL, NULL, {NULL, NULL, NULL, NULL}}; + NULL, NULL, "BLENDER_RENDER", N_("Blender Render"), RE_INTERNAL, NULL, {NULL, NULL, NULL, NULL}}; #ifdef WITH_GAMEENGINE static RenderEngineType internal_game_type = { - NULL, NULL, "BLENDER_GAME", "Blender Game", RE_INTERNAL|RE_GAME, NULL, {NULL, NULL, NULL, NULL}}; + NULL, NULL, "BLENDER_GAME", N_("Blender Game"), RE_INTERNAL|RE_GAME, NULL, {NULL, NULL, NULL, NULL}}; #endif ListBase R_engines = {NULL, NULL}; diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 145a58ecf0f..66c5b505f72 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -58,6 +58,7 @@ #include "WM_types.h" #include "BLI_threads.h" +#include "BLF_api.h" EnumPropertyItem snap_target_items[] = { {SCE_SNAP_TARGET_CLOSEST, "CLOSEST", 0, "Closest", "Snap closest point onto target"}, @@ -1173,11 +1174,17 @@ static void rna_def_tool_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Project Individual Elements", "Project individual elements on the surface of other objects"); RNA_def_property_ui_icon(prop, ICON_RETOPO, 0); RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */ + + prop= RNA_def_property(srna, "use_snap_project_self", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "snap_flag", SCE_SNAP_PROJECT_NO_SELF); + RNA_def_property_ui_text(prop, "Project to Self", "Project into its self (editmode)"); + RNA_def_property_ui_icon(prop, ICON_ORTHO, 0); + RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */ /* Grease Pencil */ prop = RNA_def_property(srna, "use_grease_pencil_sessions", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gpencil_flags", GP_TOOL_FLAG_PAINTSESSIONS_ON); - RNA_def_property_ui_text(prop, "Use Sketching Sessions", "Allow drawing multiple strokes at a time with Grease Pencil"); + RNA_def_property_ui_text(prop, N_("Use Sketching Sessions"), N_("Allow drawing multiple strokes at a time with Grease Pencil")); RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); // xxx: need toolbar to be redrawn... /* Auto Keying */ @@ -1969,13 +1976,13 @@ static void rna_def_scene_render_data(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem pixel_filter_items[] ={ - {R_FILTER_BOX, "BOX", 0, "Box", "Use a box filter for anti-aliasing"}, - {R_FILTER_TENT, "TENT", 0, "Tent", "Use a tent filter for anti-aliasing"}, - {R_FILTER_QUAD, "QUADRATIC", 0, "Quadratic", "Use a quadratic filter for anti-aliasing"}, - {R_FILTER_CUBIC, "CUBIC", 0, "Cubic", "Use a cubic filter for anti-aliasing"}, - {R_FILTER_CATROM, "CATMULLROM", 0, "Catmull-Rom", "Use a Catmull-Rom filter for anti-aliasing"}, - {R_FILTER_GAUSS, "GAUSSIAN", 0, "Gaussian", "Use a Gaussian filter for anti-aliasing"}, - {R_FILTER_MITCH, "MITCHELL", 0, "Mitchell-Netravali", "Use a Mitchell-Netravali filter for anti-aliasing"}, + {R_FILTER_BOX, "BOX", 0, N_("Box"), N_("Use a box filter for anti-aliasing")}, + {R_FILTER_TENT, "TENT", 0, N_("Tent"), N_("Use a tent filter for anti-aliasing")}, + {R_FILTER_QUAD, "QUADRATIC", 0, N_("Quadratic"), N_("Use a quadratic filter for anti-aliasing")}, + {R_FILTER_CUBIC, "CUBIC", 0, N_("Cubic"), N_("Use a cubic filter for anti-aliasing")}, + {R_FILTER_CATROM, "CATMULLROM", 0, N_("Catmull-Rom"), N_("Use a Catmull-Rom filter for anti-aliasing")}, + {R_FILTER_GAUSS, "GAUSSIAN", 0, N_("Gaussian"), N_("Use a Gaussian filter for anti-aliasing")}, + {R_FILTER_MITCH, "MITCHELL", 0, N_("Mitchell-Netravali"), N_("Use a Mitchell-Netravali filter for anti-aliasing")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem alpha_mode_items[] ={ @@ -1991,10 +1998,10 @@ static void rna_def_scene_render_data(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem display_mode_items[] ={ - {R_OUTPUT_SCREEN, "SCREEN", 0, "Full Screen", "Images are rendered in full Screen"}, - {R_OUTPUT_AREA, "AREA", 0, "Image Editor", "Images are rendered in Image Editor"}, - {R_OUTPUT_WINDOW, "WINDOW", 0, "New Window", "Images are rendered in new Window"}, - {R_OUTPUT_NONE, "NONE", 0, "Keep UI", "Images are rendered without forcing UI changes, optionally showing result"}, + {R_OUTPUT_SCREEN, "SCREEN", 0, N_("Full Screen"), N_("Images are rendered in full Screen")}, + {R_OUTPUT_AREA, "AREA", 0, N_("Image Editor"), N_("Images are rendered in Image Editor")}, + {R_OUTPUT_WINDOW, "WINDOW", 0, N_("New Window"), N_("Images are rendered in new Window")}, + {R_OUTPUT_NONE, "NONE", 0, N_("Keep UI"), N_("Images are rendered without forcing UI changes, optionally showing result")}, {0, NULL, 0, NULL, NULL}}; /* Bake */ @@ -2167,7 +2174,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna) #endif static EnumPropertyItem engine_items[] = { - {0, "BLENDER_RENDER", 0, "Blender Render", "Use the Blender internal rendering engine for rendering"}, + {0, "BLENDER_RENDER", 0, N_("Blender Render"), "Use the Blender internal rendering engine for rendering"}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "RenderSettings", NULL); @@ -2686,7 +2693,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna) prop= RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", R_NO_OVERWRITE); - RNA_def_property_ui_text(prop, "Overwrite", "Overwrite existing files while rendering"); + RNA_def_property_ui_text(prop, N_("Overwrite"), N_("Overwrite existing files while rendering")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE); @@ -2707,7 +2714,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna) prop= RNA_def_property(srna, "use_file_extension", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXTENSION); - RNA_def_property_ui_text(prop, "File Extensions", "Add the file format extensions to the rendered file name (eg: filename + .jpg)"); + RNA_def_property_ui_text(prop, N_("File Extensions"), N_("Add the file format extensions to the rendered file name (eg: filename + .jpg)")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE); @@ -2947,7 +2954,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna) prop= RNA_def_property(srna, "engine", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, engine_items); RNA_def_property_enum_funcs(prop, "rna_RenderSettings_engine_get", "rna_RenderSettings_engine_set", "rna_RenderSettings_engine_itemf"); - RNA_def_property_ui_text(prop, "Engine", "Engine to use for rendering"); + RNA_def_property_ui_text(prop, N_("Engine"), N_("Engine to use for rendering")); RNA_def_property_update(prop, NC_WINDOW, NULL); prop= RNA_def_property(srna, "has_multiple_engines", PROP_BOOLEAN, PROP_NONE); @@ -3158,24 +3165,24 @@ void RNA_def_scene(BlenderRNA *brna) FunctionRNA *func; static EnumPropertyItem audio_distance_model_items[] = { - {0, "NONE", 0, "None", "No distance attenuation"}, - {1, "INVERSE", 0, "Inverse", "Inverse distance model"}, - {2, "INVERSE_CLAMPED", 0, "Inverse Clamped", "Inverse distance model with clamping"}, - {3, "LINEAR", 0, "Linear", "Linear distance model"}, - {4, "LINEAR_CLAMPED", 0, "Linear Clamped", "Linear distance model with clamping"}, - {5, "EXPONENT", 0, "Exponent", "Exponent distance model"}, - {6, "EXPONENT_CLAMPED", 0, "Exponent Clamped", "Exponent distance model with clamping"}, + {0, "NONE", 0, N_("None"), N_("No distance attenuation")}, + {1, "INVERSE", 0, N_("Inverse"), N_("Inverse distance model")}, + {2, "INVERSE_CLAMPED", 0, N_("Inverse Clamped"), N_("Inverse distance model with clamping")}, + {3, "LINEAR", 0, N_("Linear"), N_("Linear distance model")}, + {4, "LINEAR_CLAMPED", 0, N_("Linear Clamped"), N_("Linear distance model with clamping")}, + {5, "EXPONENT", 0, N_("Exponent"), N_("Exponent distance model")}, + {6, "EXPONENT_CLAMPED", 0, N_("Exponent Clamped"), N_("Exponent distance model with clamping")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem sync_mode_items[] = { - {0, "NONE", 0, "No Sync", "Do not sync, play every frame"}, - {SCE_FRAME_DROP, "FRAME_DROP", 0, "Frame Dropping", "Drop frames if playback is too slow"}, - {AUDIO_SYNC, "AUDIO_SYNC", 0, "AV-sync", "Sync to audio playback, dropping frames"}, + {0, "NONE", 0, N_("No Sync"), N_("Do not sync, play every frame")}, + {SCE_FRAME_DROP, "FRAME_DROP", 0, N_("Frame Dropping"), N_("Drop frames if playback is too slow")}, + {AUDIO_SYNC, "AUDIO_SYNC", 0, N_("AV-sync"), N_("Sync to audio playback, dropping frames")}, {0, NULL, 0, NULL, NULL}}; /* Struct definition */ srna= RNA_def_struct(brna, "Scene", "ID"); - RNA_def_struct_ui_text(srna, "Scene", "Scene consisting objects and defining time and render related settings"); + RNA_def_struct_ui_text(srna, N_("Scene"), N_("Scene consisting objects and defining time and render related settings")); RNA_def_struct_ui_icon(srna, ICON_SCENE_DATA); RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT); @@ -3183,7 +3190,7 @@ void RNA_def_scene(BlenderRNA *brna) prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Camera_object_poll"); - RNA_def_property_ui_text(prop, "Camera", "Active camera used for rendering the scene"); + RNA_def_property_ui_text(prop, N_("Camera"), N_("Active camera used for rendering the scene")); RNA_def_property_update(prop, NC_SCENE|NA_EDITED, "rna_Scene_view3d_update"); prop= RNA_def_property(srna, "background_set", PROP_POINTER, PROP_NONE); @@ -3191,17 +3198,17 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_struct_type(prop, "Scene"); RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK); RNA_def_property_pointer_funcs(prop, NULL, "rna_Scene_set_set", NULL, NULL); - RNA_def_property_ui_text(prop, "Background Scene", "Background set scene"); + RNA_def_property_ui_text(prop, N_("Background Scene"), N_("Background set scene")); RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL); prop= RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "World", "World used for rendering the scene"); + RNA_def_property_ui_text(prop, N_("World"), N_("World used for rendering the scene")); RNA_def_property_update(prop, NC_SCENE|ND_WORLD, NULL); prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ_LENGTH); RNA_def_property_float_sdna(prop, NULL, "cursor"); - RNA_def_property_ui_text(prop, "Cursor Location", "3D cursor location"); + RNA_def_property_ui_text(prop, N_("Cursor Location"), N_("3D cursor location")); RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4); RNA_def_property_update(prop, NC_WINDOW, NULL); @@ -3209,14 +3216,14 @@ void RNA_def_scene(BlenderRNA *brna) prop= RNA_def_property(srna, "object_bases", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "base", NULL); RNA_def_property_struct_type(prop, "ObjectBase"); - RNA_def_property_ui_text(prop, "Bases", ""); + RNA_def_property_ui_text(prop, N_("Bases"), ""); RNA_def_property_collection_funcs(prop, 0, 0, 0, 0, 0, 0, "rna_Scene_object_bases_lookup_string"); rna_def_scene_bases(brna, prop); prop= RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "base", NULL); RNA_def_property_struct_type(prop, "Object"); - RNA_def_property_ui_text(prop, "Objects", ""); + RNA_def_property_ui_text(prop, N_("Objects"), ""); RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_Scene_objects_get", 0, 0, 0); rna_def_scene_objects(brna, prop); @@ -3226,7 +3233,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "lay", 1); RNA_def_property_array(prop, 20); RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_layer_set"); - RNA_def_property_ui_text(prop, "Layers", "Layers visible when rendering the scene"); + RNA_def_property_ui_text(prop, N_("Layers"), N_("Layers visible when rendering the scene")); RNA_def_property_update(prop, NC_SCENE|ND_LAYER, "rna_Scene_layer_update"); /* Frame Range Stuff */ @@ -3235,13 +3242,13 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "r.cfra"); RNA_def_property_range(prop, MINAFRAME, MAXFRAME); RNA_def_property_int_funcs(prop, NULL, "rna_Scene_current_frame_set", NULL); - RNA_def_property_ui_text(prop, "Current Frame", "Current Frame"); + RNA_def_property_ui_text(prop, N_("Current Frame"), N_("Current Frame")); RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_frame_update"); prop= RNA_def_property(srna, "frame_subframe", PROP_FLOAT, PROP_TIME); RNA_def_property_float_sdna(prop, NULL, "r.subframe"); - RNA_def_property_ui_text(prop, "Current Sub-Frame", ""); + RNA_def_property_ui_text(prop, N_("Current Sub-Frame"), ""); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE|PROP_EDITABLE); prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME); @@ -3249,7 +3256,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "r.sfra"); RNA_def_property_int_funcs(prop, NULL, "rna_Scene_start_frame_set", NULL); RNA_def_property_range(prop, MINFRAME, MAXFRAME); - RNA_def_property_ui_text(prop, "Start Frame", "First frame of the playback/rendering range"); + RNA_def_property_ui_text(prop, N_("Start Frame"), N_("First frame of the playback/rendering range")); RNA_def_property_update(prop, NC_SCENE|ND_FRAME_RANGE, NULL); prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME); @@ -3257,7 +3264,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "r.efra"); RNA_def_property_int_funcs(prop, NULL, "rna_Scene_end_frame_set", NULL); RNA_def_property_range(prop, MINFRAME, MAXFRAME); - RNA_def_property_ui_text(prop, "End Frame", "Final frame of the playback/rendering range"); + RNA_def_property_ui_text(prop, N_("End Frame"), N_("Final frame of the playback/rendering range")); RNA_def_property_update(prop, NC_SCENE|ND_FRAME_RANGE, NULL); prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_TIME); @@ -3265,7 +3272,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "r.frame_step"); RNA_def_property_range(prop, 0, MAXFRAME); RNA_def_property_ui_range(prop, 1, 100, 1, 0); - RNA_def_property_ui_text(prop, "Frame Step", "Number of frames to skip forward while rendering/playing back each frame"); + RNA_def_property_ui_text(prop, N_("Frame Step"), N_("Number of frames to skip forward while rendering/playing back each frame")); RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL); /* Preview Range (frame-range for UI playback) */ @@ -3273,7 +3280,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_boolean_sdna(prop, NULL, "r.flag", SCER_PRV_RANGE); RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_use_preview_range_set"); - RNA_def_property_ui_text(prop, "Use Preview Range", "Use an alternative start/end frame for UI playback, rather than the scene start/end frame"); + RNA_def_property_ui_text(prop, N_("Use Preview Range"), N_("Use an alternative start/end frame for UI playback, rather than the scene start/end frame")); RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL); RNA_def_property_ui_icon(prop, ICON_PREVIEW_RANGE, 0); @@ -3281,20 +3288,20 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_int_sdna(prop, NULL, "r.psfra"); RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_start_frame_set", NULL); - RNA_def_property_ui_text(prop, "Preview Range Start Frame", "Alternative start frame for UI playback"); + RNA_def_property_ui_text(prop, N_("Preview Range Start Frame"), N_("Alternative start frame for UI playback")); RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL); prop= RNA_def_property(srna, "frame_preview_end", PROP_INT, PROP_TIME); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_int_sdna(prop, NULL, "r.pefra"); RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_end_frame_set", NULL); - RNA_def_property_ui_text(prop, "Preview Range End Frame", "Alternative end frame for UI playback"); + RNA_def_property_ui_text(prop, N_("Preview Range End Frame"), N_("Alternative end frame for UI playback")); RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL); /* Stamp */ prop= RNA_def_property(srna, "use_stamp_note", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "r.stamp_udata"); - RNA_def_property_ui_text(prop, "Stamp Note", "User define note for the render stamping"); + RNA_def_property_ui_text(prop, N_("Stamp Note"), N_("User define note for the render stamping")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); /* Animation Data (for Scene) */ @@ -3304,51 +3311,51 @@ void RNA_def_scene(BlenderRNA *brna) prop= RNA_def_property(srna, "is_nla_tweakmode", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_NLA_EDIT_ON); RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* DO NOT MAKE THIS EDITABLE, OR NLA EDITOR BREAKS */ - RNA_def_property_ui_text(prop, "NLA TweakMode", "Indicates whether there is any action referenced by NLA being edited. Strictly read-only"); + RNA_def_property_ui_text(prop, N_("NLA TweakMode"), N_("Indicates whether there is any action referenced by NLA being edited. Strictly read-only")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL); /* Frame dropping flag for playback and sync enum */ prop= RNA_def_property(srna, "use_frame_drop", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_FRAME_DROP); - RNA_def_property_ui_text(prop, "Frame Dropping", "Play back dropping frames if frame display is too slow"); + RNA_def_property_ui_text(prop, N_("Frame Dropping"), N_("Play back dropping frames if frame display is too slow")); RNA_def_property_update(prop, NC_SCENE, NULL); prop= RNA_def_property(srna, "sync_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_funcs(prop, "rna_Scene_sync_mode_get", "rna_Scene_sync_mode_set", NULL); RNA_def_property_enum_items(prop, sync_mode_items); - RNA_def_property_ui_text(prop, "Sync Mode", "How to sync playback"); + RNA_def_property_ui_text(prop, N_("Sync Mode"), N_("How to sync playback")); RNA_def_property_update(prop, NC_SCENE, NULL); /* Nodes (Compositing) */ prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "nodetree"); - RNA_def_property_ui_text(prop, "Node Tree", "Compositing node tree"); + RNA_def_property_ui_text(prop, N_("Node Tree"), N_("Compositing node tree")); prop= RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1); RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_use_nodes_set"); - RNA_def_property_ui_text(prop, "Use Nodes", "Enable the compositing node tree"); + RNA_def_property_ui_text(prop, N_("Use Nodes"), N_("Enable the compositing node tree")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); /* Sequencer */ prop= RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "ed"); RNA_def_property_struct_type(prop, "SequenceEditor"); - RNA_def_property_ui_text(prop, "Sequence Editor", ""); + RNA_def_property_ui_text(prop, N_("Sequence Editor"), ""); /* Keying Sets */ prop= RNA_def_property(srna, "keying_sets", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "keyingsets", NULL); RNA_def_property_struct_type(prop, "KeyingSet"); - RNA_def_property_ui_text(prop, "Absolute Keying Sets", "Absolute Keying Sets for this Scene"); + RNA_def_property_ui_text(prop, N_("Absolute Keying Sets"), N_("Absolute Keying Sets for this Scene")); RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL); rna_def_scene_keying_sets(brna, prop); prop= RNA_def_property(srna, "keying_sets_all", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_funcs(prop, "rna_Scene_all_keyingsets_begin", "rna_Scene_all_keyingsets_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0); RNA_def_property_struct_type(prop, "KeyingSet"); - RNA_def_property_ui_text(prop, "All Keying Sets", "All Keying Sets available for use (Builtins and Absolute Keying Sets for this Scene)"); + RNA_def_property_ui_text(prop, N_("All Keying Sets"), N_("All Keying Sets available for use (Builtins and Absolute Keying Sets for this Scene)")); RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL); rna_def_scene_keying_sets_all(brna, prop); @@ -3357,26 +3364,26 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "toolsettings"); RNA_def_property_struct_type(prop, "ToolSettings"); - RNA_def_property_ui_text(prop, "Tool Settings", ""); + RNA_def_property_ui_text(prop, N_("Tool Settings"), ""); /* Unit Settings */ prop= RNA_def_property(srna, "unit_settings", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "unit"); RNA_def_property_struct_type(prop, "UnitSettings"); - RNA_def_property_ui_text(prop, "Unit Settings", "Unit editing settings"); + RNA_def_property_ui_text(prop, N_("Unit Settings"), N_("Unit editing settings")); /* Physics Settings */ prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION); RNA_def_property_float_sdna(prop, NULL, "physics_settings.gravity"); RNA_def_property_array(prop, 3); RNA_def_property_range(prop, -200.0f, 200.0f); - RNA_def_property_ui_text(prop, "Gravity", "Constant acceleration in a given direction"); + RNA_def_property_ui_text(prop, N_("Gravity"), N_("Constant acceleration in a given direction")); RNA_def_property_update(prop, 0, "rna_Physics_update"); prop= RNA_def_property(srna, "use_gravity", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "physics_settings.flag", PHYS_GLOBAL_GRAVITY); - RNA_def_property_ui_text(prop, "Global Gravity", "Use global gravity for all dynamics"); + RNA_def_property_ui_text(prop, N_("Global Gravity"), N_("Use global gravity for all dynamics")); RNA_def_property_update(prop, 0, "rna_Physics_update"); /* Render Data */ @@ -3384,47 +3391,47 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "r"); RNA_def_property_struct_type(prop, "RenderSettings"); - RNA_def_property_ui_text(prop, "Render Data", ""); + RNA_def_property_ui_text(prop, N_("Render Data"), ""); /* Markers */ prop= RNA_def_property(srna, "timeline_markers", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "markers", NULL); RNA_def_property_struct_type(prop, "TimelineMarker"); - RNA_def_property_ui_text(prop, "Timeline Markers", "Markers used in all timelines for the current scene"); + RNA_def_property_ui_text(prop, N_("Timeline Markers"), N_("Markers used in all timelines for the current scene")); rna_def_timeline_markers(brna, prop); /* Audio Settings */ prop= RNA_def_property(srna, "use_audio", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_Scene_use_audio_get", "rna_Scene_use_audio_set"); - RNA_def_property_ui_text(prop, "Audio Muted", "Play back of audio from Sequence Editor will be muted"); + RNA_def_property_ui_text(prop, N_("Audio Muted"), N_("Play back of audio from Sequence Editor will be muted")); RNA_def_property_update(prop, NC_SCENE, NULL); prop= RNA_def_property(srna, "use_audio_sync", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SYNC); - RNA_def_property_ui_text(prop, "Audio Sync", "Play back and sync with audio clock, dropping frames if frame display is too slow"); + RNA_def_property_ui_text(prop, N_("Audio Sync"), N_("Play back and sync with audio clock, dropping frames if frame display is too slow")); RNA_def_property_update(prop, NC_SCENE, NULL); prop= RNA_def_property(srna, "use_audio_scrub", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SCRUB); - RNA_def_property_ui_text(prop, "Audio Scrubbing", "Play audio from Sequence Editor while scrubbing"); + RNA_def_property_ui_text(prop, N_("Audio Scrubbing"), N_("Play audio from Sequence Editor while scrubbing")); RNA_def_property_update(prop, NC_SCENE, NULL); prop= RNA_def_property(srna, "audio_doppler_speed", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "audio.speed_of_sound"); RNA_def_property_range(prop, 0.01f, FLT_MAX); - RNA_def_property_ui_text(prop, "Speed of Sound", "Speed of sound for Doppler effect calculation"); + RNA_def_property_ui_text(prop, N_("Speed of Sound"), N_("Speed of sound for Doppler effect calculation")); RNA_def_property_update(prop, NC_SCENE, NULL); prop= RNA_def_property(srna, "audio_doppler_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "audio.doppler_factor"); RNA_def_property_range(prop, 0.0, FLT_MAX); - RNA_def_property_ui_text(prop, "Doppler Factor", "Pitch factor for Doppler effect calculation"); + RNA_def_property_ui_text(prop, N_("Doppler Factor"), N_("Pitch factor for Doppler effect calculation")); RNA_def_property_update(prop, NC_SCENE, NULL); prop= RNA_def_property(srna, "audio_distance_model", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "audio.distance_model"); RNA_def_property_enum_items(prop, audio_distance_model_items); - RNA_def_property_ui_text(prop, "Distance Model", "Distance model for distance attenuation calculation"); + RNA_def_property_ui_text(prop, N_("Distance Model"), N_("Distance model for distance attenuation calculation")); RNA_def_property_update(prop, NC_SCENE, NULL); /* Game Settings */ @@ -3432,7 +3439,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "gm"); RNA_def_property_struct_type(prop, "SceneGameData"); - RNA_def_property_ui_text(prop, "Game Data", ""); + RNA_def_property_ui_text(prop, N_("Game Data"), ""); /* Statistics */ func= RNA_def_function(srna, "statistics", "ED_info_stats_string"); @@ -3444,13 +3451,13 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_pointer_sdna(prop, NULL, "gpd"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "GreasePencil"); - RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil datablock"); + RNA_def_property_ui_text(prop, N_("Grease Pencil Data"), N_("Grease Pencil datablock")); /* Transform Orientations */ prop= RNA_def_property(srna, "orientations", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "transform_spaces", NULL); RNA_def_property_struct_type(prop, "TransformOrientation"); - RNA_def_property_ui_text(prop, "Transform Orientations", ""); + RNA_def_property_ui_text(prop, N_("Transform Orientations"), ""); /* Nestled Data */ rna_def_tool_settings(brna); diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 51556f3d0c7..0966e2b4a38 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -81,12 +81,12 @@ static EnumPropertyItem draw_channels_items[] = { {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem transform_orientation_items[] = { - {V3D_MANIP_GLOBAL, "GLOBAL", 0, "Global", "Align the transformation axes to world space"}, - {V3D_MANIP_LOCAL, "LOCAL", 0, "Local", "Align the transformation axes to the selected objects' local space"}, - {V3D_MANIP_GIMBAL, "GIMBAL", 0, "Gimbal", "Align each axis to the Euler rotation axis as used for input"}, - {V3D_MANIP_NORMAL, "NORMAL", 0, "Normal", "Align the transformation axes to average normal of selected elements (bone Y axis for pose mode)"}, - {V3D_MANIP_VIEW, "VIEW", 0, "View", "Align the transformation axes to the window"}, - {V3D_MANIP_CUSTOM, "CUSTOM", 0, "Custom", "Use a custom transform orientation"}, + {V3D_MANIP_GLOBAL, "GLOBAL", 0, N_("Global"), N_("Align the transformation axes to world space")}, + {V3D_MANIP_LOCAL, "LOCAL", 0, N_("Local"), N_("Align the transformation axes to the selected objects' local space")}, + {V3D_MANIP_GIMBAL, "GIMBAL", 0, N_("Gimbal"), N_("Align each axis to the Euler rotation axis as used for input")}, + {V3D_MANIP_NORMAL, "NORMAL", 0, N_("Normal"), N_("Align the transformation axes to average normal of selected elements (bone Y axis for pose mode)")}, + {V3D_MANIP_VIEW, "VIEW", 0, N_("View"), N_("Align the transformation axes to the window")}, + {V3D_MANIP_CUSTOM, "CUSTOM", 0, N_("Custom"), N_("Use a custom transform orientation")}, {0, NULL, 0, NULL, NULL}}; EnumPropertyItem autosnap_items[] = { @@ -97,11 +97,11 @@ EnumPropertyItem autosnap_items[] = { {0, NULL, 0, NULL, NULL}}; EnumPropertyItem viewport_shade_items[] = { - {OB_BOUNDBOX, "BOUNDBOX", ICON_BBOX, "Bounding Box", "Display the object's local bounding boxes only"}, - {OB_WIRE, "WIREFRAME", ICON_WIRE, "Wireframe", "Display the object as wire edges"}, - {OB_SOLID, "SOLID", ICON_SOLID, "Solid", "Display the object solid, lit with default OpenGL lights"}, + {OB_BOUNDBOX, "BOUNDBOX", ICON_BBOX, N_("Bounding Box"), N_("Display the object's local bounding boxes only")}, + {OB_WIRE, "WIREFRAME", ICON_WIRE, N_("Wireframe"), N_("Display the object as wire edges")}, + {OB_SOLID, "SOLID", ICON_SOLID, N_("Solid"), N_("Display the object solid, lit with default OpenGL lights")}, //{OB_SHADED, "SHADED", ICON_SMOOTH, "Shaded", "Display the object solid, with preview shading interpolated at vertices"}, - {OB_TEXTURE, "TEXTURED", ICON_POTATO, "Textured", "Display the object solid, with face-assigned textures"}, + {OB_TEXTURE, "TEXTURED", ICON_POTATO, N_("Textured"), N_("Display the object solid, with face-assigned textures")}, {0, NULL, 0, NULL, NULL}}; #ifdef RNA_RUNTIME @@ -853,14 +853,14 @@ static EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C, if(ob) { if(ob->type == OB_LAMP) { tmp.value = SB_TEXC_MAT_OR_LAMP; - tmp.description = "Show Lamp Textures"; + tmp.description = _("Show Lamp Textures"); tmp.identifier = "LAMP"; tmp.icon = ICON_LAMP_POINT; RNA_enum_item_add(&item, &totitem, &tmp); } else if(ob->totcol) { tmp.value = SB_TEXC_MAT_OR_LAMP; - tmp.description = "Show Material Textures"; + tmp.description = _("Show Material Textures"); tmp.identifier = "MATERIAL"; tmp.icon = ICON_MATERIAL; RNA_enum_item_add(&item, &totitem, &tmp); @@ -868,7 +868,7 @@ static EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C, if(ob->particlesystem.first) { tmp.value = SB_TEXC_PARTICLES; - tmp.description = "Show Particle Textures"; + tmp.description = _("Show Particle Textures"); tmp.identifier = "PARTICLE"; tmp.icon = ICON_PARTICLES; RNA_enum_item_add(&item, &totitem, &tmp); @@ -877,14 +877,14 @@ static EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C, if(scene && scene->world) { tmp.value = SB_TEXC_WORLD; - tmp.description = "Show World Textures"; + tmp.description = _("Show World Textures"); tmp.identifier = "WORLD"; tmp.icon = ICON_WORLD; RNA_enum_item_add(&item, &totitem, &tmp); } tmp.value = SB_TEXC_BRUSH; - tmp.description = "Show Brush Textures"; + tmp.description = _("Show Brush Textures"); tmp.identifier = "BRUSH"; tmp.icon = ICON_BRUSH_DATA; RNA_enum_item_add(&item, &totitem, &tmp); @@ -1029,18 +1029,18 @@ static void rna_def_space_outliner(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem display_mode_items[] = { - {SO_ALL_SCENES, "ALL_SCENES", 0, "All Scenes", "Display datablocks in all scenes"}, - {SO_CUR_SCENE, "CURRENT_SCENE", 0, "Current Scene", "Display datablocks in current scene"}, - {SO_VISIBLE, "VISIBLE_LAYERS", 0, "Visible Layers", "Display datablocks in visible layers"}, - {SO_SELECTED, "SELECTED", 0, "Selected", "Display datablocks of selected objects"}, - {SO_ACTIVE, "ACTIVE", 0, "Active", "Display datablocks of active object"}, - {SO_SAME_TYPE, "SAME_TYPES", 0, "Same Types", "Display datablocks of all objects of same type as selected object"}, - {SO_GROUPS, "GROUPS", 0, "Groups", "Display groups and their datablocks"}, - {SO_LIBRARIES, "LIBRARIES", 0, "Libraries", "Display libraries"}, - {SO_SEQUENCE, "SEQUENCE", 0, "Sequence", "Display sequence datablocks"}, - {SO_DATABLOCKS, "DATABLOCKS", 0, "Datablocks", "Display raw datablocks"}, - {SO_USERDEF, "USER_PREFERENCES", 0, "User Preferences", "Display the user preference datablocks"}, - {SO_KEYMAP, "KEYMAPS", 0, "Key Maps", "Display keymap datablocks"}, + {SO_ALL_SCENES, "ALL_SCENES", 0, N_("All Scenes"), N_("Display datablocks in all scenes")}, + {SO_CUR_SCENE, "CURRENT_SCENE", 0, N_("Current Scene"), N_("Display datablocks in current scene")}, + {SO_VISIBLE, "VISIBLE_LAYERS", 0, N_("Visible Layers"), N_("Display datablocks in visible layers")}, + {SO_SELECTED, "SELECTED", 0, N_("Selected"), N_("Display datablocks of selected objects")}, + {SO_ACTIVE, "ACTIVE", 0, N_("Active"), N_("Display datablocks of active object")}, + {SO_SAME_TYPE, "SAME_TYPES", 0, N_("Same Types"), N_("Display datablocks of all objects of same type as selected object")}, + {SO_GROUPS, "GROUPS", 0, N_("Groups"), N_("Display groups and their datablocks")}, + {SO_LIBRARIES, "LIBRARIES", 0, N_("Libraries"), N_("Display libraries")}, + {SO_SEQUENCE, "SEQUENCE", 0, N_("Sequence"), N_("Display sequence datablocks")}, + {SO_DATABLOCKS, "DATABLOCKS", 0, N_("Datablocks"), N_("Display raw datablocks")}, + {SO_USERDEF, "USER_PREFERENCES", 0, N_("User Preferences"), N_("Display the user preference datablocks")}, + {SO_KEYMAP, "KEYMAPS", 0, N_("Key Maps"), N_("Display keymap datablocks")}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "SpaceOutliner", "Space"); @@ -1050,27 +1050,27 @@ static void rna_def_space_outliner(BlenderRNA *brna) prop= RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "outlinevis"); RNA_def_property_enum_items(prop, display_mode_items); - RNA_def_property_ui_text(prop, "Display Mode", "Type of information to display"); + RNA_def_property_ui_text(prop, N_("Display Mode"), N_("Type of information to display")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL); prop= RNA_def_property(srna, "filter_text", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "search_string"); - RNA_def_property_ui_text(prop, "Display Filter", "Live search filtering string"); + RNA_def_property_ui_text(prop, N_("Display Filter"), N_("Live search filtering string")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL); prop= RNA_def_property(srna, "use_filter_case_sensitive", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "search_flags", SO_FIND_CASE_SENSITIVE); - RNA_def_property_ui_text(prop, "Case Sensitive Matches Only", "Only use case sensitive matches of search string"); + RNA_def_property_ui_text(prop, N_("Case Sensitive Matches Only"), N_("Only use case sensitive matches of search string")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL); prop= RNA_def_property(srna, "use_filter_complete", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "search_flags", SO_FIND_COMPLETE); - RNA_def_property_ui_text(prop, "Complete Matches Only", "Only use complete matches of search string"); + RNA_def_property_ui_text(prop, N_("Complete Matches Only"), N_("Only use complete matches of search string")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL); prop= RNA_def_property(srna, "show_restrict_columns", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SO_HIDE_RESTRICTCOLS); - RNA_def_property_ui_text(prop, "Show Restriction Columns", "Show column"); + RNA_def_property_ui_text(prop, N_("Show Restriction Columns"), N_("Show column")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL); } @@ -1157,11 +1157,11 @@ static void rna_def_space_view3d(BlenderRNA *brna) const int matrix_dimsize[]= {4, 4}; static EnumPropertyItem pivot_items[] = { - {V3D_CENTER, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center", "Pivot around bounding box center of selected object(s)"}, - {V3D_CURSOR, "CURSOR", ICON_CURSOR, "3D Cursor", "Pivot around the 3D cursor"}, - {V3D_LOCAL, "INDIVIDUAL_ORIGINS", ICON_ROTATECOLLECTION, "Individual Origins", "Pivot around each object's own origin"}, - {V3D_CENTROID, "MEDIAN_POINT", ICON_ROTATECENTER, "Median Point", "Pivot around the median point of selected objects"}, - {V3D_ACTIVE, "ACTIVE_ELEMENT", ICON_ROTACTIVE, "Active Element", "Pivot around active object"}, + {V3D_CENTER, "BOUNDING_BOX_CENTER", ICON_ROTATE, N_("Bounding Box Center"), N_("Pivot around bounding box center of selected object(s)")}, + {V3D_CURSOR, "CURSOR", ICON_CURSOR, N_("3D Cursor"), N_("Pivot around the 3D cursor")}, + {V3D_LOCAL, "INDIVIDUAL_ORIGINS", ICON_ROTATECOLLECTION, N_("Individual Origins"), N_("Pivot around each object's own origin")}, + {V3D_CENTROID, "MEDIAN_POINT", ICON_ROTATECENTER, N_("Median Point"), N_("Pivot around the median point of selected objects")}, + {V3D_ACTIVE, "ACTIVE_ELEMENT", ICON_ROTACTIVE, N_("Active Element"), N_("Pivot around active object")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem rv3d_persp_items[] = { @@ -1199,7 +1199,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) prop= RNA_def_property(srna, "viewport_shade", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "drawtype"); RNA_def_property_enum_items(prop, viewport_shade_items); - RNA_def_property_ui_text(prop, "Viewport Shading", "Method to display/shade objects in the 3D View"); + RNA_def_property_ui_text(prop, N_("Viewport Shading"), N_("Method to display/shade objects in the 3D View")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "local_view", PROP_POINTER, PROP_NONE); @@ -1319,7 +1319,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) prop= RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "around"); RNA_def_property_enum_items(prop, pivot_items); - RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling"); + RNA_def_property_ui_text(prop, N_("Pivot Point"), N_("Pivot center for rotation/scaling")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_SpaceView3D_pivot_update"); prop= RNA_def_property(srna, "use_pivot_point_align", PROP_BOOLEAN, PROP_NONE); @@ -1356,7 +1356,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "twmode"); RNA_def_property_enum_items(prop, transform_orientation_items); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_TransformOrientation_itemf"); - RNA_def_property_ui_text(prop, "Transform Orientation", "Transformation orientation"); + RNA_def_property_ui_text(prop, N_("Transform Orientation"), N_("Transformation orientation")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "current_orientation", PROP_POINTER, PROP_NONE); @@ -2127,38 +2127,38 @@ static void rna_def_space_time(BlenderRNA *brna) /* view settings */ prop= RNA_def_property(srna, "show_only_selected", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TIME_ONLYACTSEL); - RNA_def_property_ui_text(prop, "Only Selected channels", "Show keyframes for active Object and/or its selected channels only"); + RNA_def_property_ui_text(prop, N_("Only Selected channels"), N_("Show keyframes for active Object and/or its selected channels only")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL); prop= RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TIME_CFRA_NUM); - RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line"); + RNA_def_property_ui_text(prop, N_("Show Frame Number Indicator"), N_("Show frame number beside the current frame indicator line")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL); /* displaying cache status */ prop= RNA_def_property(srna, "show_cache", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_DISPLAY); - RNA_def_property_ui_text(prop, "Show Cache", "Show the status of cached frames in the timeline"); + RNA_def_property_ui_text(prop, N_("Show Cache"), N_("Show the status of cached frames in the timeline")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL); prop= RNA_def_property(srna, "cache_softbody", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_SOFTBODY); - RNA_def_property_ui_text(prop, "Softbody", "Show the active object's softbody point cache"); + RNA_def_property_ui_text(prop, N_("Softbody"), N_("Show the active object's softbody point cache")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL); prop= RNA_def_property(srna, "cache_particles", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_PARTICLES); - RNA_def_property_ui_text(prop, "Particles", "Show the active object's particle point cache"); + RNA_def_property_ui_text(prop, N_("Particles"), N_("Show the active object's particle point cache")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL); prop= RNA_def_property(srna, "cache_cloth", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_CLOTH); - RNA_def_property_ui_text(prop, "Cloth", "Show the active object's cloth point cache"); + RNA_def_property_ui_text(prop, N_("Cloth"), N_("Show the active object's cloth point cache")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL); prop= RNA_def_property(srna, "cache_smoke", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_SMOKE); - RNA_def_property_ui_text(prop, "Smoke", "Show the active object's smoke cache"); + RNA_def_property_ui_text(prop, N_("Smoke"), N_("Show the active object's smoke cache")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL); } @@ -2230,109 +2230,109 @@ static void rna_def_fileselect_params(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem file_display_items[] = { - {FILE_SHORTDISPLAY, "FILE_SHORTDISPLAY", ICON_SHORTDISPLAY, "Short List", "Display files as short list"}, - {FILE_LONGDISPLAY, "FILE_LONGDISPLAY", ICON_LONGDISPLAY, "Long List", "Display files as a detailed list"}, - {FILE_IMGDISPLAY, "FILE_IMGDISPLAY", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"}, + {FILE_SHORTDISPLAY, "FILE_SHORTDISPLAY", ICON_SHORTDISPLAY, N_("Short List"), N_("Display files as short list")}, + {FILE_LONGDISPLAY, "FILE_LONGDISPLAY", ICON_LONGDISPLAY, N_("Long List"), N_("Display files as a detailed list")}, + {FILE_IMGDISPLAY, "FILE_IMGDISPLAY", ICON_IMGDISPLAY, N_("Thumbnails"), N_("Display files as thumbnails")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem file_sort_items[] = { - {FILE_SORT_ALPHA, "FILE_SORT_ALPHA", ICON_SORTALPHA, "Sort alphabetically", "Sort the file list alphabetically"}, - {FILE_SORT_EXTENSION, "FILE_SORT_EXTENSION", ICON_SORTBYEXT, "Sort by extension", "Sort the file list by extension"}, - {FILE_SORT_TIME, "FILE_SORT_TIME", ICON_SORTTIME, "Sort by time", "Sort files by modification time"}, - {FILE_SORT_SIZE, "FILE_SORT_SIZE", ICON_SORTSIZE, "Sort by size", "Sort files by size"}, + {FILE_SORT_ALPHA, "FILE_SORT_ALPHA", ICON_SORTALPHA, N_("Sort alphabetically"), N_("Sort the file list alphabetically")}, + {FILE_SORT_EXTENSION, "FILE_SORT_EXTENSION", ICON_SORTBYEXT, N_("Sort by extension"), N_("Sort the file list by extension")}, + {FILE_SORT_TIME, "FILE_SORT_TIME", ICON_SORTTIME, N_("Sort by time"), N_("Sort files by modification time")}, + {FILE_SORT_SIZE, "FILE_SORT_SIZE", ICON_SORTSIZE, N_("Sort by size"), N_("Sort files by size")}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "FileSelectParams", NULL); - RNA_def_struct_ui_text(srna, "File Select Parameters", "File Select Parameters"); + RNA_def_struct_ui_text(srna, N_("File Select Parameters"), N_("File Select Parameters")); prop= RNA_def_property(srna, "title", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "title"); - RNA_def_property_ui_text(prop, "Title", "Title for the file browser"); + RNA_def_property_ui_text(prop, N_("Title"), N_("Title for the file browser")); RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "dir"); - RNA_def_property_ui_text(prop, "Directory", "Directory displayed in the file browser"); + RNA_def_property_ui_text(prop, N_("Directory"), N_("Directory displayed in the file browser")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME); RNA_def_property_string_sdna(prop, NULL, "file"); - RNA_def_property_ui_text(prop, "File Name", "Active file in the file browser"); + RNA_def_property_ui_text(prop, N_("File Name"), N_("Active file in the file browser")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "display_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "display"); RNA_def_property_enum_items(prop, file_display_items); - RNA_def_property_ui_text(prop, "Display Mode", "Display mode for the file list"); + RNA_def_property_ui_text(prop, N_("Display Mode"), N_("Display mode for the file list")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "use_filter", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", FILE_FILTER); - RNA_def_property_ui_text(prop, "Filter Files", "Enable filtering of files"); + RNA_def_property_ui_text(prop, N_("Filter Files"), N_("Enable filtering of files")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "show_hidden", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", FILE_HIDE_DOT); - RNA_def_property_ui_text(prop, "Show Hidden", "Show hidden dot files"); + RNA_def_property_ui_text(prop, N_("Show Hidden"), N_("Show hidden dot files")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS , NULL); prop= RNA_def_property(srna, "sort_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "sort"); RNA_def_property_enum_items(prop, file_sort_items); - RNA_def_property_ui_text(prop, "Sort", ""); + RNA_def_property_ui_text(prop, N_("Sort"), ""); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "use_filter_image", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filter", IMAGEFILE); - RNA_def_property_ui_text(prop, "Filter Images", "Show image files"); + RNA_def_property_ui_text(prop, N_("Filter Images"), N_("Show image files")); RNA_def_property_ui_icon(prop, ICON_FILE_IMAGE, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "use_filter_blender", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filter", BLENDERFILE); - RNA_def_property_ui_text(prop, "Filter Blender", "Show .blend files"); + RNA_def_property_ui_text(prop, N_("Filter Blender"), N_("Show .blend files")); RNA_def_property_ui_icon(prop, ICON_FILE_BLEND, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "use_filter_movie", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filter", MOVIEFILE); - RNA_def_property_ui_text(prop, "Filter Movies", "Show movie files"); + RNA_def_property_ui_text(prop, N_("Filter Movies"), N_("Show movie files")); RNA_def_property_ui_icon(prop, ICON_FILE_MOVIE, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "use_filter_script", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filter", PYSCRIPTFILE); - RNA_def_property_ui_text(prop, "Filter Script", "Show script files"); + RNA_def_property_ui_text(prop, N_("Filter Script"), N_("Show script files")); RNA_def_property_ui_icon(prop, ICON_FILE_SCRIPT, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "use_filter_font", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filter", FTFONTFILE); - RNA_def_property_ui_text(prop, "Filter Fonts", "Show font files"); + RNA_def_property_ui_text(prop, N_("Filter Fonts"), N_("Show font files")); RNA_def_property_ui_icon(prop, ICON_FILE_FONT, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "use_filter_sound", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filter", SOUNDFILE); - RNA_def_property_ui_text(prop, "Filter Sound", "Show sound files"); + RNA_def_property_ui_text(prop, N_("Filter Sound"), N_("Show sound files")); RNA_def_property_ui_icon(prop, ICON_FILE_SOUND, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "use_filter_text", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filter", TEXTFILE); - RNA_def_property_ui_text(prop, "Filter Text", "Show text files"); + RNA_def_property_ui_text(prop, N_("Filter Text"), N_("Show text files")); RNA_def_property_ui_icon(prop, ICON_FILE_BLANK, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "use_filter_folder", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filter", FOLDERFILE); - RNA_def_property_ui_text(prop, "Filter Folder", "Show folders"); + RNA_def_property_ui_text(prop, N_("Filter Folder"), N_("Show folders")); RNA_def_property_ui_icon(prop, ICON_FILE_FOLDER, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "filter_glob", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "filter_glob"); - RNA_def_property_ui_text(prop, "Extension Filter", ""); + RNA_def_property_ui_text(prop, N_("Extension Filter"), ""); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL); } @@ -2402,7 +2402,7 @@ static void rna_def_space_userpref(BlenderRNA *brna) prop= RNA_def_property(srna, "filter_text", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "filter"); - RNA_def_property_ui_text(prop, "Filter", "Search term for filtering in the UI"); + RNA_def_property_ui_text(prop, N_("Filter"), N_("Search term for filtering in the UI")); } diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index a0ceec692f0..43e71ea6f26 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -403,51 +403,51 @@ static void rna_def_userdef_theme_ui_wcol(BlenderRNA *brna) srna= RNA_def_struct(brna, "ThemeWidgetColors", NULL); RNA_def_struct_sdna(srna, "uiWidgetColors"); - RNA_def_struct_ui_text(srna, "Theme Widget Color Set", "Theme settings for widget color sets"); + RNA_def_struct_ui_text(srna, N_("Theme Widget Color Set"), N_("Theme settings for widget color sets")); prop= RNA_def_property(srna, "outline", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Outline", ""); + RNA_def_property_ui_text(prop, N_("Outline"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "inner", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 4); - RNA_def_property_ui_text(prop, "Inner", ""); + RNA_def_property_ui_text(prop, N_("Inner"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "inner_sel", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 4); - RNA_def_property_ui_text(prop, "Inner Selected", ""); + RNA_def_property_ui_text(prop, N_("Inner Selected"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "item", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 4); - RNA_def_property_ui_text(prop, "Item", ""); + RNA_def_property_ui_text(prop, N_("Item"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Text", ""); + RNA_def_property_ui_text(prop, N_("Text"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "text_sel", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Text Selected", ""); + RNA_def_property_ui_text(prop, N_("Text Selected"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "show_shaded", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "shaded", 1); - RNA_def_property_ui_text(prop, "Shaded", ""); + RNA_def_property_ui_text(prop, N_("Shaded"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "shadetop", PROP_INT, PROP_NONE); RNA_def_property_range(prop, -100, 100); - RNA_def_property_ui_text(prop, "Shade Top", ""); + RNA_def_property_ui_text(prop, N_("Shade Top"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "shadedown", PROP_INT, PROP_NONE); RNA_def_property_range(prop, -100, 100); - RNA_def_property_ui_text(prop, "Shade Down", ""); + RNA_def_property_ui_text(prop, N_("Shade Down"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); } @@ -458,40 +458,40 @@ static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna) srna= RNA_def_struct(brna, "ThemeWidgetStateColors", NULL); RNA_def_struct_sdna(srna, "uiWidgetStateColors"); - RNA_def_struct_ui_text(srna, "Theme Widget State Color", "Theme settings for widget state colors"); + RNA_def_struct_ui_text(srna, N_("Theme Widget State Color"), N_("Theme settings for widget state colors")); prop= RNA_def_property(srna, "inner_anim", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Animated", ""); + RNA_def_property_ui_text(prop, N_("Animated"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "inner_anim_sel", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Animated Selected", ""); + RNA_def_property_ui_text(prop, N_("Animated Selected"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "inner_key", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Keyframe", ""); + RNA_def_property_ui_text(prop, N_("Keyframe"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "inner_key_sel", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Keyframe Selected", ""); + RNA_def_property_ui_text(prop, N_("Keyframe Selected"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "inner_driven", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Driven", ""); + RNA_def_property_ui_text(prop, N_("Driven"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "inner_driven_sel", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Driven Selected", ""); + RNA_def_property_ui_text(prop, N_("Driven Selected"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "blend", PROP_FLOAT, PROP_FACTOR); - RNA_def_property_ui_text(prop, "Blend", ""); + RNA_def_property_ui_text(prop, N_("Blend"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); } @@ -628,7 +628,7 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna) prop= RNA_def_property(srna, "icon_file", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "iconfile"); - RNA_def_property_ui_text(prop, "Icon File", ""); + RNA_def_property_ui_text(prop, N_("Icon File"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); } @@ -1713,28 +1713,28 @@ static void rna_def_userdef_theme_colorset(BlenderRNA *brna) srna= RNA_def_struct(brna, "ThemeBoneColorSet", NULL); RNA_def_struct_sdna(srna, "ThemeWireColor"); - RNA_def_struct_ui_text(srna, "Theme Bone Color Set", "Theme settings for bone color sets"); + RNA_def_struct_ui_text(srna, N_("Theme Bone Color Set"), N_("Theme settings for bone color sets")); prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_float_sdna(prop, NULL, "solid"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Normal", "Color used for the surface of bones"); + RNA_def_property_ui_text(prop, N_("Normal"), N_("Color used for the surface of bones")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "select", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_float_sdna(prop, NULL, "select"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Select", "Color used for selected bones"); + RNA_def_property_ui_text(prop, N_("Select"), N_("Color used for selected bones")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "active", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Active", "Color used for active bones"); + RNA_def_property_ui_text(prop, N_("Active"), N_("Color used for active bones")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "show_colored_constraints", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TH_WIRECOLOR_CONSTCOLS); - RNA_def_property_ui_text(prop, "Colored Constraints", "Allow the use of colors indicating constraints/keyed status"); + RNA_def_property_ui_text(prop, N_("Colored Constraints"), N_("Allow the use of colors indicating constraints/keyed status")); RNA_def_property_update(prop, 0, "rna_userdef_update"); } diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 7ea4701dec3..8d778415197 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -33,6 +33,8 @@ #include "RNA_define.h" #include "RNA_enum_types.h" +#include "BLF_api.h" + #include "rna_internal.h" #include "DNA_screen_types.h" @@ -63,12 +65,12 @@ EnumPropertyItem event_tweak_value_items[]= { {0, NULL, 0, NULL, NULL}}; EnumPropertyItem event_value_items[] = { - {KM_ANY, "ANY", 0, "Any", ""}, - {KM_NOTHING, "NOTHING", 0, "Nothing", ""}, - {KM_PRESS, "PRESS", 0, "Press", ""}, - {KM_RELEASE, "RELEASE", 0, "Release", ""}, - {KM_CLICK, "CLICK", 0, "Click", ""}, - {KM_DBL_CLICK, "DOUBLE_CLICK", 0, "Double Click", ""}, + {KM_ANY, "ANY", 0, N_("Any"), ""}, + {KM_NOTHING, "NOTHING", 0, N_("Nothing"), ""}, + {KM_PRESS, "PRESS", 0, N_("Press"), ""}, + {KM_RELEASE, "RELEASE", 0, N_("Release"), ""}, + {KM_CLICK, "CLICK", 0, N_("Click"), ""}, + {KM_DBL_CLICK, "DOUBLE_CLICK", 0, N_("Double Click"), ""}, {0, NULL, 0, NULL, NULL}}; EnumPropertyItem event_tweak_type_items[]= { @@ -1650,81 +1652,81 @@ static void rna_def_keyconfig(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem map_type_items[] = { - {KMI_TYPE_KEYBOARD, "KEYBOARD", 0, "Keyboard", ""}, - {KMI_TYPE_TWEAK, "TWEAK", 0, "Tweak", ""}, - {KMI_TYPE_MOUSE, "MOUSE", 0, "Mouse", ""}, - {KMI_TYPE_TEXTINPUT, "TEXTINPUT", 0, "Text Input", ""}, - {KMI_TYPE_TIMER, "TIMER", 0, "Timer", ""}, + {KMI_TYPE_KEYBOARD, "KEYBOARD", 0, N_("Keyboard"), ""}, + {KMI_TYPE_TWEAK, "TWEAK", 0, N_("Tweak"), ""}, + {KMI_TYPE_MOUSE, "MOUSE", 0, N_("Mouse"), ""}, + {KMI_TYPE_TEXTINPUT, "TEXTINPUT", 0, N_("Text Input"), ""}, + {KMI_TYPE_TIMER, "TIMER", 0, N_("Timer"), ""}, {0, NULL, 0, NULL, NULL}}; /* KeyConfig */ srna= RNA_def_struct(brna, "KeyConfig", NULL); RNA_def_struct_sdna(srna, "wmKeyConfig"); - RNA_def_struct_ui_text(srna, "Key Configuration", "Input configuration, including keymaps"); + RNA_def_struct_ui_text(srna, N_("Key Configuration"), N_("Input configuration, including keymaps")); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "idname"); - RNA_def_property_ui_text(prop, "Name", "Name of the key configuration"); + RNA_def_property_ui_text(prop, N_("Name"), N_("Name of the key configuration")); RNA_def_struct_name_property(srna, prop); prop= RNA_def_property(srna, "keymaps", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "KeyMap"); - RNA_def_property_ui_text(prop, "Key Maps", "Key maps configured as part of this configuration"); + RNA_def_property_ui_text(prop, N_("Key Maps"), N_("Key maps configured as part of this configuration")); rna_def_wm_keymaps(brna, prop); prop= RNA_def_property(srna, "is_user_defined", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYCONF_USER); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "User Defined", "Indicates that a keyconfig was defined by the user"); + RNA_def_property_ui_text(prop, N_("User Defined"), N_("Indicates that a keyconfig was defined by the user")); RNA_api_keyconfig(srna); /* KeyMap */ srna= RNA_def_struct(brna, "KeyMap", NULL); RNA_def_struct_sdna(srna, "wmKeyMap"); - RNA_def_struct_ui_text(srna, "Key Map", "Input configuration, including keymaps"); + RNA_def_struct_ui_text(srna, N_("Key Map"), N_("Input configuration, including keymaps")); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "idname"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Name", "Name of the key map"); + RNA_def_property_ui_text(prop, N_("Name"), N_("Name of the key map")); RNA_def_struct_name_property(srna, prop); prop= RNA_def_property(srna, "space_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "spaceid"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_items(prop, space_type_items); - RNA_def_property_ui_text(prop, "Space Type", "Optional space type keymap is associated with"); + RNA_def_property_ui_text(prop, N_("Space Type"), N_("Optional space type keymap is associated with")); prop= RNA_def_property(srna, "region_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "regionid"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_items(prop, region_type_items); - RNA_def_property_ui_text(prop, "Region Type", "Optional region type keymap is associated with"); + RNA_def_property_ui_text(prop, N_("Region Type"), N_("Optional region type keymap is associated with")); prop= RNA_def_property(srna, "keymap_items", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "items", NULL); RNA_def_property_struct_type(prop, "KeyMapItem"); - RNA_def_property_ui_text(prop, "Items", "Items in the keymap, linking an operator to an input event"); + RNA_def_property_ui_text(prop, N_("Items"), N_("Items in the keymap, linking an operator to an input event")); rna_def_keymap_items(brna, prop); prop= RNA_def_property(srna, "is_user_defined", PROP_BOOLEAN, PROP_NEVER_NULL); RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_USER); - RNA_def_property_ui_text(prop, "User Defined", "Keymap is defined by the user"); + RNA_def_property_ui_text(prop, N_("User Defined"), N_("Keymap is defined by the user")); prop= RNA_def_property(srna, "is_modal", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_MODAL); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Modal Keymap", "Indicates that a keymap is used for translate modal events for an operator"); + RNA_def_property_ui_text(prop, N_("Modal Keymap"), N_("Indicates that a keymap is used for translate modal events for an operator")); prop= RNA_def_property(srna, "show_expanded_items", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_EXPANDED); - RNA_def_property_ui_text(prop, "Items Expanded", "Expanded in the user interface"); + RNA_def_property_ui_text(prop, N_("Items Expanded"), N_("Expanded in the user interface")); RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1); prop= RNA_def_property(srna, "show_expanded_children", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_CHILDREN_EXPANDED); - RNA_def_property_ui_text(prop, "Children Expanded", "Children expanded in the user interface"); + RNA_def_property_ui_text(prop, N_("Children Expanded"), N_("Children expanded in the user interface")); RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1); @@ -1733,99 +1735,99 @@ static void rna_def_keyconfig(BlenderRNA *brna) /* KeyMapItem */ srna= RNA_def_struct(brna, "KeyMapItem", NULL); RNA_def_struct_sdna(srna, "wmKeyMapItem"); - RNA_def_struct_ui_text(srna, "Key Map Item", "Item in a Key Map"); + RNA_def_struct_ui_text(srna, N_("Key Map Item"), N_("Item in a Key Map")); prop= RNA_def_property(srna, "idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "idname"); - RNA_def_property_ui_text(prop, "Identifier", "Identifier of operator to call on input event"); + RNA_def_property_ui_text(prop, N_("Identifier"), N_("Identifier of operator to call on input event")); RNA_def_property_string_funcs(prop, "rna_wmKeyMapItem_idname_get", "rna_wmKeyMapItem_idname_length", "rna_wmKeyMapItem_idname_set"); RNA_def_struct_name_property(srna, prop); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Name", "Name of operator to call on input event"); + RNA_def_property_ui_text(prop, N_("Name"), N_("Name of operator to call on input event")); RNA_def_property_string_funcs(prop, "rna_wmKeyMapItem_name_get", "rna_wmKeyMapItem_name_length", NULL); prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "OperatorProperties"); RNA_def_property_pointer_funcs(prop, "rna_KeyMapItem_properties_get", NULL, NULL, NULL); - RNA_def_property_ui_text(prop, "Properties", "Properties to set when the operator is called"); + RNA_def_property_ui_text(prop, N_("Properties"), N_("Properties to set when the operator is called")); prop= RNA_def_property(srna, "map_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "maptype"); RNA_def_property_enum_items(prop, map_type_items); RNA_def_property_enum_funcs(prop, "rna_wmKeyMapItem_map_type_get", "rna_wmKeyMapItem_map_type_set", NULL); - RNA_def_property_ui_text(prop, "Map Type", "Type of event mapping"); + RNA_def_property_ui_text(prop, N_("Map Type"), N_("Type of event mapping")); prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, event_type_items); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_type_itemf"); - RNA_def_property_ui_text(prop, "Type", "Type of event"); + RNA_def_property_ui_text(prop, N_("Type"), N_("Type of event")); prop= RNA_def_property(srna, "value", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "val"); RNA_def_property_enum_items(prop, event_value_items); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_value_itemf"); - RNA_def_property_ui_text(prop, "Value", ""); + RNA_def_property_ui_text(prop, N_("Value"), ""); prop= RNA_def_property(srna, "id", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "id"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "id", "ID of the item"); + RNA_def_property_ui_text(prop, "id", N_("ID of the item")); prop= RNA_def_property(srna, "any", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_KeyMapItem_any_getf", "rna_KeyMapItem_any_setf"); - RNA_def_property_ui_text(prop, "Any", "Any modifier keys pressed"); + RNA_def_property_ui_text(prop, N_("Any"), N_("Any modifier keys pressed")); prop= RNA_def_property(srna, "shift", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "shift", 0); // RNA_def_property_enum_sdna(prop, NULL, "shift"); // RNA_def_property_enum_items(prop, keymap_modifiers_items); - RNA_def_property_ui_text(prop, "Shift", "Shift key pressed"); + RNA_def_property_ui_text(prop, "Shift", N_("Shift key pressed")); prop= RNA_def_property(srna, "ctrl", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "ctrl", 0); // RNA_def_property_enum_sdna(prop, NULL, "ctrl"); // RNA_def_property_enum_items(prop, keymap_modifiers_items); - RNA_def_property_ui_text(prop, "Ctrl", "Control key pressed"); + RNA_def_property_ui_text(prop, "Ctrl", N_("Control key pressed")); prop= RNA_def_property(srna, "alt", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "alt", 0); // RNA_def_property_enum_sdna(prop, NULL, "alt"); // RNA_def_property_enum_items(prop, keymap_modifiers_items); - RNA_def_property_ui_text(prop, "Alt", "Alt key pressed"); + RNA_def_property_ui_text(prop, "Alt", N_("Alt key pressed")); prop= RNA_def_property(srna, "oskey", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "oskey", 0); // RNA_def_property_enum_sdna(prop, NULL, "oskey"); // RNA_def_property_enum_items(prop, keymap_modifiers_items); - RNA_def_property_ui_text(prop, "OS Key", "Operating system key pressed"); + RNA_def_property_ui_text(prop, N_("OS Key"), N_("Operating system key pressed")); prop= RNA_def_property(srna, "key_modifier", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "keymodifier"); RNA_def_property_enum_items(prop, event_type_items); - RNA_def_property_ui_text(prop, "Key Modifier", "Regular key pressed as a modifier"); + RNA_def_property_ui_text(prop, N_("Key Modifier"), N_("Regular key pressed as a modifier")); prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", KMI_EXPANDED); - RNA_def_property_ui_text(prop, "Expanded", "Show key map event and property details in the user interface"); + RNA_def_property_ui_text(prop, N_("Expanded"), N_("Show key map event and property details in the user interface")); RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1); prop= RNA_def_property(srna, "propvalue", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "propvalue"); RNA_def_property_enum_items(prop, keymap_propvalue_items); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_propvalue_itemf"); - RNA_def_property_ui_text(prop, "Property Value", "The value this event translates to in a modal keymap"); + RNA_def_property_ui_text(prop, N_("Property Value"), N_("The value this event translates to in a modal keymap")); prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", KMI_INACTIVE); - RNA_def_property_ui_text(prop, "Active", "Activate or deactivate item"); + RNA_def_property_ui_text(prop, N_("Active"), N_("Activate or deactivate item")); RNA_def_property_ui_icon(prop, ICON_CHECKBOX_DEHLT, 1); prop= RNA_def_property(srna, "is_user_defined", PROP_BOOLEAN, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "User Defined", "Is this keymap item user defined (doesn't just override a builtin item)"); + RNA_def_property_ui_text(prop, N_("User Defined"), N_("Is this keymap item user defined (doesn't just override a builtin item)")); RNA_def_property_boolean_funcs(prop, "rna_KeyMapItem_userdefined_get", NULL); RNA_api_keymapitem(srna); diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index d6379ad9ba0..acf619280a9 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -141,12 +141,11 @@ void WM_operatortype_append(void (*opfunc)(wmOperatorType*)) opfunc(ot); if(ot->name==NULL) { - static char dummy_name[] = "Dummy Name"; fprintf(stderr, "ERROR: Operator %s has no name property!\n", ot->idname); - ot->name= dummy_name; + ot->name= _("Dummy Name"); } - RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description:"(undocumented operator)"); // XXX All ops should have a description but for now allow them not to. + RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description:_("(undocumented operator)")); // XXX All ops should have a description but for now allow them not to. RNA_def_struct_identifier(ot->srna, ot->idname); BLI_addtail(&global_ops, ot); } @@ -158,7 +157,7 @@ void WM_operatortype_append_ptr(void (*opfunc)(wmOperatorType*, void*), void *us ot= MEM_callocN(sizeof(wmOperatorType), "operatortype"); ot->srna= RNA_def_struct(&BLENDER_RNA, "", "OperatorProperties"); opfunc(ot, userdata); - RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description:"(undocumented operator)"); + RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description:_("(undocumented operator)")); RNA_def_struct_identifier(ot->srna, ot->idname); BLI_addtail(&global_ops, ot); } @@ -1130,7 +1129,7 @@ static int wm_debug_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve static void WM_OT_debug_menu(wmOperatorType *ot) { - ot->name= "Debug Menu"; + ot->name= _("Debug Menu"); ot->idname= "WM_OT_debug_menu"; ot->description= _("Open a popup to set the debug level"); @@ -1404,7 +1403,7 @@ static int wm_search_menu_poll(bContext *C) static void WM_OT_search_menu(wmOperatorType *ot) { - ot->name= "Search Menu"; + ot->name= _("Search Menu"); ot->idname= "WM_OT_search_menu"; ot->invoke= wm_search_menu_invoke; @@ -1424,7 +1423,7 @@ static int wm_call_menu_exec(bContext *C, wmOperator *op) static void WM_OT_call_menu(wmOperatorType *ot) { - ot->name= "Call Menu"; + ot->name= _("Call Menu"); ot->idname= "WM_OT_call_menu"; ot->exec= wm_call_menu_exec; @@ -1432,7 +1431,7 @@ static void WM_OT_call_menu(wmOperatorType *ot) ot->flag= OPTYPE_INTERNAL; - RNA_def_string(ot->srna, "name", "", BKE_ST_MAXNAME, "Name", "Name of the menu"); + RNA_def_string(ot->srna, "name", "", BKE_ST_MAXNAME, _("Name"), _("Name of the menu")); } /* ************ window / screen operator definitions ************** */ @@ -2038,7 +2037,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op) static void WM_OT_collada_export(wmOperatorType *ot) { - ot->name= "Export COLLADA"; + ot->name= _("Export COLLADA"); ot->idname= "WM_OT_collada_export"; ot->invoke= wm_collada_export_invoke; @@ -2066,7 +2065,7 @@ static int wm_collada_import_exec(bContext *C, wmOperator *op) static void WM_OT_collada_import(wmOperatorType *ot) { - ot->name= "Import COLLADA"; + ot->name= _("Import COLLADA"); ot->idname= "WM_OT_collada_import"; ot->invoke= WM_operator_filesel; @@ -2102,7 +2101,7 @@ static int wm_exit_blender_op(bContext *C, wmOperator *op) static void WM_OT_quit_blender(wmOperatorType *ot) { - ot->name= "Quit Blender"; + ot->name= _("Quit Blender"); ot->idname= "WM_OT_quit_blender"; ot->description= _("Quit Blender"); @@ -2123,7 +2122,7 @@ static int wm_console_toggle_op(bContext *UNUSED(C), wmOperator *UNUSED(op)) static void WM_OT_console_toggle(wmOperatorType *ot) { - ot->name= "Toggle System Console"; + ot->name= _("Toggle System Console"); ot->idname= "WM_OT_console_toggle"; ot->description= _("Toggle System Console"); @@ -2409,9 +2408,9 @@ int WM_gesture_circle_cancel(bContext *C, wmOperator *op) /* template to copy from */ void WM_OT_circle_gesture(wmOperatorType *ot) { - ot->name= "Circle Gesture"; + ot->name= _("Circle Gesture"); ot->idname= "WM_OT_circle_gesture"; - ot->description="Enter rotate mode with a circular gesture"; + ot->description=_("Enter rotate mode with a circular gesture"); ot->invoke= WM_gesture_circle_invoke; ot->modal= WM_gesture_circle_modal; @@ -2655,9 +2654,9 @@ void WM_OT_lasso_gesture(wmOperatorType *ot) { PropertyRNA *prop; - ot->name= "Lasso Gesture"; + ot->name= _("Lasso Gesture"); ot->idname= "WM_OT_lasso_gesture"; - ot->description="Select objects within the lasso as you move the pointer"; + ot->description=_("Select objects within the lasso as you move the pointer"); ot->invoke= WM_gesture_lasso_invoke; ot->modal= WM_gesture_lasso_modal; @@ -2769,9 +2768,9 @@ void WM_OT_straightline_gesture(wmOperatorType *ot) { PropertyRNA *prop; - ot->name= "Straight Line Gesture"; + ot->name= _("Straight Line Gesture"); ot->idname= "WM_OT_straightline_gesture"; - ot->description="Draw a straight line as you move the pointer"; + ot->description=_("Draw a straight line as you move the pointer"); ot->invoke= WM_gesture_straightline_invoke; ot->modal= WM_gesture_straightline_modal; @@ -3275,13 +3274,13 @@ static void redraw_timer_window_swap(bContext *C) } static EnumPropertyItem redraw_timer_type_items[] = { - {0, "DRAW", 0, "Draw Region", "Draw Region"}, - {1, "DRAW_SWAP", 0, "Draw Region + Swap", "Draw Region and Swap"}, - {2, "DRAW_WIN", 0, "Draw Window", "Draw Window"}, - {3, "DRAW_WIN_SWAP", 0, "Draw Window + Swap", "Draw Window and Swap"}, - {4, "ANIM_STEP", 0, "Anim Step", "Animation Steps"}, - {5, "ANIM_PLAY", 0, "Anim Play", "Animation Playback"}, - {6, "UNDO", 0, "Undo/Redo", "Undo/Redo"}, + {0, "DRAW", 0, N_("Draw Region"), N_("Draw Region")}, + {1, "DRAW_SWAP", 0, N_("Draw Region + Swap"), N_("Draw Region and Swap")}, + {2, "DRAW_WIN", 0, N_("Draw Window"), N_("Draw Window")}, + {3, "DRAW_WIN_SWAP", 0, N_("Draw Window + Swap"), N_("Draw Window and Swap")}, + {4, "ANIM_STEP", 0, N_("Anim Step"), N_("Animation Steps")}, + {5, "ANIM_PLAY", 0, N_("Anim Play"), N_("Animation Playback")}, + {6, "UNDO", 0, N_("Undo/Redo"), N_("Undo/Redo")}, {0, NULL, 0, NULL, NULL}}; static int redraw_timer_exec(bContext *C, wmOperator *op) @@ -3380,15 +3379,15 @@ static int redraw_timer_exec(bContext *C, wmOperator *op) static void WM_OT_redraw_timer(wmOperatorType *ot) { - ot->name= "Redraw Timer"; + ot->name= _("Redraw Timer"); ot->idname= "WM_OT_redraw_timer"; - ot->description="Simple redraw timer to test the speed of updating the interface"; + ot->description=_("Simple redraw timer to test the speed of updating the interface"); ot->invoke= WM_menu_invoke; ot->exec= redraw_timer_exec; ot->poll= WM_operator_winactive; - ot->prop= RNA_def_enum(ot->srna, "type", redraw_timer_type_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(redraw_timer_type_items), 0, _("Type"), ""); RNA_def_int(ot->srna, "iterations", 10, 1,INT_MAX, _("Iterations"), _("Number of times to redraw"), 1,1000); } @@ -3403,7 +3402,7 @@ static int memory_statistics_exec(bContext *UNUSED(C), wmOperator *UNUSED(op)) static void WM_OT_memory_statistics(wmOperatorType *ot) { - ot->name= "Memory Statistics"; + ot->name= _("Memory Statistics"); ot->idname= "WM_OT_memory_statistics"; ot->description= _("Print memory statistics to the console"); -- cgit v1.2.3