From 6d125e159d2c391fd92d20bd29bc5c8c33b7dcc2 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 20 Sep 2011 07:39:25 +0000 Subject: i18n: code clean-up - Move all translation-related declarations to BLF_translation.h - Reverted some changes to match trunk svn rev40365 --- source/blender/blenfont/BLF_api.h | 20 -------------------- source/blender/blenfont/CMakeLists.txt | 6 ++---- source/blender/blenfont/SConscript | 1 - source/blender/blenfont/intern/blf.c | 16 ---------------- 4 files changed, 2 insertions(+), 41 deletions(-) (limited to 'source/blender/blenfont') diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index b7131800097..1bb61d02b78 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -34,7 +34,6 @@ #ifndef BLF_API_H #define BLF_API_H -#include struct rctf; int BLF_init(int points, int dpi); @@ -42,8 +41,6 @@ void BLF_exit(void); void BLF_cache_clear(void); -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); @@ -181,20 +178,6 @@ void BLF_buffer_col(int fontid, float r, float g, float b, float a); */ void BLF_draw_buffer(int fontid, const char *str); -/* - * Search the path directory to the locale files, this try all - * the case for Linux, Win and Mac. - */ -void BLF_lang_init(void); - -/* Set the current locale. */ -void BLF_lang_set(const char *); - -/* Set the current encoding name. */ -void BLF_lang_encoding_name(const char *str); - -void BLF_lang_encoding(const char *str); - /* Add a path to the font dir paths. */ void BLF_dir_add(const char *path); @@ -219,7 +202,4 @@ void BLF_dir_free(char **dirs, int count); extern int blf_mono_font; extern int blf_mono_font_render; // dont mess drawing with render threads. -#define _(msgid) BLF_gettext(msgid) -#define N_(msgid) msgid - #endif /* BLF_API_H */ diff --git a/source/blender/blenfont/CMakeLists.txt b/source/blender/blenfont/CMakeLists.txt index 82099d4f125..b87a3b88f07 100644 --- a/source/blender/blenfont/CMakeLists.txt +++ b/source/blender/blenfont/CMakeLists.txt @@ -42,9 +42,11 @@ set(SRC intern/blf_font.c intern/blf_glyph.c intern/blf_lang.c + intern/blf_translation.c intern/blf_util.c BLF_api.h + BLF_translation.h intern/blf_internal.h intern/blf_internal_types.h ) @@ -56,9 +58,5 @@ if(WITH_INTERNATIONAL) add_definitions(-DINTERNATIONAL) endif() -if(WIN32 AND NOT UNIX) - add_definitions(-DUSE_GETTEXT_DLL) -endif() - blender_add_lib(bf_blenfont "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/blenfont/SConscript b/source/blender/blenfont/SConscript index 2763bea0da0..45a55793856 100644 --- a/source/blender/blenfont/SConscript +++ b/source/blender/blenfont/SConscript @@ -13,7 +13,6 @@ defs = [] if sys.platform == 'win32' or env['OURPLATFORM'] == 'linuxcross': defs.append('_WIN32') - defs.append('USE_GETTEXT_DLL') if env['WITH_BF_INTERNATIONAL']: defs.append('INTERNATIONAL') diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index 9a1c87ea3de..cccecd00bf7 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -34,11 +34,6 @@ #include #include #include - -#ifdef INTERNATIONAL -#include -#endif - #include #include @@ -304,17 +299,6 @@ void BLF_enable(int fontid, int option) } } -const char* BLF_gettext(const char *msgid) -{ -#ifdef INTERNATIONAL - if( msgid[0] ) - return gettext( msgid ); - return ""; -#else - return msgid; -#endif -} - void BLF_disable(int fontid, int option) { FontBLF *font= BLF_get(fontid); -- cgit v1.2.3