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:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-09-20 11:39:25 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-09-20 11:39:25 +0400
commit6d125e159d2c391fd92d20bd29bc5c8c33b7dcc2 (patch)
tree408d10d9a473158cf49812a0a229cb51e18ba7b7 /source/blender/blenfont
parent0e421f429ab9c6a6d041c7feb52e84826abe6c65 (diff)
i18n: code clean-up
- Move all translation-related declarations to BLF_translation.h - Reverted some changes to match trunk svn rev40365
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r--source/blender/blenfont/BLF_api.h20
-rw-r--r--source/blender/blenfont/CMakeLists.txt6
-rw-r--r--source/blender/blenfont/SConscript1
-rw-r--r--source/blender/blenfont/intern/blf.c16
4 files changed, 2 insertions, 41 deletions
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 <stdlib.h>
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 <stdio.h>
#include <stdlib.h>
#include <string.h>
-
-#ifdef INTERNATIONAL
-#include <libintl.h>
-#endif
-
#include <math.h>
#include <ft2build.h>
@@ -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);