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/imbuf/intern/thumbs_font.c
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/imbuf/intern/thumbs_font.c')
-rw-r--r--source/blender/imbuf/intern/thumbs_font.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/imbuf/intern/thumbs_font.c b/source/blender/imbuf/intern/thumbs_font.c
index c8982318d80..7c94742a187 100644
--- a/source/blender/imbuf/intern/thumbs_font.c
+++ b/source/blender/imbuf/intern/thumbs_font.c
@@ -34,18 +34,19 @@
/* XXX, bad level call */
#include "../../blenfont/BLF_api.h"
+#include "../../blenfont/BLF_translation.h" /* 'N_' macro and BLF_lang_get()... */
struct ImBuf *IMB_thumb_load_font(const char *filename, unsigned int x, unsigned int y)
{
const int font_size = y / 4;
const char *thumb_str[] = {
- "AaBbCc",
+ N_("AaBbCc"),
- "The quick",
- "brown fox",
- "jumps over",
- "the lazy dog",
+ N_("The quick"),
+ N_("brown fox"),
+ N_("jumps over"),
+ N_("the lazy dog"),
};
struct ImBuf *ibuf;
@@ -71,3 +72,7 @@ struct ImBuf *IMB_thumb_load_font(const char *filename, unsigned int x, unsigned
return ibuf;
}
+const char *IMB_thumb_load_font_get_language(void)
+{
+ return BLF_lang_get();
+}