From e951e81b0f66f5714ecee9f962dd3f995e0f338e Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Sat, 29 Jan 2022 17:40:02 -0500 Subject: Cleanup: Cmake: remove unnecessary definitions for internationalization Previously, macros were ifdefed using the cmake option `WITH_INTERNATIONAL` However, the is unnecessary as withen the functions themselves have checks for building without internationalization. This also means that many `add_definitions(-DWITH_INTERNATIONAL)` are also unnecessary. Reviewed By: mont29, LazyDodo Differential Revision: https://developer.blender.org/D13929 --- source/blender/blentranslation/BLT_translation.h | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) (limited to 'source/blender/blentranslation') diff --git a/source/blender/blentranslation/BLT_translation.h b/source/blender/blentranslation/BLT_translation.h index 21296143226..8785eadf5f1 100644 --- a/source/blender/blentranslation/BLT_translation.h +++ b/source/blender/blentranslation/BLT_translation.h @@ -55,24 +55,14 @@ bool BLT_lang_is_ime_supported(void); #define N_(msgid) msgid #define CTX_N_(context, msgid) msgid -/* Those macros should be used everywhere in UI code. */ -#ifdef WITH_INTERNATIONAL +/* These macros should be used everywhere in UI code. */ /*# define _(msgid) BLT_gettext(msgid) */ -# define IFACE_(msgid) BLT_translate_do_iface(NULL, msgid) -# define TIP_(msgid) BLT_translate_do_tooltip(NULL, msgid) -# define DATA_(msgid) BLT_translate_do_new_dataname(NULL, msgid) -# define CTX_IFACE_(context, msgid) BLT_translate_do_iface(context, msgid) -# define CTX_TIP_(context, msgid) BLT_translate_do_tooltip(context, msgid) -# define CTX_DATA_(context, msgid) BLT_translate_do_new_dataname(context, msgid) -#else -/*# define _(msgid) msgid */ -# define IFACE_(msgid) msgid -# define TIP_(msgid) msgid -# define DATA_(msgid) msgid -# define CTX_IFACE_(context, msgid) ((void)(0 ? (context) : 0), msgid) -# define CTX_TIP_(context, msgid) ((void)(0 ? (context) : 0), msgid) -# define CTX_DATA_(context, msgid) ((void)(0 ? (context) : 0), msgid) -#endif +#define IFACE_(msgid) BLT_translate_do_iface(NULL, msgid) +#define TIP_(msgid) BLT_translate_do_tooltip(NULL, msgid) +#define DATA_(msgid) BLT_translate_do_new_dataname(NULL, msgid) +#define CTX_IFACE_(context, msgid) BLT_translate_do_iface(context, msgid) +#define CTX_TIP_(context, msgid) BLT_translate_do_tooltip(context, msgid) +#define CTX_DATA_(context, msgid) BLT_translate_do_new_dataname(context, msgid) /* Helper macro, when we want to define a same msgid for multiple msgctxt... * Does nothing in C, but is "parsed" by our i18n py tools. -- cgit v1.2.3