diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 32131d99d..bc4c6b728 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1747,14 +1747,14 @@ bool Tab::validate_custom_gcode(const wxString& title, const std::string& gcode) std::vector tags; bool invalid = GCodeProcessor::contains_reserved_tags(gcode, 5, tags); if (invalid) { - wxString reports = _L_PLURAL("The following line", "The following lines", tags.size()); - reports += ":\n"; - for (const std::string& keyword : tags) { - reports += ";" + keyword + "\n"; - } - reports += _L("contain reserved keywords.") + "\n"; - reports += _L("Please remove them, as they may cause problems in g-code visualization and printing time estimation."); - + std::string lines = ":\n"; + for (const std::string& keyword : tags) + lines += ";" + keyword + "\n"; + wxString reports = format_wxstr( + _L_PLURAL("The following line %s contains reserved keywords.\nPlease remove it, as it may cause problems in G-code visualization and printing time estimation.", + "The following lines %s contain reserved keywords.\nPlease remove them, as they may cause problems in G-code visualization and printing time estimation.", + tags.size()), + lines); //wxMessageDialog dialog(wxGetApp().mainframe, reports, _L("Found reserved keywords in") + " " + _(title), wxICON_WARNING | wxOK); MessageDialog dialog(wxGetApp().mainframe, reports, _L("Found reserved keywords in") + " " + _(title), wxICON_WARNING | wxOK); dialog.ShowModal();