diff options
author | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-06-20 14:07:46 +0400 |
---|---|---|
committer | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-06-20 14:07:46 +0400 |
commit | 9a2f36b50f818c0c1b659363a1df298f7043e207 (patch) | |
tree | 29356fc32cdf7faba05e099e67e3da5adf349c39 /source/blender/blenfont | |
parent | 558d549aeb2ec7da41d31986707774eae0821da8 (diff) |
handle SpaceType and UserPref popups
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r-- | source/blender/blenfont/BLF_api.h | 1 | ||||
-rw-r--r-- | source/blender/blenfont/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/blenfont/intern/blf.c | 6 | ||||
-rwxr-xr-x | source/blender/blenfont/intern/blf_gettext.c | 40 | ||||
-rw-r--r-- | source/blender/blenfont/intern/blf_lang.c | 2 |
5 files changed, 43 insertions, 7 deletions
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index e305345d6bc..9847b6ce838 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -224,5 +224,6 @@ extern int blf_mono_font_render; // dont mess drawing with render threads. extern int blf_unifont; extern int blf_unifont_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 b915764c1bb..118a081bf69 100644 --- a/source/blender/blenfont/CMakeLists.txt +++ b/source/blender/blenfont/CMakeLists.txt @@ -40,6 +40,7 @@ set(SRC intern/blf.c intern/blf_dir.c intern/blf_font.c + intern/blf_gettext.c intern/blf_glyph.c intern/blf_lang.c intern/blf_util.c diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index b5ad6ab8ae9..643c2826403 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -37,7 +37,6 @@ #include <math.h> #include <ft2build.h> -#include <libintl.h> #include FT_FREETYPE_H #include FT_GLYPH_H @@ -125,11 +124,6 @@ void BLF_cache_clear(void) } } -char* BLF_gettext(const char *msgid) -{ - return gettext( msgid ); -} - static int blf_search(const char *name) { FontBLF *font; diff --git a/source/blender/blenfont/intern/blf_gettext.c b/source/blender/blenfont/intern/blf_gettext.c new file mode 100755 index 00000000000..c82baed555c --- /dev/null +++ b/source/blender/blenfont/intern/blf_gettext.c @@ -0,0 +1,40 @@ +/* + * $Id: blf_gettext.c 37094 2011-06-02 11:22:22Z xiaoxiangquan $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2008 Blender Foundation. + * All rights reserved. + * + * Contributor(s): Blender Foundation. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/blenfont/intern/blf_gettext.c + * \ingroup blf + */ + +#include <libintl.h> +#include <string.h> + +char* BLF_gettext(const char *msgid) +{ + if( msgid!=NULL && strlen(msgid)>0 ) + return gettext( msgid ); + return ""; +} diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c index 6a3e5b1f2ef..4a32d5270b4 100644 --- a/source/blender/blenfont/intern/blf_lang.c +++ b/source/blender/blenfont/intern/blf_lang.c @@ -39,7 +39,7 @@ #ifdef INTERNATIONAL #include <locale.h> -#include "libintl.h" +#include <libintl.h> #include "DNA_listBase.h" |