X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c801d85f158c4cba50b588807daabdcbd0ed3853..6f34921d9369a31de14e4b07e4824e2d701710f0:/src/common/valtext.cpp diff --git a/src/common/valtext.cpp b/src/common/valtext.cpp index 6346404d47..3973230d80 100644 --- a/src/common/valtext.cpp +++ b/src/common/valtext.cpp @@ -24,7 +24,8 @@ #include #include "wx/textctrl.h" #include "wx/utils.h" -#include "wx/msgbxdlg.h" +#include "wx/msgdlg.h" +#include "wx/intl.h" #endif #include "wx/valtext.h" @@ -41,7 +42,7 @@ BEGIN_EVENT_TABLE(wxTextValidator, wxValidator) END_EVENT_TABLE() #endif -wxTextValidator::wxTextValidator(const long style, wxString *val) +wxTextValidator::wxTextValidator(long style, wxString *val) { m_validatorStyle = style ; m_stringValue = val ; @@ -132,8 +133,8 @@ bool wxTextValidator::Validate(wxWindow *parent) if ( !m_includeList.Member(val) ) { char buf[512]; - sprintf(buf, "%s is invalid.", (const char *)val); - wxMessageBox(buf, "Validation conflict", wxOK | wxICON_EXCLAMATION, parent); + sprintf(buf, _("%s is invalid."), (const char *)val); + wxMessageBox(buf, _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent); return FALSE; } } @@ -142,37 +143,37 @@ bool wxTextValidator::Validate(wxWindow *parent) if ( m_excludeList.Member(val) ) { char buf[512]; - sprintf(buf, "%s is invalid.", (const char *)val); - wxMessageBox(buf, "Validation conflict", wxOK | wxICON_EXCLAMATION, parent); + sprintf(buf, _("%s is invalid."), (const char *)val); + wxMessageBox(buf, _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent); return FALSE; } } if ( (m_validatorStyle & wxFILTER_ASCII) && !val.IsAscii() ) { char buf[512]; - sprintf(buf, "%s should only contain ASCII characters.", (const char *)val); - wxMessageBox(buf, "Validation conflict", wxOK | wxICON_EXCLAMATION, parent); + sprintf(buf, _("%s should only contain ASCII characters."), (const char *)val); + wxMessageBox(buf, _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent); return FALSE; } if ( (m_validatorStyle & wxFILTER_ALPHA) && !wxIsAlpha(val) ) { char buf[512]; - sprintf(buf, "%s should only contain alphabetic characters.", (const char *)val); - wxMessageBox(buf, "Validation conflict", wxOK | wxICON_EXCLAMATION, parent); + sprintf(buf, _("%s should only contain alphabetic characters."), (const char *)val); + wxMessageBox(buf, _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent); return FALSE; } if ( (m_validatorStyle & wxFILTER_ALPHANUMERIC) && !wxIsAlphaNumeric(val)) { char buf[512]; - sprintf(buf, "%s should only contain alphabetic or numeric characters.", (const char *)val); - wxMessageBox(buf, "Validation conflict", wxOK | wxICON_EXCLAMATION, parent); + sprintf(buf, _("%s should only contain alphabetic or numeric characters."), (const char *)val); + wxMessageBox(buf,_("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent); return FALSE; } if ( (m_validatorStyle & wxFILTER_NUMERIC) && !val.IsNumber()) { char buf[512]; - sprintf(buf, "%s should be numeric.", (const char *)val); - wxMessageBox(buf, "Validation conflict", wxOK | wxICON_EXCLAMATION, parent); + sprintf(buf, _("%s should be numeric."), (const char *)val); + wxMessageBox(buf, _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent); return FALSE; }