Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2016-05-14 11:00:52 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-05-14 11:00:52 +0300
commitb1e2f8be2371eeeed3300d42e796f6cf7901e8d9 (patch)
tree8181be409c9333e55c29b07ceb2abef241081c0b /source/blender/editors/sculpt_paint
parentede742917a175319dcfdb63703126ed688f948bf (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/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 7d663a034ee..88b3bc5d8fd 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -41,6 +41,7 @@
#include "BLI_utildefines.h"
#include "BLI_threads.h"
+#include "BLT_translation.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
@@ -60,6 +61,7 @@
#include "BKE_paint.h"
#include "BKE_texture.h"
+#include "UI_interface.h"
#include "UI_view2d.h"
#include "ED_image.h"
@@ -1167,20 +1169,17 @@ typedef struct {
static void sample_color_update_header(SampleColorData *data, bContext *C)
{
-#define HEADER_LENGTH 150
- char msg[HEADER_LENGTH];
+ char msg[UI_MAX_DRAW_STR];
ScrArea *sa = CTX_wm_area(C);
if (sa) {
- BLI_snprintf(msg, HEADER_LENGTH,
- "Sample color for %s",
+ BLI_snprintf(msg, sizeof(msg),
+ IFACE_("Sample color for %s"),
!data->sample_palette ?
- "Brush. Use Left Click to sample for palette instead" :
- "Palette. Use Left Click to sample more colors");
+ IFACE_("Brush. Use Left Click to sample for palette instead") :
+ IFACE_("Palette. Use Left Click to sample more colors"));
ED_area_headerprint(sa, msg);
}
-
-#undef HEADER_LENGTH
}
static int sample_color_exec(bContext *C, wmOperator *op)