diff options
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_fly.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_fly.c | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c index ed1ed5b3881..79f2d98cabd 100644 --- a/source/blender/editors/space_view3d/view3d_fly.c +++ b/source/blender/editors/space_view3d/view3d_fly.c @@ -39,6 +39,9 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" +#include "RNA_define.h" + #include "BKE_context.h" #include "BKE_object.h" #include "BKE_report.h" @@ -80,26 +83,26 @@ void fly_modal_keymap(wmKeyConfig *keyconf) { static EnumPropertyItem modal_items[] = { - {FLY_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""}, - {FLY_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, - {FLY_MODAL_ACCELERATE, "ACCELERATE", 0, "Accelerate", ""}, - {FLY_MODAL_DECELERATE, "DECELERATE", 0, "Decelerate", ""}, + {FLY_MODAL_CANCEL, "CANCEL", 0, N_("Cancel"), ""}, + {FLY_MODAL_CONFIRM, "CONFIRM", 0, N_("Confirm"), ""}, + {FLY_MODAL_ACCELERATE, "ACCELERATE", 0, N_("Accelerate"), ""}, + {FLY_MODAL_DECELERATE, "DECELERATE", 0, N_("Decelerate"), ""}, - {FLY_MODAL_PAN_ENABLE, "PAN_ENABLE", 0, "Pan Enable", ""}, - {FLY_MODAL_PAN_DISABLE, "PAN_DISABLE", 0, "Pan Disable", ""}, + {FLY_MODAL_PAN_ENABLE, "PAN_ENABLE", 0, N_("Pan Enable"), ""}, + {FLY_MODAL_PAN_DISABLE, "PAN_DISABLE", 0, N_("Pan Disable"), ""}, - {FLY_MODAL_DIR_FORWARD, "FORWARD", 0, "Fly Forward", ""}, - {FLY_MODAL_DIR_BACKWARD,"BACKWARD", 0, "Fly Backward", ""}, - {FLY_MODAL_DIR_LEFT, "LEFT", 0, "Fly Left", ""}, - {FLY_MODAL_DIR_RIGHT, "RIGHT", 0, "Fly Right", ""}, - {FLY_MODAL_DIR_UP, "UP", 0, "Fly Up", ""}, - {FLY_MODAL_DIR_DOWN, "DOWN", 0, "Fly Down", ""}, + {FLY_MODAL_DIR_FORWARD, "FORWARD", 0, N_("Fly Forward"), ""}, + {FLY_MODAL_DIR_BACKWARD,"BACKWARD", 0, N_("Fly Backward"), ""}, + {FLY_MODAL_DIR_LEFT, "LEFT", 0, N_("Fly Left"), ""}, + {FLY_MODAL_DIR_RIGHT, "RIGHT", 0, N_("Fly Right"), ""}, + {FLY_MODAL_DIR_UP, "UP", 0, N_("Fly Up"), ""}, + {FLY_MODAL_DIR_DOWN, "DOWN", 0, N_("Fly Down"), ""}, - {FLY_MODAL_AXIS_LOCK_X, "AXIS_LOCK_X", 0, "X Axis Correction", "X axis correction (toggle)"}, - {FLY_MODAL_AXIS_LOCK_Z, "AXIS_LOCK_Z", 0, "X Axis Correction", "Z axis correction (toggle)"}, + {FLY_MODAL_AXIS_LOCK_X, "AXIS_LOCK_X", 0, N_("X Axis Correction"), N_("X axis correction (toggle)")}, + {FLY_MODAL_AXIS_LOCK_Z, "AXIS_LOCK_Z", 0, N_("X Axis Correction"), N_("Z axis correction (toggle)")}, - {FLY_MODAL_PRECISION_ENABLE, "PRECISION_ENABLE", 0, "Precision Enable", ""}, - {FLY_MODAL_PRECISION_DISABLE, "PRECISION_DISABLE", 0, "Precision Disable", ""}, + {FLY_MODAL_PRECISION_ENABLE, "PRECISION_ENABLE", 0, N_("Precision Enable"), ""}, + {FLY_MODAL_PRECISION_DISABLE, "PRECISION_DISABLE", 0, N_("Precision Disable"), ""}, {0, NULL, 0, NULL, NULL}}; @@ -108,7 +111,7 @@ void fly_modal_keymap(wmKeyConfig *keyconf) /* this function is called for each spacetype, only needs to add map once */ if(keymap) return; - keymap= WM_modalkeymap_add(keyconf, "View3D Fly Modal", modal_items); + keymap= WM_modalkeymap_add(keyconf, "View3D Fly Modal", RNA_enum_items_gettexted(modal_items)); /* items for modal map */ WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, FLY_MODAL_CANCEL); @@ -932,8 +935,8 @@ static int fly_modal(bContext *C, wmOperator *op, wmEvent *event) void VIEW3D_OT_fly(wmOperatorType *ot) { /* identifiers */ - ot->name= "Fly Navigation"; - ot->description= "Interactively fly around the scene"; + ot->name= _("Fly Navigation"); + ot->description= _("Interactively fly around the scene"); ot->idname= "VIEW3D_OT_fly"; /* api callbacks */ |