code cleanup: favor braces when blocks have mixed brace use.
[blender.git] / source / blender / editors / transform / transform.c
index c4960de..4aa5439 100644 (file)
@@ -94,6 +94,7 @@
 #include "RNA_access.h"
 
 #include "BLF_api.h"
+#include "BLF_translation.h"
 
 #include "transform.h"
 
@@ -104,6 +105,16 @@ static int doVertSlide(TransInfo *t, float perc);
 static void drawEdgeSlide(const struct bContext *C, TransInfo *t);
 static void drawVertSlide(const struct bContext *C, TransInfo *t);
 
+static bool transdata_check_local_center(TransInfo *t)
+{
+       return ((t->around == V3D_LOCAL) && (
+                   (t->flag & (T_OBJECT | T_POSE)) ||
+                   (t->obedit && t->obedit->type == OB_MESH && (t->settings->selectmode & (SCE_SELECT_EDGE | SCE_SELECT_FACE))) ||
+                   (t->obedit && t->obedit->type == OB_ARMATURE) ||
+                   (t->spacetype == SPACE_IPO))
+               );
+}
+
 /* ************************** SPACE DEPENDANT CODE **************************** */
 
 void setTransformViewMatrices(TransInfo *t)
@@ -228,11 +239,11 @@ void convertViewVec(TransInfo *t, float r_vec[3], int dx, int dy)
        }
 }
 
