From de12f8049a2fbd6e4feab02bc252411a8f5d5d1f Mon Sep 17 00:00:00 2001 From: Xiao Xiangquan Date: Wed, 15 Jun 2011 11:41:15 +0000 Subject: translate left panel --- .../blender/editors/animation/anim_channels_edit.c | 11 ++-- source/blender/editors/animation/anim_markers.c | 10 +-- source/blender/editors/animation/anim_ops.c | 11 ++-- source/blender/editors/animation/drivers.c | 6 +- source/blender/editors/animation/keyframing.c | 12 ++-- source/blender/editors/animation/keyingsets.c | 6 +- source/blender/editors/armature/editarmature.c | 26 ++++---- .../blender/editors/armature/editarmature_sketch.c | 10 +-- source/blender/editors/armature/poseSlide.c | 8 ++- source/blender/editors/armature/poselib.c | 10 +-- source/blender/editors/armature/poseobject.c | 26 ++++---- source/blender/editors/curve/editcurve.c | 14 ++-- source/blender/editors/curve/editfont.c | 16 +++-- .../blender/editors/interface/interface_layout.c | 4 +- source/blender/editors/interface/interface_ops.c | 14 ++-- source/blender/editors/interface/interface_utils.c | 4 +- source/blender/editors/interface/view2d_ops.c | 44 +++++++------ source/blender/editors/mesh/editmesh_add.c | 30 +++++---- source/blender/editors/mesh/editmesh_loop.c | 4 +- source/blender/editors/mesh/editmesh_mods.c | 44 +++++++------ source/blender/editors/mesh/editmesh_tools.c | 46 +++++++------- source/blender/editors/mesh/loopcut.c | 6 +- source/blender/editors/metaball/CMakeLists.txt | 1 + source/blender/editors/metaball/SConscript | 2 +- source/blender/editors/metaball/mball_edit.c | 4 +- source/blender/editors/object/object_add.c | 28 ++++---- source/blender/editors/object/object_constraint.c | 8 ++- source/blender/editors/object/object_edit.c | 18 +++--- source/blender/editors/object/object_ops.c | 4 +- source/blender/editors/object/object_relations.c | 16 +++-- source/blender/editors/object/object_select.c | 50 ++++++++------- source/blender/editors/object/object_shapekey.c | 8 ++- source/blender/editors/object/object_transform.c | 12 ++-- source/blender/editors/object/object_vgroup.c | 42 ++++++------ source/blender/editors/physics/particle_edit.c | 12 ++-- source/blender/editors/physics/particle_object.c | 14 ++-- .../blender/editors/physics/physics_pointcache.c | 14 ++-- source/blender/editors/render/render_internal.c | 14 ++-- source/blender/editors/render/render_opengl.c | 12 ++-- source/blender/editors/screen/screen_ops.c | 60 +++++++++--------- source/blender/editors/screen/screendump.c | 10 +-- source/blender/editors/sculpt_paint/sculpt.c | 8 ++- source/blender/editors/sound/CMakeLists.txt | 1 + source/blender/editors/sound/SConscript | 2 +- source/blender/editors/sound/sound_ops.c | 8 ++- source/blender/editors/space_action/CMakeLists.txt | 1 + source/blender/editors/space_action/SConscript | 2 +- .../blender/editors/space_action/action_select.c | 12 ++-- source/blender/editors/space_console/console_ops.c | 12 ++-- source/blender/editors/space_file/file_ops.c | 10 +-- source/blender/editors/space_graph/graph_edit.c | 22 ++++--- source/blender/editors/space_graph/graph_ops.c | 6 +- source/blender/editors/space_graph/graph_select.c | 16 +++-- source/blender/editors/space_image/image_ops.c | 30 +++++---- source/blender/editors/space_info/info_report.c | 4 +- source/blender/editors/space_logic/logic_buttons.c | 4 +- source/blender/editors/space_nla/CMakeLists.txt | 1 + source/blender/editors/space_nla/SConscript | 2 +- source/blender/editors/space_nla/nla_channels.c | 6 +- source/blender/editors/space_nla/nla_edit.c | 6 +- source/blender/editors/space_nla/nla_select.c | 10 +-- source/blender/editors/space_node/node_edit.c | 18 +++--- source/blender/editors/space_node/node_select.c | 10 +-- source/blender/editors/space_node/node_state.c | 6 +- .../blender/editors/space_outliner/CMakeLists.txt | 1 + source/blender/editors/space_outliner/SConscript | 2 +- source/blender/editors/space_outliner/outliner.c | 26 ++++---- .../editors/space_sequencer/sequencer_add.c | 24 +++---- .../editors/space_sequencer/sequencer_edit.c | 24 +++---- .../editors/space_sequencer/sequencer_select.c | 20 +++--- source/blender/editors/space_text/text_ops.c | 32 +++++----- source/blender/editors/space_view3d/view3d_edit.c | 74 +++++++++++----------- .../blender/editors/space_view3d/view3d_header.c | 12 ++-- .../blender/editors/space_view3d/view3d_select.c | 24 +++---- .../blender/editors/space_view3d/view3d_toolbar.c | 8 ++- source/blender/editors/space_view3d/view3d_view.c | 8 ++- source/blender/editors/transform/SConscript | 2 +- source/blender/editors/transform/transform_ops.c | 22 ++++--- source/blender/editors/uvedit/uvedit_ops.c | 62 +++++++++--------- source/blender/editors/uvedit/uvedit_unwrap_ops.c | 26 ++++---- 80 files changed, 696 insertions(+), 559 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 9145cc2b79d..8efa4847452 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -39,6 +39,7 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" #include "DNA_anim_types.h" #include "DNA_object_types.h" @@ -1605,7 +1606,7 @@ static void ANIM_OT_channels_expand (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - ot->prop= RNA_def_boolean(ot->srna, "all", 1, "All", "Expand all channels (not just selected ones)"); + ot->prop= RNA_def_boolean(ot->srna, "all", 1, _("All"), _("Expand all channels (not just selected ones)")); } /* ********************** Collapse Channels Operator *********************** */ @@ -1647,7 +1648,7 @@ static void ANIM_OT_channels_collapse (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - ot->prop= RNA_def_boolean(ot->srna, "all", 1, "All", "Collapse all channels (not just selected ones)"); + ot->prop= RNA_def_boolean(ot->srna, "all", 1, _("All"), _("Collapse all channels (not just selected ones)")); } /* ******************* Reenable Disabled Operator ******************* */ @@ -1760,7 +1761,7 @@ static void ANIM_OT_channels_select_all_toggle (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - ot->prop= RNA_def_boolean(ot->srna, "invert", 0, "Invert", ""); + ot->prop= RNA_def_boolean(ot->srna, "invert", 0, _("Invert"), ""); } /* ******************** Borderselect Operator *********************** */ @@ -2203,8 +2204,8 @@ static void ANIM_OT_channels_click (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY - RNA_def_boolean(ot->srna, "children_only", 0, "Select Children Only", ""); // CTRLKEY|SHIFTKEY + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); // SHIFTKEY + RNA_def_boolean(ot->srna, "children_only", 0, _("Select Children Only"), ""); // CTRLKEY|SHIFTKEY } /* ************************************************************************** */ diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index bd92d334720..b880ed30a63 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -45,6 +45,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_fcurve.h" #include "BKE_main.h" @@ -892,7 +894,7 @@ static void MARKER_OT_move(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; /* rna storage */ - RNA_def_int(ot->srna, "frames", 0, INT_MIN, INT_MAX, "Frames", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "frames", 0, INT_MIN, INT_MAX, _("Frames"), "", INT_MIN, INT_MAX); } /* ************************** duplicate markers *************************** */ @@ -987,7 +989,7 @@ static void MARKER_OT_duplicate(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* rna storage */ - RNA_def_int(ot->srna, "frames", 0, INT_MIN, INT_MAX, "Frames", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "frames", 0, INT_MIN, INT_MAX, _("Frames"), "", INT_MIN, INT_MAX); } /* ************************** selection ************************************/ @@ -1106,9 +1108,9 @@ static void MARKER_OT_select(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "extend the selection"); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("extend the selection")); #ifdef DURIAN_CAMERA_SWITCH - RNA_def_boolean(ot->srna, "camera", 0, "Camera", "Select the camera"); + RNA_def_boolean(ot->srna, "camera", 0, _("Camera"), _("Select the camera")); #endif } diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index 7a94a21d41e..f938fcfa39f 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -37,6 +37,7 @@ #include "BLO_sys_types.h" #include "BLI_utildefines.h" +#include "BLF_api.h" #include "DNA_anim_types.h" #include "DNA_scene_types.h" @@ -175,7 +176,7 @@ static void ANIM_OT_change_frame(wmOperatorType *ot) ot->flag= OPTYPE_BLOCKING|OPTYPE_UNDO; /* rna */ - RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, "Frame", "", MINAFRAME, MAXFRAME); + RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, _("Frame"), "", MINAFRAME, MAXFRAME); } /* ****************** set preview range operator ****************************/ @@ -233,11 +234,11 @@ static void ANIM_OT_previewrange_set(wmOperatorType *ot) /* rna */ /* used to define frame range */ - RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, _("X Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, _("X Max"), "", INT_MIN, INT_MAX); /* these are not used, but are needed by borderselect gesture operator stuff */ - RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, _("Y Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, _("Y Max"), "", INT_MIN, INT_MAX); } /* ****************** clear preview range operator ****************************/ diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index 75b54a7529a..a8043c806f1 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -40,6 +40,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_anim_types.h" #include "DNA_object_types.h" #include "DNA_material_types.h" @@ -534,7 +536,7 @@ void ANIM_OT_driver_button_add (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "all", 1, "All", "Create drivers for all elements of the array."); + RNA_def_boolean(ot->srna, "all", 1, _("All"), _("Create drivers for all elements of the array.")); } /* Remove Driver Button Operator ------------------------ */ @@ -586,7 +588,7 @@ void ANIM_OT_driver_button_remove (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "all", 1, "All", "Delete drivers for all elements of the array."); + RNA_def_boolean(ot->srna, "all", 1, _("All"), _("Delete drivers for all elements of the array.")); } /* Copy Driver Button Operator ------------------------ */ diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 1ba695209b2..ec60ddbfa1c 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -45,6 +45,8 @@ #include "BLI_dynstr.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_anim_types.h" #include "DNA_armature_types.h" #include "DNA_constraint_types.h" @@ -1160,7 +1162,7 @@ void ANIM_OT_keyframe_insert (wmOperatorType *ot) /* confirm whether a keyframe was added by showing a popup * - by default, this is enabled, since this operator is assumed to be called independently */ - prop= RNA_def_boolean(ot->srna, "confirm_success", 1, "Confirm Successful Insert", "Show a popup when the keyframes get successfully added"); + prop= RNA_def_boolean(ot->srna, "confirm_success", 1, _("Confirm Successful Insert"), _("Show a popup when the keyframes get successfully added")); RNA_def_property_flag(prop, PROP_HIDDEN); } @@ -1215,7 +1217,7 @@ void ANIM_OT_keyframe_insert_menu (wmOperatorType *ot) * - by default, this is disabled so that if a menu is shown, this doesn't come up too */ // XXX should this just be always on? - prop= RNA_def_boolean(ot->srna, "confirm_success", 0, "Confirm Successful Insert", "Show a popup when the keyframes get successfully added"); + prop= RNA_def_boolean(ot->srna, "confirm_success", 0, _("Confirm Successful Insert"), _("Show a popup when the keyframes get successfully added")); RNA_def_property_flag(prop, PROP_HIDDEN); /* whether the menu should always be shown @@ -1307,7 +1309,7 @@ void ANIM_OT_keyframe_delete (wmOperatorType *ot) /* confirm whether a keyframe was added by showing a popup * - by default, this is enabled, since this operator is assumed to be called independently */ - RNA_def_boolean(ot->srna, "confirm_success", 1, "Confirm Successful Insert", "Show a popup when the keyframes get successfully added"); + RNA_def_boolean(ot->srna, "confirm_success", 1, _("Confirm Successful Insert"), _("Show a popup when the keyframes get successfully added")); } /* Delete Key Operator ------------------------ */ @@ -1460,7 +1462,7 @@ void ANIM_OT_keyframe_insert_button (wmOperatorType *ot) ot->flag= OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "all", 1, "All", "Insert a keyframe for all element of the array."); + RNA_def_boolean(ot->srna, "all", 1, _("All"), _("Insert a keyframe for all element of the array.")); } /* Delete Key Button Operator ------------------------ */ @@ -1532,7 +1534,7 @@ void ANIM_OT_keyframe_delete_button (wmOperatorType *ot) ot->flag= OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "all", 1, "All", "Delete keyfames from all elements of the array."); + RNA_def_boolean(ot->srna, "all", 1, _("All"), _("Delete keyfames from all elements of the array.")); } /* ******************************************* */ diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index c525c9af626..c04fdc3f82c 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -45,6 +45,8 @@ #include "BLI_dynstr.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_anim_types.h" #include "DNA_scene_types.h" #include "DNA_object_types.h" @@ -383,7 +385,7 @@ void ANIM_OT_keyingset_button_add (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "all", 1, "All", "Add all elements of the array to a Keying Set."); + RNA_def_boolean(ot->srna, "all", 1, _("All"), _("Add all elements of the array to a Keying Set.")); } /* Remove from KeyingSet Button Operator ------------------------ */ @@ -508,7 +510,7 @@ void ANIM_OT_keying_set_active_set (wmOperatorType *ot) /* keyingset to use * - here the type is int not enum, since many of the indices here are determined dynamically */ - RNA_def_int(ot->srna, "type", 0, INT_MIN, INT_MAX, "Keying Set Number", "Index (determined internally) of the Keying Set to use", 0, 1); + RNA_def_int(ot->srna, "type", 0, INT_MIN, INT_MAX, _("Keying Set Number"), _("Index (determined internally) of the Keying Set to use"), 0, 1); } /* ******************************************* */ diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index abf08393544..1144de4c355 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -53,6 +53,8 @@ #include "BLI_editVert.h" #include "BLI_ghash.h" +#include "BLF_api.h" + #include "BKE_animsys.h" #include "BKE_action.h" #include "BKE_armature.h" @@ -1575,9 +1577,9 @@ static int pose_select_linked_poll(bContext *C) void POSE_OT_select_linked(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Connected"; + ot->name= _("Select Connected"); ot->idname= "POSE_OT_select_linked"; - ot->description= "Select bones related to selected ones by parent/child relationships"; + ot->description= _("Select bones related to selected ones by parent/child relationships"); /* api callbacks */ ot->exec= NULL; @@ -1588,7 +1590,7 @@ void POSE_OT_select_linked(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend"), _("Extend selection instead of deselecting everything first.")); } /* **************** END Posemode stuff ********************** */ @@ -1684,7 +1686,7 @@ void ARMATURE_OT_select_linked(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties s*/ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend"), _("Extend selection instead of deselecting everything first.")); } /* does bones and points */ @@ -2225,8 +2227,8 @@ void ARMATURE_OT_calculate_roll(wmOperatorType *ot) /* properties */ ot->prop= RNA_def_enum(ot->srna, "type", prop_calc_roll_types, 0, "Type", ""); - RNA_def_boolean(ot->srna, "axis_flip", 0, "Flip Axis", "Negate the alignment axis."); - RNA_def_boolean(ot->srna, "axis_only", 0, "Shortest Rotation", "Ignore the axis direction, use the shortest rotation to align."); + RNA_def_boolean(ot->srna, "axis_flip", 0, _("Flip Axis"), _("Negate the alignment axis.")); + RNA_def_boolean(ot->srna, "axis_only", 0, _("Shortest Rotation"), _("Ignore the axis direction, use the shortest rotation to align.")); } /* **************** undo for armatures ************** */ @@ -3303,7 +3305,7 @@ void ARMATURE_OT_hide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Hide unselected rather than selected.")); } static int armature_reveal_exec(bContext *C, wmOperator *UNUSED(op)) @@ -3552,7 +3554,7 @@ void ARMATURE_OT_extrude(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "forked", 0, "Forked", ""); + RNA_def_boolean(ot->srna, "forked", 0, _("Forked"), ""); } /* ********************** Bone Add ********************/ @@ -4216,7 +4218,7 @@ void ARMATURE_OT_select_hierarchy(wmOperatorType *ot) /* props */ RNA_def_enum(ot->srna, "direction", direction_items, BONE_SELECT_PARENT, "Direction", ""); - RNA_def_boolean(ot->srna, "extend", 0, "Add to Selection", ""); + RNA_def_boolean(ot->srna, "extend", 0, _("Add to Selection"), ""); } /* ***************** EditBone Alignment ********************* */ @@ -5313,9 +5315,9 @@ static int pose_hide_exec(bContext *C, wmOperator *op) void POSE_OT_hide(wmOperatorType *ot) { /* identifiers */ - ot->name= "Hide Selected"; + ot->name= _("Hide Selected"); ot->idname= "POSE_OT_hide"; - ot->description= "Tag selected bones to not be visible in Pose Mode"; + ot->description= _("Tag selected bones to not be visible in Pose Mode"); /* api callbacks */ ot->exec= pose_hide_exec; @@ -5325,7 +5327,7 @@ void POSE_OT_hide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", ""); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), ""); } static int show_pose_bone_cb(Object *ob, Bone *bone, void *UNUSED(ptr)) diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index 97f85b92b32..e3a6ded3410 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -44,6 +44,8 @@ #include "BLI_graph.h" #include "BLI_ghash.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_sketch.h" @@ -2916,7 +2918,7 @@ void SKETCH_OT_finish_stroke(wmOperatorType *ot) void SKETCH_OT_draw_preview(wmOperatorType *ot) { /* identifiers */ - ot->name= "draw preview"; + ot->name= _("draw preview"); ot->idname= "SKETCH_OT_draw_preview"; /* api callbacks */ @@ -2924,7 +2926,7 @@ void SKETCH_OT_draw_preview(wmOperatorType *ot) ot->poll= ED_operator_sketch_mode_active_stroke; - RNA_def_boolean(ot->srna, "snap", 0, "Snap", ""); + RNA_def_boolean(ot->srna, "snap", 0, _("Snap"), ""); /* flags */ // ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -2943,7 +2945,7 @@ void SKETCH_OT_draw_stroke(wmOperatorType *ot) ot->poll= (int (*)(bContext *))ED_operator_sketch_mode; - RNA_def_boolean(ot->srna, "snap", 0, "Snap", ""); + RNA_def_boolean(ot->srna, "snap", 0, _("Snap"), ""); /* flags */ ot->flag= OPTYPE_BLOCKING; // OPTYPE_REGISTER|OPTYPE_UNDO @@ -2962,7 +2964,7 @@ void SKETCH_OT_gesture(wmOperatorType *ot) ot->poll= ED_operator_sketch_mode_gesture; - RNA_def_boolean(ot->srna, "snap", 0, "Snap", ""); + RNA_def_boolean(ot->srna, "snap", 0, _("Snap"), ""); /* flags */ ot->flag= OPTYPE_BLOCKING; // OPTYPE_UNDO diff --git a/source/blender/editors/armature/poseSlide.c b/source/blender/editors/armature/poseSlide.c index 3d6888d87dc..d5ad8346be2 100644 --- a/source/blender/editors/armature/poseSlide.c +++ b/source/blender/editors/armature/poseSlide.c @@ -45,6 +45,8 @@ #include "BLI_dlrbTree.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_anim_types.h" #include "DNA_armature_types.h" #include "DNA_object_types.h" @@ -682,9 +684,9 @@ static int pose_slide_exec_common (bContext *C, wmOperator *op, tPoseSlideOp *ps /* common code for defining RNA properties */ static void pose_slide_opdef_properties (wmOperatorType *ot) { - RNA_def_int(ot->srna, "prev_frame", 0, MINAFRAME, MAXFRAME, "Previous Keyframe", "Frame number of keyframe immediately before the current frame.", 0, 50); - RNA_def_int(ot->srna, "next_frame", 0, MINAFRAME, MAXFRAME, "Next Keyframe", "Frame number of keyframe immediately after the current frame.", 0, 50); - RNA_def_float_percentage(ot->srna, "percentage", 0.5f, 0.0f, 1.0f, "Percentage", "Weighting factor for the sliding operation", 0.3, 0.7); + RNA_def_int(ot->srna, "prev_frame", 0, MINAFRAME, MAXFRAME, _("Previous Keyframe"), _("Frame number of keyframe immediately before the current frame."), 0, 50); + RNA_def_int(ot->srna, "next_frame", 0, MINAFRAME, MAXFRAME, _("Next Keyframe"), _("Frame number of keyframe immediately after the current frame."), 0, 50); + RNA_def_float_percentage(ot->srna, "percentage", 0.5f, 0.0f, 1.0f, _("Percentage"), _("Weighting factor for the sliding operation"), 0.3, 0.7); } /* ------------------------------------ */ diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index 5b4da1a38df..effe4ee5f76 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -45,6 +45,8 @@ #include "BLI_dlrbTree.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_anim_types.h" #include "DNA_armature_types.h" #include "DNA_object_types.h" @@ -476,8 +478,8 @@ void POSELIB_OT_pose_add (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_int(ot->srna, "frame", 1, 0, INT_MAX, "Frame", "Frame to store pose on", 0, INT_MAX); - RNA_def_string(ot->srna, "name", "Pose", 64, "Pose Name", "Name of newly added Pose"); + RNA_def_int(ot->srna, "frame", 1, 0, INT_MAX, _("Frame"), _("Frame to store pose on"), 0, INT_MAX); + RNA_def_string(ot->srna, "name", "Pose", 64, _("Pose Name"), _("Name of newly added Pose")); } /* ----- */ @@ -1592,7 +1594,7 @@ void POSELIB_OT_browse_interactive (wmOperatorType *ot) /* properties */ // TODO: make the pose_index into a proper enum instead of a cryptic int... - ot->prop= RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, "Pose", "Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)", 0, INT_MAX); + ot->prop= RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, _("Pose"), _("Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)"), 0, INT_MAX); // XXX: percentage vs factor? /* not used yet */ @@ -1615,5 +1617,5 @@ void POSELIB_OT_apply_pose (wmOperatorType *ot) /* properties */ // TODO: make the pose_index into a proper enum instead of a cryptic int... - ot->prop= RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, "Pose", "Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)", 0, INT_MAX); + ot->prop= RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, _("Pose"), _("Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)"), 0, INT_MAX); } diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index 8176aa5893b..680218551db 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -43,6 +43,8 @@ #include "BLI_dynstr.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_anim_types.h" #include "DNA_armature_types.h" #include "DNA_constraint_types.h" @@ -487,9 +489,9 @@ void POSE_OT_select_hierarchy(wmOperatorType *ot) }; /* identifiers */ - ot->name= "Select Hierarchy"; + ot->name= _("Select Hierarchy"); ot->idname= "POSE_OT_select_hierarchy"; - ot->description= "Select immediate parent/children of selected bones"; + ot->description= _("Select immediate parent/children of selected bones"); /* api callbacks */ ot->exec= pose_select_hierarchy_exec; @@ -500,7 +502,7 @@ void POSE_OT_select_hierarchy(wmOperatorType *ot) /* props */ ot->prop= RNA_def_enum(ot->srna, "direction", direction_items, BONE_SELECT_PARENT, "Direction", ""); - RNA_def_boolean(ot->srna, "extend", 0, "Add to Selection", ""); + RNA_def_boolean(ot->srna, "extend", 0, _("Add to Selection"), ""); } @@ -646,8 +648,8 @@ void POSE_OT_select_grouped (wmOperatorType *ot) }; /* identifiers */ - ot->name= "Select Grouped"; - ot->description = "Select all visible bones grouped by similar properties"; + ot->name= _("Select Grouped"); + ot->description = _("Select all visible bones grouped by similar properties"); ot->idname= "POSE_OT_select_grouped"; /* api callbacks */ @@ -659,7 +661,7 @@ void POSE_OT_select_grouped (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend"), _("Extend selection instead of deselecting everything first.")); ot->prop= RNA_def_enum(ot->srna, "type", prop_select_grouped_types, 0, "Type", ""); } @@ -1156,9 +1158,9 @@ static int pose_paste_exec (bContext *C, wmOperator *op) void POSE_OT_paste (wmOperatorType *ot) { /* identifiers */ - ot->name= "Paste Pose"; + ot->name= _("Paste Pose"); ot->idname= "POSE_OT_paste"; - ot->description= "Pastes the stored pose on to the current pose"; + ot->description= _("Pastes the stored pose on to the current pose"); /* api callbacks */ ot->exec= pose_paste_exec; @@ -1168,8 +1170,8 @@ void POSE_OT_paste (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "flipped", 0, "Flipped on X-Axis", "Paste the stored pose flipped on to current pose"); - RNA_def_boolean(ot->srna, "selected_mask", 0, "On Selected Only", "Only paste the stored pose on to selected bones in the current pose"); + RNA_def_boolean(ot->srna, "flipped", 0, _("Flipped on X-Axis"), _("Paste the stored pose flipped on to current pose")); + RNA_def_boolean(ot->srna, "selected_mask", 0, _("On Selected Only"), _("Only paste the stored pose on to selected bones in the current pose")); } /* ********************************************** */ @@ -1370,7 +1372,7 @@ void POSE_OT_group_assign (wmOperatorType *ot) ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_int(ot->srna, "type", 0, 0, 10, "Bone Group Index", "", 0, INT_MAX); + RNA_def_int(ot->srna, "type", 0, 0, 10, _("Bone Group Index"), "", 0, INT_MAX); } @@ -1678,7 +1680,7 @@ void ARMATURE_OT_layers_show_all (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop = RNA_def_boolean(ot->srna, "all", 1, "All Layers", "Enable all layers or just the first 16 (top row)"); + ot->prop = RNA_def_boolean(ot->srna, "all", 1, _("All Layers"), _("Enable all layers or just the first 16 (top row)")); } /* ------------------- */ diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 99aebfffaee..9dc0acb4131 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -56,6 +56,8 @@ #include "BLI_utildefines.h" #include "BLI_ghash.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_curve.h" #include "BKE_depsgraph.h" @@ -2717,7 +2719,7 @@ void CURVE_OT_hide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Hide unselected rather than selected.")); } /********************** reveal operator *********************/ @@ -3274,7 +3276,7 @@ void CURVE_OT_subdivide(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of cuts", "", 1, 10); + RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, _("Number of cuts"), "", 1, 10); } /******************** find nearest ************************/ @@ -5037,7 +5039,7 @@ void CURVE_OT_select_linked_pick(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Deselect linked control points rather than selecting them."); + RNA_def_boolean(ot->srna, "deselect", 0, _("Deselect"), _("Deselect linked control points rather than selecting them.")); } /***************** select row operator **********************/ @@ -5480,8 +5482,8 @@ void CURVE_OT_select_random(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, "Percent", "Percentage of elements to select randomly.", 0.f, 100.0f); - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend Selection", "Extend selection instead of deselecting everything first."); + RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, _("Percent"), _("Percentage of elements to select randomly."), 0.f, 100.0f); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend Selection"), _("Extend selection instead of deselecting everything first.")); } /********************* every nth number of point *******************/ @@ -5605,7 +5607,7 @@ void CURVE_OT_select_nth(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "nth", 2, 2, 100, "Nth Selection", "", 1, INT_MAX); + RNA_def_int(ot->srna, "nth", 2, 2, 100, _("Nth Selection"), "", 1, INT_MAX); } /********************** add duplicate operator *********************/ diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index 649ff9e953a..6b50bcfc93e 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -47,6 +47,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_curve_types.h" #include "DNA_object_types.h" #include "DNA_vfont_types.h" @@ -662,8 +664,8 @@ void FONT_OT_style_set(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "style", style_items, CU_CHINFO_BOLD, "Style", "Style to set selection to."); - RNA_def_boolean(ot->srna, "clear", 0, "Clear", "Clear style rather than setting it."); + RNA_def_enum(ot->srna, "style", style_items, CU_CHINFO_BOLD, _("Style"), _("Style to set selection to.")); + RNA_def_boolean(ot->srna, "clear", 0, _("Clear"), _("Clear style rather than setting it.")); } /******************* toggle style operator ********************/ @@ -1037,7 +1039,7 @@ void FONT_OT_change_spacing(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_int(ot->srna, "delta", 1, -20, 20, "Delta", "Amount to decrease or increasing character spacing with.", -20, 20); + RNA_def_int(ot->srna, "delta", 1, -20, 20, _("Delta"), _("Amount to decrease or increasing character spacing with."), -20, 20); } /************************* change character **********************/ @@ -1082,7 +1084,7 @@ void FONT_OT_change_character(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_int(ot->srna, "delta", 1, -255, 255, "Delta", "Number to increase or decrease character code with.", -255, 255); + RNA_def_int(ot->srna, "delta", 1, -255, 255, _("Delta"), _("Number to increase or decrease character code with."), -255, 255); } /******************* line break operator ********************/ @@ -1365,8 +1367,8 @@ void FONT_OT_text_insert(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position."); - RNA_def_boolean(ot->srna, "accent", 0, "Accent mode", "Next typed character will strike through previous, for special character input."); + RNA_def_string(ot->srna, "text", "", 0, _("Text"), _("Text to insert at the cursor position.")); + RNA_def_boolean(ot->srna, "accent", 0, _("Accent mode"), _("Next typed character will strike through previous, for special character input.")); } @@ -1445,7 +1447,7 @@ void FONT_OT_textbox_remove(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "The current text box.", 0, INT_MAX); + RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, _("Index"), _("The current text box."), 0, INT_MAX); } diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 55c1488291b..c7361180367 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.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_idprop.h" @@ -2781,7 +2783,7 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,in empty= uiDefAutoButsRNA(layout, &ptr, check_prop, label_align) == 0; if(empty && (flag & UI_LAYOUT_OP_SHOW_EMPTY)) { - uiItemL(layout, "No Properties.", ICON_NONE); + uiItemL(layout, _("No Properties."), ICON_NONE); } } diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index e9fad382beb..e2bfedcf3ea 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -44,6 +44,8 @@ #include "BLI_math_color.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_global.h" #include "BKE_text.h" /* for UI_OT_reports_to_text */ @@ -305,9 +307,9 @@ static int reset_default_button_exec(bContext *C, wmOperator *op) static void UI_OT_reset_default_button(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reset to Default Value"; + ot->name= _("Reset to Default Value"); ot->idname= "UI_OT_reset_default_button"; - ot->description= "Reset this property's value to its default value"; + ot->description= _("Reset this property's value to its default value"); /* callbacks */ ot->poll= reset_default_button_poll; @@ -317,7 +319,7 @@ static void UI_OT_reset_default_button(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "all", 1, "All", "Reset to default values all elements of the array."); + RNA_def_boolean(ot->srna, "all", 1, _("All"), _("Reset to default values all elements of the array.")); } /* Copy To Selected Operator ------------------------ */ @@ -397,9 +399,9 @@ static int copy_to_selected_button_exec(bContext *C, wmOperator *op) static void UI_OT_copy_to_selected_button(wmOperatorType *ot) { /* identifiers */ - ot->name= "Copy To Selected"; + ot->name= _("Copy To Selected"); ot->idname= "UI_OT_copy_to_selected_button"; - ot->description= "Copy property from this object to selected objects or bones"; + ot->description= _("Copy property from this object to selected objects or bones"); /* callbacks */ ot->poll= copy_to_selected_button_poll; @@ -409,7 +411,7 @@ static void UI_OT_copy_to_selected_button(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "all", 1, "All", "Reset to default values all elements of the array."); + RNA_def_boolean(ot->srna, "all", 1, _("All"), _("Reset to default values all elements of the array.")); } /* Reports to Textblock Operator ------------------------ */ diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c index 1ec125c2f26..8f20f47f539 100644 --- a/source/blender/editors/interface/interface_utils.c +++ b/source/blender/editors/interface/interface_utils.c @@ -37,6 +37,8 @@ #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" @@ -117,7 +119,7 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind } case PROP_COLLECTION: { char text[256]; - sprintf(text, "%d items", RNA_property_collection_length(ptr, prop)); + sprintf(text, _("%d items"), RNA_property_collection_length(ptr, prop)); but= uiDefBut(block, LABEL, 0, text, x1, y1, x2, y2, NULL, 0, 0, 0, 0, NULL); uiButSetFlag(but, UI_BUT_DISABLED); break; diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 434334258af..979732b6044 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -39,6 +39,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "RNA_access.h" @@ -306,8 +308,8 @@ static void VIEW2D_OT_pan(wmOperatorType *ot) ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; /* rna - must keep these in sync with the other operators */ - RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, "Delta Y", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, _("Delta X"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, _("Delta Y"), "", INT_MIN, INT_MAX); } /* ------------------ Scrollwheel Versions (2) ---------------------- */ @@ -350,8 +352,8 @@ static void VIEW2D_OT_scroll_right(wmOperatorType *ot) ot->exec= view_scrollright_exec; /* rna - must keep these in sync with the other operators */ - RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, "Delta Y", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, _("Delta X"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, _("Delta Y"), "", INT_MIN, INT_MAX); } @@ -394,8 +396,8 @@ static void VIEW2D_OT_scroll_left(wmOperatorType *ot) ot->exec= view_scrollleft_exec; /* rna - must keep these in sync with the other operators */ - RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, "Delta Y", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, _("Delta X"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, _("Delta Y"), "", INT_MIN, INT_MAX); } @@ -434,17 +436,17 @@ static int view_scrolldown_exec(bContext *C, wmOperator *op) static void VIEW2D_OT_scroll_down(wmOperatorType *ot) { /* identifiers */ - ot->name= "Scroll Down"; - ot->description= "Scroll the view down"; + ot->name= _("Scroll Down"); + ot->description= _("Scroll the view down"); ot->idname= "VIEW2D_OT_scroll_down"; /* api callbacks */ ot->exec= view_scrolldown_exec; /* rna - must keep these in sync with the other operators */ - RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, "Delta Y", "", INT_MIN, INT_MAX); - RNA_def_boolean(ot->srna, "page", 0, "Page", "Scroll down one page."); + RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, _("Delta X"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, _("Delta Y"), "", INT_MIN, INT_MAX); + RNA_def_boolean(ot->srna, "page", 0, _("Page"), _("Scroll down one page.")); } @@ -484,17 +486,17 @@ static int view_scrollup_exec(bContext *C, wmOperator *op) static void VIEW2D_OT_scroll_up(wmOperatorType *ot) { /* identifiers */ - ot->name= "Scroll Up"; - ot->description= "Scroll the view up"; + ot->name= _("Scroll Up"); + ot->description= _("Scroll the view up"); ot->idname= "VIEW2D_OT_scroll_up"; /* api callbacks */ ot->exec= view_scrollup_exec; /* rna - must keep these in sync with the other operators */ - RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, "Delta Y", "", INT_MIN, INT_MAX); - RNA_def_boolean(ot->srna, "page", 0, "Page", "Scroll up one page."); + RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, _("Delta X"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, _("Delta Y"), "", INT_MIN, INT_MAX); + RNA_def_boolean(ot->srna, "page", 0, _("Page"), _("Scroll up one page.")); } /* ********************************************************* */ @@ -1178,11 +1180,11 @@ static void VIEW2D_OT_zoom_border(wmOperatorType *ot) ot->poll= view_zoom_poll; /* rna */ - RNA_def_int(ot->srna, "gesture_mode", 0, INT_MIN, INT_MAX, "Gesture Mode", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "gesture_mode", 0, INT_MIN, INT_MAX, _("Gesture Mode"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, _("X Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, _("X Max"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, _("Y Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, _("Y Max"), "", INT_MIN, INT_MAX); } /* ********************************************************* */ diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index fa3619883f4..8bd9c6fad79 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -52,6 +52,8 @@ #include "BLI_editVert.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_depsgraph.h" #include "BKE_library.h" @@ -272,8 +274,8 @@ static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event) void MESH_OT_dupli_extrude_cursor(wmOperatorType *ot) { /* identifiers */ - ot->name= "Duplicate or Extrude at 3D Cursor"; - ot->description= "Duplicate and extrude selected vertices, edges or faces towards 3D Cursor"; + ot->name= _("Duplicate or Extrude at 3D Cursor"); + ot->description= _("Duplicate and extrude selected vertices, edges or faces towards 3D Cursor"); ot->idname= "MESH_OT_dupli_extrude_cursor"; /* api callbacks */ @@ -283,7 +285,7 @@ void MESH_OT_dupli_extrude_cursor(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "rotate_source", 1, "Rotate Source", "Rotate initial selection giving better shape"); + RNA_def_boolean(ot->srna, "rotate_source", 1, _("Rotate Source"), _("Rotate initial selection giving better shape")); } @@ -1486,9 +1488,9 @@ void MESH_OT_primitive_circle_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, "Vertices", "", 3, 500); - RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00); - RNA_def_boolean(ot->srna, "fill", 0, "Fill", ""); + RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, _("Vertices"), "", 3, 500); + RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, _("Radius"), "", 0.001, 100.00); + RNA_def_boolean(ot->srna, "fill", 0, _("Fill"), ""); ED_object_add_generic_props(ot, TRUE); } @@ -1527,10 +1529,10 @@ void MESH_OT_primitive_cylinder_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, "Vertices", "", 2, 500); - RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00); - RNA_def_float(ot->srna, "depth", 2.0f, 0.0, FLT_MAX, "Depth", "", 0.001, 100.00); - RNA_def_boolean(ot->srna, "cap_ends", 1, "Cap Ends", ""); + RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, _("Vertices"), "", 2, 500); + RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, _("Radius"), "", 0.001, 100.00); + RNA_def_float(ot->srna, "depth", 2.0f, 0.0, FLT_MAX, _("Depth"), "", 0.001, 100.00); + RNA_def_boolean(ot->srna, "cap_ends", 1, _("Cap Ends"), ""); ED_object_add_generic_props(ot, TRUE); } @@ -1568,10 +1570,10 @@ void MESH_OT_primitive_cone_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, "Vertices", "", 2, 500); - RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00); - RNA_def_float(ot->srna, "depth", 2.0f, 0.0, FLT_MAX, "Depth", "", 0.001, 100.00); - RNA_def_boolean(ot->srna, "cap_end", 1, "Cap End", ""); + RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, _("Vertices"), "", 2, 500); + RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, _("Radius"), "", 0.001, 100.00); + RNA_def_float(ot->srna, "depth", 2.0f, 0.0, FLT_MAX, _("Depth"), "", 0.001, 100.00); + RNA_def_boolean(ot->srna, "cap_end", 1, _("Cap End"), ""); ED_object_add_generic_props(ot, TRUE); } diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c index 32971ca77ed..326a293fb95 100644 --- a/source/blender/editors/mesh/editmesh_loop.c +++ b/source/blender/editors/mesh/editmesh_loop.c @@ -55,6 +55,8 @@ editmesh_loop: tools with own drawing subloops, select, knife, subdiv #include "BLI_editVert.h" #include "BLI_ghash.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_depsgraph.h" #include "BKE_mesh.h" @@ -726,7 +728,7 @@ void MESH_OT_knife_cut(wmOperatorType *ot) RNA_def_enum(ot->srna, "type", knife_items, KNIFE_EXACT, "Type", ""); prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath); - RNA_def_int(ot->srna, "num_cuts", 1, 1, MAX_CUTS, "Number of Cuts", "Only for Multi-Cut", 1, MAX_CUTS); + RNA_def_int(ot->srna, "num_cuts", 1, 1, MAX_CUTS, _("Number of Cuts"), _("Only for Multi-Cut"), 1, MAX_CUTS); // doesn't work atm.. RNA_def_enum(ot->srna, "corner_cut_pattern", corner_type_items, SUBDIV_CORNER_INNERVERT, "Corner Cut Pattern", "Topology pattern to use to fill a face after cutting across its corner"); /* internal */ diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index 741cfd7078c..d0423806f60 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -55,6 +55,8 @@ editmesh_mods.c, UI level access, no geometry changes #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_displist.h" #include "BKE_depsgraph.h" @@ -2052,7 +2054,7 @@ void MESH_OT_loop_multi_select(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "ring", 0, "Ring", ""); + RNA_def_boolean(ot->srna, "ring", 0, _("Ring"), ""); } @@ -2142,8 +2144,8 @@ void MESH_OT_loop_select(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); - RNA_def_boolean(ot->srna, "ring", 0, "Select Ring", ""); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); + RNA_def_boolean(ot->srna, "ring", 0, _("Select Ring"), ""); } /* ******************* mesh shortest path select, uses prev-selected edge ****************** */ @@ -2273,7 +2275,7 @@ void MESH_OT_select_shortest_path(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); } @@ -2580,8 +2582,8 @@ void MESH_OT_select_linked_pick(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", ""); - RNA_def_boolean(ot->srna, "limit", 0, "Limit by Seams", "Limit selection by seam boundaries (faces only)"); + RNA_def_boolean(ot->srna, "deselect", 0, _("Deselect"), ""); + RNA_def_boolean(ot->srna, "limit", 0, _("Limit by Seams"), _("Limit selection by seam boundaries (faces only)")); } @@ -2670,7 +2672,7 @@ void MESH_OT_select_linked(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "limit", 0, "Limit by Seams", "Limit selection by seam boundaries (faces only)"); + RNA_def_boolean(ot->srna, "limit", 0, _("Limit by Seams"), _("Limit selection by seam boundaries (faces only)")); } @@ -2795,8 +2797,8 @@ static int hide_mesh_exec(bContext *C, wmOperator *op) void MESH_OT_hide(wmOperatorType *ot) { /* identifiers */ - ot->name= "Hide Selection"; - ot->description= "Hide (un)selected vertices, edges or faces"; + ot->name= _("Hide Selection"); + ot->description= _("Hide (un)selected vertices, edges or faces"); ot->idname= "MESH_OT_hide"; /* api callbacks */ @@ -2807,7 +2809,7 @@ void MESH_OT_hide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Hide unselected rather than selected.")); } void EM_reveal_mesh(EditMesh *em) @@ -2965,7 +2967,7 @@ void MESH_OT_select_mirror(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the existing selection"); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("Extend the existing selection")); } static int select_sharp_edges_exec(bContext *C, wmOperator *op) @@ -3714,8 +3716,8 @@ void MESH_OT_select_random(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, "Percent", "Percentage of elements to select randomly.", 0.f, 100.0f); - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend Selection", "Extend selection instead of deselecting everything first."); + RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, _("Percent"), _("Percentage of elements to select randomly."), 0.f, 100.0f); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend Selection"), _("Extend selection instead of deselecting everything first.")); } void EM_select_by_material(EditMesh *em, int index) @@ -3808,7 +3810,7 @@ void MESH_OT_mark_seam(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "clear", 0, "Clear", ""); + RNA_def_boolean(ot->srna, "clear", 0, _("Clear"), ""); } static int editmesh_mark_sharp(bContext *C, wmOperator *op) @@ -3860,7 +3862,7 @@ void MESH_OT_mark_sharp(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "clear", 0, "Clear", ""); + RNA_def_boolean(ot->srna, "clear", 0, _("Clear"), ""); } /* **************** NORMALS ************** */ @@ -4104,7 +4106,7 @@ void MESH_OT_normals_make_consistent(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "inside", 0, "Inside", ""); + RNA_def_boolean(ot->srna, "inside", 0, _("Inside"), ""); } /* **************** VERTEX DEFORMS *************** */ @@ -4282,10 +4284,10 @@ void MESH_OT_vertices_smooth(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "repeat", 1, 1, 100, "Smooth Iterations", "", 1, INT_MAX); - RNA_def_boolean(ot->srna, "xaxis", 1, "X-Axis", "Smooth along the X axis."); - RNA_def_boolean(ot->srna, "yaxis", 1, "Y-Axis", "Smooth along the Y axis."); - RNA_def_boolean(ot->srna, "zaxis", 1, "Z-Axis", "Smooth along the Z axis."); + RNA_def_int(ot->srna, "repeat", 1, 1, 100, _("Smooth Iterations"), "", 1, INT_MAX); + RNA_def_boolean(ot->srna, "xaxis", 1, _("X-Axis"), _("Smooth along the X axis.")); + RNA_def_boolean(ot->srna, "yaxis", 1, _("Y-Axis"), _("Smooth along the Y axis.")); + RNA_def_boolean(ot->srna, "zaxis", 1, _("Z-Axis"), _("Smooth along the Z axis.")); } static int mesh_noise_exec(bContext *C, wmOperator *op) @@ -4495,6 +4497,6 @@ void MESH_OT_select_nth(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "nth", 2, 2, 100, "Nth Selection", "", 1, INT_MAX); + RNA_def_int(ot->srna, "nth", 2, 2, 100, _("Nth Selection"), "", 1, INT_MAX); } diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 424d3dd5a38..cccc281a345 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -65,6 +65,8 @@ editmesh_tool.c: UI called tools for editmesh, geometry changes here, otherwise #include "BLI_heap.h" #include "BLI_scanfill.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_depsgraph.h" #include "BKE_global.h" @@ -959,9 +961,9 @@ void MESH_OT_extrude_repeat(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_float(ot->srna, "offset", 2.0f, 0.0f, 100.0f, "Offset", "", 0.0f, 100.0f); - RNA_def_int(ot->srna, "steps", 10, 0, 180, "Steps", "", 0, 180); - RNA_def_float_vector(ot->srna, "direction", 3, NULL, -FLT_MAX, FLT_MAX, "Direction", "Direction of extrude", -FLT_MAX, FLT_MAX); + RNA_def_float(ot->srna, "offset", 2.0f, 0.0f, 100.0f, _("Offset"), "", 0.0f, 100.0f); + RNA_def_int(ot->srna, "steps", 10, 0, 180, _("Steps"), "", 0, 180); + RNA_def_float_vector(ot->srna, "direction", 3, NULL, -FLT_MAX, FLT_MAX, _("Direction"), _("Direction of extrude"), -FLT_MAX, FLT_MAX); } /* ************************** spin operator ******************** */ @@ -1095,12 +1097,12 @@ void MESH_OT_spin(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_int(ot->srna, "steps", 9, 0, INT_MAX, "Steps", "Steps", 0, 128); - RNA_def_boolean(ot->srna, "dupli", 0, "Dupli", "Make Duplicates"); - RNA_def_float(ot->srna, "degrees", 90.0f, -FLT_MAX, FLT_MAX, "Degrees", "Degrees", -360.0f, 360.0f); + RNA_def_int(ot->srna, "steps", 9, 0, INT_MAX, _("Steps"), _("Steps"), 0, 128); + RNA_def_boolean(ot->srna, "dupli", 0, _("Dupli"), _("Make Duplicates")); + RNA_def_float(ot->srna, "degrees", 90.0f, -FLT_MAX, FLT_MAX, _("Degrees"), _("Degrees"), -360.0f, 360.0f); - RNA_def_float_vector_xyz(ot->srna, "center", 3, NULL, -FLT_MAX, FLT_MAX, "Center", "Center in global view space", -FLT_MAX, FLT_MAX); - RNA_def_float_vector(ot->srna, "axis", 3, NULL, -1.0f, 1.0f, "Axis", "Axis in global view space", -FLT_MAX, FLT_MAX); + RNA_def_float_vector_xyz(ot->srna, "center", 3, NULL, -FLT_MAX, FLT_MAX, _("Center"), _("Center in global view space"), -FLT_MAX, FLT_MAX); + RNA_def_float_vector(ot->srna, "axis", 3, NULL, -1.0f, 1.0f, _("Axis"), _("Axis in global view space"), -FLT_MAX, FLT_MAX); } @@ -1201,11 +1203,11 @@ void MESH_OT_screw(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /*props */ - RNA_def_int(ot->srna, "steps", 9, 0, INT_MAX, "Steps", "Steps", 0, 256); - RNA_def_int(ot->srna, "turns", 1, 0, INT_MAX, "Turns", "Turns", 0, 256); + RNA_def_int(ot->srna, "steps", 9, 0, INT_MAX, _("Steps"), _("Steps"), 0, 256); + RNA_def_int(ot->srna, "turns", 1, 0, INT_MAX, _("Turns"), _("Turns"), 0, 256); - RNA_def_float_vector_xyz(ot->srna, "center", 3, NULL, -FLT_MAX, FLT_MAX, "Center", "Center in global view space", -FLT_MAX, FLT_MAX); - RNA_def_float_vector(ot->srna, "axis", 3, NULL, -1.0f, 1.0f, "Axis", "Axis in global view space", -FLT_MAX, FLT_MAX); + RNA_def_float_vector_xyz(ot->srna, "center", 3, NULL, -FLT_MAX, FLT_MAX, _("Center"), _("Center in global view space"), -FLT_MAX, FLT_MAX); + RNA_def_float_vector(ot->srna, "axis", 3, NULL, -1.0f, 1.0f, _("Axis"), _("Axis in global view space"), -FLT_MAX, FLT_MAX); } static void erase_edges(EditMesh *em, ListBase *l) @@ -5300,8 +5302,8 @@ void MESH_OT_blend_from_shape(wmOperatorType *ot) static EnumPropertyItem shape_items[]= {{0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Blend From Shape"; - ot->description= "Blend in shape from a shape key"; + ot->name= _("Blend From Shape"); + ot->description= _("Blend in shape from a shape key"); ot->idname= "MESH_OT_blend_from_shape"; /* api callbacks */ @@ -5313,10 +5315,10 @@ void MESH_OT_blend_from_shape(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - prop= RNA_def_enum(ot->srna, "shape", shape_items, 0, "Shape", "Shape key to use for blending."); + prop= RNA_def_enum(ot->srna, "shape", shape_items, 0, _("Shape"), _("Shape key to use for blending.")); RNA_def_enum_funcs(prop, shape_itemf); - RNA_def_float(ot->srna, "blend", 1.0f, -FLT_MAX, FLT_MAX, "Blend", "Blending factor.", -2.0f, 2.0f); - RNA_def_boolean(ot->srna, "add", 0, "Add", "Add rather than blend between shapes."); + RNA_def_float(ot->srna, "blend", 1.0f, -FLT_MAX, FLT_MAX, _("Blend"), _("Blending factor."), -2.0f, 2.0f); + RNA_def_boolean(ot->srna, "add", 0, _("Add"), _("Add rather than blend between shapes.")); } /************************ Merge Operator *************************/ @@ -6032,7 +6034,7 @@ void MESH_OT_merge(wmOperatorType *ot) prop= RNA_def_enum(ot->srna, "type", merge_type_items, 3, "Type", "Merge method to use."); RNA_def_enum_funcs(prop, merge_type_itemf); ot->prop= prop; - RNA_def_boolean(ot->srna, "uvs", 0, "UVs", "Move UVs according to merge."); + RNA_def_boolean(ot->srna, "uvs", 0, _("UVs"), _("Move UVs according to merge.")); } /************************ Vertex Path Operator *************************/ @@ -6867,10 +6869,10 @@ void MESH_OT_subdivide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of Cuts", "", 1, 10); - RNA_def_float(ot->srna, "smoothness", 0.0f, 0.0f, FLT_MAX, "Smoothness", "Smoothness factor.", 0.0f, 1.0f); - RNA_def_float(ot->srna, "fractal", 0.0, 0.0f, FLT_MAX, "Fractal", "Fractal randomness factor.", 0.0f, 1000.0f); - RNA_def_enum(ot->srna, "corner_cut_pattern", corner_type_items, SUBDIV_CORNER_INNERVERT, "Corner Cut Pattern", "Topology pattern to use to fill a face after cutting across its corner"); + RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, _("Number of Cuts"), "", 1, 10); + RNA_def_float(ot->srna, "smoothness", 0.0f, 0.0f, FLT_MAX, _("Smoothness"), _("Smoothness factor."), 0.0f, 1.0f); + RNA_def_float(ot->srna, "fractal", 0.0, 0.0f, FLT_MAX, _("Fractal"), _("Fractal randomness factor."), 0.0f, 1000.0f); + RNA_def_enum(ot->srna, "corner_cut_pattern", corner_type_items, SUBDIV_CORNER_INNERVERT, _("Corner Cut Pattern"), _("Topology pattern to use to fill a face after cutting across its corner")); } /********************** Fill Operators *************************/ diff --git a/source/blender/editors/mesh/loopcut.c b/source/blender/editors/mesh/loopcut.c index 0ec356a88ae..43de28e010b 100644 --- a/source/blender/editors/mesh/loopcut.c +++ b/source/blender/editors/mesh/loopcut.c @@ -53,6 +53,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_blender.h" #include "BKE_context.h" #include "BKE_depsgraph.h" @@ -521,7 +523,7 @@ void MESH_OT_edgering_select (wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection"); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("Extend the selection")); } void MESH_OT_loopcut (wmOperatorType *ot) @@ -541,5 +543,5 @@ void MESH_OT_loopcut (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; /* properties */ - RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of Cuts", "", 1, 10); + RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, _("Number of Cuts"), "", 1, 10); } diff --git a/source/blender/editors/metaball/CMakeLists.txt b/source/blender/editors/metaball/CMakeLists.txt index 690a8ec2fcb..9093da34519 100644 --- a/source/blender/editors/metaball/CMakeLists.txt +++ b/source/blender/editors/metaball/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenloader ../../blenlib diff --git a/source/blender/editors/metaball/SConscript b/source/blender/editors/metaball/SConscript index b1a1ce935db..327e85b95f9 100644 --- a/source/blender/editors/metaball/SConscript +++ b/source/blender/editors/metaball/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/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c index b007e30422d..00d40d196d6 100644 --- a/source/blender/editors/metaball/mball_edit.c +++ b/source/blender/editors/metaball/mball_edit.c @@ -42,6 +42,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_meta_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" @@ -412,7 +414,7 @@ void MBALL_OT_hide_metaelems(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Hide unselected rather than selected.")); } /***************************** Unhide operator *****************************/ diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index e5bd247a22c..bd7d6c826a8 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -50,6 +50,8 @@ #include "BLI_listbase.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_anim.h" #include "BKE_animsys.h" #include "BKE_armature.h" @@ -174,10 +176,10 @@ void ED_object_add_generic_props(wmOperatorType *ot, int do_editmode) PropertyRNA *prop; /* note: this property gets hidden for add-camera operator */ - RNA_def_boolean(ot->srna, "view_align", 0, "Align to View", "Align the new object to the view"); + RNA_def_boolean(ot->srna, "view_align", 0, _("Align to View"), _("Align the new object to the view")); if(do_editmode) { - prop= RNA_def_boolean(ot->srna, "enter_editmode", 0, "Enter Editmode", "Enter editmode when adding this object"); + prop= RNA_def_boolean(ot->srna, "enter_editmode", 0, _("Enter Editmode"), _("Enter editmode when adding this object")); RNA_def_property_flag(prop, PROP_HIDDEN); } @@ -837,8 +839,8 @@ static int object_delete_exec(bContext *C, wmOperator *UNUSED(op)) void OBJECT_OT_delete(wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete"; - ot->description = "Delete selected objects"; + ot->name= _("Delete"); + ot->description = _("Delete selected objects"); ot->idname= "OBJECT_OT_delete"; /* api callbacks */ @@ -1382,8 +1384,8 @@ static int convert_exec(bContext *C, wmOperator *op) void OBJECT_OT_convert(wmOperatorType *ot) { /* identifiers */ - ot->name= "Convert"; - ot->description = "Convert selected objects to another type"; + ot->name= _("Convert to"); + ot->description = _("Convert selected objects to another type"); ot->idname= "OBJECT_OT_convert"; /* api callbacks */ @@ -1395,8 +1397,8 @@ void OBJECT_OT_convert(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "target", convert_target_items, OB_MESH, "Target", "Type of object to convert to"); - RNA_def_boolean(ot->srna, "keep_original", 0, "Keep Original", "Keep original objects instead of replacing them"); + ot->prop= RNA_def_enum(ot->srna, "target", convert_target_items, OB_MESH, _("Target"), _("Type of object to convert to")); + RNA_def_boolean(ot->srna, "keep_original", 0, _("Keep Original"), _("Keep original objects instead of replacing them")); } /**************************** Duplicate ************************/ @@ -1716,7 +1718,7 @@ void OBJECT_OT_duplicate(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* to give to transform */ - RNA_def_boolean(ot->srna, "linked", 0, "Linked", "Duplicate object but not object data, linking to the original data"); + RNA_def_boolean(ot->srna, "linked", 0, _("Linked"), _("Duplicate object but not object data, linking to the original data")); prop= RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", ""); RNA_def_property_flag(prop, PROP_HIDDEN); } @@ -1786,8 +1788,8 @@ void OBJECT_OT_add_named(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "linked", 0, "Linked", "Duplicate object but not object data, linking to the original data"); - RNA_def_string(ot->srna, "name", "Cube", 24, "Name", "Object name to add"); + RNA_def_boolean(ot->srna, "linked", 0, _("Linked"), _("Duplicate object but not object data, linking to the original data")); + RNA_def_string(ot->srna, "name", "Cube", 24, _("Name"), _("Object name to add")); } @@ -1833,8 +1835,8 @@ static int join_exec(bContext *C, wmOperator *op) void OBJECT_OT_join(wmOperatorType *ot) { /* identifiers */ - ot->name= "Join"; - ot->description = "Join selected objects into active object"; + ot->name= _("Join"); + ot->description = _("Join selected objects into active object"); ot->idname= "OBJECT_OT_join"; /* api callbacks */ diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 450bd70a568..14213a0f191 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -42,6 +42,8 @@ #include "BLI_dynstr.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_constraint_types.h" #include "DNA_curve_types.h" #include "DNA_scene_types.h" @@ -1583,8 +1585,8 @@ static int pose_ik_add_exec(bContext *C, wmOperator *op) void POSE_OT_ik_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add IK to Bone"; - ot->description= "Add IK Constraint to the active Bone"; + ot->name= _("Add IK to Bone"); + ot->description= _("Add IK Constraint to the active Bone"); ot->idname= "POSE_OT_ik_add"; /* api callbacks */ @@ -1596,7 +1598,7 @@ void POSE_OT_ik_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "with_targets", 1, "With Targets", "Assign IK Constraint with targets derived from the select bones/objects"); + RNA_def_boolean(ot->srna, "with_targets", 1, _("With Targets"), _("Assign IK Constraint with targets derived from the select bones/objects")); } /* ------------------ */ diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 527b97a6082..21e636e3340 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -46,6 +46,8 @@ #include "BLI_ghash.h" #include "BLI_rand.h" +#include "BLF_api.h" + #include "DNA_armature_types.h" #include "DNA_curve_types.h" #include "DNA_group_types.h" @@ -211,8 +213,8 @@ static int object_hide_view_set_exec(bContext *C, wmOperator *op) void OBJECT_OT_hide_view_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Restrict View"; - ot->description = "Hide the object by setting the hide flag"; + ot->name= _("Set Restrict View"); + ot->description = _("Hide the object by setting the hide flag"); ot->idname= "OBJECT_OT_hide_view_set"; /* api callbacks */ @@ -222,7 +224,7 @@ void OBJECT_OT_hide_view_set(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Hide unselected rather than selected objects.")); } @@ -286,8 +288,8 @@ static int object_hide_render_set_exec(bContext *C, wmOperator *op) void OBJECT_OT_hide_render_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Restrict Render"; - ot->description = "Hide the render object by setting the hide render flag"; + ot->name= _("Set Restrict Render"); + ot->description = _("Hide the render object by setting the hide render flag"); ot->idname= "OBJECT_OT_hide_render_set"; /* api callbacks */ @@ -297,7 +299,7 @@ void OBJECT_OT_hide_render_set(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Hide unselected rather than selected objects.")); } /* ******************* toggle editmode operator ***************** */ @@ -2009,7 +2011,7 @@ void OBJECT_OT_mode_set(wmOperatorType *ot) prop= RNA_def_enum(ot->srna, "mode", object_mode_items, OB_MODE_OBJECT, "Mode", ""); RNA_def_enum_funcs(prop, object_mode_set_itemsf); - RNA_def_boolean(ot->srna, "toggle", 0, "Toggle", ""); + RNA_def_boolean(ot->srna, "toggle", 0, _("Toggle"), ""); } @@ -2103,7 +2105,7 @@ void OBJECT_OT_game_property_remove(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "Property index to remove ", 0, INT_MAX); + RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, _("Index"), _("Property index to remove "), 0, INT_MAX); } #define COPY_PROPERTIES_REPLACE 1 diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index ff9b13379a2..5fc33c6836d 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -41,6 +41,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "RNA_access.h" @@ -218,7 +220,7 @@ void ED_operatormacros_object(void) wmOperatorType *ot; wmOperatorTypeMacro *otmacro; - ot= WM_operatortype_append_macro("OBJECT_OT_duplicate_move", "Duplicate Objects", OPTYPE_UNDO|OPTYPE_REGISTER); + ot= WM_operatortype_append_macro("OBJECT_OT_duplicate_move", _("Duplicate Objects"), OPTYPE_UNDO|OPTYPE_REGISTER); if(ot) { WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate"); otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index f7158e4b4ec..cae78dcbccd 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -54,6 +54,8 @@ #include "BLI_string.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_action.h" #include "BKE_animsys.h" #include "BKE_armature.h" @@ -1842,8 +1844,8 @@ void OBJECT_OT_make_single_user(wmOperatorType *ot) {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Make Single User"; - ot->description = "Make linked data local to each object"; + ot->name= _("Make Single User"); + ot->description = _("Make linked data local to each object"); ot->idname= "OBJECT_OT_make_single_user"; /* api callbacks */ @@ -1857,11 +1859,11 @@ void OBJECT_OT_make_single_user(wmOperatorType *ot) /* properties */ ot->prop= RNA_def_enum(ot->srna, "type", type_items, SELECT, "Type", ""); - RNA_def_boolean(ot->srna, "object", 0, "Object", "Make single user objects"); - RNA_def_boolean(ot->srna, "obdata", 0, "Object Data", "Make single user object data"); - RNA_def_boolean(ot->srna, "material", 0, "Materials", "Make materials local to each datablock"); - RNA_def_boolean(ot->srna, "texture", 0, "Textures", "Make textures local to each material"); - RNA_def_boolean(ot->srna, "animation", 0, "Object Animation", "Make animation data local to each object"); + RNA_def_boolean(ot->srna, "object", 0, _("Object"), _("Make single user objects")); + RNA_def_boolean(ot->srna, "obdata", 0, _("Object Data"), _("Make single user object data")); + RNA_def_boolean(ot->srna, "material", 0, _("Materials"), _("Make materials local to each datablock")); + RNA_def_boolean(ot->srna, "texture", 0, _("Textures"), _("Make textures local to each material")); + RNA_def_boolean(ot->srna, "animation", 0, _("Object Animation"), _("Make animation data local to each object")); } static int drop_named_material_invoke(bContext *C, wmOperator *op, wmEvent *event) diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index a3bd399a60c..3c2d46872cd 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -49,6 +49,8 @@ #include "BLI_string.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_group.h" #include "BKE_main.h" @@ -150,8 +152,8 @@ static int object_select_by_type_exec(bContext *C, wmOperator *op) void OBJECT_OT_select_by_type(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select By Type"; - ot->description = "Select all visible objects that are of a type"; + ot->name= _("Select By Type"); + ot->description = _("Select all visible objects that are of a type"); ot->idname= "OBJECT_OT_select_by_type"; /* api callbacks */ @@ -163,7 +165,7 @@ void OBJECT_OT_select_by_type(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend"), _("Extend selection instead of deselecting everything first.")); ot->prop= RNA_def_enum(ot->srna, "type", object_type_items, 1, "Type", ""); } @@ -332,8 +334,8 @@ static int object_select_linked_exec(bContext *C, wmOperator *op) void OBJECT_OT_select_linked(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Linked"; - ot->description = "Select all visible objects that are linked"; + ot->name= _("Select Linked"); + ot->description = _("Select all visible objects that are linked"); ot->idname= "OBJECT_OT_select_linked"; /* api callbacks */ @@ -345,7 +347,7 @@ void OBJECT_OT_select_linked(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend"), _("Extend selection instead of deselecting everything first.")); ot->prop= RNA_def_enum(ot->srna, "type", prop_select_linked_types, 0, "Type", ""); } @@ -620,8 +622,8 @@ static int object_select_grouped_exec(bContext *C, wmOperator *op) void OBJECT_OT_select_grouped(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Grouped"; - ot->description = "Select all visible objects grouped by various properties"; + ot->name= _("Select Grouped"); + ot->description = _("Select all visible objects grouped by various properties"); ot->idname= "OBJECT_OT_select_grouped"; /* api callbacks */ @@ -633,7 +635,7 @@ void OBJECT_OT_select_grouped(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend"), _("Extend selection instead of deselecting everything first.")); ot->prop= RNA_def_enum(ot->srna, "type", prop_select_grouped_types, 0, "Type", ""); } @@ -669,8 +671,8 @@ static int object_select_by_layer_exec(bContext *C, wmOperator *op) void OBJECT_OT_select_by_layer(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select by Layer"; - ot->description = "Select all visible objects on a layer"; + ot->name= _("Select by Layer"); + ot->description = _("Select all visible objects on a layer"); ot->idname= "OBJECT_OT_select_by_layer"; /* api callbacks */ @@ -682,8 +684,8 @@ void OBJECT_OT_select_by_layer(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); - RNA_def_int(ot->srna, "layers", 1, 1, 20, "Layer", "", 1, 20); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend"), _("Extend selection instead of deselecting everything first.")); + RNA_def_int(ot->srna, "layers", 1, 1, 20, _("Layer"), "", 1, 20); } /************************** Select Inverse *************************/ @@ -871,8 +873,8 @@ void OBJECT_OT_select_mirror(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Mirror"; - ot->description = "Select the Mirror objects of the selected object eg. L.sword -> R.sword"; + ot->name= _("Select Mirror"); + ot->description = _("Select the Mirror objects of the selected object eg. L.sword -> R.sword"); ot->idname= "OBJECT_OT_select_mirror"; /* api callbacks */ @@ -882,7 +884,7 @@ void OBJECT_OT_select_mirror(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first."); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("Extend selection instead of deselecting everything first.")); } @@ -928,8 +930,8 @@ void OBJECT_OT_select_name(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Name"; - ot->description = "Select an object with this name"; + ot->name= _("Select Name"); + ot->description = _("Select an object with this name"); ot->idname= "OBJECT_OT_select_name"; /* api callbacks */ @@ -939,8 +941,8 @@ void OBJECT_OT_select_name(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_string(ot->srna, "name", "", 0, "Name", "Object name to select."); - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first."); + RNA_def_string(ot->srna, "name", "", 0, _("Name"), _("Object name to select.")); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("Extend selection instead of deselecting everything first.")); } /**************************** Select Random ****************************/ @@ -975,8 +977,8 @@ static int object_select_random_exec(bContext *C, wmOperator *op) void OBJECT_OT_select_random(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Random"; - ot->description = "Set select on random visible objects"; + ot->name= _("Select Random"); + ot->description = _("Set select on random visible objects"); ot->idname= "OBJECT_OT_select_random"; /* api callbacks */ @@ -988,8 +990,8 @@ void OBJECT_OT_select_random(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, "Percent", "Percentage of objects to select randomly", 0.f, 100.0f); - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend Selection", "Extend selection instead of deselecting everything first."); + RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, _("Percent"), _("Percentage of objects to select randomly"), 0.f, 100.0f); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend Selection"), _("Extend selection instead of deselecting everything first.")); } diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c index fd2e7fd7c99..e62fa403518 100644 --- a/source/blender/editors/object/object_shapekey.c +++ b/source/blender/editors/object/object_shapekey.c @@ -45,6 +45,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_curve_types.h" #include "DNA_key_types.h" #include "DNA_lattice_types.h" @@ -297,9 +299,9 @@ static int shape_key_add_exec(bContext *C, wmOperator *op) void OBJECT_OT_shape_key_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Shape Key"; + ot->name= _("Add Shape Key"); ot->idname= "OBJECT_OT_shape_key_add"; - ot->description= "Add shape key to the object"; + ot->description= _("Add shape key to the object"); /* api callbacks */ ot->poll= shape_key_mode_poll; @@ -309,7 +311,7 @@ void OBJECT_OT_shape_key_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "from_mix", 1, "From Mix", "Create the new shape key from the existing mix of keys."); + RNA_def_boolean(ot->srna, "from_mix", 1, _("From Mix"), _("Create the new shape key from the existing mix of keys.")); } static int shape_key_remove_exec(bContext *C, wmOperator *UNUSED(op)) diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index f7c6ff99bde..49e4daf6d6a 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -46,6 +46,8 @@ #include "BLI_listbase.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_curve.h" #include "BKE_depsgraph.h" @@ -613,8 +615,8 @@ static int object_transform_apply_exec(bContext *C, wmOperator *op) void OBJECT_OT_transform_apply(wmOperatorType *ot) { /* identifiers */ - ot->name= "Apply Object Transform"; - ot->description = "Apply the object's transformation to its data"; + ot->name= _("Apply Object Transform"); + ot->description = _("Apply the object's transformation to its data"); ot->idname= "OBJECT_OT_transform_apply"; /* api callbacks */ @@ -624,9 +626,9 @@ void OBJECT_OT_transform_apply(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "location", 0, "Location", ""); - RNA_def_boolean(ot->srna, "rotation", 0, "Rotation", ""); - RNA_def_boolean(ot->srna, "scale", 0, "Scale", ""); + RNA_def_boolean(ot->srna, "location", 0, _("Location"), ""); + RNA_def_boolean(ot->srna, "rotation", 0, _("Rotation"), ""); + RNA_def_boolean(ot->srna, "scale", 0, _("Scale"), ""); } /********************* Set Object Center ************************/ diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 52ba9460818..eed92549652 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -53,6 +53,8 @@ #include "BLI_editVert.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_customdata.h" #include "BKE_deform.h" @@ -1580,7 +1582,7 @@ static int vertex_group_remove_exec(bContext *C, wmOperator *op) void OBJECT_OT_vertex_group_remove(wmOperatorType *ot) { /* identifiers */ - ot->name= "Remove Vertex Group"; + ot->name= _("Remove Vertex Group"); ot->idname= "OBJECT_OT_vertex_group_remove"; /* api callbacks */ @@ -1591,7 +1593,7 @@ void OBJECT_OT_vertex_group_remove(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "all", 0, "All", "Remove from all vertex groups."); + RNA_def_boolean(ot->srna, "all", 0, _("All"), _("Remove from all vertex groups.")); } static int vertex_group_assign_exec(bContext *C, wmOperator *op) @@ -1612,7 +1614,7 @@ static int vertex_group_assign_exec(bContext *C, wmOperator *op) void OBJECT_OT_vertex_group_assign(wmOperatorType *ot) { /* identifiers */ - ot->name= "Assign Vertex Group"; + ot->name= _("Assign Vertex Group"); ot->idname= "OBJECT_OT_vertex_group_assign"; /* api callbacks */ @@ -1623,7 +1625,7 @@ void OBJECT_OT_vertex_group_assign(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "new", 0, "New", "Assign vertex to new vertex group."); + RNA_def_boolean(ot->srna, "new", 0, _("New"), _("Assign vertex to new vertex group.")); } static int vertex_group_remove_from_exec(bContext *C, wmOperator *op) @@ -1651,7 +1653,7 @@ static int vertex_group_remove_from_exec(bContext *C, wmOperator *op) void OBJECT_OT_vertex_group_remove_from(wmOperatorType *ot) { /* identifiers */ - ot->name= "Remove from Vertex Group"; + ot->name= _("Remove from Vertex Group"); ot->idname= "OBJECT_OT_vertex_group_remove_from"; /* api callbacks */ @@ -1662,7 +1664,7 @@ void OBJECT_OT_vertex_group_remove_from(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "all", 0, "All", "Remove from all vertex groups."); + RNA_def_boolean(ot->srna, "all", 0, _("All"), _("Remove from all vertex groups.")); } static int vertex_group_select_exec(bContext *C, wmOperator *UNUSED(op)) @@ -1819,7 +1821,7 @@ static int vertex_group_normalize_all_exec(bContext *C, wmOperator *op) void OBJECT_OT_vertex_group_normalize_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "Normalize All Vertex Groups"; + ot->name= _("Normalize All Vertex Groups"); ot->idname= "OBJECT_OT_vertex_group_normalize_all"; /* api callbacks */ @@ -1829,7 +1831,7 @@ void OBJECT_OT_vertex_group_normalize_all(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "lock_active", TRUE, "Lock Active", "Keep the values of the active group while normalizing others."); + RNA_def_boolean(ot->srna, "lock_active", TRUE, _("Lock Active"), _("Keep the values of the active group while normalizing others.")); } static int vertex_group_invert_exec(bContext *C, wmOperator *op) @@ -1849,7 +1851,7 @@ static int vertex_group_invert_exec(bContext *C, wmOperator *op) void OBJECT_OT_vertex_group_invert(wmOperatorType *ot) { /* identifiers */ - ot->name= "Invert Vertex Group"; + ot->name= _("Invert Vertex Group"); ot->idname= "OBJECT_OT_vertex_group_invert"; /* api callbacks */ @@ -1859,8 +1861,8 @@ void OBJECT_OT_vertex_group_invert(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "auto_assign", TRUE, "Add Weights", "Add verts from groups that have zero weight before inverting."); - RNA_def_boolean(ot->srna, "auto_remove", TRUE, "Remove Weights", "Remove verts from groups that have zero weight after inverting."); + RNA_def_boolean(ot->srna, "auto_assign", TRUE, _("Add Weights"), _("Add verts from groups that have zero weight before inverting.")); + RNA_def_boolean(ot->srna, "auto_remove", TRUE, _("Remove Weights"), _("Remove verts from groups that have zero weight after inverting.")); } @@ -1914,9 +1916,9 @@ static int vertex_group_clean_exec(bContext *C, wmOperator *op) void OBJECT_OT_vertex_group_clean(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clean Vertex Group"; + ot->name= _("Clean Vertex Group"); ot->idname= "OBJECT_OT_vertex_group_clean"; - ot->description= "Remove Vertex Group assignments which aren't required"; + ot->description= _("Remove Vertex Group assignments which aren't required"); /* api callbacks */ ot->poll= vertex_group_poll; @@ -1925,9 +1927,9 @@ void OBJECT_OT_vertex_group_clean(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_float(ot->srna, "limit", 0.01f, 0.0f, 1.0, "Limit", "Remove weights under this limit.", 0.001f, 0.99f); - RNA_def_boolean(ot->srna, "all_groups", FALSE, "All Groups", "Clean all vertex groups."); - RNA_def_boolean(ot->srna, "keep_single", FALSE, "Keep Single", "Keep verts assigned to at least one group when cleaning."); + RNA_def_float(ot->srna, "limit", 0.01f, 0.0f, 1.0, _("Limit"), _("Remove weights under this limit."), 0.001f, 0.99f); + RNA_def_boolean(ot->srna, "all_groups", FALSE, _("All Groups"), _("Clean all vertex groups.")); + RNA_def_boolean(ot->srna, "keep_single", FALSE, _("Keep Single"), _("Keep verts assigned to at least one group when cleaning.")); } @@ -1947,9 +1949,9 @@ static int vertex_group_mirror_exec(bContext *C, wmOperator *op) void OBJECT_OT_vertex_group_mirror(wmOperatorType *ot) { /* identifiers */ - ot->name= "Mirror Vertex Group"; + ot->name= _("Mirror Vertex Group"); ot->idname= "OBJECT_OT_vertex_group_mirror"; - ot->description= "Mirror all vertex groups, flip weights and/or names, editing only selected vertices, flipping when both sides are selected otherwise copy from unselected"; + ot->description= _("Mirror all vertex groups, flip weights and/or names, editing only selected vertices, flipping when both sides are selected otherwise copy from unselected"); /* api callbacks */ ot->poll= vertex_group_poll_edit; @@ -1959,8 +1961,8 @@ void OBJECT_OT_vertex_group_mirror(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "mirror_weights", TRUE, "Mirror Weights", "Mirror weights."); - RNA_def_boolean(ot->srna, "flip_group_names", TRUE, "Flip Groups", "Flip vertex group names."); + RNA_def_boolean(ot->srna, "mirror_weights", TRUE, _("Mirror Weights"), _("Mirror weights.")); + RNA_def_boolean(ot->srna, "flip_group_names", TRUE, _("Flip Groups"), _("Flip vertex group names.")); } diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 6155929243b..bcc53b6e2b0 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -53,6 +53,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_DerivedMesh.h" #include "BKE_depsgraph.h" @@ -1512,7 +1514,7 @@ static int select_linked_invoke(bContext *C, wmOperator *op, wmEvent *event) void PARTICLE_OT_select_linked(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Linked"; + ot->name= _("Select Linked"); ot->idname= "PARTICLE_OT_select_linked"; /* api callbacks */ @@ -1524,7 +1526,7 @@ void PARTICLE_OT_select_linked(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Deselect linked keys rather than selecting them."); + RNA_def_boolean(ot->srna, "deselect", 0, _("Deselect"), _("Deselect linked keys rather than selecting them.")); RNA_def_int_vector(ot->srna, "location", 2, NULL, 0, INT_MAX, "Location", "", 0, 16384); } @@ -1700,7 +1702,7 @@ static int hide_exec(bContext *C, wmOperator *op) void PARTICLE_OT_hide(wmOperatorType *ot) { /* identifiers */ - ot->name= "Hide Selected"; + ot->name= _("Hide Selected"); ot->idname= "PARTICLE_OT_hide"; /* api callbacks */ @@ -1711,7 +1713,7 @@ void PARTICLE_OT_hide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Hide unselected rather than selected.")); } /*************************** reveal operator **************************/ @@ -2006,7 +2008,7 @@ void PARTICLE_OT_rekey(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_int(ot->srna, "keys", 2, 2, INT_MAX, "Number of Keys", "", 2, 100); + RNA_def_int(ot->srna, "keys", 2, 2, INT_MAX, _("Number of Keys"), "", 2, 100); } static void rekey_particle_to_time(Scene *scene, Object *ob, int pa_index, float path_time) diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index 8ec95e9b107..7f0cedb71c9 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -43,6 +43,8 @@ #include "BLI_listbase.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_depsgraph.h" #include "BKE_DerivedMesh.h" @@ -609,8 +611,8 @@ static int disconnect_hair_exec(bContext *C, wmOperator *op) void PARTICLE_OT_disconnect_hair(wmOperatorType *ot) { - ot->name= "Disconnect Hair"; - ot->description= "Disconnect hair from the emitter mesh"; + ot->name= _("Disconnect Hair"); + ot->description= _("Disconnect hair from the emitter mesh"); ot->idname= "PARTICLE_OT_disconnect_hair"; ot->exec= disconnect_hair_exec; @@ -618,7 +620,7 @@ void PARTICLE_OT_disconnect_hair(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "all", 0, "All hair", "Disconnect all hair systems from the emitter mesh"); + RNA_def_boolean(ot->srna, "all", 0, _("All hair"), _("Disconnect all hair systems from the emitter mesh")); } static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys) @@ -747,8 +749,8 @@ static int connect_hair_exec(bContext *C, wmOperator *op) void PARTICLE_OT_connect_hair(wmOperatorType *ot) { - ot->name= "Connect Hair"; - ot->description= "Connect hair to the emitter mesh"; + ot->name= _("Connect Hair"); + ot->description= _("Connect hair to the emitter mesh"); ot->idname= "PARTICLE_OT_connect_hair"; ot->exec= connect_hair_exec; @@ -756,6 +758,6 @@ void PARTICLE_OT_connect_hair(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "all", 0, "All hair", "Connect all hair systems to the emitter mesh"); + RNA_def_boolean(ot->srna, "all", 0, _("All hair"), _("Connect all hair systems to the emitter mesh")); } diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c index 797ead3cd90..b245fc05d86 100644 --- a/source/blender/editors/physics/physics_pointcache.c +++ b/source/blender/editors/physics/physics_pointcache.c @@ -39,6 +39,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_scene_types.h" #include "BKE_context.h" @@ -155,8 +157,8 @@ static int ptcache_free_bake_all_exec(bContext *C, wmOperator *UNUSED(op)) void PTCACHE_OT_bake_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "Bake All Physics"; - ot->description= "Bake all physics"; + ot->name= _("Bake All Physics"); + ot->description= _("Bake all physics"); ot->idname= "PTCACHE_OT_bake_all"; /* api callbacks */ @@ -166,7 +168,7 @@ void PTCACHE_OT_bake_all(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "bake", 1, "Bake", ""); + RNA_def_boolean(ot->srna, "bake", 1, _("Bake"), ""); } void PTCACHE_OT_free_bake_all(wmOperatorType *ot) { @@ -269,8 +271,8 @@ static int ptcache_bake_from_cache_exec(bContext *C, wmOperator *UNUSED(op)) void PTCACHE_OT_bake(wmOperatorType *ot) { /* identifiers */ - ot->name= "Bake Physics"; - ot->description= "Bake physics"; + ot->name= _("Bake Physics"); + ot->description= _("Bake physics"); ot->idname= "PTCACHE_OT_bake"; /* api callbacks */ @@ -280,7 +282,7 @@ void PTCACHE_OT_bake(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "bake", 0, "Bake", ""); + RNA_def_boolean(ot->srna, "bake", 0, _("Bake"), ""); } void PTCACHE_OT_free_bake(wmOperatorType *ot) { diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 6191ec9c035..9483a88fbcd 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -41,6 +41,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_scene_types.h" #include "BKE_blender.h" @@ -598,8 +600,8 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event) void RENDER_OT_render(wmOperatorType *ot) { /* identifiers */ - ot->name= "Render"; - ot->description= "Render active scene"; + ot->name= _("Render"); + ot->description= _("Render active scene"); ot->idname= "RENDER_OT_render"; /* api callbacks */ @@ -609,9 +611,9 @@ void RENDER_OT_render(wmOperatorType *ot) /*ot->poll= ED_operator_screenactive;*/ /* this isnt needed, causes failer in background mode */ - RNA_def_boolean(ot->srna, "animation", 0, "Animation", "Render files from the animation range of this scene"); - RNA_def_boolean(ot->srna, "write_still", 0, "Write Image", "Save rendered the image to the output path (used only when animation is disabled)"); - RNA_def_string(ot->srna, "layer", "", RE_MAXNAME, "Render Layer", "Single render layer to re-render"); - RNA_def_string(ot->srna, "scene", "", MAX_ID_NAME-2, "Scene", "Re-render single layer in this scene"); + RNA_def_boolean(ot->srna, "animation", 0, _("Animation"), _("Render files from the animation range of this scene")); + RNA_def_boolean(ot->srna, "write_still", 0, _("Write Image"), _("Save rendered the image to the output path (used only when animation is disabled)")); + RNA_def_string(ot->srna, "layer", "", RE_MAXNAME, _("Render Layer"), _("Single render layer to re-render")); + RNA_def_string(ot->srna, "scene", "", MAX_ID_NAME-2, _("Scene"), _("Re-render single layer in this scene")); } diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 98463ce955f..fac9d783110 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -43,6 +43,8 @@ #include "BLI_dlrbTree.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_scene_types.h" #include "DNA_object_types.h" @@ -571,8 +573,8 @@ static int screen_opengl_render_exec(bContext *C, wmOperator *op) void RENDER_OT_opengl(wmOperatorType *ot) { /* identifiers */ - ot->name= "OpenGL Render"; - ot->description= "OpenGL render active viewport"; + ot->name= _("OpenGL Render"); + ot->description= _("OpenGL render active viewport"); ot->idname= "RENDER_OT_opengl"; /* api callbacks */ @@ -583,9 +585,9 @@ void RENDER_OT_opengl(wmOperatorType *ot) ot->poll= ED_operator_screenactive; - RNA_def_boolean(ot->srna, "animation", 0, "Animation", "Render files from the animation range of this scene"); - RNA_def_boolean(ot->srna, "write_still", 0, "Write Image", "Save rendered the image to the output path (used only when animation is disabled)"); - RNA_def_boolean(ot->srna, "view_context", 1, "View Context", "Use the current 3D view for rendering, else use scene settings."); + RNA_def_boolean(ot->srna, "animation", 0, _("Animation"), _("Render files from the animation range of this scene")); + RNA_def_boolean(ot->srna, "write_still", 0, _("Write Image"), _("Save rendered the image to the output path (used only when animation is disabled)")); + RNA_def_boolean(ot->srna, "view_context", 1, _("View Context"), _("Use the current 3D view for rendering, else use scene settings.")); } /* function for getting an opengl buffer from a View3D, used by sequencer */ diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index af4bce5ceda..1a3e4d8a50f 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -650,7 +650,7 @@ static void SCREEN_OT_actionzone(wmOperatorType *ot) ot->flag= OPTYPE_BLOCKING; - RNA_def_int(ot->srna, "modifier", 0, 0, 2, "modifier", "modifier state", 0, 2); + RNA_def_int(ot->srna, "modifier", 0, 0, 2, _("modifier"), _("modifier state"), 0, 2); } /* ************** swap area operator *********************************** */ @@ -830,8 +830,8 @@ static int area_dupli_invoke(bContext *C, wmOperator *op, wmEvent *event) static void SCREEN_OT_area_dupli(wmOperatorType *ot) { - ot->name= "Duplicate Area into New Window"; - ot->description= "Duplicate selected area into new window"; + ot->name= _("Duplicate Area into New Window"); + ot->description= _("Duplicate selected area into new window"); ot->idname= "SCREEN_OT_area_dupli"; ot->invoke= area_dupli_invoke; @@ -1093,7 +1093,7 @@ static void SCREEN_OT_area_move(wmOperatorType *ot) /* rna */ RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX); RNA_def_int(ot->srna, "y", 0, INT_MIN, INT_MAX, "Y", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, _("Delta"), "", INT_MIN, INT_MAX); } /* ************** split area operator *********************************** */ @@ -1511,10 +1511,10 @@ static void SCREEN_OT_area_split(wmOperatorType *ot) ot->flag= OPTYPE_BLOCKING; /* rna */ - RNA_def_enum(ot->srna, "direction", prop_direction_items, 'h', "Direction", ""); - RNA_def_float(ot->srna, "factor", 0.5f, 0.0, 1.0, "Factor", "", 0.0, 1.0); - RNA_def_int(ot->srna, "mouse_x", -100, INT_MIN, INT_MAX, "Mouse X", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "mouse_y", -100, INT_MIN, INT_MAX, "Mouse Y", "", INT_MIN, INT_MAX); + RNA_def_enum(ot->srna, "direction", prop_direction_items, 'h', _("Direction"), ""); + RNA_def_float(ot->srna, "factor", 0.5f, 0.0, 1.0, _("Factor"), "", 0.0, 1.0); + RNA_def_int(ot->srna, "mouse_x", -100, INT_MIN, INT_MAX, _("Mouse X"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "mouse_y", -100, INT_MIN, INT_MAX, _("Mouse Y"), "", INT_MIN, INT_MAX); } @@ -1760,7 +1760,7 @@ static void SCREEN_OT_frame_offset(wmOperatorType *ot) ot->flag= 0; /* rna */ - RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, _("Delta"), "", INT_MIN, INT_MAX); } @@ -1800,8 +1800,8 @@ static int frame_jump_exec(bContext *C, wmOperator *op) static void SCREEN_OT_frame_jump(wmOperatorType *ot) { - ot->name = "Jump to Endpoint"; - ot->description= "Jump to first/last frame in frame range"; + ot->name = _("Jump to Endpoint"); + ot->description= _("Jump to first/last frame in frame range"); ot->idname = "SCREEN_OT_frame_jump"; ot->exec= frame_jump_exec; @@ -1810,7 +1810,7 @@ static void SCREEN_OT_frame_jump(wmOperatorType *ot) ot->flag= OPTYPE_UNDO; /* rna */ - RNA_def_boolean(ot->srna, "end", 0, "Last Frame", "Jump to the last frame of the frame range."); + RNA_def_boolean(ot->srna, "end", 0, _("Last Frame"), _("Jump to the last frame of the frame range.")); } @@ -1882,8 +1882,8 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op) static void SCREEN_OT_keyframe_jump(wmOperatorType *ot) { - ot->name = "Jump to Keyframe"; - ot->description= "Jump to previous/next keyframe"; + ot->name = _("Jump to Keyframe"); + ot->description= _("Jump to previous/next keyframe"); ot->idname = "SCREEN_OT_keyframe_jump"; ot->exec= keyframe_jump_exec; @@ -1892,7 +1892,7 @@ static void SCREEN_OT_keyframe_jump(wmOperatorType *ot) ot->flag= OPTYPE_UNDO; /* rna */ - RNA_def_boolean(ot->srna, "next", 1, "Next Keyframe", ""); + RNA_def_boolean(ot->srna, "next", 1, _("Next Keyframe"), ""); } /* ************** switch screen operator ***************************** */ @@ -1954,7 +1954,7 @@ static void SCREEN_OT_screen_set(wmOperatorType *ot) ot->poll= ED_operator_screenactive; /* rna */ - RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, _("Delta"), "", INT_MIN, INT_MAX); } /* ************** screen full-area operator ***************************** */ @@ -1980,8 +1980,8 @@ static int screen_full_area_exec(bContext *C, wmOperator *UNUSED(op)) static void SCREEN_OT_screen_full_area(wmOperatorType *ot) { - ot->name = "Toggle Full Screen"; - ot->description= "Toggle display selected area as fullscreen"; + ot->name = _("Toggle Full Screen"); + ot->description= _("Toggle display selected area as fullscreen"); ot->idname = "SCREEN_OT_screen_full_area"; ot->exec= screen_full_area_exec; @@ -2393,8 +2393,8 @@ static int repeat_last_exec(bContext *C, wmOperator *UNUSED(op)) static void SCREEN_OT_repeat_last(wmOperatorType *ot) { /* identifiers */ - ot->name= "Repeat Last"; - ot->description= "Repeat last action"; + ot->name= _("Repeat Last"); + ot->description= _("Repeat last action"); ot->idname= "SCREEN_OT_repeat_last"; /* api callbacks */ @@ -2456,7 +2456,7 @@ static void SCREEN_OT_repeat_history(wmOperatorType *ot) ot->poll= ED_operator_screenactive; - RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "", 0, 1000); + RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, _("Index"), "", 0, 1000); } /* ********************** redo operator ***************************** */ @@ -2577,8 +2577,8 @@ static int region_quadview_exec(bContext *C, wmOperator *op) static void SCREEN_OT_region_quadview(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Quad View"; - ot->description= "Split selected area into camera, front, right & top views"; + ot->name= _("Toggle Quad View"); + ot->description= _("Split selected area into camera, front, right & top views"); ot->idname= "SCREEN_OT_region_quadview"; /* api callbacks */ @@ -2971,8 +2971,8 @@ static int screen_animation_play_exec(bContext *C, wmOperator *op) static void SCREEN_OT_animation_play(wmOperatorType *ot) { /* identifiers */ - ot->name= "Play Animation"; - ot->description= "Play animation"; + ot->name= _("Play Animation"); + ot->description= _("Play animation"); ot->idname= "SCREEN_OT_animation_play"; /* api callbacks */ @@ -2980,8 +2980,8 @@ static void SCREEN_OT_animation_play(wmOperatorType *ot) ot->poll= ED_operator_screenactive_norender; - RNA_def_boolean(ot->srna, "reverse", 0, "Play in Reverse", "Animation is played backwards"); - RNA_def_boolean(ot->srna, "sync", 0, "Sync", "Drop frames to maintain framerate"); + RNA_def_boolean(ot->srna, "reverse", 0, _("Play in Reverse"), _("Animation is played backwards")); + RNA_def_boolean(ot->srna, "sync", 0, _("Sync"), _("Drop frames to maintain framerate")); } static int screen_animation_cancel_exec(bContext *C, wmOperator *op) @@ -3011,8 +3011,8 @@ static int screen_animation_cancel_exec(bContext *C, wmOperator *op) static void SCREEN_OT_animation_cancel(wmOperatorType *ot) { /* identifiers */ - ot->name= "Cancel Animation"; - ot->description= "Cancel animation, returning to the original frame"; + ot->name= _("Cancel Animation"); + ot->description= _("Cancel animation, returning to the original frame"); ot->idname= "SCREEN_OT_animation_cancel"; /* api callbacks */ @@ -3020,7 +3020,7 @@ static void SCREEN_OT_animation_cancel(wmOperatorType *ot) ot->poll= ED_operator_screenactive; - RNA_def_boolean(ot->srna, "restore_frame", TRUE, "Restore Frame", "Restore the frame when animation was initialized."); + RNA_def_boolean(ot->srna, "restore_frame", TRUE, _("Restore Frame"), _("Restore the frame when animation was initialized.")); } /* ************** border select operator (template) ***************************** */ diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c index 3010adafe20..916d50f7ee4 100644 --- a/source/blender/editors/screen/screendump.c +++ b/source/blender/editors/screen/screendump.c @@ -38,6 +38,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" @@ -203,7 +205,7 @@ void SCREEN_OT_screenshot(wmOperatorType *ot) { PropertyRNA *prop; - ot->name= "Save Screenshot"; /* weak: opname starting with 'save' makes filewindow give save-over */ + ot->name= _("Save Screenshot"); /* weak: opname starting with 'save' makes filewindow give save-over */ ot->idname= "SCREEN_OT_screenshot"; ot->invoke= screenshot_invoke; @@ -214,7 +216,7 @@ void SCREEN_OT_screenshot(wmOperatorType *ot) ot->flag= 0; WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH); - prop= RNA_def_boolean(ot->srna, "full", 1, "Full Screen", ""); + prop= RNA_def_boolean(ot->srna, "full", 1, _("Full Screen"), ""); RNA_def_property_flag(prop, PROP_HIDDEN); /* hide because once the file sel is displayed, the option no longer does anything */ } @@ -375,7 +377,7 @@ static int screencast_exec(bContext *C, wmOperator *op) void SCREEN_OT_screencast(wmOperatorType *ot) { - ot->name= "Make Screencast"; + ot->name= _("Make Screencast"); ot->idname= "SCREEN_OT_screencast"; ot->invoke= WM_operator_confirm; @@ -385,7 +387,7 @@ void SCREEN_OT_screencast(wmOperatorType *ot) ot->flag= 0; RNA_def_property(ot->srna, "filepath", PROP_STRING, PROP_FILEPATH); - RNA_def_boolean(ot->srna, "full", 1, "Full Screen", ""); + RNA_def_boolean(ot->srna, "full", 1, _("Full Screen"), ""); } diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index be985342ea8..f0e02dde2e8 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -47,6 +47,8 @@ #include "BLI_editVert.h" #include "BLI_rand.h" +#include "BLF_api.h" + #include "DNA_meshdata_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" @@ -3587,7 +3589,7 @@ static void SCULPT_OT_brush_stroke(wmOperatorType *ot) }; /* identifiers */ - ot->name= "Sculpt Mode"; + ot->name= _("Sculpt Mode"); ot->idname= "SCULPT_OT_brush_stroke"; /* api callbacks */ @@ -3610,8 +3612,8 @@ static void SCULPT_OT_brush_stroke(wmOperatorType *ot) "Action taken when a sculpt stroke is made"); RNA_def_boolean(ot->srna, "ignore_background_click", 0, - "Ignore Background Click", - "Clicks on the background do not start the stroke"); + _("Ignore Background Click"), + _("Clicks on the background do not start the stroke")); } /**** Reset the copy of the mesh that is being sculpted on (currently just for the layer brush) ****/ diff --git a/source/blender/editors/sound/CMakeLists.txt b/source/blender/editors/sound/CMakeLists.txt index 6a99971a5af..8f7ec8fcb6e 100644 --- a/source/blender/editors/sound/CMakeLists.txt +++ b/source/blender/editors/sound/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenloader ../../blenlib diff --git a/source/blender/editors/sound/SConscript b/source/blender/editors/sound/SConscript index e17bccdadd9..e69b27763fd 100644 --- a/source/blender/editors/sound/SConscript +++ b/source/blender/editors/sound/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' incs += ' ../../makesrna ../../blenloader' incs += ' #/intern/audaspace/intern' diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index 3716baad474..0e2f1ed69dd 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -41,6 +41,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_packedFile_types.h" #include "DNA_scene_types.h" #include "DNA_space_types.h" @@ -147,8 +149,8 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *event) void SOUND_OT_open(wmOperatorType *ot) { /* identifiers */ - ot->name= "Open Sound"; - ot->description= "Load a sound file"; + ot->name= _("Open Sound"); + ot->description= _("Load a sound file"); ot->idname= "SOUND_OT_open"; /* api callbacks */ @@ -160,7 +162,7 @@ void SOUND_OT_open(wmOperatorType *ot) /* properties */ WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH); - RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory."); + RNA_def_boolean(ot->srna, "cache", FALSE, _("Cache"), _("Cache the sound in memory.")); } /* ******************************************************* */ diff --git a/source/blender/editors/space_action/CMakeLists.txt b/source/blender/editors/space_action/CMakeLists.txt index 6789556aa2b..91da0a4695d 100644 --- a/source/blender/editors/space_action/CMakeLists.txt +++ b/source/blender/editors/space_action/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenloader ../../blenlib diff --git a/source/blender/editors/space_action/SConscript b/source/blender/editors/space_action/SConscript index 0fee8ff68ab..e4cec8e70ef 100644 --- a/source/blender/editors/space_action/SConscript +++ b/source/blender/editors/space_action/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include ../../blenloader' env.BlenderLib ( 'bf_editors_space_action', sources, Split(incs), [], libtype=['core'], priority=[40] ) diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index 4d0043913ab..b10dffb0064 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -41,6 +41,8 @@ #include "BLI_dlrbTree.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_anim_types.h" #include "DNA_gpencil_types.h" #include "DNA_object_types.h" @@ -175,7 +177,7 @@ void ACTION_OT_select_all_toggle (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - ot->prop= RNA_def_boolean(ot->srna, "invert", 0, "Invert", ""); + ot->prop= RNA_def_boolean(ot->srna, "invert", 0, _("Invert"), ""); } /* ******************** Border Select Operator **************************** */ @@ -342,7 +344,7 @@ void ACTION_OT_select_border(wmOperatorType *ot) /* rna */ WM_operator_properties_gesture_border(ot, FALSE); - ot->prop= RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", ""); + ot->prop= RNA_def_boolean(ot->srna, "axis_range", 0, _("Axis Range"), ""); } /* ******************** Column Select Operator **************************** */ @@ -879,7 +881,7 @@ void ACTION_OT_select_leftright (wmOperatorType *ot) /* id-props */ ot->prop= RNA_def_enum(ot->srna, "mode", prop_actkeys_leftright_select_types, ACTKEYS_LRSEL_TEST, "Mode", ""); - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); } /* ******************** Mouse-Click Select Operator *********************** */ @@ -1196,8 +1198,8 @@ void ACTION_OT_clickselect (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY - RNA_def_boolean(ot->srna, "column", 0, "Column Select", ""); // ALTKEY + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); // SHIFTKEY + RNA_def_boolean(ot->srna, "column", 0, _("Column Select"), ""); // ALTKEY } /* ************************************************************************** */ diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index 97c2d9e3eb4..56706a7ca69 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -40,6 +40,8 @@ #include "BLI_dynstr.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_text.h" /* only for character utility funcs */ @@ -538,8 +540,8 @@ void CONSOLE_OT_clear(wmOperatorType *ot) ot->poll= ED_operator_console_active; /* properties */ - RNA_def_boolean(ot->srna, "scrollback", 1, "Scrollback", "Clear the scrollback history"); - RNA_def_boolean(ot->srna, "history", 0, "History", "Clear the command history"); + RNA_def_boolean(ot->srna, "scrollback", 1, _("Scrollback"), _("Clear the scrollback history")); + RNA_def_boolean(ot->srna, "history", 0, _("History"), _("Clear the command history")); } @@ -604,7 +606,7 @@ void CONSOLE_OT_history_cycle(wmOperatorType *ot) ot->poll= ED_operator_console_active; /* properties */ - RNA_def_boolean(ot->srna, "reverse", 0, "Reverse", "reverse cycle history"); + RNA_def_boolean(ot->srna, "reverse", 0, _("Reverse"), _("reverse cycle history")); } @@ -653,8 +655,8 @@ void CONSOLE_OT_history_append(wmOperatorType *ot) /* properties */ RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position."); - RNA_def_int(ot->srna, "current_character", 0, 0, INT_MAX, "Cursor", "The index of the cursor.", 0, 10000); - RNA_def_boolean(ot->srna, "remove_duplicates", 0, "Remove Duplicates", "Remove duplicate items in the history"); + RNA_def_int(ot->srna, "current_character", 0, 0, INT_MAX, _("Cursor"), _("The index of the cursor."), 0, 10000); + RNA_def_boolean(ot->srna, "remove_duplicates", 0, _("Remove Duplicates"), _("Remove duplicate items in the history")); } diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 265e80b42ad..32dd50bf6ae 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -354,8 +354,8 @@ void FILE_OT_select(wmOperatorType *ot) ot->poll= ED_operator_file_active; /* rna */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first."); - RNA_def_boolean(ot->srna, "fill", 0, "Fill", "Select everything beginning with the last selection."); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("Extend selection instead of deselecting everything first.")); + RNA_def_boolean(ot->srna, "fill", 0, _("Fill"), _("Select everything beginning with the last selection.")); } static int file_select_all_exec(bContext *C, wmOperator *UNUSED(op)) @@ -501,7 +501,7 @@ void FILE_OT_delete_bookmark(wmOperatorType *ot) ot->exec= bookmark_delete_exec; ot->poll= ED_operator_file_active; - RNA_def_int(ot->srna, "index", -1, -1, 20000, "Index", "", -1, 20000); + RNA_def_int(ot->srna, "index", -1, -1, 20000, _("Index"), "", -1, 20000); } int file_hilight_set(SpaceFile *sfile, ARegion *ar, int mx, int my) @@ -757,7 +757,7 @@ void FILE_OT_execute(struct wmOperatorType *ot) ot->exec= file_exec; ot->poll= file_operator_poll; - RNA_def_boolean(ot->srna, "need_active", 0, "Need Active", "Only execute if there's an active selected file in the file list."); + RNA_def_boolean(ot->srna, "need_active", 0, _("Need Active"), _("Only execute if there's an active selected file in the file list.")); } @@ -1278,7 +1278,7 @@ void FILE_OT_filenum(struct wmOperatorType *ot) ot->poll= ED_operator_file_active; /* <- important, handler is on window level */ /* props */ - RNA_def_int(ot->srna, "increment", 1, 0, 100, "Increment", "", 0,100); + RNA_def_int(ot->srna, "increment", 1, 0, 100, _("Increment"), "", 0,100); } static int file_rename_exec(bContext *C, wmOperator *UNUSED(op)) diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 962cadba1f3..4acb80cb8cc 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -45,6 +45,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_anim_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" @@ -1177,15 +1179,15 @@ void GRAPH_OT_sound_bake (wmOperatorType *ot) /* properties */ WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH); - RNA_def_float(ot->srna, "low", 0.0f, 0.0, 100000.0, "Lowest frequency", "", 0.1, 1000.00); - RNA_def_float(ot->srna, "high", 100000.0, 0.0, 100000.0, "Highest frequency", "", 0.1, 1000.00); - RNA_def_float(ot->srna, "attack", 0.005, 0.0, 2.0, "Attack time", "", 0.01, 0.1); - RNA_def_float(ot->srna, "release", 0.2, 0.0, 5.0, "Release time", "", 0.01, 0.2); - RNA_def_float(ot->srna, "threshold", 0.0, 0.0, 1.0, "Threshold", "", 0.01, 0.1); - RNA_def_boolean(ot->srna, "accumulate", 0, "Accumulate", ""); - RNA_def_boolean(ot->srna, "use_additive", 0, "Additive", ""); - RNA_def_boolean(ot->srna, "square", 0, "Square", ""); - RNA_def_float(ot->srna, "sthreshold", 0.1, 0.0, 1.0, "Square Threshold", "", 0.01, 0.1); + RNA_def_float(ot->srna, "low", 0.0f, 0.0, 100000.0, _("Lowest frequency"), "", 0.1, 1000.00); + RNA_def_float(ot->srna, "high", 100000.0, 0.0, 100000.0, _("Highest frequency"), "", 0.1, 1000.00); + RNA_def_float(ot->srna, "attack", 0.005, 0.0, 2.0, _("Attack time"), "", 0.01, 0.1); + RNA_def_float(ot->srna, "release", 0.2, 0.0, 5.0, _("Release time"), "", 0.01, 0.2); + RNA_def_float(ot->srna, "threshold", 0.0, 0.0, 1.0, _("Threshold"), "", 0.01, 0.1); + RNA_def_boolean(ot->srna, "accumulate", 0, _("Accumulate"), ""); + RNA_def_boolean(ot->srna, "use_additive", 0, _("Additive"), ""); + RNA_def_boolean(ot->srna, "square", 0, _("Square"), ""); + RNA_def_float(ot->srna, "sthreshold", 0.1, 0.0, 1.0, _("Square Threshold"), "", 0.01, 0.1); } /* ******************** Sample Keyframes Operator *********************** */ @@ -2136,7 +2138,7 @@ void GRAPH_OT_fmodifier_add (wmOperatorType *ot) /* id-props */ ot->prop= RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, "Type", ""); - RNA_def_boolean(ot->srna, "only_active", 1, "Only Active", "Only add F-Modifier to active F-Curve."); + RNA_def_boolean(ot->srna, "only_active", 1, _("Only Active"), _("Only add F-Modifier to active F-Curve.")); } /* ******************** Copy F-Modifiers Operator *********************** */ diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index 03cc8bb9e80..a79f1761499 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -40,6 +40,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_sound.h" @@ -177,8 +179,8 @@ static void GRAPH_OT_cursor_set(wmOperatorType *ot) ot->flag= OPTYPE_BLOCKING|OPTYPE_UNDO; /* rna */ - RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, "Frame", "", MINAFRAME, MAXFRAME); - RNA_def_float(ot->srna, "value", 0, FLT_MIN, FLT_MAX, "Value", "", -100.0f, 100.0f); + RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, _("Frame"), "", MINAFRAME, MAXFRAME); + RNA_def_float(ot->srna, "value", 0, FLT_MIN, FLT_MAX, _("Value"), "", -100.0f, 100.0f); } /* Toggle Handles ----------------------------------------------------------------- */ diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index cb799b85d3a..7557aeb24fa 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -40,6 +40,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_anim_types.h" #include "DNA_object_types.h" #include "DNA_screen_types.h" @@ -179,7 +181,7 @@ void GRAPH_OT_select_all_toggle (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/; /* props */ - ot->prop= RNA_def_boolean(ot->srna, "invert", 0, "Invert", ""); + ot->prop= RNA_def_boolean(ot->srna, "invert", 0, _("Invert"), ""); } /* ******************** Border Select Operator **************************** */ @@ -354,8 +356,8 @@ void GRAPH_OT_select_border(wmOperatorType *ot) /* rna */ WM_operator_properties_gesture_border(ot, FALSE); - ot->prop= RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", ""); - RNA_def_boolean(ot->srna, "include_handles", 0, "Include Handles", "Are handles tested individually against the selection criteria"); + ot->prop= RNA_def_boolean(ot->srna, "axis_range", 0, _("Axis Range"), ""); + RNA_def_boolean(ot->srna, "include_handles", 0, _("Include Handles"), _("Are handles tested individually against the selection criteria")); } /* ******************** Column Select Operator **************************** */ @@ -849,7 +851,7 @@ void GRAPH_OT_select_leftright (wmOperatorType *ot) /* id-props */ ot->prop= RNA_def_enum(ot->srna, "mode", prop_graphkeys_leftright_select_types, GRAPHKEYS_LRSEL_TEST, "Mode", ""); - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); } /* ******************** Mouse-Click Select Operator *********************** */ @@ -1337,9 +1339,9 @@ void GRAPH_OT_clickselect (wmOperatorType *ot) ot->poll= graphop_visible_keyframes_poll; /* id-props */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY - RNA_def_boolean(ot->srna, "column", 0, "Column Select", "Select all keyframes that occur on the same frame as the one under the mouse"); // ALTKEY - RNA_def_boolean(ot->srna, "curves", 0, "Only Curves", "Select all the keyframes in the curve"); // CTRLKEY + ALTKEY + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); // SHIFTKEY + RNA_def_boolean(ot->srna, "column", 0, _("Column Select"), _("Select all keyframes that occur on the same frame as the one under the mouse")); // ALTKEY + RNA_def_boolean(ot->srna, "curves", 0, _("Only Curves"), _("Select all the keyframes in the curve")); // CTRLKEY + ALTKEY } /* ************************************************************************** */ diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 10b8cb238aa..b8a964033e8 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -41,6 +41,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_object_types.h" #include "DNA_node_types.h" #include "DNA_packedFile_types.h" @@ -1096,7 +1098,7 @@ void IMAGE_OT_save_as(wmOperatorType *ot) RNA_def_enum(ot->srna, "file_type", image_file_type_items, R_PNG, "File Type", "File type to save image as."); WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH); - RNA_def_boolean(ot->srna, "copy", 0, "Copy", "Create a new image file without modifying the current image in blender"); + RNA_def_boolean(ot->srna, "copy", 0, _("Copy"), _("Create a new image file without modifying the current image in blender")); } /******************** save image operator ********************/ @@ -1357,14 +1359,14 @@ void IMAGE_OT_new(wmOperatorType *ot) ot->flag= OPTYPE_UNDO; /* properties */ - RNA_def_string(ot->srna, "name", "untitled", MAX_ID_NAME-2, "Name", "Image datablock name."); - RNA_def_int(ot->srna, "width", 1024, 1, INT_MAX, "Width", "Image width.", 1, 16384); - RNA_def_int(ot->srna, "height", 1024, 1, INT_MAX, "Height", "Image height.", 1, 16384); - prop= RNA_def_float_color(ot->srna, "color", 4, NULL, 0.0f, FLT_MAX, "Color", "Default fill color.", 0.0f, 1.0f); + RNA_def_string(ot->srna, "name", "untitled", MAX_ID_NAME-2, _("Name"), _("Image datablock name.")); + RNA_def_int(ot->srna, "width", 1024, 1, INT_MAX, _("Width"), _("Image width."), 1, 16384); + RNA_def_int(ot->srna, "height", 1024, 1, INT_MAX, _("Height"), _("Image height."), 1, 16384); + prop= RNA_def_float_color(ot->srna, "color", 4, NULL, 0.0f, FLT_MAX, _("Color"), _("Default fill color."), 0.0f, 1.0f); RNA_def_property_float_array_default(prop, default_color); - RNA_def_boolean(ot->srna, "alpha", 1, "Alpha", "Create an image with an alpha channel."); - RNA_def_boolean(ot->srna, "uv_test_grid", 0, "UV Test Grid", "Fill the image with a grid for UV map testing."); - RNA_def_boolean(ot->srna, "float", 0, "32 bit Float", "Create image with 32 bit floating point bit depth."); + RNA_def_boolean(ot->srna, "alpha", 1, _("Alpha"), _("Create an image with an alpha channel.")); + RNA_def_boolean(ot->srna, "uv_test_grid", 0, _("UV Test Grid"), _("Fill the image with a grid for UV map testing.")); + RNA_def_boolean(ot->srna, "float", 0, _("32 bit Float"), _("Create image with 32 bit floating point bit depth.")); } /********************* invert operators *********************/ @@ -1443,10 +1445,10 @@ void IMAGE_OT_invert(wmOperatorType *ot) ot->poll= image_invert_poll; /* properties */ - RNA_def_boolean(ot->srna, "invert_r", 0, "Red", "Invert Red Channel"); - RNA_def_boolean(ot->srna, "invert_g", 0, "Green", "Invert Green Channel"); - RNA_def_boolean(ot->srna, "invert_b", 0, "Blue", "Invert Blue Channel"); - RNA_def_boolean(ot->srna, "invert_a", 0, "Alpha", "Invert Alpha Channel"); + RNA_def_boolean(ot->srna, "invert_r", 0, _("Red"), _("Invert Red Channel")); + RNA_def_boolean(ot->srna, "invert_g", 0, _("Green"), _("Invert Green Channel")); + RNA_def_boolean(ot->srna, "invert_b", 0, _("Blue"), _("Invert Blue Channel")); + RNA_def_boolean(ot->srna, "invert_a", 0, _("Alpha"), _("Invert Alpha Channel")); /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1534,7 +1536,7 @@ void IMAGE_OT_pack(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "as_png", 0, "Pack As PNG", "Pack image as lossless PNG."); + RNA_def_boolean(ot->srna, "as_png", 0, _("Pack As PNG"), _("Pack image as lossless PNG.")); } /********************* unpack operator *********************/ @@ -2162,7 +2164,7 @@ void IMAGE_OT_cycle_render_slot(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "reverse", 0, "Cycle in Reverse", ""); + RNA_def_boolean(ot->srna, "reverse", 0, _("Cycle in Reverse"), ""); } /******************** TODO ********************/ diff --git a/source/blender/editors/space_info/info_report.c b/source/blender/editors/space_info/info_report.c index c8bda434227..ed8b66ad23a 100644 --- a/source/blender/editors/space_info/info_report.c +++ b/source/blender/editors/space_info/info_report.c @@ -37,6 +37,8 @@ #include "BLI_dynstr.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "WM_api.h" @@ -160,7 +162,7 @@ void INFO_OT_select_pick(wmOperatorType *ot) /* ot->flag= OPTYPE_REGISTER; */ /* properties */ - RNA_def_int(ot->srna, "report_index", 0, 0, INT_MAX, "Report", "The index of the report.", 0, INT_MAX); + RNA_def_int(ot->srna, "report_index", 0, 0, INT_MAX, _("Report"), _("The index of the report."), 0, INT_MAX); } diff --git a/source/blender/editors/space_logic/logic_buttons.c b/source/blender/editors/space_logic/logic_buttons.c index 16e916928a9..271acea72cb 100644 --- a/source/blender/editors/space_logic/logic_buttons.c +++ b/source/blender/editors/space_logic/logic_buttons.c @@ -35,6 +35,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_screen.h" @@ -216,6 +218,6 @@ void LOGIC_OT_links_cut(wmOperatorType *ot) prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath); /* internal */ - RNA_def_int(ot->srna, "cursor", BC_KNIFECURSOR, 0, INT_MAX, "Cursor", "", 0, INT_MAX); + RNA_def_int(ot->srna, "cursor", BC_KNIFECURSOR, 0, INT_MAX, _("Cursor"), "", 0, INT_MAX); } diff --git a/source/blender/editors/space_nla/CMakeLists.txt b/source/blender/editors/space_nla/CMakeLists.txt index 1bf04f4dc37..ebeb959bf17 100644 --- a/source/blender/editors/space_nla/CMakeLists.txt +++ b/source/blender/editors/space_nla/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenloader ../../blenlib diff --git a/source/blender/editors/space_nla/SConscript b/source/blender/editors/space_nla/SConscript index 51ce829ed8d..6738f3380b4 100644 --- a/source/blender/editors/space_nla/SConscript +++ b/source/blender/editors/space_nla/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include ../../blenloader' env.BlenderLib ( 'bf_editors_space_nla', sources, Split(incs), [], libtype=['core'], priority=[85] ) diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index 38f680fff07..8ce64c6d553 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -45,6 +45,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_animsys.h" #include "BKE_nla.h" #include "BKE_context.h" @@ -354,7 +356,7 @@ void NLA_OT_channels_click (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); // SHIFTKEY } /* *********************************************** */ @@ -428,7 +430,7 @@ void NLA_OT_tracks_add (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "above_selected", 0, "Above Selected", "Add a new NLA Track above every existing selected one."); + RNA_def_boolean(ot->srna, "above_selected", 0, _("Above Selected"), _("Add a new NLA Track above every existing selected one.")); } /* ******************** Delete Tracks Operator ***************************** */ diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 77c91b28a63..934cf8be247 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -45,6 +45,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_action.h" #include "BKE_fcurve.h" #include "BKE_nla.h" @@ -1410,7 +1412,7 @@ void NLA_OT_action_sync_length (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_boolean(ot->srna, "active", 1, "Active Strip Only", "Only sync the active length for the active strip."); + ot->prop= RNA_def_boolean(ot->srna, "active", 1, _("Active Strip Only"), _("Only sync the active length for the active strip.")); } /* ******************** Apply Scale Operator ***************************** */ @@ -1831,7 +1833,7 @@ void NLA_OT_fmodifier_add (wmOperatorType *ot) /* id-props */ ot->prop= RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, "Type", ""); - RNA_def_boolean(ot->srna, "only_active", 0, "Only Active", "Only add F-Modifier of the specified type to the active strip."); + RNA_def_boolean(ot->srna, "only_active", 0, _("Only Active"), _("Only add F-Modifier of the specified type to the active strip.")); } /* ******************** Copy F-Modifiers Operator *********************** */ diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index 8ef63b9a83d..0bd96e510c1 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -43,6 +43,8 @@ #include "BLI_math.h" #include "BLI_rand.h" +#include "BLF_api.h" + #include "BKE_nla.h" #include "BKE_context.h" #include "BKE_screen.h" @@ -199,7 +201,7 @@ void NLA_OT_select_all_toggle (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/; /* props */ - RNA_def_boolean(ot->srna, "invert", 0, "Invert", ""); + RNA_def_boolean(ot->srna, "invert", 0, _("Invert"), ""); } /* ******************** Border Select Operator **************************** */ @@ -343,7 +345,7 @@ void NLA_OT_select_border(wmOperatorType *ot) /* rna */ WM_operator_properties_gesture_border(ot, 0); - RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", ""); + RNA_def_boolean(ot->srna, "axis_range", 0, _("Axis Range"), ""); } /* ******************** Select Left/Right Operator ************************* */ @@ -491,7 +493,7 @@ void NLA_OT_select_leftright (wmOperatorType *ot) /* id-props */ ot->prop= RNA_def_enum(ot->srna, "mode", prop_nlaedit_leftright_select_types, NLAEDIT_LRSEL_TEST, "Mode", ""); - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); } @@ -650,7 +652,7 @@ void NLA_OT_click_select (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); // SHIFTKEY } /* *********************************************** */ diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 99f2ea99efc..a049b6ed9b2 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -50,6 +50,8 @@ #include "BLI_storage_types.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_depsgraph.h" #include "BKE_global.h" @@ -755,8 +757,8 @@ void NODE_OT_group_socket_remove(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "", 0, INT_MAX); - RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, "Socket Type", "Input or Output"); + RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, _("Index"), "", 0, INT_MAX); + RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, _("Socket Type"), _("Input or Output")); } /* ***************** Move Group Socket Up operator ************* */ @@ -821,8 +823,8 @@ void NODE_OT_group_socket_move_up(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "", 0, INT_MAX); - RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, "Socket Type", "Input or Output"); + RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, _("Index"), "", 0, INT_MAX); + RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, _("Socket Type"), _("Input or Output")); } /* ***************** Move Group Socket Up operator ************* */ @@ -887,8 +889,8 @@ void NODE_OT_group_socket_move_down(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "", 0, INT_MAX); - RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, "Socket Type", "Input or Output"); + RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, _("Index"), "", 0, INT_MAX); + RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, _("Socket Type"), _("Input or Output")); } /* ******************** Ungroup operator ********************** */ @@ -2358,7 +2360,7 @@ void NODE_OT_link_make(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "replace", 0, "Replace", "Replace socket connections with the new links"); + RNA_def_boolean(ot->srna, "replace", 0, _("Replace"), _("Replace socket connections with the new links")); } /* ********************** Cut Link operator ***************** */ @@ -2442,7 +2444,7 @@ void NODE_OT_links_cut(wmOperatorType *ot) prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath); /* internal */ - RNA_def_int(ot->srna, "cursor", BC_KNIFECURSOR, 0, INT_MAX, "Cursor", "", 0, INT_MAX); + RNA_def_int(ot->srna, "cursor", BC_KNIFECURSOR, 0, INT_MAX, _("Cursor"), "", 0, INT_MAX); } /* ******************************** */ diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c index 1abcaccc939..d8dfa6c41b9 100644 --- a/source/blender/editors/space_node/node_select.c +++ b/source/blender/editors/space_node/node_select.c @@ -41,6 +41,8 @@ #include "BLI_rect.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "ED_screen.h" #include "ED_types.h" @@ -146,9 +148,9 @@ void NODE_OT_select(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_int(ot->srna, "mouse_x", 0, INT_MIN, INT_MAX, "Mouse X", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "mouse_y", 0, INT_MIN, INT_MAX, "Mouse Y", "", INT_MIN, INT_MAX); - RNA_def_boolean(ot->srna, "extend", 0, "Extend", ""); + RNA_def_int(ot->srna, "mouse_x", 0, INT_MIN, INT_MAX, _("Mouse X"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "mouse_y", 0, INT_MIN, INT_MAX, _("Mouse Y"), "", INT_MIN, INT_MAX); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), ""); } /* ****** Border Select ****** */ @@ -224,7 +226,7 @@ void NODE_OT_select_border(wmOperatorType *ot) /* rna */ WM_operator_properties_gesture_border(ot, FALSE); - RNA_def_boolean(ot->srna, "tweak", 0, "Tweak", "Only activate when mouse is not over a node - useful for tweak gesture"); + RNA_def_boolean(ot->srna, "tweak", 0, _("Tweak"), _("Only activate when mouse is not over a node - useful for tweak gesture")); } /* ****** Select/Deselect All ****** */ diff --git a/source/blender/editors/space_node/node_state.c b/source/blender/editors/space_node/node_state.c index 601ffbd313d..1daa425e244 100644 --- a/source/blender/editors/space_node/node_state.c +++ b/source/blender/editors/space_node/node_state.c @@ -39,6 +39,8 @@ #include "BLI_rect.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_node.h" @@ -221,8 +223,8 @@ void NODE_OT_visibility_toggle(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "mouse_x", 0, INT_MIN, INT_MAX, "Mouse X", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "mouse_y", 0, INT_MIN, INT_MAX, "Mouse Y", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "mouse_x", 0, INT_MIN, INT_MAX, _("Mouse X"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "mouse_y", 0, INT_MIN, INT_MAX, _("Mouse Y"), "", INT_MIN, INT_MAX); } /* **************** View All Operator ************** */ diff --git a/source/blender/editors/space_outliner/CMakeLists.txt b/source/blender/editors/space_outliner/CMakeLists.txt index c05350c256f..bda431c0290 100644 --- a/source/blender/editors/space_outliner/CMakeLists.txt +++ b/source/blender/editors/space_outliner/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenloader ../../blenlib diff --git a/source/blender/editors/space_outliner/SConscript b/source/blender/editors/space_outliner/SConscript index ab0b8582d33..5e57d9bab85 100644 --- a/source/blender/editors/space_outliner/SConscript +++ b/source/blender/editors/space_outliner/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 ../../makesrna ../../blenloader' incs += ' #/extern/glew/include' diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index bd2d591a8c8..a5c86c9ee58 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -59,6 +59,8 @@ #include "BLI_utildefines.h" #include "BLI_math_base.h" +#include "BLF_api.h" + #if defined WIN32 && !defined _LIBC # include "BLI_fnmatch.h" /* use fnmatch included in blenlib */ #else @@ -1536,16 +1538,16 @@ static int outliner_scroll_page_exec(bContext *C, wmOperator *op) void OUTLINER_OT_scroll_page(wmOperatorType *ot) { /* identifiers */ - ot->name= "Scroll Page"; + ot->name= _("Scroll Page"); ot->idname= "OUTLINER_OT_scroll_page"; - ot->description= "Scroll page up or down"; + ot->description= _("Scroll page up or down"); /* callbacks */ ot->exec= outliner_scroll_page_exec; ot->poll= ED_operator_outliner_active; /* properties */ - RNA_def_boolean(ot->srna, "up", 0, "Up", "Scroll up one page."); + RNA_def_boolean(ot->srna, "up", 0, _("Up"), _("Scroll up one page.")); } @@ -1847,9 +1849,9 @@ static int outliner_one_level_exec(bContext *C, wmOperator *op) void OUTLINER_OT_show_one_level(wmOperatorType *ot) { /* identifiers */ - ot->name= "Show/Hide One Level"; + ot->name= _("Show/Hide One Level"); ot->idname= "OUTLINER_OT_show_one_level"; - ot->description= "Expand/collapse all entries by one level"; + ot->description= _("Expand/collapse all entries by one level"); /* callbacks */ ot->exec= outliner_one_level_exec; @@ -1858,7 +1860,7 @@ void OUTLINER_OT_show_one_level(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "open", 1, "Open", "Expand all entries one level deep."); + RNA_def_boolean(ot->srna, "open", 1, _("Open"), _("Expand all entries one level deep.")); } /* This is not used anywhere at the moment */ @@ -2612,15 +2614,15 @@ static int outliner_item_activate(bContext *C, wmOperator *op, wmEvent *event) void OUTLINER_OT_item_activate(wmOperatorType *ot) { - ot->name= "Activate Item"; + ot->name= _("Activate Item"); ot->idname= "OUTLINER_OT_item_activate"; - ot->description= "Handle mouse clicks to activate/select items"; + ot->description= _("Handle mouse clicks to activate/select items"); ot->invoke= outliner_item_activate; ot->poll= ED_operator_outliner_active; - RNA_def_boolean(ot->srna, "extend", 1, "Extend", "Extend selection for activation."); + RNA_def_boolean(ot->srna, "extend", 1, _("Extend"), _("Extend selection for activation.")); } /* *********** */ @@ -2675,15 +2677,15 @@ static int outliner_item_openclose(bContext *C, wmOperator *op, wmEvent *event) void OUTLINER_OT_item_openclose(wmOperatorType *ot) { - ot->name= "Open/Close Item"; + ot->name= _("Open/Close Item"); ot->idname= "OUTLINER_OT_item_openclose"; - ot->description= "Toggle whether item under cursor is enabled or closed"; + ot->description= _("Toggle whether item under cursor is enabled or closed"); ot->invoke= outliner_item_openclose; ot->poll= ED_operator_outliner_active; - RNA_def_boolean(ot->srna, "all", 1, "All", "Close or open all items."); + RNA_def_boolean(ot->srna, "all", 1, _("All"), _("Close or open all items.")); } diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index 6d50913dfd4..85be3d5f99f 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -47,6 +47,8 @@ #include "BLI_storage_types.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_scene_types.h" #include "DNA_userdef_types.h" @@ -88,17 +90,17 @@ static void sequencer_generic_props__internal(wmOperatorType *ot, int flag) { if(flag & SEQPROP_STARTFRAME) - RNA_def_int(ot->srna, "frame_start", 0, INT_MIN, INT_MAX, "Start Frame", "Start frame of the sequence strip", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "frame_start", 0, INT_MIN, INT_MAX, _("Start Frame"), _("Start frame of the sequence strip"), INT_MIN, INT_MAX); if(flag & SEQPROP_ENDFRAME) - RNA_def_int(ot->srna, "frame_end", 0, INT_MIN, INT_MAX, "End Frame", "End frame for the color strip", INT_MIN, INT_MAX); /* not useual since most strips have a fixed length */ + RNA_def_int(ot->srna, "frame_end", 0, INT_MIN, INT_MAX, _("End Frame"), _("End frame for the color strip"), INT_MIN, INT_MAX); /* not useual since most strips have a fixed length */ - RNA_def_int(ot->srna, "channel", 1, 1, MAXSEQ, "Channel", "Channel to place this strip into", 1, MAXSEQ); + RNA_def_int(ot->srna, "channel", 1, 1, MAXSEQ, _("Channel"), _("Channel to place this strip into"), 1, MAXSEQ); - RNA_def_boolean(ot->srna, "replace_sel", 1, "Replace Selection", "replace the current selection"); + RNA_def_boolean(ot->srna, "replace_sel", 1, _("Replace Selection"), _("replace the current selection")); if(flag & SEQPROP_FILES) - RNA_def_collection_runtime(ot->srna, "files", &RNA_OperatorFileListElement, "Files", ""); + RNA_def_collection_runtime(ot->srna, "files", &RNA_OperatorFileListElement, _("Files"), ""); } static void sequencer_generic_invoke_path__internal(bContext *C, wmOperator *op, const char *identifier) @@ -375,9 +377,9 @@ void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Movie Strip"; + ot->name= _("Add Movie Strip"); ot->idname= "SEQUENCER_OT_movie_strip_add"; - ot->description= "Add a movie strip to the sequencer"; + ot->description= _("Add a movie strip to the sequencer"); /* api callbacks */ ot->invoke= sequencer_add_movie_strip_invoke; @@ -390,7 +392,7 @@ void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot) WM_operator_properties_filesel(ot, FOLDERFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH); sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME|SEQPROP_FILES); - RNA_def_boolean(ot->srna, "sound", TRUE, "Sound", "Load sound with the movie"); + RNA_def_boolean(ot->srna, "sound", TRUE, _("Sound"), _("Load sound with the movie")); } /* add sound operator */ @@ -430,9 +432,9 @@ void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Sound Strip"; + ot->name= _("Add Sound Strip"); ot->idname= "SEQUENCER_OT_sound_strip_add"; - ot->description= "Add a sound strip to the sequencer"; + ot->description= _("Add a sound strip to the sequencer"); /* api callbacks */ ot->invoke= sequencer_add_sound_strip_invoke; @@ -445,7 +447,7 @@ void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot) WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH); sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME|SEQPROP_FILES); - RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory."); + RNA_def_boolean(ot->srna, "cache", FALSE, _("Cache"), _("Cache the sound in memory.")); } /* add image operator */ diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 6900271deea..b049ae4d33e 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -48,6 +48,8 @@ #include "BLI_storage_types.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_scene_types.h" #include "DNA_userdef_types.h" @@ -1193,7 +1195,7 @@ void SEQUENCER_OT_snap(struct wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "frame", 0, INT_MIN, INT_MAX, "Frame", "Frame where selected strips will be snapped", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "frame", 0, INT_MIN, INT_MAX, _("Frame"), _("Frame where selected strips will be snapped"), INT_MIN, INT_MAX); } /* mute operator */ @@ -1228,9 +1230,9 @@ static int sequencer_mute_exec(bContext *C, wmOperator *op) void SEQUENCER_OT_mute(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Mute Strips"; + ot->name= _("Mute Strips"); ot->idname= "SEQUENCER_OT_mute"; - ot->description="Mute selected strips"; + ot->description=_("Mute selected strips"); /* api callbacks */ ot->exec= sequencer_mute_exec; @@ -1239,7 +1241,7 @@ void SEQUENCER_OT_mute(struct wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Mute unselected rather than selected strips."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Mute unselected rather than selected strips.")); } @@ -1275,9 +1277,9 @@ static int sequencer_unmute_exec(bContext *C, wmOperator *op) void SEQUENCER_OT_unmute(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Un-Mute Strips"; + ot->name= _("Un-Mute Strips"); ot->idname= "SEQUENCER_OT_unmute"; - ot->description="Un-Mute unselected rather than selected strips"; + ot->description=_("Un-Mute unselected rather than selected strips"); /* api callbacks */ ot->exec= sequencer_unmute_exec; @@ -1286,7 +1288,7 @@ void SEQUENCER_OT_unmute(struct wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "UnMute unselected rather than selected strips."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("UnMute unselected rather than selected strips.")); } @@ -1604,9 +1606,9 @@ void SEQUENCER_OT_cut(struct wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "frame", 0, INT_MIN, INT_MAX, "Frame", "Frame where selected strips will be cut", INT_MIN, INT_MAX); - RNA_def_enum(ot->srna, "type", prop_cut_types, SEQ_CUT_SOFT, "Type", "The type of cut operation to perform on strips"); - RNA_def_enum(ot->srna, "side", prop_side_types, SEQ_SIDE_BOTH, "Side", "The side that remains selected after cutting"); + RNA_def_int(ot->srna, "frame", 0, INT_MIN, INT_MAX, _("Frame"), _("Frame where selected strips will be cut"), INT_MIN, INT_MAX); + RNA_def_enum(ot->srna, "type", prop_cut_types, SEQ_CUT_SOFT, _("Type"), _("The type of cut operation to perform on strips")); + RNA_def_enum(ot->srna, "side", prop_side_types, SEQ_SIDE_BOTH, _("Side"), _("The side that remains selected after cutting")); } /* duplicate operator */ @@ -1840,7 +1842,7 @@ void SEQUENCER_OT_images_separate(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "length", 1, 1, 1000, "Length", "Length of each frame", 1, INT_MAX); + RNA_def_int(ot->srna, "length", 1, 1, 1000, _("Length"), _("Length of each frame"), 1, INT_MAX); } diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index 8d5f372f55e..c48814f7302 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -44,6 +44,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_scene_types.h" #include "BKE_context.h" @@ -507,9 +509,9 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event) void SEQUENCER_OT_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Activate/Select"; + ot->name= _("Activate/Select"); ot->idname= "SEQUENCER_OT_select"; - ot->description="Select a strip (last selected becomes the \"active strip\")"; + ot->description=_("Select a strip (last selected becomes the \"active strip\")"); /* api callbacks */ ot->invoke= sequencer_select_invoke; @@ -519,11 +521,11 @@ void SEQUENCER_OT_select(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection."); - RNA_def_boolean(ot->srna, "linked_handle", 0, "Linked Handle", "Select handles next to the active strip."); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("Extend the selection.")); + RNA_def_boolean(ot->srna, "linked_handle", 0, _("Linked Handle"), _("Select handles next to the active strip.")); /* for animation this is an enum but atm having an enum isnt useful for us */ - RNA_def_boolean(ot->srna, "left_right", 0, "Left/Right", "select based on the frame side the cursor is on."); - RNA_def_boolean(ot->srna, "linked_time", 0, "Linked Time", "Select other strips at the same time."); + RNA_def_boolean(ot->srna, "left_right", 0, _("Left/Right"), _("select based on the frame side the cursor is on.")); + RNA_def_boolean(ot->srna, "linked_time", 0, _("Linked Time"), _("Select other strips at the same time.")); } @@ -677,9 +679,9 @@ static int sequencer_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEv void SEQUENCER_OT_select_linked_pick(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select pick linked"; + ot->name= _("Select pick linked"); ot->idname= "SEQUENCER_OT_select_linked_pick"; - ot->description="Select a chain of linked strips nearest to the mouse pointer"; + ot->description=_("Select a chain of linked strips nearest to the mouse pointer"); /* api callbacks */ ot->invoke= sequencer_select_linked_pick_invoke; @@ -689,7 +691,7 @@ void SEQUENCER_OT_select_linked_pick(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "extend the selection"); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("extend the selection")); } diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 2bd6bd624df..12f910d2011 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -45,6 +45,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "PIL_time.h" #include "BKE_context.h" @@ -290,9 +292,9 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) void TEXT_OT_open(wmOperatorType *ot) { /* identifiers */ - ot->name= "Open Text Block"; + ot->name= _("Open Text Block"); ot->idname= "TEXT_OT_open"; - ot->description= "Open a new text data block"; + ot->description= _("Open a new text data block"); /* api callbacks */ ot->exec= open_exec; @@ -305,7 +307,7 @@ void TEXT_OT_open(wmOperatorType *ot) /* properties */ WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE|PYSCRIPTFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH); //XXX TODO, relative_path - RNA_def_boolean(ot->srna, "internal", 0, "Make internal", "Make text file internal after loading"); + RNA_def_boolean(ot->srna, "internal", 0, _("Make internal"), _("Make text file internal after loading")); } /******************* reload operator *********************/ @@ -804,16 +806,16 @@ static int paste_exec(bContext *C, wmOperator *op) void TEXT_OT_paste(wmOperatorType *ot) { /* identifiers */ - ot->name= "Paste"; + ot->name= _("Paste"); ot->idname= "TEXT_OT_paste"; - ot->description= "Paste text from clipboard"; + ot->description= _("Paste text from clipboard"); /* api callbacks */ ot->exec= paste_exec; ot->poll= text_edit_poll; /* properties */ - RNA_def_boolean(ot->srna, "selection", 0, "Selection", "Paste text selected elsewhere rather than copied, X11 only."); + RNA_def_boolean(ot->srna, "selection", 0, _("Selection"), _("Paste text selected elsewhere rather than copied, X11 only.")); } /******************* copy operator *********************/ @@ -1968,7 +1970,7 @@ void TEXT_OT_jump(wmOperatorType *ot) ot->poll= text_edit_poll; /* properties */ - RNA_def_int(ot->srna, "line", 1, 1, INT_MAX, "Line", "Line number to jump to.", 1, 10000); + RNA_def_int(ot->srna, "line", 1, 1, INT_MAX, _("Line"), _("Line number to jump to."), 1, 10000); } /******************* delete operator **********************/ @@ -2257,7 +2259,7 @@ void TEXT_OT_scroll(wmOperatorType *ot) ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; /* properties */ - RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, "Lines", "Number of lines to scroll.", -100, 100); + RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, _("Lines"), _("Number of lines to scroll."), -100, 100); } /******************** scroll bar operator *******************/ @@ -2339,7 +2341,7 @@ void TEXT_OT_scroll_bar(wmOperatorType *ot) ot->flag= OPTYPE_BLOCKING; /* properties */ - RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, "Lines", "Number of lines to scroll.", -100, 100); + RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, _("Lines"), _("Number of lines to scroll."), -100, 100); } /******************* set selection operator **********************/ @@ -2619,9 +2621,9 @@ static int set_selection_cancel(bContext *C, wmOperator *op) void TEXT_OT_selection_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Selection"; + ot->name= _("Set Selection"); ot->idname= "TEXT_OT_selection_set"; - ot->description= "Set cursor selection"; + ot->description= _("Set cursor selection"); /* api callbacks */ ot->invoke= set_selection_invoke; @@ -2630,7 +2632,7 @@ void TEXT_OT_selection_set(wmOperatorType *ot) ot->poll= text_region_edit_poll; /* properties */ - RNA_def_boolean(ot->srna, "select", 0, "Select", "Set selection end rather than cursor."); + RNA_def_boolean(ot->srna, "select", 0, _("Select"), _("Set selection end rather than cursor.")); } /******************* set cursor operator **********************/ @@ -3181,9 +3183,9 @@ static int to_3d_object_exec(bContext *C, wmOperator *op) void TEXT_OT_to_3d_object(wmOperatorType *ot) { /* identifiers */ - ot->name= "To 3D Object"; + ot->name= _("To 3D Object"); ot->idname= "TEXT_OT_to_3d_object"; - ot->description= "Create 3d text object from active text data block"; + ot->description= _("Create 3d text object from active text data block"); /* api callbacks */ ot->exec= to_3d_object_exec; @@ -3193,7 +3195,7 @@ void TEXT_OT_to_3d_object(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "split_lines", 0, "Split Lines", "Create one object per line in the text."); + RNA_def_boolean(ot->srna, "split_lines", 0, _("Split Lines"), _("Create one object per line in the text.")); } diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 016aacecb4b..8cef69fdaba 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -49,6 +49,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_image.h" #include "BKE_library.h" @@ -1454,9 +1456,9 @@ void VIEW3D_OT_zoom(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; - RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "mx", 0, 0, INT_MAX, "Zoom Position X", "", 0, INT_MAX); - RNA_def_int(ot->srna, "my", 0, 0, INT_MAX, "Zoom Position Y", "", 0, INT_MAX); + RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, _("Delta"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "mx", 0, 0, INT_MAX, _("Zoom Position X"), "", 0, INT_MAX); + RNA_def_int(ot->srna, "my", 0, 0, INT_MAX, _("Zoom Position Y"), "", 0, INT_MAX); } @@ -1688,9 +1690,9 @@ void VIEW3D_OT_dolly(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; - RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "mx", 0, 0, INT_MAX, "Zoom Position X", "", 0, INT_MAX); - RNA_def_int(ot->srna, "my", 0, 0, INT_MAX, "Zoom Position Y", "", 0, INT_MAX); + RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, _("Delta"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "mx", 0, 0, INT_MAX, _("Zoom Position X"), "", 0, INT_MAX); + RNA_def_int(ot->srna, "my", 0, 0, INT_MAX, _("Zoom Position Y"), "", 0, INT_MAX); } @@ -1783,8 +1785,8 @@ static int view3d_all_exec(bContext *C, wmOperator *op) /* was view3d_home() in void VIEW3D_OT_view_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "View All"; - ot->description = "View all objects in scene"; + ot->name= _("View All"); + ot->description = _("View all objects in scene"); ot->idname= "VIEW3D_OT_view_all"; /* api callbacks */ @@ -1794,7 +1796,7 @@ void VIEW3D_OT_view_all(wmOperatorType *ot) /* flags */ ot->flag= 0; - RNA_def_boolean(ot->srna, "center", 0, "Center", ""); + RNA_def_boolean(ot->srna, "center", 0, _("Center"), ""); } @@ -1930,8 +1932,8 @@ void VIEW3D_OT_view_selected(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Selected"; - ot->description = "Move the view to the selection center"; + ot->name= _("View Selected"); + ot->description = _("Move the view to the selection center"); ot->idname= "VIEW3D_OT_view_selected"; /* api callbacks */ @@ -1965,8 +1967,8 @@ static int viewcenter_cursor_exec(bContext *C, wmOperator *UNUSED(op)) void VIEW3D_OT_view_center_cursor(wmOperatorType *ot) { /* identifiers */ - ot->name= "Center View to Cursor"; - ot->description= "Centers the view so that the cursor is in the middle of the view"; + ot->name= _("Center View to Cursor"); + ot->description= _("Centers the view so that the cursor is in the middle of the view"); ot->idname= "VIEW3D_OT_view_center_cursor"; /* api callbacks */ @@ -2085,10 +2087,10 @@ void VIEW3D_OT_render_border(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* rna */ - RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, _("X Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, _("X Max"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, _("Y Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, _("Y Max"), "", INT_MIN, INT_MAX); } /* ********************* Border Zoom operator ****************** */ @@ -2241,10 +2243,10 @@ void VIEW3D_OT_zoom_border(wmOperatorType *ot) ot->flag= 0; /* rna */ - RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, _("X Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, _("X Max"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, _("Y Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, _("Y Max"), "", INT_MIN, INT_MAX); } @@ -2498,8 +2500,8 @@ static int viewnumpad_exec(bContext *C, wmOperator *op) void VIEW3D_OT_viewnumpad(wmOperatorType *ot) { /* identifiers */ - ot->name= "View numpad"; - ot->description = "Set the view"; + ot->name= _("View numpad"); + ot->description = _("Set the view"); ot->idname= "VIEW3D_OT_viewnumpad"; /* api callbacks */ @@ -2510,7 +2512,7 @@ void VIEW3D_OT_viewnumpad(wmOperatorType *ot) ot->flag= 0; RNA_def_enum(ot->srna, "type", prop_view_items, 0, "View", "The Type of view"); - RNA_def_boolean(ot->srna, "align_active", 0, "Align Active", "Align to the active objects axis"); + RNA_def_boolean(ot->srna, "align_active", 0, _("Align Active"), _("Align to the active objects axis")); } /* XXX add _() for strings */ @@ -2649,8 +2651,8 @@ static int viewpersportho_exec(bContext *C, wmOperator *UNUSED(op)) void VIEW3D_OT_view_persportho(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Persp/Ortho"; - ot->description = "Switch the current view from perspective/orthographic"; + ot->name= _("View Persp/Ortho"); + ot->description = _("Switch the current view from perspective/orthographic"); ot->idname= "VIEW3D_OT_view_persportho"; /* api callbacks */ @@ -2778,7 +2780,7 @@ void VIEW3D_OT_background_image_remove(wmOperatorType *ot) /* flags */ ot->flag = 0; - RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "Background image index to remove ", 0, INT_MAX); + RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, _("Index"), _("Background image index to remove "), 0, INT_MAX); } /* ********************* set clipping operator ****************** */ @@ -2882,10 +2884,10 @@ void VIEW3D_OT_clip_border(wmOperatorType *ot) ot->flag= 0; /* rna */ - RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, _("X Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, _("X Max"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, _("Y Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, _("Y Max"), "", INT_MIN, INT_MAX); } /* ***************** 3d cursor cursor op ******************* */ @@ -3035,8 +3037,8 @@ static int enable_manipulator_invoke(bContext *C, wmOperator *op, wmEvent *UNUSE void VIEW3D_OT_enable_manipulator(wmOperatorType *ot) { /* identifiers */ - ot->name= "Enable 3D Manipulator"; - ot->description = "Enable the transform manipulator for use"; + ot->name= _("Enable 3D Manipulator"); + ot->description = _("Enable the transform manipulator for use"); ot->idname= "VIEW3D_OT_enable_manipulator"; /* api callbacks */ @@ -3044,9 +3046,9 @@ void VIEW3D_OT_enable_manipulator(wmOperatorType *ot) ot->poll= ED_operator_view3d_active; /* rna later */ - RNA_def_boolean(ot->srna, "translate", 0, "Translate", "Enable the translate manipulator"); - RNA_def_boolean(ot->srna, "rotate", 0, "Rotate", "Enable the rotate manipulator"); - RNA_def_boolean(ot->srna, "scale", 0, "Scale", "Enable the scale manipulator"); + RNA_def_boolean(ot->srna, "translate", 0, _("Translate"), _("Enable the translate manipulator")); + RNA_def_boolean(ot->srna, "rotate", 0, _("Rotate"), _("Enable the rotate manipulator")); + RNA_def_boolean(ot->srna, "scale", 0, _("Scale"), _("Enable the scale manipulator")); } /* ************************* below the line! *********************** */ diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 75c8d5cae73..56ea3e8abd3 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -47,6 +47,8 @@ #include "BLI_editVert.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_depsgraph.h" #include "BKE_effect.h" @@ -252,8 +254,8 @@ static int view3d_layers_poll(bContext *C) void VIEW3D_OT_layers(wmOperatorType *ot) { /* identifiers */ - ot->name= "Layers"; - ot->description= "Toggle layer(s) visibility"; + ot->name= _("Layers"); + ot->description= _("Toggle layer(s) visibility"); ot->idname= "VIEW3D_OT_layers"; /* api callbacks */ @@ -264,9 +266,9 @@ void VIEW3D_OT_layers(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "nr", 1, 0, 20, "Number", "The layer number to set, zero for all layers", 0, 20); - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Add this layer to the current view layers"); - RNA_def_boolean(ot->srna, "toggle", 1, "Toggle", "Toggle the layer"); + RNA_def_int(ot->srna, "nr", 1, 0, 20, _("Number"), _("The layer number to set, zero for all layers"), 0, 20); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("Add this layer to the current view layers")); + RNA_def_boolean(ot->srna, "toggle", 1, _("Toggle"), _("Toggle the layer")); } static char *view3d_modeselect_pup(Scene *scene) diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 9290e1fc631..05975052913 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -54,6 +54,8 @@ #include "BLI_linklist.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_paint.h" #include "BKE_armature.h" @@ -862,8 +864,8 @@ static int view3d_lasso_select_exec(bContext *C, wmOperator *op) void VIEW3D_OT_select_lasso(wmOperatorType *ot) { - ot->name= "Lasso Select"; - ot->description= "Select items using lasso selection"; + ot->name= _("Lasso Select"); + ot->description= _("Select items using lasso selection"); ot->idname= "VIEW3D_OT_select_lasso"; ot->invoke= WM_gesture_lasso_invoke; @@ -876,8 +878,8 @@ void VIEW3D_OT_select_lasso(wmOperatorType *ot) ot->flag= OPTYPE_UNDO; RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", ""); - RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Deselect rather than select items."); - RNA_def_boolean(ot->srna, "extend", 1, "Extend", "Extend selection instead of deselecting everything first."); + RNA_def_boolean(ot->srna, "deselect", 0, _("Deselect"), _("Deselect rather than select items.")); + RNA_def_boolean(ot->srna, "extend", 1, _("Extend"), _("Extend selection instead of deselecting everything first.")); } @@ -1876,8 +1878,8 @@ static int view3d_select_invoke(bContext *C, wmOperator *op, wmEvent *event) void VIEW3D_OT_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Activate/Select"; - ot->description= "Activate/select item(s)"; + ot->name= _("Activate/Select"); + ot->description= _("Activate/select item(s)"); ot->idname= "VIEW3D_OT_select"; /* api callbacks */ @@ -1888,9 +1890,9 @@ void VIEW3D_OT_select(wmOperatorType *ot) ot->flag= OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first."); - RNA_def_boolean(ot->srna, "center", 0, "Center", "Use the object center when selecting (object mode only)."); - RNA_def_boolean(ot->srna, "enumerate", 0, "Enumerate", "List objects under the mouse (object mode only)."); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("Extend selection instead of deselecting everything first.")); + RNA_def_boolean(ot->srna, "center", 0, _("Center"), _("Use the object center when selecting (object mode only).")); + RNA_def_boolean(ot->srna, "enumerate", 0, _("Enumerate"), _("List objects under the mouse (object mode only).")); } @@ -2306,6 +2308,6 @@ void VIEW3D_OT_select_circle(wmOperatorType *ot) RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX); RNA_def_int(ot->srna, "y", 0, INT_MIN, INT_MAX, "Y", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "radius", 0, INT_MIN, INT_MAX, "Radius", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "gesture_mode", 0, INT_MIN, INT_MAX, "Event Type", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "radius", 0, INT_MIN, INT_MAX, _("Radius"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "gesture_mode", 0, INT_MIN, INT_MAX, _("Event Type"), "", INT_MIN, INT_MAX); } diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index 2e96800bf3b..7285a9d6d09 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -47,6 +47,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_idprop.h" #include "BKE_global.h" @@ -79,7 +81,7 @@ static void view3d_panel_operator_redo_header(const bContext *C, Panel *pa) wmOperator *op= WM_operator_last_redo(C); if(op) BLI_strncpy(pa->drawname, op->type->name, sizeof(pa->drawname)); - else BLI_strncpy(pa->drawname, "Operator", sizeof(pa->drawname)); + else BLI_strncpy(pa->drawname, _("Operator"), sizeof(pa->drawname)); } static void view3d_panel_operator_redo_operator(const bContext *C, Panel *pa, wmOperator *op) @@ -254,8 +256,8 @@ static int view3d_toolshelf(bContext *C, wmOperator *UNUSED(op)) void VIEW3D_OT_toolshelf(wmOperatorType *ot) { - ot->name= "Tool Shelf"; - ot->description= "Toggles tool shelf display"; + ot->name= _("Tool Shelf"); + ot->description= _("Toggles tool shelf display"); ot->idname= "VIEW3D_OT_toolshelf"; ot->exec= view3d_toolshelf; diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index aadb355f743..eaae865156e 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -43,6 +43,8 @@ #include "BLI_listbase.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_anim.h" #include "BKE_action.h" #include "BKE_context.h" @@ -452,8 +454,8 @@ void VIEW3D_OT_object_as_camera(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Active Object as Camera"; - ot->description= "Set the active object as the active camera for this view or scene"; + ot->name= _("Set Active Object as Camera"); + ot->description= _("Set the active object as the active camera for this view or scene"); ot->idname= "VIEW3D_OT_object_as_camera"; /* api callbacks */ @@ -1610,7 +1612,7 @@ void VIEW3D_OT_localview(wmOperatorType *ot) /* identifiers */ ot->name= "Local View"; - ot->description= "Toggle display of selected object(s) separately and centered in view"; + ot->description= _("Toggle display of selected object(s) separately and centered in view"); ot->idname= "VIEW3D_OT_localview"; /* api callbacks */ diff --git a/source/blender/editors/transform/SConscript b/source/blender/editors/transform/SConscript index edc2156a07b..f2d5baecfb3 100644 --- a/source/blender/editors/transform/SConscript +++ b/source/blender/editors/transform/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 += ' ../../render/extern/include' incs += ' ../../gpu ../../makesrna ../../blenloader' diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 7bdf6c909d9..861feb73f48 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -38,6 +38,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_global.h" #include "BKE_armature.h" @@ -292,8 +294,8 @@ static int create_orientation_invoke(bContext *C, wmOperator *op, wmEvent *UNUSE static void TRANSFORM_OT_create_orientation(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Create Orientation"; - ot->description= "Create transformation orientation from selection"; + ot->name = _("Create Orientation"); + ot->description= _("Create transformation orientation from selection"); ot->idname = "TRANSFORM_OT_create_orientation"; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; @@ -303,9 +305,9 @@ static void TRANSFORM_OT_create_orientation(struct wmOperatorType *ot) ot->poll = ED_operator_areaactive; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_string(ot->srna, "name", "", 35, "Name", "Text to insert at the cursor position."); - RNA_def_boolean(ot->srna, "use", 0, "Use after creation", "Select orientation after its creation"); - RNA_def_boolean(ot->srna, "overwrite", 0, "Overwrite previous", "Overwrite previously created orientation with same name"); + RNA_def_string(ot->srna, "name", "", 35, _("Name"), _("Text to insert at the cursor position.")); + RNA_def_boolean(ot->srna, "use", 0, _("Use after creation"), _("Select orientation after its creation")); + RNA_def_boolean(ot->srna, "overwrite", 0, _("Overwrite previous"), _("Overwrite previously created orientation with same name")); } static void transformops_exit(bContext *C, wmOperator *op) @@ -460,7 +462,7 @@ void Transform_Properties(struct wmOperatorType *ot, int flags) if (flags & P_MIRROR) { - RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); + RNA_def_boolean(ot->srna, "mirror", 0, _("Mirror Editing"), ""); } @@ -504,8 +506,8 @@ void Transform_Properties(struct wmOperatorType *ot, int flags) void TRANSFORM_OT_translate(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Translate"; - ot->description= "Translate selected items"; + ot->name = _("Translate"); + ot->description= _("Translate selected items"); ot->idname = OP_TRANSLATION; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -565,8 +567,8 @@ void TRANSFORM_OT_trackball(struct wmOperatorType *ot) void TRANSFORM_OT_rotate(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Rotate"; - ot->description= "Rotate selected items"; + ot->name = _("Rotate"); + ot->description= _("Rotate selected items"); ot->idname = OP_ROTATION; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index c09f8cff02d..8172a74f861 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -47,6 +47,8 @@ #include "BLI_editVert.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_customdata.h" #include "BKE_depsgraph.h" @@ -1292,8 +1294,8 @@ static int stitch_exec(bContext *C, wmOperator *op) static void UV_OT_stitch(wmOperatorType *ot) { /* identifiers */ - ot->name= "Stitch"; - ot->description= "Stitch selected UV vertices by proximity"; + ot->name= _("Stitch"); + ot->description= _("Stitch selected UV vertices by proximity"); ot->idname= "UV_OT_stitch"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1302,8 +1304,8 @@ static void UV_OT_stitch(wmOperatorType *ot) ot->poll= ED_operator_uvedit; /* properties */ - RNA_def_boolean(ot->srna, "use_limit", 1, "Use Limit", "Stitch UVs within a specified limit distance."); - RNA_def_float(ot->srna, "limit", 0.01f, 0.0f, FLT_MAX, "Limit", "Limit distance in normalized coordinates.", -FLT_MAX, FLT_MAX); + RNA_def_boolean(ot->srna, "use_limit", 1, _("Use Limit"), _("Stitch UVs within a specified limit distance.")); + RNA_def_float(ot->srna, "limit", 0.01f, 0.0f, FLT_MAX, _("Limit"), _("Limit distance in normalized coordinates."), -FLT_MAX, FLT_MAX); } /* ******************** (de)select all operator **************** */ @@ -1725,8 +1727,8 @@ static int select_invoke(bContext *C, wmOperator *op, wmEvent *event) static void UV_OT_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select"; - ot->description= "Select UV vertices"; + ot->name= _("Select"); + ot->description= _("Select UV vertices"); ot->idname= "UV_OT_select"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1737,9 +1739,9 @@ static void UV_OT_select(wmOperatorType *ot) /* properties */ RNA_def_boolean(ot->srna, "extend", 0, - "Extend", "Extend selection rather than clearing the existing selection."); + _("Extend"), _("Extend selection rather than clearing the existing selection.")); RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, - "Location", "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds.", -100.0f, 100.0f); + _("Location"), _("Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds."), -100.0f, 100.0f); } /* ******************** loop select operator **************** */ @@ -1770,8 +1772,8 @@ static int select_loop_invoke(bContext *C, wmOperator *op, wmEvent *event) static void UV_OT_select_loop(wmOperatorType *ot) { /* identifiers */ - ot->name= "Loop Select"; - ot->description= "Select a loop of connected UV vertices"; + ot->name= _("Loop Select"); + ot->description= _("Select a loop of connected UV vertices"); ot->idname= "UV_OT_select_loop"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1782,9 +1784,9 @@ static void UV_OT_select_loop(wmOperatorType *ot) /* properties */ RNA_def_boolean(ot->srna, "extend", 0, - "Extend", "Extend selection rather than clearing the existing selection."); + _("Extend"), _("Extend selection rather than clearing the existing selection.")); RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, - "Location", "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds.", -100.0f, 100.0f); + _("Location"), _("Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds."), -100.0f, 100.0f); } /* ******************** linked select operator **************** */ @@ -1847,8 +1849,8 @@ static int select_linked_exec(bContext *C, wmOperator *op) static void UV_OT_select_linked(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Linked"; - ot->description= "Select all UV vertices linked to the active UV map"; + ot->name= _("Select Linked"); + ot->description= _("Select all UV vertices linked to the active UV map"); ot->idname= "UV_OT_select_linked"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1858,7 +1860,7 @@ static void UV_OT_select_linked(wmOperatorType *ot) /* properties */ RNA_def_boolean(ot->srna, "extend", 0, - "Extend", "Extend selection rather than clearing the existing selection."); + _("Extend"), _("Extend selection rather than clearing the existing selection.")); } static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event) @@ -1874,8 +1876,8 @@ static int select_linked_pick_exec(bContext *C, wmOperator *op) static void UV_OT_select_linked_pick(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Linked Pick"; - ot->description= "Select all UV vertices linked under the mouse"; + ot->name= _("Select Linked Pick"); + ot->description= _("Select all UV vertices linked under the mouse"); ot->idname= "UV_OT_select_linked_pick"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1886,10 +1888,10 @@ static void UV_OT_select_linked_pick(wmOperatorType *ot) /* properties */ RNA_def_boolean(ot->srna, "extend", 0, - "Extend", "Extend selection rather than clearing the existing selection."); + _("Extend"), _("Extend selection rather than clearing the existing selection.")); RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, - "Location", "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds.", -100.0f, 100.0f); + _("Location"), _("Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds."), -100.0f, 100.0f); } /* ******************** unlink selection operator **************** */ @@ -2212,8 +2214,8 @@ static int border_select_exec(bContext *C, wmOperator *op) static void UV_OT_select_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Border Select"; - ot->description= "Select UV vertices using border selection"; + ot->name= _("Border Select"); + ot->description= _("Select UV vertices using border selection"); ot->idname= "UV_OT_select_border"; /* api callbacks */ @@ -2227,7 +2229,7 @@ static void UV_OT_select_border(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "pinned", 0, "Pinned", "Border select pinned UVs only."); + RNA_def_boolean(ot->srna, "pinned", 0, _("Pinned"), _("Border select pinned UVs only.")); WM_operator_properties_gesture_border(ot, FALSE); } @@ -2319,8 +2321,8 @@ static void UV_OT_circle_select(wmOperatorType *ot) /* properties */ RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX); RNA_def_int(ot->srna, "y", 0, INT_MIN, INT_MAX, "Y", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "radius", 0, INT_MIN, INT_MAX, "Radius", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "gesture_mode", 0, INT_MIN, INT_MAX, "Gesture Mode", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "radius", 0, INT_MIN, INT_MAX, _("Radius"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "gesture_mode", 0, INT_MIN, INT_MAX, _("Gesture Mode"), "", INT_MIN, INT_MAX); } /* ******************** snap cursor operator **************** */ @@ -2675,8 +2677,8 @@ static int pin_exec(bContext *C, wmOperator *op) static void UV_OT_pin(wmOperatorType *ot) { /* identifiers */ - ot->name= "Pin"; - ot->description= "Set/clear selected UV vertices as anchored between multiple unwrap operations"; + ot->name= _("Pin"); + ot->description= _("Set/clear selected UV vertices as anchored between multiple unwrap operations"); ot->idname= "UV_OT_pin"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -2685,7 +2687,7 @@ static void UV_OT_pin(wmOperatorType *ot) ot->poll= ED_operator_uvedit; /* properties */ - RNA_def_boolean(ot->srna, "clear", 0, "Clear", "Clear pinning for the selection instead of setting it."); + RNA_def_boolean(ot->srna, "clear", 0, _("Clear"), _("Clear pinning for the selection instead of setting it.")); } /******************* select pinned operator ***************/ @@ -2860,8 +2862,8 @@ static int hide_exec(bContext *C, wmOperator *op) static void UV_OT_hide(wmOperatorType *ot) { /* identifiers */ - ot->name= "Hide Selected"; - ot->description= "Hide (un)selected UV vertices"; + ot->name= _("Hide Selected"); + ot->description= _("Hide (un)selected UV vertices"); ot->idname= "UV_OT_hide"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -2870,7 +2872,7 @@ static void UV_OT_hide(wmOperatorType *ot) ot->poll= ED_operator_uvedit; /* props */ - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Hide unselected rather than selected.")); } /****************** reveal operator ******************/ diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 1b8acb013ea..1ccda0f1596 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -49,6 +49,8 @@ #include "BLI_uvproject.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_customdata.h" #include "BKE_depsgraph.h" @@ -432,9 +434,9 @@ void UV_OT_minimize_stretch(wmOperatorType *ot) ot->poll= ED_operator_uvedit; /* properties */ - RNA_def_boolean(ot->srna, "fill_holes", 1, "Fill Holes", "Virtual fill holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry."); - RNA_def_float_factor(ot->srna, "blend", 0.0f, 0.0f, 1.0f, "Blend", "Blend factor between stretch minimized and original.", 0.0f, 1.0f); - RNA_def_int(ot->srna, "iterations", 0, 0, INT_MAX, "Iterations", "Number of iterations to run, 0 is unlimited when run interactively.", 0, 100); + RNA_def_boolean(ot->srna, "fill_holes", 1, _("Fill Holes"), _("Virtual fill holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry.")); + RNA_def_float_factor(ot->srna, "blend", 0.0f, 0.0f, 1.0f, _("Blend"), _("Blend factor between stretch minimized and original."), 0.0f, 1.0f); + RNA_def_int(ot->srna, "iterations", 0, 0, INT_MAX, _("Iterations"), _("Number of iterations to run, 0 is unlimited when run interactively."), 0, 100); } /* ******************** Pack Islands operator **************** */ @@ -754,9 +756,9 @@ static void correct_uv_aspect(EditMesh *em) static void uv_map_clip_correct_properties(wmOperatorType *ot) { - RNA_def_boolean(ot->srna, "correct_aspect", 1, "Correct Aspect", "Map UV's taking image aspect ratio into account."); - RNA_def_boolean(ot->srna, "clip_to_bounds", 0, "Clip to Bounds", "Clip UV coordinates to bounds after unwrapping."); - RNA_def_boolean(ot->srna, "scale_to_bounds", 0, "Scale to Bounds", "Scale UV coordinates to bounds after unwrapping."); + RNA_def_boolean(ot->srna, "correct_aspect", 1, _("Correct Aspect"), _("Map UV's taking image aspect ratio into account.")); + RNA_def_boolean(ot->srna, "clip_to_bounds", 0, _("Clip to Bounds"), _("Clip UV coordinates to bounds after unwrapping.")); + RNA_def_boolean(ot->srna, "scale_to_bounds", 0, _("Scale to Bounds"), _("Scale UV coordinates to bounds after unwrapping.")); } static void uv_map_clip_correct(EditMesh *em, wmOperator *op) @@ -892,8 +894,8 @@ void UV_OT_unwrap(wmOperatorType *ot) {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Unwrap"; - ot->description= "Unwrap the mesh of the object being edited"; + ot->name= _("Unwrap"); + ot->description= _("Unwrap the mesh of the object being edited"); ot->idname= "UV_OT_unwrap"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -903,8 +905,8 @@ void UV_OT_unwrap(wmOperatorType *ot) /* properties */ RNA_def_enum(ot->srna, "method", method_items, 0, "Method", "Unwrapping method. Angle Based usually gives better results than Conformal, while being somewhat slower."); - RNA_def_boolean(ot->srna, "fill_holes", 1, "Fill Holes", "Virtual fill holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry."); - RNA_def_boolean(ot->srna, "correct_aspect", 1, "Correct Aspect", "Map UV's taking image aspect ratio into account."); + RNA_def_boolean(ot->srna, "fill_holes", 1, _("Fill Holes"), _("Virtual fill holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry.")); + RNA_def_boolean(ot->srna, "correct_aspect", 1, _("Correct Aspect"), _("Map UV's taking image aspect ratio into account.")); } /**************** Project From View operator **************/ @@ -1004,7 +1006,7 @@ static int uv_from_view_poll(bContext *C) void UV_OT_from_view(wmOperatorType *ot) { /* identifiers */ - ot->name= "Project From View"; + ot->name= _("Project From View"); ot->idname= "UV_OT_project_from_view"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1013,7 +1015,7 @@ void UV_OT_from_view(wmOperatorType *ot) ot->poll= uv_from_view_poll; /* properties */ - RNA_def_boolean(ot->srna, "orthographic", 0, "Orthographic", "Use orthographic projection."); + RNA_def_boolean(ot->srna, "orthographic", 0, _("Orthographic"), _("Use orthographic projection.")); uv_map_clip_correct_properties(ot); } -- cgit v1.2.3