From f7175a3e145eea83db0b64bb26b18d7b2f58fa45 Mon Sep 17 00:00:00 2001 From: Stone Li Date: Thu, 12 Jan 2023 10:24:16 +0800 Subject: [PATCH] ENH: refine entries for extrusion calibration Change-Id: Idcefca17cb026887ea5bd32387ab6d269f8f9d58 Signed-off-by: Stone Li --- bbl/i18n/list.txt | 1 + src/slic3r/GUI/AMSMaterialsSetting.cpp | 15 +++++++++------ src/slic3r/GUI/ExtrusionCalibration.cpp | 9 +++++---- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/bbl/i18n/list.txt b/bbl/i18n/list.txt index f9c0fda46..0675706fd 100644 --- a/bbl/i18n/list.txt +++ b/bbl/i18n/list.txt @@ -42,6 +42,7 @@ src/slic3r/GUI/Jobs/SendJob.cpp src/slic3r/GUI/Jobs/UpgradeNetworkJob.cpp src/slic3r/GUI/AboutDialog.cpp src/slic3r/GUI/AMSMaterialsSetting.cpp +src/slic3r/GUI/ExtrusionCalibration.cpp src/slic3r/GUI/AMSMappingPopup.cpp src/slic3r/GUI/AMSSetting.cpp src/slic3r/GUI/BBLTopbar.cpp diff --git a/src/slic3r/GUI/AMSMaterialsSetting.cpp b/src/slic3r/GUI/AMSMaterialsSetting.cpp index d6820a0ed..6ef237d8d 100644 --- a/src/slic3r/GUI/AMSMaterialsSetting.cpp +++ b/src/slic3r/GUI/AMSMaterialsSetting.cpp @@ -378,8 +378,9 @@ void AMSMaterialsSetting::on_select_ok(wxCommandEvent &event) if (is_virtual_tray()) { if (!ExtrusionCalibration::check_k_n_validation(k_text, n_text)) { - wxString kn_tips = _L("Plase input valid value, k is in range 0 ~ 0.5, n is in range 0.6 ~ 2.0"); - MessageDialog msg_dlg(nullptr, kn_tips, wxEmptyString, wxICON_WARNING | wxOK); + wxString k_tips = _L("Please input a valid value (K in 0~0.5)"); + wxString kn_tips = _L("Please input a valid value (K in 0~0.5, N in 0.6~2.0)"); + MessageDialog msg_dlg(nullptr, k_tips, wxEmptyString, wxICON_WARNING | wxOK); msg_dlg.ShowModal(); return; } @@ -404,8 +405,9 @@ void AMSMaterialsSetting::on_select_ok(wxCommandEvent &event) // check and set k n if (obj->is_function_supported(PrinterFunction::FUNC_EXTRUSION_CALI)) { if (!ExtrusionCalibration::check_k_n_validation(k_text, n_text)) { - wxString kn_tips = _L("Plase input valid value, K is in range 0 ~ 0.5, N is in range 0.6 ~ 2.0"); - MessageDialog msg_dlg(nullptr, kn_tips, wxEmptyString, wxICON_WARNING | wxOK); + wxString k_tips = _L("Please input a valid value (K in 0~0.5)"); + wxString kn_tips = _L("Please input a valid value (K in 0~0.5, N in 0.6~2.0)"); + MessageDialog msg_dlg(nullptr, k_tips, wxEmptyString, wxICON_WARNING | wxOK); msg_dlg.ShowModal(); return; } @@ -467,8 +469,9 @@ void AMSMaterialsSetting::on_select_ok(wxCommandEvent &event) if (obj) { if (obj->is_function_supported(PrinterFunction::FUNC_EXTRUSION_CALI)) { if (!ExtrusionCalibration::check_k_n_validation(k_text, n_text)) { - wxString kn_tips = _L("Plase input valid value, k is in range 0 ~ 0.5, n is in range 0.6 ~ 2.0"); - MessageDialog msg_dlg(nullptr, kn_tips, wxEmptyString, wxICON_WARNING | wxOK); + wxString k_tips = _L("Please input a valid value (K in 0~0.5)"); + wxString kn_tips = _L("Please input a valid value (K in 0~0.5, N in 0.6~2.0)"); + MessageDialog msg_dlg(nullptr, k_tips, wxEmptyString, wxICON_WARNING | wxOK); msg_dlg.ShowModal(); return; } diff --git a/src/slic3r/GUI/ExtrusionCalibration.cpp b/src/slic3r/GUI/ExtrusionCalibration.cpp index 976a7a4a0..cc09a57fe 100644 --- a/src/slic3r/GUI/ExtrusionCalibration.cpp +++ b/src/slic3r/GUI/ExtrusionCalibration.cpp @@ -107,7 +107,7 @@ void ExtrusionCalibration::create() auto nozzle_temp_text = new wxStaticText(m_step_1_panel, wxID_ANY, _L("Nozzle temperature")); auto max_input_width = std::max(std::max(std::max(wxWindow::GetTextExtent(_L("Nozzle temperature")).x, wxWindow::GetTextExtent(_L("Bed Temperature")).x), - wxWindow::GetTextExtent(_L("Max Flow")).x), + wxWindow::GetTextExtent(_L("Max volumetric speed")).x), EXTRUSION_CALIBRATION_INPUT_SIZE.x); m_nozzle_temp = new TextInput(m_step_1_panel, wxEmptyString, _L("\u2103"), "", wxDefaultPosition, { max_input_width, EXTRUSION_CALIBRATION_INPUT_SIZE.y }, wxTE_READONLY); nozzle_temp_sizer->Add(nozzle_temp_text, 0, wxALIGN_LEFT); @@ -152,7 +152,7 @@ void ExtrusionCalibration::create() m_error_text->SetForegroundColour(wxColour(208, 27, 27)); m_error_text->Hide(); - m_button_cali = new Button(m_step_1_panel, _L("Start")); + m_button_cali = new Button(m_step_1_panel, _L("Start calibration")); m_btn_bg_green = StateColor(std::pair(wxColour(238, 238, 238), StateColor::Disabled), std::pair(wxColour(27, 136, 68), StateColor::Pressed), std::pair(wxColour(61, 203, 115), StateColor::Hovered), std::pair(wxColour(0, 174, 66), StateColor::Normal)); m_button_cali->SetBackgroundColor(m_btn_bg_green); @@ -471,8 +471,9 @@ void ExtrusionCalibration::on_click_save(wxCommandEvent &event) wxString k_text = m_k_val->GetTextCtrl()->GetValue(); wxString n_text = m_n_val->GetTextCtrl()->GetValue(); if (!ExtrusionCalibration::check_k_n_validation(k_text, n_text)) { + wxString k_tips = _L("Please input a valid value (K in 0~0.5)"); wxString kn_tips = _L("Please input a valid value (K in 0~0.5, N in 0.6~2.0)"); - MessageDialog msg_dlg(nullptr, kn_tips, wxEmptyString, wxICON_WARNING | wxOK); + MessageDialog msg_dlg(nullptr, k_tips, wxEmptyString, wxICON_WARNING | wxOK); msg_dlg.ShowModal(); return; } @@ -624,7 +625,7 @@ void ExtrusionCalibration::show_bed_type_incompatible(bool incompatible) } } } - wxString tips = wxString::Format("%s does not support %s", m_comboBox_bed_type->GetValue(), filament_alias); + wxString tips = wxString::Format(_L("%s does not support %s"), m_comboBox_bed_type->GetValue(), filament_alias); show_info(true, true, tips); m_button_cali->Disable(); }