diff --git a/src/Internat.h b/src/Internat.h index ce0a03709..7a57c117f 100644 --- a/src/Internat.h +++ b/src/Internat.h @@ -29,13 +29,24 @@ extern const wxString& GetCustomSubstitution(const wxString& str1 ); // Marks strings for extraction only...must use wxGetTranslation() to translate. #define XO(s) wxT(s) -#if defined( __WXDEBUG__ ) && !defined( _MSC_VER ) - #include +#if defined( __WXDEBUG__ ) // Force a crash if you misuse _ in a static initializer, so that translation // is looked up too early and not found. + + #ifdef _MSC_VER + + #define _(s) ((wxTranslations::Get() || (DebugBreak(), true)), \ + GetCustomTranslation((s))) + + #else + + #include // Raise a signal because it's even too early to use wxASSERT for this. #define _(s) ((wxTranslations::Get() || raise(SIGTRAP)), \ GetCustomTranslation((s))) + + #endif + #else #define _(s) GetCustomTranslation((s)) #endif