Improved wording of "reserved words in G-code" error message.
This commit is contained in:
parent
07186dac99
commit
f9af9aa907
@ -1747,14 +1747,14 @@ bool Tab::validate_custom_gcode(const wxString& title, const std::string& gcode)
|
|||||||
std::vector<std::string> tags;
|
std::vector<std::string> tags;
|
||||||
bool invalid = GCodeProcessor::contains_reserved_tags(gcode, 5, tags);
|
bool invalid = GCodeProcessor::contains_reserved_tags(gcode, 5, tags);
|
||||||
if (invalid) {
|
if (invalid) {
|
||||||
wxString reports = _L_PLURAL("The following line", "The following lines", tags.size());
|
std::string lines = ":\n";
|
||||||
reports += ":\n";
|
for (const std::string& keyword : tags)
|
||||||
for (const std::string& keyword : tags) {
|
lines += ";" + keyword + "\n";
|
||||||
reports += ";" + 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.",
|
||||||
reports += _L("contain reserved keywords.") + "\n";
|
"The following lines %s contain reserved keywords.\nPlease remove them, as they may cause problems in G-code visualization and printing time estimation.",
|
||||||
reports += _L("Please 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);
|
//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);
|
MessageDialog dialog(wxGetApp().mainframe, reports, _L("Found reserved keywords in") + " " + _(title), wxICON_WARNING | wxOK);
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
|
Loading…
Reference in New Issue
Block a user