X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/88ac883a0d005437c97a60d8195bd5e4719b1154..9d9b77552eeb78e0c7ee903aa265dc187651ff57:/include/wx/intl.h diff --git a/include/wx/intl.h b/include/wx/intl.h index 2a8ccef47b..ff519fcfef 100644 --- a/include/wx/intl.h +++ b/include/wx/intl.h @@ -35,6 +35,10 @@ #define _(str) wxGetTranslation(_T(str)) #endif +// another one which just marks the strings for extraction, but doesn't +// perform the translation (use -kwxTRANSLATE with xgettext!) +#define wxTRANSLATE(str) _T(str) + // ---------------------------------------------------------------------------- // forward decls // ---------------------------------------------------------------------------- @@ -141,13 +145,23 @@ inline const wxMB2WXbuf wxGetTranslation(const wxChar *sz) #else // !wxUSE_INTL -#ifndef WXINTL_NO_GETTEXT_MACRO +// the macros should still be defined - otherwise compilation would fail + +#if !defined(WXINTL_NO_GETTEXT_MACRO) && !defined(_) #define _(str) (str) #endif +#define wxTRANSLATE(str) _T(str) + inline const wxChar *wxGetTranslation(const wxChar *sz) { return sz; } #endif // wxUSE_INTL/!wxUSE_INTL +// define this one just in case it occurs somewhere (instead of preferred +// wxTRANSLATE) too +#if !defined(WXINTL_NO_GETTEXT_MACRO) && !defined(gettext_noop) + #define gettext_noop(str) _T(str) +#endif + #endif // _WX_INTLH__