From 7104f09d5dbbb3cbae296c1c1495d1052cc8adf0 Mon Sep 17 00:00:00 2001 From: Lauri Nurmi Date: Thu, 7 Nov 2024 15:45:30 +0200 Subject: [PATCH] Define wxPLURAL regardless of WXINTL_NO_GETTEXT_MACRO The purpose of WXINTL_NO_GETTEXT_MACRO is, as I understand it, to avoid name clashes between _() and symbols with the same name introduced by other libraries or compilers. Although wxPLURAL has forever (15d0695 (added wxPLURAL() macro, 2005-06-01)) been conditionally defined, there is no similar need with it. wxPLURAL has a longer name, and is wx-prefixed. The other, more recently introduced translation macros are not conditionally defined, which makes wxPLURAL inconsistent in this regard. --- include/wx/translation.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/wx/translation.h b/include/wx/translation.h index 8f465279c786..62197801f7fa 100644 --- a/include/wx/translation.h +++ b/include/wx/translation.h @@ -50,9 +50,10 @@ using wxTranslationsHashMap = std::unordered_map; #else #define _(s) wxGetTranslation(wxASCII_STR(s)) #endif - #define wxPLURAL(sing, plur, n) wxGetTranslation((sing), (plur), n) #endif +#define wxPLURAL(sing, plur, n) wxGetTranslation((sing), (plur), n) + // wx-specific macro for translating strings in the given context: if you use // them, you need to also add // --keyword="wxGETTEXT_IN_CONTEXT:1c,2" --keyword="wxGETTEXT_IN_CONTEXT_PLURAL:1c,2,3"