diff options
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_smart_stitch.c | 17 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_unwrap_ops.c | 9 |
2 files changed, 17 insertions, 9 deletions
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index 20a8ab5c98c..59442e89787 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -46,6 +46,8 @@ #include "BLI_math_vector.h" #include "BLI_string.h" +#include "BLT_translation.h" + #include "BIF_gl.h" #include "BKE_context.h" @@ -54,6 +56,8 @@ #include "BKE_mesh_mapping.h" #include "BKE_editmesh.h" +#include "UI_interface.h" + #include "ED_mesh.h" #include "ED_uvedit.h" #include "ED_screen.h" @@ -259,25 +263,24 @@ static void stitch_preview_delete(StitchPreviewer *stitch_preview) } } -#define HEADER_LENGTH 256 - /* This function updates the header of the UV editor when the stitch tool updates its settings */ static void stitch_update_header(StitchState *state, bContext *C) { - static char str[] = + const char *str = IFACE_( "Mode(TAB) %s, " "(S)nap %s, " "(M)idpoints %s, " "(L)imit %.2f (Alt Wheel adjust) %s, " "Switch (I)sland, " - "shift select vertices"; + "shift select vertices" + ); - char msg[HEADER_LENGTH]; + char msg[UI_MAX_DRAW_STR]; ScrArea *sa = CTX_wm_area(C); if (sa) { - BLI_snprintf(msg, HEADER_LENGTH, str, - state->mode == STITCH_VERT ? "Vertex" : "Edge", + BLI_snprintf(msg, sizeof(msg), str, + state->mode == STITCH_VERT ? IFACE_("Vertex") : IFACE_("Edge"), WM_bool_as_string(state->snap_islands), WM_bool_as_string(state->midpoints), state->limit_dist, diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 768624b1968..8e4ba4c0afa 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_string.h" +#include "BLT_translation.h" + #include "BKE_cdderivedmesh.h" #include "BKE_subsurf.h" #include "BKE_context.h" @@ -62,6 +64,8 @@ #include "PIL_time.h" +#include "UI_interface.h" + #include "ED_image.h" #include "ED_mesh.h" #include "ED_screen.h" @@ -554,12 +558,13 @@ static void minimize_stretch_iteration(bContext *C, wmOperator *op, bool interac RNA_int_set(op->ptr, "iterations", ms->i); if (interactive && (PIL_check_seconds_timer() - ms->lasttime > 0.5)) { - char str[100]; + char str[UI_MAX_DRAW_STR]; param_flush(ms->handle); if (sa) { - BLI_snprintf(str, sizeof(str), "Minimize Stretch. Blend %.2f (Press + and -, or scroll wheel to set)", ms->blend); + BLI_snprintf(str, sizeof(str), + IFACE_("Minimize Stretch. Blend %.2f (Press + and -, or scroll wheel to set)"), ms->blend); ED_area_headerprint(sa, str); } |