diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-12-18 22:25:48 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-12-18 22:25:48 +0400 |
commit | edf826d9240a1e153329e133f98d6a7243aa0c48 (patch) | |
tree | 8e354c9f81321462028499991041750beb221bb2 /source/blender/blenfont | |
parent | 7e56e5ac949155e93f5defba8be30b272745b503 (diff) |
Various minor fixes to i18n code (mostly, translation of enum items' tooltips was wrongly bound to iface option, not tooltips one, and recent changes in r53119 were incorectly using BLF_pgettext, made them simpler by using CTX_IFACE_ macro).
Also fixed CTX_FOO_ macros when building without i18n, those were kinda wrong.
And hid i18n ui section in userpreferences when built without its support too.
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r-- | source/blender/blenfont/BLF_translation.h | 4 | ||||
-rw-r--r-- | source/blender/blenfont/intern/blf_lang.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenfont/BLF_translation.h b/source/blender/blenfont/BLF_translation.h index 159d4b067b6..0832907d1d9 100644 --- a/source/blender/blenfont/BLF_translation.h +++ b/source/blender/blenfont/BLF_translation.h @@ -85,8 +85,8 @@ const char *BLF_translate_do_tooltip(const char *msgctxt, const char *msgid); /* #define _(msgid) msgid */ #define IFACE_(msgid) msgid #define TIP_(msgid) msgid - #define CTX_IFACE_(context, msgid) ((void)context, msgid) - #define CTX_TIP_(context, msgid) ((void)context, msgid) + #define CTX_IFACE_(context, msgid) msgid + #define CTX_TIP_(context, msgid) msgid #endif /* Helper macro, when we want to define a same msgid for multiple msgctxt... diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c index 0ed48623dd5..4d066ea8740 100644 --- a/source/blender/blenfont/intern/blf_lang.c +++ b/source/blender/blenfont/intern/blf_lang.c @@ -30,6 +30,8 @@ #include "BLF_translation.h" /* own include */ +#include "BLI_utildefines.h" + #ifdef WITH_INTERNATIONAL #include <stdio.h> @@ -50,7 +52,6 @@ #include "BLI_linklist.h" #include "BLI_path_util.h" #include "BLI_string.h" -#include "BLI_utildefines.h" /* Locale options. */ static const char **locales = NULL; @@ -254,9 +255,8 @@ void BLF_lang_free(void) return; } -void BLF_lang_set(const char *str) +void BLF_lang_set(const char *UNUSED(str)) { - (void)str; return; } |