-void projectIntView(TransInfo *t, const float vec[3], int adr[2])
+void projectIntViewEx(TransInfo *t, const float vec[3], int adr[2], const eV3DProjTest flag)
 {
        if (t->spacetype == SPACE_VIEW3D) {
                if (t->ar->regiontype == RGN_TYPE_WINDOW) {
-                       if (ED_view3d_project_int_global(t->ar, vec, adr, V3D_PROJ_TEST_NOP) != V3D_PROJ_RET_OK) {
+                       if (ED_view3d_project_int_global(t->ar, vec, adr, flag) != V3D_PROJ_RET_OK) {
                                adr[0] = (int)2140000000.0f;  /* this is what was done in 2.64, perhaps we can be smarter? */
                                adr[1] = (int)2140000000.0f;
                        }
@@ -350,15 +361,19 @@ void projectIntView(TransInfo *t, const float vec[3], int adr[2])
                UI_view2d_to_region_no_clip((View2D *)t->view, vec[0], vec[1], adr, adr + 1);
        }
 }
+void projectIntView(TransInfo *t, const float vec[3], int adr[2])
+{
+       projectIntViewEx(t, vec, adr, V3D_PROJ_TEST_NOP);
+}
 
-void projectFloatView(TransInfo *t, const float vec[3], float adr[2])
+void projectFloatViewEx(TransInfo *t, const float vec[3], float adr[2], const eV3DProjTest flag)
 {
        switch (t->spacetype) {
                case SPACE_VIEW3D:
                {
                        if (t->ar->regiontype == RGN_TYPE_WINDOW) {
                                /* allow points behind the view [#33643] */
-                               if (ED_view3d_project_float_global(t->ar, vec, adr, V3D_PROJ_TEST_NOP) != V3D_PROJ_RET_OK) {
+                               if (ED_view3d_project_float_global(t->ar, vec, adr, flag) != V3D_PROJ_RET_OK) {
                                        /* XXX, 2.64 and prior did this, weak! */
                                        adr[0] = t->ar->winx / 2.0f;
                                        adr[1] = t->ar->winy / 2.0f;
@@ -382,6 +397,10 @@ void projectFloatView(TransInfo *t, const float vec[3], float adr[2])
 
        zero_v2(adr);
 }
+void projectFloatView(TransInfo *t, const float vec[3], float adr[2])
+{
+       projectFloatViewEx(t, vec, adr, V3D_PROJ_TEST_NOP);
+}
 
 void applyAspectRatio(TransInfo *t, float vec[2])
 {
@@ -780,22 +799,29 @@ static void transform_event_xyz_constraint(TransInfo *t, short key_type, char cm
        if (!(t->flag & T_NO_CONSTRAINT)) {
                int constraint_axis, constraint_plane;
                int edit_2d = (t->flag & T_2D_EDIT);
-               char msg1[] = "along _";
-               char msg2[] = "along %s _";
-               char msg3[] = "locking %s _";
+               const char *msg1 = "", *msg2 = "", *msg3 = "";
                char axis;
        
                /* Initialize */
                switch (key_type) {
                        case XKEY:
+                               msg1 = IFACE_("along X");
+                               msg2 = IFACE_("along %s X");
+                               msg3 = IFACE_("locking %s X");
                                axis = 'X';
                                constraint_axis = CON_AXIS0;
                                break;
                        case YKEY:
+                               msg1 = IFACE_("along Y");
+                               msg2 = IFACE_("along %s Y");
+                               msg3 = IFACE_("locking %s Y");
                                axis = 'Y';
                                constraint_axis = CON_AXIS1;
                                break;
                        case ZKEY:
+                               msg1 = IFACE_("along Z");
+                               msg2 = IFACE_("along %s Z");
+                               msg3 = IFACE_("locking %s Z");
                                axis = 'Z';
                                constraint_axis = CON_AXIS2;
                                break;
@@ -803,9 +829,6 @@ static void transform_event_xyz_constraint(TransInfo *t, short key_type, char cm
                                /* Invalid key */
                                return;
                }
-               msg1[sizeof(msg1) - 2] = axis;
-               msg2[sizeof(msg2) - 2] = axis;
-               msg3[sizeof(msg3) - 2] = axis;
                constraint_plane = ((CON_AXIS0 | CON_AXIS1 | CON_AXIS2) & (~constraint_axis));
 
                if (edit_2d && (key_type != ZKEY)) {
@@ -894,6 +917,10 @@ int transformEvent(TransInfo *t, wmEvent *event)
                                        t->redraw |= TREDRAW_HARD;
                                        WM_event_add_mousemove(t->context);
                                }
+                               else if (t->mode == TFM_SEQ_SLIDE) {
+                                       t->flag ^= T_ALT_TRANSFORM;
+                                       t->redraw |= TREDRAW_HARD;
+                               }
                                else {
                                        if (t->obedit && t->obedit->type == OB_MESH) {
                                                if ((t->mode == TFM_TRANSLATION) && (t->spacetype == SPACE_VIEW3D)) {
@@ -958,6 +985,10 @@ int transformEvent(TransInfo *t, wmEvent *event)
                                        initSnapping(t, NULL); // need to reinit after mode change
                                        t->redraw |= TREDRAW_HARD;
                                }
+                               else if (t->mode == TFM_SHRINKFATTEN) {
+                                       t->flag ^= T_ALT_TRANSFORM;
+                                       t->redraw |= TREDRAW_HARD;
+                               }
                                else if (t->mode == TFM_RESIZE) {
                                        if (t->options & CTX_MOVIECLIP) {
                                                restoreTransObjects(t);
@@ -987,10 +1018,10 @@ int transformEvent(TransInfo *t, wmEvent *event)
                                        }
                                        else {
                                                if (t->flag & T_2D_EDIT) {
-                                                       setUserConstraint(t, V3D_MANIP_GLOBAL, (CON_AXIS0), "along X");
+                                                       setUserConstraint(t, V3D_MANIP_GLOBAL, (CON_AXIS0), IFACE_("along X"));
                                                }
                                                else {
-                                                       setUserConstraint(t, t->current_orientation, (CON_AXIS0), "along %s X");
+                                                       setUserConstraint(t, t->current_orientation, (CON_AXIS0), IFACE_("along %s X"));
                                                }
                                        }
                                        t->redraw |= TREDRAW_HARD;
@@ -1003,10 +1034,10 @@ int transformEvent(TransInfo *t, wmEvent *event)
                                        }
                                        else {
                                                if (t->flag & T_2D_EDIT) {
-                                                       setUserConstraint(t, V3D_MANIP_GLOBAL, (CON_AXIS1), "along Y");
+                                                       setUserConstraint(t, V3D_MANIP_GLOBAL, (CON_AXIS1), IFACE_("along Y"));
                                                }
                                                else {
-                                                       setUserConstraint(t, t->current_orientation, (CON_AXIS1), "along %s Y");
+                                                       setUserConstraint(t, t->current_orientation, (CON_AXIS1), IFACE_("along %s Y"));
                                                }
                                        }
                                        t->redraw |= TREDRAW_HARD;
@@ -1018,7 +1049,7 @@ int transformEvent(TransInfo *t, wmEvent *event)
                                                stopConstraint(t);
                                        }
                                        else {
-                                               setUserConstraint(t, t->current_orientation, (CON_AXIS2), "along %s Z");
+                                               setUserConstraint(t, t->current_orientation, (CON_AXIS2), IFACE_("along %s Z"));
                                        }
                                        t->redraw |= TREDRAW_HARD;
                                }
@@ -1029,7 +1060,7 @@ int transformEvent(TransInfo *t, wmEvent *event)
                                                stopConstraint(t);
                                        }
                                        else {
-                                               setUserConstraint(t, t->current_orientation, (CON_AXIS1 | CON_AXIS2), "locking %s X");
+                                               setUserConstraint(t, t->current_orientation, (CON_AXIS1 | CON_AXIS2), IFACE_("locking %s X"));
                                        }
                                        t->redraw |= TREDRAW_HARD;
                                }
@@ -1040,7 +1071,7 @@ int transformEvent(TransInfo *t, wmEvent *event)
                                                stopConstraint(t);
                                        }
                                        else {
-                                               setUserConstraint(t, t->current_orientation, (CON_AXIS0 | CON_AXIS2), "locking %s Y");
+                                               setUserConstraint(t, t->current_orientation, (CON_AXIS0 | CON_AXIS2), IFACE_("locking %s Y"));
                                        }
                                        t->redraw |= TREDRAW_HARD;
                                }
@@ -1051,7 +1082,7 @@ int transformEvent(TransInfo *t, wmEvent *event)
                                                stopConstraint(t);
                                        }
                                        else {
-                                               setUserConstraint(t, t->current_orientation, (CON_AXIS0 | CON_AXIS1), "locking %s Z");
+                                               setUserConstraint(t, t->current_orientation, (CON_AXIS0 | CON_AXIS1), IFACE_("locking %s Z"));
                                        }
                                        t->redraw |= TREDRAW_HARD;
                                }
@@ -1156,7 +1187,7 @@ int transformEvent(TransInfo *t, wmEvent *event)
                                        /* exception for switching to dolly, or trackball, in camera view */
                                        if (t->flag & T_CAMERA) {
                                                if (t->mode == TFM_TRANSLATION)
-                                                       setLocalConstraint(t, (CON_AXIS2), "along local Z");
+                                                       setLocalConstraint(t, (CON_AXIS2), IFACE_("along local Z"));
                                                else if (t->mode == TFM_ROTATION) {
                                                        restoreTransObjects(t);
                                                        initTrackball(t);
@@ -1267,7 +1298,9 @@ int transformEvent(TransInfo *t, wmEvent *event)
                                if (t->flag & T_AUTOIK) {
                                        transform_autoik_update(t, 1);
                                }
-                               else view_editmove(event->type);
+                               else {
+                                       view_editmove(event->type);
+                               }
                                t->redraw = 1;
                                break;
                        case PADMINUS:
@@ -1282,7 +1315,9 @@ int transformEvent(TransInfo *t, wmEvent *event)
                                if (t->flag & T_AUTOIK) {
                                        transform_autoik_update(t, -1);
                                }
-                               else view_editmove(event->type);
+                               else {
+                                       view_editmove(event->type);
+                               }
                                t->redraw = 1;
                                break;
                        case LEFTALTKEY:
@@ -1520,7 +1555,7 @@ static void drawHelpline(bContext *UNUSED(C), int x, int y, void *customdata)
                        if (ob) mul_m4_v3(ob->obmat, vecrot);
                }
 
-               projectFloatView(t, vecrot, cent);  // no overflow in extreme cases
+               projectFloatViewEx(t, vecrot, cent, V3D_PROJ_TEST_CLIP_ZERO);
 
                glPushMatrix();
 
@@ -1648,7 +1683,7 @@ static void drawTransformView(const struct bContext *C, ARegion *UNUSED(ar), voi
 static void drawAutoKeyWarning(TransInfo *UNUSED(t), ARegion *ar)
 {
        rcti rect;
-       const char printable[] = "Auto Keying On";
+       const char *printable = IFACE_("Auto Keying On");
        float      printable_size[2];
        int xco, yco;
 
@@ -1663,7 +1698,11 @@ static void drawAutoKeyWarning(TransInfo *UNUSED(t), ARegion *ar)
         * - original color was red to match the icon, but that clashes badly with a less nasty border
         */
        UI_ThemeColorShade(TH_TEXT_HI, -50);
+#ifdef WITH_INTERNATIONAL
+       BLF_draw_default(xco, ar->winy - 17, 0.0f, printable, sizeof(printable));
+#else
        BLF_draw_default_ascii(xco, ar->winy - 17, 0.0f, printable, sizeof(printable));
+#endif
        
        /* autokey recording icon... */
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -1920,6 +1959,8 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
 
        }
 
+       t->keymap = WM_keymap_active(CTX_wm_manager(C), op->type->modalkeymap);
+
        initSnapping(t, op); // Initialize snapping data AFTER mode flags
 
        /* EVIL! posemode code can switch translation to rotate when 1 bone is selected. will be removed (ton) */
@@ -2679,13 +2720,13 @@ int Warp(TransInfo *t, const int UNUSED(mval[2]))
                
                outputNumInput(&(t->num), c);
                
-               sprintf(str, "Warp: %s", c);
+               sprintf(str, IFACE_("Warp: %s"), c);
 
                circumfac = DEG2RADF(circumfac);
        }
        else {
                /* default header print */
-               sprintf(str, "Warp: %.3f", RAD2DEGF(circumfac));
+               sprintf(str, IFACE_("Warp: %.3f"), RAD2DEGF(circumfac));
        }
        
        t->values[0] = circumfac;
@@ -2820,11 +2861,11 @@ int Shear(TransInfo *t, const int UNUSED(mval[2]))
                
                outputNumInput(&(t->num), c);
                
-               sprintf(str, "Shear: %s %s", c, t->proptext);
+               sprintf(str, IFACE_("Shear: %s %s"), c, t->proptext);
        }
        else {
                /* default header print */
-               sprintf(str, "Shear: %.3f %s (Press X or Y to set shear axis)", value, t->proptext);
+               sprintf(str, IFACE_("Shear: %.3f %s (Press X or Y to set shear axis)"), value, t->proptext);
        }
        
        t->values[0] = value;
@@ -2916,30 +2957,30 @@ static void headerResize(TransInfo *t, float vec[3], char *str)
        if (t->con.mode & CON_APPLY) {
                switch (t->num.idx_max) {
                        case 0:
-                               spos += sprintf(spos, "Scale: %s%s %s", &tvec[0], t->con.text, t->proptext);
+                               spos += sprintf(spos, IFACE_("Scale: %s%s %s"), &tvec[0], t->con.text, t->proptext);
                                break;
                        case 1:
-                               spos += sprintf(spos, "Scale: %s : %s%s %s", &tvec[0], &tvec[NUM_STR_REP_LEN],
+                               spos += sprintf(spos, IFACE_("Scale: %s : %s%s %s"), &tvec[0], &tvec[NUM_STR_REP_LEN],
                                                t->con.text, t->proptext);
                                break;
                        case 2:
-                               spos += sprintf(spos, "Scale: %s : %s : %s%s %s", &tvec[0], &tvec[NUM_STR_REP_LEN],
+                               spos += sprintf(spos, IFACE_("Scale: %s : %s : %s%s %s"), &tvec[0], &tvec[NUM_STR_REP_LEN],
                                                &tvec[NUM_STR_REP_LEN * 2], t->con.text, t->proptext);
                }
        }
        else {
                if (t->flag & T_2D_EDIT) {
-                       spos += sprintf(spos, "Scale X: %s   Y: %s%s %s", &tvec[0], &tvec[NUM_STR_REP_LEN],
+                       spos += sprintf(spos, IFACE_("Scale X: %s   Y: %s%s %s"), &tvec[0], &tvec[NUM_STR_REP_LEN],
                                        t->con.text, t->proptext);
                }
                else {
-                       spos += sprintf(spos, "Scale X: %s   Y: %s  Z: %s%s %s", &tvec[0], &tvec[NUM_STR_REP_LEN],
+                       spos += sprintf(spos, IFACE_("Scale X: %s   Y: %s  Z: %s%s %s"), &tvec[0], &tvec[NUM_STR_REP_LEN],
                                        &tvec[NUM_STR_REP_LEN * 2], t->con.text, t->proptext);
                }
        }
        
        if (t->flag & (T_PROP_EDIT | T_PROP_CONNECTED)) {
-               spos += sprintf(spos, " Proportional size: %.2f", t->prop_size);
+               spos += sprintf(spos, IFACE_(" Proportional size: %.2f"), t->prop_size);
        }
 
        (void)spos;
@@ -2995,12 +3036,7 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3])
        }
        
        /* local constraint shouldn't alter center */
-       if ((t->around == V3D_LOCAL) &&
-           (   (t->flag & (T_OBJECT | T_POSE)) ||
-               ((t->flag & T_EDIT) && (t->settings->selectmode & (SCE_SELECT_EDGE | SCE_SELECT_FACE))) ||
-               (t->obedit && t->obedit->type == OB_ARMATURE))
-           )
-       {
+       if (transdata_check_local_center(t)) {
                copy_v3_v3(center, td->center);
        }
        else if (t->options & CTX_MOVIECLIP) {
@@ -3303,11 +3339,11 @@ int ToSphere(TransInfo *t, const int UNUSED(mval[2]))
                
                outputNumInput(&(t->num), c);
                
-               sprintf(str, "To Sphere: %s %s", c, t->proptext);
+               sprintf(str, IFACE_("To Sphere: %s %s"), c, t->proptext);
        }
        else {
                /* default header print */
-               sprintf(str, "To Sphere: %.4f %s", ratio, t->proptext);
+               sprintf(str, IFACE_("To Sphere: %.4f %s"), ratio, t->proptext);
        }
        
        
@@ -3377,20 +3413,16 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
 {
        float vec[3], totmat[3][3], smat[3][3];
        float eul[3], fmat[3][3], quat[4];
-       float *center = t->center;
+       const float *center;
 
        /* local constraint shouldn't alter center */
-       if (around == V3D_LOCAL) {
-               if (    (t->flag & (T_OBJECT | T_POSE)) ||
-                       (t->settings->selectmode & (SCE_SELECT_EDGE | SCE_SELECT_FACE)) ||
-                       (t->obedit && t->obedit->type == OB_ARMATURE))
-               {
-                       center = td->center;
-               }
-
-               if (t->options & CTX_MOVIECLIP) {
-                       center = td->center;
-               }
+       if (transdata_check_local_center(t) ||
+           ((around == V3D_LOCAL) && (t->options & CTX_MOVIECLIP)))
+       {
+               center = td->center;
+       }
+       else {
+               center = t->center;
        }
 
        if (t->flag & T_POINTS) {
@@ -3651,17 +3683,17 @@ int Rotation(TransInfo *t, const int UNUSED(mval[2]))
                
                outputNumInput(&(t->num), c);
                
-               spos += sprintf(spos, "Rot: %s %s %s", &c[0], t->con.text, t->proptext);
+               spos += sprintf(spos, IFACE_("Rot: %s %s %s"), &c[0], t->con.text, t->proptext);
 
                /* Clamp between -180 and 180 */
                final = angle_wrap_rad(DEG2RADF(final));
        }
        else {
-               spos += sprintf(spos, "Rot: %.2f%s %s", RAD2DEGF(final), t->con.text, t->proptext);
+               spos += sprintf(spos, IFACE_("Rot: %.2f%s %s"), RAD2DEGF(final), t->con.text, t->proptext);
        }
        
        if (t->flag & (T_PROP_EDIT | T_PROP_CONNECTED)) {
-               spos += sprintf(spos, " Proportional size: %.2f", t->prop_size);
+               spos += sprintf(spos, IFACE_(" Proportional size: %.2f"), t->prop_size);
        }
        (void)spos;
 
@@ -3750,17 +3782,17 @@ int Trackball(TransInfo *t, const int UNUSED(mval[2]))
 
                outputNumInput(&(t->num), c);
 
-               spos += sprintf(spos, "Trackball: %s %s %s", &c[0], &c[NUM_STR_REP_LEN], t->proptext);
+               spos += sprintf(spos, IFACE_("Trackball: %s %s %s"), &c[0], &c[NUM_STR_REP_LEN], t->proptext);
 
                phi[0] = DEG2RADF(phi[0]);
                phi[1] = DEG2RADF(phi[1]);
        }
        else {
-               spos += sprintf(spos, "Trackball: %.2f %.2f %s", RAD2DEGF(phi[0]), RAD2DEGF(phi[1]), t->proptext);
+               spos += sprintf(spos, IFACE_("Trackball: %.2f %.2f %s"), RAD2DEGF(phi[0]), RAD2DEGF(phi[1]), t->proptext);
        }
 
        if (t->flag & (T_PROP_EDIT | T_PROP_CONNECTED)) {
-               spos += sprintf(spos, " Proportional size: %.2f", t->prop_size);
+               spos += sprintf(spos, IFACE_(" Proportional size: %.2f"), t->prop_size);
        }
        (void)spos;
 
@@ -3871,7 +3903,7 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str)
                short chainlen = t->settings->autoik_chainlen;
 
                if (chainlen)
-                       sprintf(autoik, "AutoIK-Len: %d", chainlen);
+                       sprintf(autoik, IFACE_("AutoIK-Len: %d"), chainlen);
                else
                        autoik[0] = '\0';
        }
@@ -3904,7 +3936,7 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str)
        }
        
        if (t->flag & (T_PROP_EDIT | T_PROP_CONNECTED)) {
-               spos += sprintf(spos, " Proportional size: %.2f", t->prop_size);
+               spos += sprintf(spos, IFACE_(" Proportional size: %.2f"), t->prop_size);
        }
        (void)spos;
 }
@@ -4054,7 +4086,8 @@ int ShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
 {
        float distance;
        int i;
-       char str[64];
+       char str[128];
+       char *str_p;
        TransData *td = t->data;
 
        distance = -t->values[0];
@@ -4064,17 +4097,33 @@ int ShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
        applyNumInput(&t->num, &distance);
 
        /* header print for NumInput */
+       str_p = str;
+       str_p += BLI_snprintf(str_p, sizeof(str), IFACE_("Shrink/Fatten:"));
        if (hasNumInput(&t->num)) {
                char c[NUM_STR_REP_LEN];
-
                outputNumInput(&(t->num), c);
-
-               sprintf(str, "Shrink/Fatten: %s %s", c, t->proptext);
+               str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), " %s", c);
        }
        else {
                /* default header print */
-               sprintf(str, "Shrink/Fatten: %.4f %s", distance, t->proptext);
+               str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), " %.4f", distance);
+       }
+
+       if (t->proptext[0]) {
+               str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), " %s", t->proptext);
        }
