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 | |
parent | 5293b4f498c3b3a851cc69850a4e131b0788089c (diff) |
fix a small bug , and update language-packs
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenfont/BLF_api.h | 2 | ||||
-rw-r--r-- | source/blender/blenfont/intern/blf.c | 10 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 5 |
3 files changed, 14 insertions, 3 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) diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index ce959a7e870..4c1f44eedc4 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -498,7 +498,10 @@ int WM_read_homefile(bContext *C, ReportList *reports, short from_memory, ListBa return TRUE; } -/* split from the old WM_read_homefile */ +/* split from the old WM_read_homefile, as the locale setting should + * be called after loading user preference, while the + * WM_read_homefile_proc may need i18n support. So we split them, and + * insert locale setting steps */ int WM_read_homefile_proc(bContext *C, ListBase *wmbase) { /* prevent buggy files that had G_FILE_RELATIVE_REMAP written out by mistake. Screws up autosaves otherwise |