X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c801d85f158c4cba50b588807daabdcbd0ed3853..d1427b705318677afe28b1291867f6930c8823a7:/src/common/valtext.cpp diff --git a/src/common/valtext.cpp b/src/common/valtext.cpp index 6346404d47..02162b7c85 100644 --- a/src/common/valtext.cpp +++ b/src/common/valtext.cpp @@ -41,7 +41,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 +132,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 +142,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; }