X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/849a28d0da2d036a78c7252c2baa42e8aee8a65d..61f3e0f5c172147d5ba76fc7f099472c1e05aba4:/include/wx/intl.h diff --git a/include/wx/intl.h b/include/wx/intl.h index da18e33025..c784562899 100644 --- a/include/wx/intl.h +++ b/include/wx/intl.h @@ -33,12 +33,10 @@ // ---------------------------------------------------------------------------- // gettext() style macros (notice that xgettext should be invoked with -// --keyword="_" --keyword="_N:1,2" --keyword="N_" options +// --keyword="_" --keyword="wxGetTranslation:1,2" options // to extract the strings from the sources) #ifndef WXINTL_NO_GETTEXT_MACRO - #define _(s) wxGetTranslation(_T(s)) - #define _N(s1, s2, n) wxGetTranslation(_T(s1), _T(s2), n) - #define N_(s) _T(s) + #define _(s) wxGetTranslation(_T(s)) #endif // another one which just marks the strings for extraction, but doesn't @@ -522,6 +520,8 @@ private: bool m_bConvertEncoding; + bool m_initialized; + static wxLanguageInfoArray *ms_languagesDB; DECLARE_NO_COPY_CLASS(wxLocale) @@ -557,10 +557,10 @@ inline const wxChar *wxGetTranslation(const wxChar *sz1, const wxChar *sz2, // the macros should still be defined - otherwise compilation would fail -#if !defined(WXINTL_NO_GETTEXT_MACRO) && !defined(_) - #define _(s) (_T(s)) - #define _N(s1, s2, n) ((n) == 1 ? _T(s1) : _T(s2)) - #define N_(s) _T(s) +#if !defined(WXINTL_NO_GETTEXT_MACRO) + #if !defined(_) + #define _(s) (_T(s)) + #endif #endif #define wxTRANSLATE(str) _T(str) @@ -573,8 +573,13 @@ inline const wxChar *wxGetTranslation(const wxChar *sz1, const wxChar *sz2, // 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) +#if !defined(WXINTL_NO_GETTEXT_MACRO) + #if !defined(gettext_noop) + #define gettext_noop(str) _T(str) + #endif + #if !defined(N_) + #define N_(s) _T(s) + #endif #endif #endif // _WX_INTL_H_