+       str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), ", (");
+
+       {
+               wmKeyMapItem *kmi = WM_modalkeymap_find_propvalue(t->keymap, TFM_MODAL_RESIZE);
+               if (kmi) {
+                       str_p += WM_keymap_item_to_string(kmi, str_p, sizeof(str) - (str_p - str));
+               }
+       }
+       str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), IFACE_(" or Alt) Even Thickness %s"),
+                             (t->flag & T_ALT_TRANSFORM) ? IFACE_("ON") : IFACE_("OFF"));
+       /* done with header string */
+
 
        t->values[0] = -distance;
 
@@ -4143,7 +4192,7 @@ int Tilt(TransInfo *t, const int UNUSED(mval[2]))
 
                outputNumInput(&(t->num), c);
 
-               sprintf(str, "Tilt: %s° %s", &c[0], t->proptext);
+               sprintf(str, IFACE_("Tilt: %s° %s"), &c[0], t->proptext);
 
                final = DEG2RADF(final);
 
@@ -4151,7 +4200,7 @@ int Tilt(TransInfo *t, const int UNUSED(mval[2]))
                t->values[0] = final;
        }
        else {
-               sprintf(str, "Tilt: %.2f° %s", RAD2DEGF(final), t->proptext);
+               sprintf(str, IFACE_("Tilt: %.2f° %s"), RAD2DEGF(final), t->proptext);
        }
 
        for (i = 0; i < t->total; i++, td++) {
@@ -4215,10 +4264,10 @@ int CurveShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
                char c[NUM_STR_REP_LEN];
 
                outputNumInput(&(t->num), c);
-               sprintf(str, "Shrink/Fatten: %s", c);
+               sprintf(str, IFACE_("Shrink/Fatten: %s"), c);
        }
        else {
-               sprintf(str, "Shrink/Fatten: %3f", ratio);
+               sprintf(str, IFACE_("Shrink/Fatten: %3f"), ratio);
        }
 
        for (i = 0; i < t->total; i++, td++) {
@@ -4283,10 +4332,10 @@ int MaskShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
                char c[NUM_STR_REP_LEN];
 
                outputNumInput(&(t->num), c);
-               sprintf(str, "Feather Shrink/Fatten: %s", c);
+               sprintf(str, IFACE_("Feather Shrink/Fatten: %s"), c);
        }
        else {
-               sprintf(str, "Feather Shrink/Fatten: %3f", ratio);
+               sprintf(str, IFACE_("Feather Shrink/Fatten: %3f"), ratio);
        }
 
        /* detect if no points have feather yet */
