diff options
author | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-08-16 20:58:35 +0400 |
---|---|---|
committer | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-08-16 20:58:35 +0400 |
commit | 18d95a8462a7b6386becfecb962657022afdb82b (patch) | |
tree | 2ed0077afa066b0e03862c97352a7476799bd20b /source/blender/blenfont | |
parent | 5293b4f498c3b3a851cc69850a4e131b0788089c (diff) |
fix a small bug , and update language-packs
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r-- | source/blender/blenfont/BLF_api.h | 2 | ||||
-rw-r--r-- | source/blender/blenfont/intern/blf.c | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index 6f6003fa670..a324d983bb4 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -42,7 +42,7 @@ void BLF_exit(void); void BLF_cache_clear(void); -char* BLF_gettext(const char *msgid); +const char* BLF_gettext(const char *msgid); int BLF_load(const char *name); int BLF_load_mem(const char *name, unsigned char *mem, int mem_size); diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index 82094fdecdd..52597a282eb 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -34,7 +34,11 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> + +#ifdef INTERNATIONAL #include <libintl.h> +#endif + #include <math.h> #include <ft2build.h> @@ -300,11 +304,15 @@ void BLF_enable(int fontid, int option) font->flags |= option; } -char* BLF_gettext(const char *msgid) +const char* BLF_gettext(const char *msgid) { +#ifdef INTERNATIONAL if( msgid!=NULL && strlen(msgid)>0 ) return gettext( msgid ); return ""; +#else + return msgid; +#endif } void BLF_disable(int fontid, int option) |