don't use _T() inside wxGetTranslation() and related macros (wxTRANSLATE, _, ...) to preserve compatibility with the old ASCII build (even at the expense with the Unicode build compatibility)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-09-07 19:34:56 +00:00
parent a0fef35d6b
commit 066f3611df

View File

@@ -42,13 +42,13 @@ enum wxLayoutDirection
// --keyword="_" --keyword="wxPLURAL:1,2" options // --keyword="_" --keyword="wxPLURAL:1,2" options
// to extract the strings from the sources) // to extract the strings from the sources)
#ifndef WXINTL_NO_GETTEXT_MACRO #ifndef WXINTL_NO_GETTEXT_MACRO
#define _(s) wxGetTranslation(_T(s)) #define _(s) wxGetTranslation((s))
#define wxPLURAL(sing, plur, n) wxGetTranslation(_T(sing), _T(plur), n) #define wxPLURAL(sing, plur, n) wxGetTranslation((sing), (plur), n)
#endif #endif
// another one which just marks the strings for extraction, but doesn't // another one which just marks the strings for extraction, but doesn't
// perform the translation (use -kwxTRANSLATE with xgettext!) // perform the translation (use -kwxTRANSLATE with xgettext!)
#define wxTRANSLATE(str) _T(str) #define wxTRANSLATE(str) (str)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// forward decls // forward decls
@@ -600,12 +600,12 @@ inline const wxString& wxGetTranslation(const wxString& str1,
#if !defined(WXINTL_NO_GETTEXT_MACRO) #if !defined(WXINTL_NO_GETTEXT_MACRO)
#if !defined(_) #if !defined(_)
#define _(s) (_T(s)) #define _(s) (s)
#endif #endif
#define wxPLURAL(sing, plur, n) ((n) == 1 ? _T(sing) : _T(plur)) #define wxPLURAL(sing, plur, n) ((n) == 1 ? (sing) : (plur))
#endif #endif
#define wxTRANSLATE(str) _T(str) #define wxTRANSLATE(str) (str)
// NB: we use a template here in order to avoid using // NB: we use a template here in order to avoid using
// wxLocale::GetUntranslatedString() above, which would be required if // wxLocale::GetUntranslatedString() above, which would be required if
@@ -635,10 +635,10 @@ inline TString wxGetTranslation(TString str1, TString str2, size_t n,
// wxTRANSLATE) too // wxTRANSLATE) too
#if !defined(WXINTL_NO_GETTEXT_MACRO) #if !defined(WXINTL_NO_GETTEXT_MACRO)
#if !defined(gettext_noop) #if !defined(gettext_noop)
#define gettext_noop(str) _T(str) #define gettext_noop(str) (str)
#endif #endif
#if !defined(N_) #if !defined(N_)
#define N_(s) _T(s) #define N_(s) (s)
#endif #endif
#endif #endif