diff options
Diffstat (limited to 'source/blender/editors/armature/poselib.c')
-rw-r--r-- | source/blender/editors/armature/poselib.c | 50 |
1 files changed, 26 insertions, 24 deletions
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index 864eaa3bdbd..1d6ec1685b2 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -43,6 +43,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" @@ -231,9 +233,9 @@ static int poselib_new_exec (bContext *C, wmOperator *UNUSED(op)) void POSELIB_OT_new (wmOperatorType *ot) { /* identifiers */ - ot->name = "New Pose Library"; + ot->name = _("New Pose Library"); ot->idname = "POSELIB_OT_new"; - ot->description = "Add New Pose Library to active Object"; + ot->description = _("Add New Pose Library to active Object"); /* callbacks */ ot->exec = poselib_new_exec; @@ -266,9 +268,9 @@ static int poselib_unlink_exec (bContext *C, wmOperator *UNUSED(op)) void POSELIB_OT_unlink (wmOperatorType *ot) { /* identifiers */ - ot->name = "Unlink Pose Library"; + ot->name = _("Unlink Pose Library"); ot->idname = "POSELIB_OT_unlink"; - ot->description = "Remove Pose Library from active Object"; + ot->description = _("Remove Pose Library from active Object"); /* callbacks */ ot->exec = poselib_unlink_exec; @@ -352,9 +354,9 @@ static int poselib_sanitise_exec (bContext *C, wmOperator *op) void POSELIB_OT_action_sanitise (wmOperatorType *ot) { /* identifiers */ - ot->name = "Sanitise Pose Library Action"; + ot->name = _("Sanitise Pose Library Action"); ot->idname = "POSELIB_OT_action_sanitise"; - ot->description = "Make action suitable for use as a Pose Library"; + ot->description = _("Make action suitable for use as a Pose Library"); /* callbacks */ ot->exec = poselib_sanitise_exec; @@ -406,15 +408,15 @@ static int poselib_add_menu_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); /* add new (adds to the first unoccupied frame) */ - uiItemIntO(layout, "Add New", ICON_NONE, "POSELIB_OT_pose_add", "frame", poselib_get_free_index(ob->poselib)); + uiItemIntO(layout, _("Add New"), ICON_NONE, "POSELIB_OT_pose_add", "frame", poselib_get_free_index(ob->poselib)); /* check if we have any choices to add a new pose in any other way */ if ((ob->poselib) && (ob->poselib->markers.first)) { /* add new (on current frame) */ - uiItemIntO(layout, "Add New (Current Frame)", ICON_NONE, "POSELIB_OT_pose_add", "frame", CFRA); + uiItemIntO(layout, _("Add New (Current Frame)"), ICON_NONE, "POSELIB_OT_pose_add", "frame", CFRA); /* replace existing - submenu */ - uiItemMenuF(layout, "Replace Existing...", 0, poselib_add_menu_invoke__replacemenu, NULL); + uiItemMenuF(layout, _("Replace Existing..."), 0, poselib_add_menu_invoke__replacemenu, NULL); } uiPupMenuEnd(C, pup); @@ -478,9 +480,9 @@ static int poselib_add_exec (bContext *C, wmOperator *op) void POSELIB_OT_pose_add (wmOperatorType *ot) { /* identifiers */ - ot->name= "PoseLib Add Pose"; + ot->name= _("PoseLib Add Pose"); ot->idname= "POSELIB_OT_pose_add"; - ot->description= "Add the current Pose to the active Pose Library"; + ot->description= _("Add the current Pose to the active Pose Library"); /* api callbacks */ ot->invoke= poselib_add_menu_invoke; @@ -491,8 +493,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")); } /* ----- */ @@ -584,9 +586,9 @@ void POSELIB_OT_pose_remove (wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "PoseLib Remove Pose"; + ot->name= _("PoseLib Remove Pose"); ot->idname= "POSELIB_OT_pose_remove"; - ot->description= "Remove nth pose from the active Pose Library"; + ot->description= _("Remove nth pose from the active Pose Library"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -597,7 +599,7 @@ void POSELIB_OT_pose_remove (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - prop= RNA_def_enum(ot->srna, "pose", DummyRNA_DEFAULT_items, 0, "Pose", "The pose to remove"); + prop= RNA_def_enum(ot->srna, "pose", DummyRNA_DEFAULT_items, 0, _("Pose"), _("The pose to remove")); RNA_def_enum_funcs(prop, poselib_stored_pose_itemf); ot->prop= prop; } @@ -674,9 +676,9 @@ void POSELIB_OT_pose_rename (wmOperatorType *ot) }; /* identifiers */ - ot->name= "PoseLib Rename Pose"; + ot->name= _("PoseLib Rename Pose"); ot->idname= "POSELIB_OT_pose_rename"; - ot->description= "Rename specified pose from the active Pose Library"; + ot->description= _("Rename specified pose from the active Pose Library"); /* api callbacks */ ot->invoke= poselib_rename_invoke; @@ -1601,9 +1603,9 @@ static int poselib_preview_exec (bContext *C, wmOperator *op) void POSELIB_OT_browse_interactive (wmOperatorType *ot) { /* identifiers */ - ot->name= "PoseLib Browse Poses"; + ot->name= _("PoseLib Browse Poses"); ot->idname= "POSELIB_OT_browse_interactive"; - ot->description= "Interactively browse poses in 3D-View"; + ot->description= _("Interactively browse poses in 3D-View"); /* callbacks */ ot->invoke= poselib_preview_invoke; @@ -1617,7 +1619,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 */ @@ -1627,9 +1629,9 @@ void POSELIB_OT_browse_interactive (wmOperatorType *ot) void POSELIB_OT_apply_pose (wmOperatorType *ot) { /* identifiers */ - ot->name = "Apply Pose Library Pose"; + ot->name = _("Apply Pose Library Pose"); ot->idname = "POSELIB_OT_apply_pose"; - ot->description = "Apply specified Pose Library pose to the rig"; + ot->description = _("Apply specified Pose Library pose to the rig"); /* callbacks */ ot->exec= poselib_preview_exec; @@ -1640,5 +1642,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); } |