@@ -4371,11 +4420,11 @@ int PushPull(TransInfo *t, const int UNUSED(mval[2]))
 
                outputNumInput(&(t->num), c);
 
-               sprintf(str, "Push/Pull: %s%s %s", c, t->con.text, t->proptext);
+               sprintf(str, IFACE_("Push/Pull: %s%s %s"), c, t->con.text, t->proptext);
        }
        else {
                /* default header print */
-               sprintf(str, "Push/Pull: %.4f%s %s", distance, t->con.text, t->proptext);
+               sprintf(str, IFACE_("Push/Pull: %.4f%s %s"), distance, t->con.text, t->proptext);
        }
 
        t->values[0] = distance;
@@ -4492,7 +4541,7 @@ int Bevel(TransInfo *t, const int UNUSED(mval[2]))
        const char *mode;
        TransData *td = t->data;
 
-       mode = (G.editBMesh->options & BME_BEVEL_VERT) ? "verts only" : "normal";
+       mode = (G.editBMesh->options & BME_BEVEL_VERT) ? IFACE_("verts only") : IFACE_("normal");
        distance = t->values[0] / 4; /* 4 just seemed a nice value to me, nothing special */
 
        distance = fabs(distance);
@@ -4507,11 +4556,11 @@ int Bevel(TransInfo *t, const int UNUSED(mval[2]))
 
                outputNumInput(&(t->num), c);
 
-               sprintf(str, "Bevel - Dist: %s, Mode: %s (MMB to toggle))", c, mode);
+               sprintf(str, IFACE_("Bevel - Dist: %s, Mode: %s (MMB to toggle))"), c, mode);
        }
        else {
                /* default header print */
-               sprintf(str, "Bevel - Dist: %.4f, Mode: %s (MMB to toggle))", distance, mode);
+               sprintf(str, IFACE_("Bevel - Dist: %.4f, Mode: %s (MMB to toggle))"), distance, mode);
        }
 
        if (distance < 0) distance = -distance;
@@ -4575,16 +4624,16 @@ int BevelWeight(TransInfo *t, const int UNUSED(mval[2]))
                outputNumInput(&(t->num), c);
 
                if (weight >= 0.0f)
-                       sprintf(str, "Bevel Weight: +%s %s", c, t->proptext);
+                       sprintf(str, IFACE_("Bevel Weight: +%s %s"), c, t->proptext);
                else
