mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-22 22:24:56 +08:00
Fix wxGETTEXT_IN_CONTEXT* with wxNO_IMPLICIT_WXSTRING_ENCODING
The call to wxGetTranslation() was ambiguous. Fix this by adding missing wxASCII_STR() for all string literal arguments in wxGETTEXT_IN_CONTEXT and wxGETTEXT_IN_CONTEXT_PLURAL, just as it is used in _(). Also test that all translation macros expand to compilable code when wxNO_IMPLICIT_WXSTRING_ENCODING is enabled. See #1312 and also #24916. Closes #24925.
This commit is contained in:
committed by
Vadim Zeitlin
parent
6bcbcf9d09
commit
a47b560fd4
@@ -413,4 +413,12 @@ TEST_CASE("wxNO_IMPLICIT_WXSTRING_ENCODING", "[string]")
|
||||
#endif
|
||||
|
||||
wxLogSysError(wxASCII_STR("Bogus error for testing"));
|
||||
|
||||
// Check that all translation macros expand to compilable
|
||||
// code also when wxNO_IMPLICIT_WXSTRING_ENCODING is enabled.
|
||||
|
||||
_("some text");
|
||||
wxPLURAL("singular", "plural", 2);
|
||||
wxGETTEXT_IN_CONTEXT("context", "text");
|
||||
wxGETTEXT_IN_CONTEXT_PLURAL("context", "singular", "plural", 3);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user