diff --git a/include/wx/generic/wizard.h b/include/wx/generic/wizard.h index 7b820a4f26..2b512ec5e3 100644 --- a/include/wx/generic/wizard.h +++ b/include/wx/generic/wizard.h @@ -132,6 +132,10 @@ protected: *m_btnNext; // the "Next>" or "Finish" button wxStaticBitmap *m_statbmp; // the control for the bitmap + // cached labels so their translations stay consistent + wxString m_nextLabel, + m_finishLabel; + // Border around page area sizer requested using SetBorder() int m_border; diff --git a/src/generic/wizard.cpp b/src/generic/wizard.cpp index 666ab84f47..3960216686 100644 --- a/src/generic/wizard.cpp +++ b/src/generic/wizard.cpp @@ -429,7 +429,10 @@ void wxWizard::AddButtonRow(wxBoxSizer *mainColumn) btnHelp=new wxButton(this, wxID_HELP, wxEmptyString, wxDefaultPosition, wxDefaultSize, buttonStyle); #endif - m_btnNext = new wxButton(this, wxID_FORWARD, _("&Next >")); + m_nextLabel = _("&Next >"); + m_finishLabel = _("&Finish"); + + m_btnNext = new wxButton(this, wxID_FORWARD, m_nextLabel); // Avoid Cmd+C closing dialog on Mac. wxString cancelLabel(_("&Cancel")); #ifdef __WXMAC__ @@ -629,7 +632,7 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward) m_btnPrev->Enable(m_page != m_firstpage); const bool hasNext = HasNextPage(m_page); - const wxString label = hasNext ? _("&Next >") : _("&Finish"); + const wxString& label = hasNext ? m_nextLabel : m_finishLabel; if ( label != m_btnNext->GetLabel() ) m_btnNext->SetLabel(label);