-                       sprintf(str, "Bevel Weight: %s %s", c, t->proptext);
+                       sprintf(str, IFACE_("Bevel Weight: %s %s"), c, t->proptext);
        }
        else {
                /* default header print */
                if (weight >= 0.0f)
-                       sprintf(str, "Bevel Weight: +%.3f %s", weight, t->proptext);
+                       sprintf(str, IFACE_("Bevel Weight: +%.3f %s"), weight, t->proptext);
                else
-                       sprintf(str, "Bevel Weight: %.3f %s", weight, t->proptext);
+                       sprintf(str, IFACE_("Bevel Weight: %.3f %s"), weight, t->proptext);
        }
 
        for (i = 0; i < t->total; i++, td++) {
@@ -4648,16 +4697,16 @@ int Crease(TransInfo *t, const int UNUSED(mval[2]))
                outputNumInput(&(t->num), c);
 
                if (crease >= 0.0f)
-                       sprintf(str, "Crease: +%s %s", c, t->proptext);
+                       sprintf(str, IFACE_("Crease: +%s %s"), c, t->proptext);
                else
-                       sprintf(str, "Crease: %s %s", c, t->proptext);
+                       sprintf(str, IFACE_("Crease: %s %s"), c, t->proptext);
        }
        else {
                /* default header print */
                if (crease >= 0.0f)
-                       sprintf(str, "Crease: +%.3f %s", crease, t->proptext);
+                       sprintf(str, IFACE_("Crease: +%.3f %s"), crease, t->proptext);
                else
-                       sprintf(str, "Crease: %.3f %s", crease, t->proptext);
+                       sprintf(str, IFACE_("Crease: %.3f %s"), crease, t->proptext);
        }
 
        for (i = 0; i < t->total; i++, td++) {
@@ -4716,14 +4765,14 @@ static void headerBoneSize(TransInfo *t, float vec[3], char *str)
        /* hmm... perhaps the y-axis values don't need to be shown? */
        if (t->con.mode & CON_APPLY) {
                if (t->num.idx_max == 0)
-                       sprintf(str, "ScaleB: %s%s %s", &tvec[0], t->con.text, t->proptext);
+                       sprintf(str, IFACE_("ScaleB: %s%s %s"), &tvec[0], t->con.text, t->proptext);
                else
-                       sprintf(str, "ScaleB: %s : %s : %s%s %s", &tvec[0], &tvec[NUM_STR_REP_LEN], &tvec[NUM_STR_REP_LEN * 2],
-                               t->con.text, t->proptext);
+                       sprintf(str, IFACE_("ScaleB: %s : %s : %s%s %s"), &tvec[0], &tvec[NUM_STR_REP_LEN],
+                               &tvec[NUM_STR_REP_LEN * 2], t->con.text, t->proptext);
        }
        else {
-               sprintf(str, "ScaleB X: %s  Y: %s  Z: %s%s %s", &tvec[0], &tvec[NUM_STR_REP_LEN], &tvec[NUM_STR_REP_LEN * 2],
-                       t->con.text, t->proptext);
+               sprintf(str, IFACE_("ScaleB X: %s  Y: %s  Z: %s%s %s"), &tvec[0], &tvec[NUM_STR_REP_LEN],
+                       &tvec[NUM_STR_REP_LEN * 2], t->con.text, t->proptext);
        }
 }
 
@@ -4839,10 +4888,10 @@ int BoneEnvelope(TransInfo *t, const int UNUSED(mval[2]))
                char c[NUM_STR_REP_LEN];
                
                outputNumInput(&(t->num), c);
-               sprintf(str, "Envelope: %s", c);
+               sprintf(str, IFACE_("Envelope: %s"), c);
        }
        else {
-               sprintf(str, "Envelope: %3f", ratio);
+               sprintf(str, IFACE_("Envelope: %3f"), ratio);
        }
        
        for (i = 0; i < t->total; i++, td++) {
@@ -4889,6 +4938,45 @@ static void len_v3_ensure(float v[3], const float length)
        mul_v3_fl(v, length);
 }
 
+/**
+ * Find the closest point on the ngon on the opposite side.
+ * used to set the edge slide distance for ngons.
+ */
+static bool bm_loop_calc_opposite_co(BMLoop *l_tmp,
+                                     const float plane_no[3],
+                                     float r_co[3])
+{
+       /* skip adjacent edges */
+       BMLoop *l_first = l_tmp->next;
+       BMLoop *l_last  = l_tmp->prev;
+       BMLoop *l_iter;
+       float dist = FLT_MAX;
+
+       l_iter = l_first;
+       do {
+               float tvec[3];
+               if (isect_line_plane_v3(tvec,
+                                       l_iter->v->co, l_iter->next->v->co,
+                                       l_tmp->v->co, plane_no, false))
+               {
+                       const float fac = line_point_factor_v3(tvec, l_iter->v->co, l_iter->next->v->co);
+                       /* allow some overlap to avoid missing the intersection because of float precision */
+                       if ((fac > -FLT_EPSILON) && (fac < 1.0f + FLT_EPSILON)) {
+                               /* likelyhood of multiple intersections per ngon is quite low,
+                                * it would have to loop back on its self, but better support it
+                                * so check for the closest opposite edge */
+                               const float tdist = len_v3v3(l_tmp->v->co, tvec);
+                               if (tdist < dist) {
+                                       copy_v3_v3(r_co, tvec);
+                                       dist = tdist;
+                               }
+                       }
+               }
+       } while ((l_iter = l_iter->next) != l_last);
+
+       return (dist != FLT_MAX);
+}
+
 /**
  * Given 2 edges and a loop, step over the loops
  * and calculate a direction to slide along.
@@ -4919,21 +5007,39 @@ static BMLoop *get_next_loop(BMVert *v, BMLoop *l,
                        else {
                                /* When there is no edge to slide along,
                                 * we must slide along the vector defined by the face we're attach to */
-                               float e_dir_prev[3], e_dir_next[3], tvec[3];
+                               BMLoop *l_tmp = BM_face_vert_share_loop(l_first->f, v);
 
-                               sub_v3_v3v3(e_dir_prev, BM_edge_other_vert(e_prev, v)->co, v->co);
-                               sub_v3_v3v3(e_dir_next, BM_edge_other_vert(e_next, v)->co, v->co);
+                               BLI_assert(ELEM(l_tmp->e, e_prev, e_next) && ELEM(l_tmp->prev->e, e_prev, e_next));
 
-                               cross_v3_v3v3(tvec, l->f->no, e_dir_prev);
-                               cross_v3_v3v3(vec_accum, e_dir_next, l->f->no);
+                               if (l_tmp->f->len == 4) {
+                                       /* we could use code below, but in this case
+                                        * sliding diagonally across the quad works well */
+                                       sub_v3_v3v3(vec_accum, l_tmp->next->next->v->co, v->co);
+                               }
+                               else {
+                                       float tdir[3];
+                                       BM_loop_calc_face_direction(l_tmp, tdir);
+                                       cross_v3_v3v3(vec_accum, l_tmp->f->no, tdir);
+#if 0
+                                       /* rough guess, we can  do better! */
+                                       len_v3_ensure(vec_accum, (BM_edge_calc_length(e_prev) + BM_edge_calc_length(e_next)) / 2.0f);
+#else
+                                       /* be clever, check the opposite ngon edge to slide into.
+                                        * this gives best results */
+                                       {
+                                               float tvec[3];
+                                               float dist;
 
-                               mid_v3_v3v3(vec_accum, vec_accum, tvec);
+                                               if (bm_loop_calc_opposite_co(l_tmp, tdir, tvec)) {
+                                                       dist = len_v3v3(l_tmp->v->co, tvec);
+                                               }
+                                               else {
+                                                       dist = (BM_edge_calc_length(e_prev) + BM_edge_calc_length(e_next)) / 2.0f;
+                                               }
 
-                               /* check if we need to flip
-                                * (compare the normal defines by the edges with the face normal) */
-                               cross_v3_v3v3(tvec, e_dir_prev, e_dir_next);
-                               if (dot_v3v3(tvec, l->f->no) > 0.0f) {
-                                       negate_v3(vec_accum);
+                                               len_v3_ensure(vec_accum, dist);
+                                       }
+#endif
                                }
                        }
 
