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>2015-04-10 16:31:38 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-04-10 16:34:31 +0300
commitf75bbe27e23d2f79490aac82666ded1b1574083c (patch)
tree2fa753c9911bcb72e34c540a38531d30f4713d41 /source/blender/blenfont
parent8a99dc232469a987ca2631b3ab5dd8e0da948054 (diff)
Thumbnails: Add translations to font preview.
Not much to say, this is pretty straightforward. We just have to add current locale to thumbnails 'signature', so that previews get re-generated when we change locale... Tested with Japanese and French. Btw, I do not really understand why using BLF in ImBuf is badlevel... :/
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r--source/blender/blenfont/intern/blf_thumbs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenfont/intern/blf_thumbs.c b/source/blender/blenfont/intern/blf_thumbs.c
index afda6a382f9..3c400d0b8e4 100644
--- a/source/blender/blenfont/intern/blf_thumbs.c
+++ b/source/blender/blenfont/intern/blf_thumbs.c
@@ -45,6 +45,7 @@
#include "blf_internal_types.h"
#include "BLF_api.h"
+#include "BLF_translation.h"
#include "BLI_strict_flags.h"
@@ -97,7 +98,7 @@ void BLF_thumb_preview(
font->pos[1] -= font->glyph_cache->ascender * 1.1f;
- blf_font_buffer(font, draw_str[i]);
+ blf_font_buffer(font, BLF_translate_do(BLF_I18NCONTEXT_DEFAULT, draw_str[i]));
}
blf_font_free(font);