From ba9d03fa1316bfa8cd555fc3128f90663f78db99 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 13 Oct 2003 21:27:02 +0000 Subject: [PATCH] 1) use ngettext instead of _N, 2) cleanup of gettext macros definitions git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/intl.h | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/include/wx/intl.h b/include/wx/intl.h index da18e33025..56e21256a9 100644 --- a/include/wx/intl.h +++ b/include/wx/intl.h @@ -33,12 +33,11 @@ // ---------------------------------------------------------------------------- // gettext() style macros (notice that xgettext should be invoked with -// --keyword="_" --keyword="_N:1,2" --keyword="N_" options +// --keyword="_" --keyword="ngettext: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)) + #define ngettext(s1, s2, n) wxGetTranslation(_T(s1), _T(s2), n) #endif // another one which just marks the strings for extraction, but doesn't @@ -557,10 +556,13 @@ 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 + #if !defined(ngettext) + #define ngettext(s1, s2, n) ((n) == 1 ? _T(s1) : _T(s2)) + #endif #endif #define wxTRANSLATE(str) _T(str) @@ -573,8 +575,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_ -- 2.45.2