@@ -5025,6 +5131,7 @@ static int createEdgeSlideVerts(TransInfo *t)
        BMEdge *e, *e1;
        BMVert *v, *v2;
        TransDataEdgeSlideVert *sv_array;
+       int sv_tot;
        BMBVHTree *btree;
        SmallHash table;
        EdgeSlideData *sld = MEM_callocN(sizeof(*sld), "sld");
@@ -5124,10 +5231,10 @@ static int createEdgeSlideVerts(TransInfo *t)
                return 0;
        }
 
-       sv_array = MEM_callocN(sizeof(TransDataEdgeSlideVert) * j, "sv_array");
+       sv_tot = j;
+       sv_array = MEM_callocN(sizeof(TransDataEdgeSlideVert) * sv_tot, "sv_array");
        loop_nr = 0;
 
-       j = 0;
        while (1) {
                BMLoop *l, *l1, *l2;
                BMVert *v_first;
@@ -5187,10 +5294,11 @@ static int createEdgeSlideVerts(TransInfo *t)
                /*iterate over the loop*/
                v_first = v;
                do {
-                       TransDataEdgeSlideVert *sv = sv_array + j;
-
-                       BLI_assert(j < MEM_allocN_len(sv_array) / sizeof(*sv));
+                       TransDataEdgeSlideVert *sv;
 
+                       /* XXX, 'sv' will initialize multiple times, this is suspicious. see [#34024] */
+                       BLI_assert(BLI_smallhash_haskey(&table, (uintptr_t)v) != false);
+                       sv = sv_array + GET_INT_FROM_POINTER(BLI_smallhash_lookup(&table, (uintptr_t)v));
                        sv->v = v;
                        sv->origvert = *v;
                        sv->loop_nr = loop_nr;
@@ -5212,11 +5320,8 @@ static int createEdgeSlideVerts(TransInfo *t)
                        e1 = e;
                        e = get_other_edge(v, e);
                        if (!e) {
-                               //v2=v, v = BM_edge_other_vert(l1->e, v);
-
-                               BLI_assert(j + 1 < MEM_allocN_len(sv_array) / sizeof(*sv));
-
-                               sv = sv_array + j + 1;
+                               BLI_assert(BLI_smallhash_haskey(&table, (uintptr_t)v) != false);
+                               sv = sv_array + GET_INT_FROM_POINTER(BLI_smallhash_lookup(&table, (uintptr_t)v));
                                sv->v = v;
                                sv->origvert = *v;
                                sv->loop_nr = loop_nr;
@@ -5233,15 +5338,18 @@ static int createEdgeSlideVerts(TransInfo *t)
 
                                BM_elem_flag_disable(v, BM_ELEM_TAG);
                                BM_elem_flag_disable(v2, BM_ELEM_TAG);
-                               
-                               j += 2;
+
                                break;
                        }
 
                        l1 = get_next_loop(v, l1, e1, e, vec);
                        l2 = l2 ? get_next_loop(v, l2, e1, e, vec2) : NULL;
 
-                       j += 1;
+                       if (UNLIKELY(l1 == NULL && l2 != NULL)) {
+                               l1 = l2;
+                               l2 = NULL;
+                               swap_v3_v3(vec, vec2);
+                       }
 
                        BM_elem_flag_disable(v, BM_ELEM_TAG);
                        BM_elem_flag_disable(v2, BM_ELEM_TAG);
@@ -5253,7 +5361,7 @@ static int createEdgeSlideVerts(TransInfo *t)
        /* EDBM_flag_disable_all(em, BM_ELEM_SELECT); */
 
        sld->sv = sv_array;
-       sld->totsv = j;
+       sld->totsv = sv_tot;
        
        /* find mouse vectors, the global one, and one per loop in case we have
         * multiple loops selected, in case they are oriented different */
@@ -5284,6 +5392,7 @@ static int createEdgeSlideVerts(TransInfo *t)
                                                continue;
                                        }
 
+                                       BLI_assert(BLI_smallhash_haskey(&table, (uintptr_t)v) != false);
                                        j = GET_INT_FROM_POINTER(BLI_smallhash_lookup(&table, (uintptr_t)v));
 
                                        if (sv_array[j].down) {
@@ -5628,7 +5737,7 @@ void initEdgeSlide(TransInfo *t)
 
        /* set custom point first if you want value to be initialized by init */
        setCustomPoints(t, &t->mouse, sld->end, sld->start);
-       initMouseInputMode(t, &t->mouse, INPUT_CUSTOM_RATIO);
+       initMouseInputMode(t, &t->mouse, INPUT_CUSTOM_RATIO_FLIP);
        
        t->idx_max = 0;
        t->num.idx_max = 0;
@@ -5844,12 +5953,12 @@ int EdgeSlide(TransInfo *t, const int UNUSED(mval[2]))
 
                outputNumInput(&(t->num), c);
 
-               BLI_snprintf(str, sizeof(str), "Edge Slide: %s (E)ven: %s, (F)lipped: %s",
-                            &c[0], !is_proportional ? "ON" : "OFF", flipped ? "ON" : "OFF");
+               BLI_snprintf(str, sizeof(str), IFACE_("Edge Slide: %s (E)ven: %s, (F)lipped: %s"),
+                            &c[0], !is_proportional ? IFACE_("ON") : IFACE_("OFF"), flipped ? IFACE_("ON") : IFACE_("OFF"));
        }
        else {
-               BLI_snprintf(str, sizeof(str), "Edge Slide: %.2f (E)ven: %s, (F)lipped: %s",
-                            final, !is_proportional ? "ON" : "OFF", flipped ? "ON" : "OFF");
+               BLI_snprintf(str, sizeof(str), IFACE_("Edge Slide: %.4f (E)ven: %s, (F)lipped: %s"),
+                            final, !is_proportional ? IFACE_("ON") : IFACE_("OFF"), flipped ? IFACE_("ON") : IFACE_("OFF"));
        }
 
        CLAMP(final, -1.0f, 1.0f);
@@ -5860,7 +5969,7 @@ int EdgeSlide(TransInfo *t, const int UNUSED(mval[2]))
        if (t->customData)
                doEdgeSlide(t, final);
        else {
-               strcpy(str, "Invalid Edge Selection");
+               strcpy(str, IFACE_("Invalid Edge Selection"));
                t->state = TRANS_CANCEL;
        }
 
@@ -5879,19 +5988,14 @@ static void calcVertSlideCustomPoints(struct TransInfo *t)
        TransDataVertSlideVert *sv = &sld->sv[sld->curr_sv_index];
        float *co_orig = sv->co_orig_2d;
        float *co_curr = sv->co_link_orig_2d[sv->co_link_curr];
-       float  co_curr_flip[2];
+       const int start[2] = {co_orig[0], co_orig[1]};
+       const int end[2]   = {co_curr[0], co_curr[1]};
 
-       flip_v2_v2v2(co_curr_flip, co_orig, co_curr);
-
-       {
-               const int start[2] = {co_orig[0], co_orig[1]};
-               const int end[2]   = {co_curr_flip[0], co_curr_flip[1]};
-               if (!sld->flipped_vtx) {
-                       setCustomPoints(t, &t->mouse, end, start);
-               }
-               else {
-                       setCustomPoints(t, &t->mouse, start, end);
-               }
+       if (sld->flipped_vtx && sld->is_proportional == false) {
+               setCustomPoints(t, &t->mouse, start, end);
+       }
+       else {
+               setCustomPoints(t, &t->mouse, end, start);
        }
 }
 
@@ -5977,7 +6081,7 @@ static int createVertSlideVerts(TransInfo *t)
        if (t->spacetype == SPACE_VIEW3D) {
                /* background mode support */
 //             v3d = t->sa ? t->sa->spacedata.first : NULL;
-               rv3d = t->ar ? t->ar->regiondata : NULL;
+               rv3d = ar ? ar->regiondata : NULL;
        }
 
        sld->is_proportional = true;
@@ -6043,18 +6147,30 @@ static int createVertSlideVerts(TransInfo *t)
                                if (!BM_elem_flag_test(e, BM_ELEM_HIDDEN)) {
                                        BMVert *v_other = BM_edge_other_vert(e, v);
                                        copy_v3_v3(sv_array[j].co_link_orig_3d[k], v_other->co);
-                                       ED_view3d_project_float_v2_m4(ar,
-                                                                     sv_array[j].co_link_orig_3d[k],
-                                                                     sv_array[j].co_link_orig_2d[k],
-                                                                     projectMat);
+                                       if (ar) {
+                                               ED_view3d_project_float_v2_m4(ar,
+                                                                             sv_array[j].co_link_orig_3d[k],
+                                                                             sv_array[j].co_link_orig_2d[k],
+                                                                             projectMat);
+                                       }
+                                       else {
+                                               copy_v2_v2(sv_array[j].co_link_orig_2d[k],
+                                                          sv_array[j].co_link_orig_3d[k]);
+                                       }
                                        k++;
                                }
                        }
 
