diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-05-14 11:00:52 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-05-14 11:00:52 +0300 |
commit | b1e2f8be2371eeeed3300d42e796f6cf7901e8d9 (patch) | |
tree | 8181be409c9333e55c29b07ceb2abef241081c0b /source/blender/editors/uvedit/uvedit_smart_stitch.c | |
parent | ede742917a175319dcfdb63703126ed688f948bf (diff) |
Fix T48426: Use same length for all header message strings.
Some languages like Chinese or Japanese take three or four bytes per char...
Also fixed some missing translation markers for UI header messages.
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_smart_stitch.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_smart_stitch.c | 17 |
1 files changed, 10 insertions, 7 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, |