-                       ED_view3d_project_float_v2_m4(ar,
-                                                     sv_array[j].co_orig_3d,
-                                                     sv_array[j].co_orig_2d,
-                                                     projectMat);
+                       if (ar) {
+                               ED_view3d_project_float_v2_m4(ar,
+                                                             sv_array[j].co_orig_3d,
+                                                             sv_array[j].co_orig_2d,
+                                                             projectMat);
+                       }
+                       else {
+                               copy_v2_v2(sv_array[j].co_orig_2d,
+                                          sv_array[j].co_orig_3d);
+                       }
 
                        j++;
                }
@@ -6147,16 +6263,27 @@ int handleEventVertSlide(struct TransInfo *t, struct wmEvent *event)
                                case EKEY:
                                        if (event->val == KM_PRESS) {
                                                sld->is_proportional = !sld->is_proportional;
+                                               if (sld->flipped_vtx) {
+                                                       calcVertSlideCustomPoints(t);
+                                               }
                                                return 1;
                                        }
                                        break;
                                case FKEY:
                                {
                                        if (event->val == KM_PRESS) {
-                                               if (sld->is_proportional == FALSE) {
-                                                       sld->flipped_vtx = !sld->flipped_vtx;
-                                                       calcVertSlideCustomPoints(t);
-                                               }
+                                               sld->flipped_vtx = !sld->flipped_vtx;
+                                               calcVertSlideCustomPoints(t);
+                                               return 1;
+                                       }
+                                       break;
+                               }
+                               case CKEY:
+                               {
+                                       /* use like a modifier key */
+                                       if (event->val == KM_PRESS) {
+                                               t->flag ^= T_ALT_TRANSFORM;
+                                               calcVertSlideCustomPoints(t);
                                                return 1;
                                        }
                                        break;
@@ -6181,7 +6308,8 @@ int handleEventVertSlide(struct TransInfo *t, struct wmEvent *event)
                                case MOUSEMOVE:
                                {
                                        /* don't recalculat the best edge */
-                                       if (!(t->flag & T_ALT_TRANSFORM)) {
+                                       const bool is_clamp = !(t->flag & T_ALT_TRANSFORM);
+                                       if (is_clamp) {
                                                calcVertSlideMouseActiveEdges(t, event->mval);
                                        }
                                        calcVertSlideCustomPoints(t);
@@ -6206,8 +6334,8 @@ static void drawVertSlide(const struct bContext *C, TransInfo *t)
                        const float ctrl_size = UI_GetThemeValuef(TH_FACEDOT_SIZE) + 1.5f;
                        const float line_size = UI_GetThemeValuef(TH_OUTLINE_WIDTH) + 0.5f;
                        const int alpha_shade = -30;
+                       const bool is_clamp = !(t->flag & T_ALT_TRANSFORM);
                        int i;
-                       bool is_constrained = !(t->flag & T_ALT_TRANSFORM);
 
                        if (v3d && v3d->zbuf)
                                glDisable(GL_DEPTH_TEST);
@@ -6223,7 +6351,7 @@ static void drawVertSlide(const struct bContext *C, TransInfo *t)
                        glLineWidth(line_size);
                        UI_ThemeColorShadeAlpha(TH_EDGE_SELECT, 80, alpha_shade);
                        glBegin(GL_LINES);
-                       if (is_constrained) {
+                       if (is_clamp) {
                                sv = sld->sv;
                                for (i = 0; i < sld->totsv; i++, sv++) {
                                        glVertex3fv(sv->co_orig_3d);
@@ -6311,11 +6439,13 @@ static int doVertSlide(TransInfo *t, float perc)
 int VertSlide(TransInfo *t, const int UNUSED(mval[2]))
 {
        char str[128];
+       char *str_p;
        float final;
        VertSlideData *sld =  t->customData;
        const bool flipped = sld->flipped_vtx;
        const bool is_proportional = sld->is_proportional;
-       const bool is_constrained = !((t->flag & T_ALT_TRANSFORM) || hasNumInput(&t->num));
+       const bool is_clamp = !(t->flag & T_ALT_TRANSFORM);
+       const bool is_constrained = !(is_clamp == false || hasNumInput(&t->num));
 
        final = t->values[0];
 
@@ -6326,32 +6456,34 @@ int VertSlide(TransInfo *t, const int UNUSED(mval[2]))
                CLAMP(final, 0.0f, 1.0f);
        }
 
+       /* header string */
+       str_p = str;
+       str_p += BLI_snprintf(str_p, sizeof(str), IFACE_("Vert Slide: "));
        if (hasNumInput(&t->num)) {
                char c[NUM_STR_REP_LEN];
-
                applyNumInput(&t->num, &final);
-
                outputNumInput(&(t->num), c);
-
-               BLI_snprintf(str, sizeof(str), "Vert Slide: %s (E)ven: %s, (F)lipped: %s, Alt Hold: %s",
-                            &c[0], !is_proportional ? "ON" : "OFF", flipped ? "ON" : "OFF", (t->flag & T_ALT_TRANSFORM) ? "ON" : "OFF");
+               str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), "%s", &c[0]);
        }
        else {
-               BLI_snprintf(str, sizeof(str), "Vert Slide: %.2f (E)ven: %s, (F)lipped: %s, Alt Hold: %s",
-                            final, !is_proportional ? "ON" : "OFF", flipped ? "ON" : "OFF", (t->flag & T_ALT_TRANSFORM) ? "ON" : "OFF");
+               str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), "%.4f ", final);
        }
-
-       if (is_constrained) {
-               CLAMP(final, 0.0f, 1.0f);
+       str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), IFACE_("(E)ven: %s, "),
+                             !is_proportional ? IFACE_("ON") : IFACE_("OFF"));
+       if (!is_proportional) {
+               str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), IFACE_("(F)lipped: %s, "),
+                                     flipped ? IFACE_("ON") : IFACE_("OFF"));
        }
-
-       t->values[0] = final;
+       str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), IFACE_("Alt or (C)lamp: %s"),
+                             is_clamp ? IFACE_("ON") : IFACE_("OFF"));
+       /* done with header string */
 
        /*do stuff here*/
-       if (t->customData)
+       if (t->customData) {
                doVertSlide(t, final);
+       }
        else {
-               strcpy(str, "Invalid Vert Selection");
+               strcpy(str, IFACE_("Invalid Vert Selection"));
                t->state = TRANS_CANCEL;
        }
 
@@ -6402,12 +6534,12 @@ int BoneRoll(TransInfo *t, const int UNUSED(mval[2]))
 
                outputNumInput(&(t->num), c);
 
-               sprintf(str, "Roll: %s", &c[0]);
+               sprintf(str, IFACE_("Roll: %s"), &c[0]);
 
                final = DEG2RADF(final);
        }
        else {
-               sprintf(str, "Roll: %.2f", RAD2DEGF(final));
+               sprintf(str, IFACE_("Roll: %.2f"), RAD2DEGF(final));
        }
 
        /* set roll values */
@@ -6473,16 +6605,16 @@ int BakeTime(TransInfo *t, const int mval[2])
                outputNumInput(&(t->num), c);
 
                if (time >= 0.0f)
-                       sprintf(str, "Time: +%s %s", c, t->proptext);
+                       sprintf(str, IFACE_("Time: +%s %s"), c, t->proptext);
                else
-                       sprintf(str, "Time: %s %s", c, t->proptext);
+                       sprintf(str, IFACE_("Time: %s %s"), c, t->proptext);
        }
        else {
                /* default header print */
                if (time >= 0.0f)
-                       sprintf(str, "Time: +%.3f %s", time, t->proptext);
+                       sprintf(str, IFACE_("Time: +%.3f %s"), time, t->proptext);
                else
-                       sprintf(str, "Time: %.3f %s", time, t->proptext);
+                       sprintf(str, IFACE_("Time: %.3f %s"), time, t->proptext);
        }
 
        for (i = 0; i < t->total; i++, td++) {
@@ -6542,7 +6674,7 @@ int Mirror(TransInfo *t, const int UNUSED(mval[2]))
                        t->con.applySize(t, NULL, mat);
                }
 
-               sprintf(str, "Mirror%s", t->con.text);
+               sprintf(str, IFACE_("Mirror%s"), t->con.text);
 
                for (i = 0, td = t->data; i < t->total; i++, td++) {
                        if (td->flag & TD_NOACTION)
@@ -6576,9 +6708,9 @@ int Mirror(TransInfo *t, const int UNUSED(mval[2]))
                recalcData(t);
 
                if (t->flag & T_2D_EDIT)
-                       ED_area_headerprint(t->sa, "Select a mirror axis (X, Y)");
+                       ED_area_headerprint(t->sa, IFACE_("Select a mirror axis (X, Y)"));
                else
-                       ED_area_headerprint(t->sa, "Select a mirror axis (X, Y, Z)");
+                       ED_area_headerprint(t->sa, IFACE_("Select a mirror axis (X, Y, Z)"));
        }
 
        return 1;
@@ -6635,7 +6767,7 @@ int Align(TransInfo *t, const int UNUSED(mval[2]))
 
        recalcData(t);
 
-       ED_area_headerprint(t->sa, "Align");
+       ED_area_headerprint(t->sa, IFACE_("Align"));
 
        return 1;
 }
@@ -6659,9 +6791,10 @@ void initSeqSlide(TransInfo *t)
        t->num.increment = t->snap[1];
 }
 
-static void headerSeqSlide(TransInfo *t, float val[2], char *str)
+static void headerSeqSlide(TransInfo *t, float val[2], char *str, size_t str_len)
 {
        char tvec[NUM_STR_REP_LEN * 3];
+       char *str_p;
 
        if (hasNumInput(&t->num)) {
                outputNumInput(&(t->num), tvec);
@@ -6670,7 +6803,17 @@ static void headerSeqSlide(TransInfo *t, float val[2], char *str)
                sprintf(&tvec[0], "%.0f, %.0f", val[0], val[1]);
        }
 
-       sprintf(str, "Sequence Slide: %s%s", &tvec[0], t->con.text);
+       str_p = str;
+       str_p += BLI_snprintf(str, str_len, IFACE_("Sequence Slide: %s%s, ("), &tvec[0], t->con.text);
+
+       {
+               wmKeyMapItem *kmi = WM_modalkeymap_find_propvalue(t->keymap, TFM_MODAL_TRANSLATE);
+               if (kmi) {
+                       str_p += WM_keymap_item_to_string(kmi, str_p, str_len - (str_p - str));
+               }
+       }
+       str_p += BLI_snprintf(str_p, str_len - (str_p - str), IFACE_(" or Alt) Expand to fit %s"),
+                             (t->flag & T_ALT_TRANSFORM) ? IFACE_("ON") : IFACE_("OFF"));
 }
 
 static void applySeqSlide(TransInfo *t, float val[2])
@@ -6714,7 +6857,7 @@ int SeqSlide(TransInfo *t, const int UNUSED(mval[2]))
        t->values[0] = floor(t->values[0] + 0.5f);
        t->values[1] = floor(t->values[1] + 0.5f);
 
-       headerSeqSlide(t, t->values, str);
+       headerSeqSlide(t, t->values, str, sizeof(str));
        applySeqSlide(t, t->values);
 
        recalcData(t);
@@ -6935,7 +7078,7 @@ static void headerTimeTranslate(TransInfo *t, char *str)
                        sprintf(&tvec[0], "%.4f", val);
        }
 
-       sprintf(str, "DeltaX: %s", &tvec[0]);
+       sprintf(str, IFACE_("DeltaX: %s"), &tvec[0]);
 }
 
 static void applyTimeTranslate(TransInfo *t, float UNUSED(sval))
@@ -7076,7 +7219,7 @@ static void headerTimeSlide(TransInfo *t, float sval, char *str)
                sprintf(&tvec[0], "%.4f", val);
        }
 
-       sprintf(str, "TimeSlide: %s", &tvec[0]);
+       sprintf(str, IFACE_("TimeSlide: %s"), &tvec[0]);
 }
 
 static void applyTimeSlide(TransInfo *t, float sval)
@@ -7208,7 +7351,7 @@ static void headerTimeScale(TransInfo *t, char *str)
        else
                sprintf(&tvec[0], "%.4f", t->values[0]);
 
-       sprintf(str, "ScaleX: %s", &tvec[0]);
+       sprintf(str, IFACE_("ScaleX: %s"), &tvec[0]);
 }
 
 static void applyTimeScale(TransInfo *t)
@@ -7277,3 +7420,10 @@ void BIF_TransformSetUndo(const char *UNUSED(str))
        // TRANSFORM_FIX_ME
        //Trans.undostr = str;
 }
+
+
+/* TODO, move to: transform_queries.c */
+bool checkUseLocalCenter_GraphEdit(TransInfo *t)
+{
+       return ((t->around == V3D_LOCAL) && !ELEM3(t->mode, TFM_TRANSLATION, TFM_TIME_TRANSLATE, TFM_TIME_SLIDE));
+}