i18n(fr): fix untranslated UI strings, extract hardcoded ones, complete French catalog (#14164)

This commit is contained in:
foXaCe
2026-06-11 22:10:31 +02:00
committed by GitHub
parent 15f330641c
commit d641ca598a
23 changed files with 1028 additions and 265 deletions

View File

@@ -3,6 +3,7 @@
#include "GLGizmoBase.hpp"
#include "slic3r/GUI/GLSelectionRectangle.hpp"
#include "slic3r/GUI/I18N.hpp"
#include "libslic3r/BrimEarsPoint.hpp"
#include "libslic3r/ObjectID.hpp"
@@ -87,8 +88,8 @@ public:
bool is_selection_rectangle_dragging() const { return m_selection_rectangle.is_dragging(); }
bool wants_enter_leave_snapshots() const override { return true; }
std::string get_gizmo_entering_text() const override { return "Entering Brim Ears"; }
std::string get_gizmo_leaving_text() const override { return "Leaving Brim Ears"; }
std::string get_gizmo_entering_text() const override { return _u8L("Entering Brim Ears"); }
std::string get_gizmo_leaving_text() const override { return _u8L("Leaving Brim Ears"); }
private:
bool on_init() override;

View File

@@ -6,6 +6,7 @@
#include "libslic3r/Print.hpp"
#include "libslic3r/ObjectID.hpp"
#include "slic3r/GUI/3DScene.hpp"
#include "slic3r/GUI/I18N.hpp"
#include <boost/thread.hpp>
@@ -36,9 +37,9 @@ protected:
void render_tooltip_button(float x, float y);
wxString handle_snapshot_action_name(bool shift_down, Button button_down) const override;
std::string get_gizmo_entering_text() const override { return "Entering Paint-on supports"; }
std::string get_gizmo_leaving_text() const override { return "Leaving Paint-on supports"; }
std::string get_action_snapshot_name() const override { return "Paint-on supports editing"; }
std::string get_gizmo_entering_text() const override { return _u8L("Entering Paint-on supports"); }
std::string get_gizmo_leaving_text() const override { return _u8L("Leaving Paint-on supports"); }
std::string get_action_snapshot_name() const override { return _u8L("Paint-on supports editing"); }
// BBS
wchar_t m_current_tool = 0;

View File

@@ -2,6 +2,7 @@
#define slic3r_GLGizmoMmuSegmentation_hpp_
#include "GLGizmoPainterBase.hpp"
#include "slic3r/GUI/I18N.hpp"
namespace Slic3r::GUI {
@@ -100,9 +101,9 @@ protected:
wxString handle_snapshot_action_name(bool shift_down, Button button_down) const override;
std::string get_gizmo_entering_text() const override { return "Entering color painting"; }
std::string get_gizmo_leaving_text() const override { return "Leaving color painting"; }
std::string get_action_snapshot_name() const override { return "Color painting editing"; }
std::string get_gizmo_entering_text() const override { return _u8L("Entering color painting"); }
std::string get_gizmo_leaving_text() const override { return _u8L("Leaving color painting"); }
std::string get_action_snapshot_name() const override { return _u8L("Color painting editing"); }
// BBS
size_t m_selected_extruder_idx = 0;

View File

@@ -367,7 +367,7 @@ std::string PartSkipDialog::create_tmp_path()
}
std::string tmp_path = (parent_path / buf.str()).string();
if (!std::filesystem::exists(tmp_path + "Metadata/") && !fs::create_directories(tmp_path + "Metadata/")) { wxMessageBox("create file failed."); }
if (!std::filesystem::exists(tmp_path + "Metadata/") && !fs::create_directories(tmp_path + "Metadata/")) { wxMessageBox(_L("Failed to create the temporary folder.")); }
return tmp_path;
}

View File

@@ -6225,12 +6225,12 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ":" << __LINE__ << " " << boost::format("%1%: %2%")%it->first %it->second;
//
NotificationManager *notify_manager = q->get_notification_manager();
std::string error_message = L("Invalid values found in the 3MF:");
std::string error_message = _u8L("Invalid values found in the 3MF:");
error_message += "\n";
for (std::map<std::string, std::string>::iterator it=validity.begin(); it!=validity.end(); ++it)
error_message += "-" + it->first + ": " + it->second + "\n";
error_message += "\n";
error_message += L("Please correct them in the param tabs");
error_message += _u8L("Please correct them in the param tabs");
notify_manager->bbl_show_3mf_warn_notification(error_message);
}
}

View File

@@ -562,7 +562,7 @@ void PrintHostSendDialog::init()
// });
// }
add_button(wxID_CANCEL,false, L("Cancel"));
add_button(wxID_CANCEL,false, _L("Cancel"));
finalize();
#ifdef __linux__

View File

@@ -23,7 +23,7 @@
namespace Slic3r { namespace GUI {
PrinterCloudAuthDialog::PrinterCloudAuthDialog(wxWindow* parent, PrintHost* host)
: wxDialog((wxWindow*) (wxGetApp().mainframe), wxID_ANY, "Login")
: wxDialog((wxWindow*) (wxGetApp().mainframe), wxID_ANY, _L("Login"))
{
SetBackgroundColour(*wxWHITE);
// Url

View File

@@ -607,7 +607,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
auto completedimg = new wxStaticBitmap(m_panel_finish, wxID_ANY, create_scaled_bitmap("completed", m_panel_finish, 25), wxDefaultPosition, wxSize(imgsize, imgsize), 0);
m_sizer_finish_h->Add(completedimg, 0, wxALIGN_CENTER | wxALL, FromDIP(5));
m_statictext_finish = new wxStaticText(m_panel_finish, wxID_ANY, L("Send complete"), wxDefaultPosition, wxDefaultSize, 0);
m_statictext_finish = new wxStaticText(m_panel_finish, wxID_ANY, _L("Send complete"), wxDefaultPosition, wxDefaultSize, 0);
m_statictext_finish->Wrap(-1);
m_statictext_finish->SetForegroundColour(wxColour(0, 150, 136));
m_sizer_finish_h->Add(m_statictext_finish, 0, wxALIGN_CENTER | wxALL, FromDIP(5));

View File

@@ -61,10 +61,10 @@ static const std::map<int, std::string> error_messages = {
{SendToPrinterDialog::SEND_ERR, L("File upload failed, please try again.")}
};
static std::string ParseErrorCode(int errorcde)
static wxString ParseErrorCode(int errorcde)
{
auto it = error_messages.find(errorcde);
if (it != error_messages.end()) { return it->second; }
if (it != error_messages.end()) { return _L(it->second); }
return "";
}
@@ -367,7 +367,7 @@ SendToPrinterDialog::SendToPrinterDialog(Plater *plater)
auto completedimg = new wxStaticBitmap(m_panel_finish, wxID_ANY, create_scaled_bitmap("completed", m_panel_finish, 25), wxDefaultPosition, wxSize(imgsize, imgsize), 0);
m_sizer_finish_h->Add(completedimg, 0, wxALIGN_CENTER | wxALL, FromDIP(5));
m_statictext_finish = new wxStaticText(m_panel_finish, wxID_ANY, L("Send complete"), wxDefaultPosition, wxDefaultSize, 0);
m_statictext_finish = new wxStaticText(m_panel_finish, wxID_ANY, _L("Send complete"), wxDefaultPosition, wxDefaultSize, 0);
m_statictext_finish->Wrap(-1);
m_statictext_finish->SetForegroundColour(wxColour(0, 150, 136));
m_sizer_finish_h->Add(m_statictext_finish, 0, wxALIGN_CENTER | wxALL, FromDIP(5));
@@ -1982,7 +1982,7 @@ void SendToPrinterDialog::UploadFileRessultCallback(int res, int resp_ec, std::s
if (ParseErrorCode(resp_ec) != "")
update_print_status_msg(ParseErrorCode(resp_ec), false, true);
else
update_print_status_msg("Sending failed, please try again!", false, true);
update_print_status_msg(_L("Sending failed, please try again!"), false, true);
m_filetransfer_uploadfile_job.reset();
m_filetransfer_uploadfile_job = nullptr;
}

View File

@@ -685,7 +685,7 @@ void PrintingTaskPanel::create_panel(wxWindow* parent)
#endif
m_staticText_progress_left = new wxStaticText(penel_text, wxID_ANY, L("N/A"), wxDefaultPosition, wxDefaultSize, 0);
m_staticText_progress_left = new wxStaticText(penel_text, wxID_ANY, _L("N/A"), wxDefaultPosition, wxDefaultSize, 0);
m_staticText_progress_left->Wrap(-1);
m_staticText_progress_left->SetFont(wxFont(12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxT("HarmonyOS Sans SC")));
m_staticText_progress_left->SetForegroundColour(wxColour(146, 146, 146));
@@ -787,7 +787,7 @@ void PrintingTaskPanel::create_panel(wxWindow* parent)
m_printing_stage_panel->SetSizer(printingstage_vertical_sizer);
// Orca: display the end time of the print
m_staticText_progress_end = new wxStaticText(penel_finish_time, wxID_ANY, L("N/A"), wxDefaultPosition, wxDefaultSize, 0);
m_staticText_progress_end = new wxStaticText(penel_finish_time, wxID_ANY, _L("N/A"), wxDefaultPosition, wxDefaultSize, 0);
m_staticText_progress_end->Wrap(-1);
m_staticText_progress_end->SetFont(
wxFont(12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxT("HarmonyOS Sans SC")));

View File

@@ -109,7 +109,7 @@ MachineInfoPanel::MachineInfoPanel(wxWindow* parent, wxWindowID id, const wxPoin
m_staticText_ver_val->Wrap(-1);
m_staticText_beta_version = new wxStaticText(this, wxID_ANY, "Beta", wxDefaultPosition, wxDefaultSize, 0);
m_staticText_beta_version = new wxStaticText(this, wxID_ANY, _L("Beta"), wxDefaultPosition, wxDefaultSize, 0);
m_staticText_beta_version->SetForegroundColour("#778899");
m_staticText_beta_version->Wrap(-1);
m_staticText_beta_version->Hide();
@@ -1571,7 +1571,7 @@ bool UpgradePanel::Show(bool show)
m_staticText_ams_ver_val->SetForegroundColour("#262E30");
m_staticText_ams_ver_val->Wrap(-1);
m_staticText_beta_version = new wxStaticText(this, wxID_ANY, "Beta", wxDefaultPosition, wxDefaultSize, 0);
m_staticText_beta_version = new wxStaticText(this, wxID_ANY, _L("Beta"), wxDefaultPosition, wxDefaultSize, 0);
m_staticText_beta_version->SetForegroundColour("#778899");
m_staticText_beta_version->Wrap(-1);
m_staticText_beta_version->Hide();

View File

@@ -323,7 +323,7 @@ bool C3DPrinterOS::login(wxString& msg) const
msg.clear();
std::string token = get_api_auth_token(msg);
if (token.empty()) {
msg = "Error. Can't get api token for authorization";
msg = _L("Error. Can't get api token for authorization");
return false;
}
@@ -341,12 +341,12 @@ bool C3DPrinterOS::login(wxString& msg) const
return false;
}
} catch (const std::exception&) {
msg = "Could not parse server response";
msg = _L("Could not parse server response.");
return false;
}
bool res = save_api_session(session, email);
if (!res) {
msg = "Error saving session to file";
msg = _L("Error saving session to file");
}
return res;
}
@@ -395,7 +395,7 @@ bool C3DPrinterOS::upload(
}
}
} catch (const std::exception &) {
error_fn("Could not parse server response");
error_fn(_L("Could not parse server response."));
return false;
}
@@ -404,7 +404,7 @@ bool C3DPrinterOS::upload(
UploadOptionsDialog dlg(GUI::wxGetApp().GetTopWindow(), cloud_projects_list, cloud_printer_types_list, m_preset_name);
if (dlg.ShowModal() != wxID_OK) {
error_fn("Canceled");
error_fn(_L("Canceled"));
return false;
}
@@ -483,7 +483,7 @@ bool C3DPrinterOS::upload(
}
} catch (const std::exception &) {
res = false;
error_fn("Error during file upload");
error_fn(_L("Error during file upload"));
}
// set printer type for uploaded gcode
if (res) {
@@ -542,7 +542,7 @@ std::string C3DPrinterOS::get_api_auth_token(wxString &err) const
err = wxString(resp.get<std::string>("message").c_str());
}
} catch (const std::exception &) {
err = "Could not parse server response";
err = _L("Could not parse server response.");
}
return result;
}
@@ -566,7 +566,7 @@ bool C3DPrinterOS::check_session(wxString &msg) const {
}
} catch (const std::exception &) {
msg = wxString("Could not parse server response");
msg = _L("Could not parse server response.");
return false;
}
return false;

View File

@@ -71,7 +71,7 @@ bool AstroBox::test(wxString &msg) const
}
catch (const std::exception &) {
res = false;
msg = "Could not parse server response";
msg = _L("Could not parse server response.");
}
})
.perform_sync();

View File

@@ -85,7 +85,7 @@ bool Duet::upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn e
int err_code = dsf ? (status == 201 ? 0 : 1) : get_err_code_from_body(body);
if (err_code != 0) {
BOOST_LOG_TRIVIAL(error) << boost::format("Duet: Request completed but error code was received: %1%") % err_code;
error_fn(format_error(body, L("Unknown error occurred"), 0));
error_fn(format_error(body, _u8L("Unknown error occurred"), 0));
res = false;
} else if (upload_data.post_action == PrintHostPostUploadAction::StartPrint) {
wxString errormsg;
@@ -148,13 +148,13 @@ Duet::ConnectionType Duet::connect(wxString &msg) const
res = ConnectionType::rrf;
break;
case 1:
msg = format_error(body, L("Wrong password"), 0);
msg = format_error(body, _u8L("Wrong password"), 0);
break;
case 2:
msg = format_error(body, L("Could not get resources to create a new connection"), 0);
msg = format_error(body, _u8L("Could not get resources to create a new connection"), 0);
break;
default:
msg = format_error(body, L("Unknown error occurred"), 0);
msg = format_error(body, _u8L("Unknown error occurred"), 0);
break;
}

View File

@@ -141,9 +141,9 @@ namespace Slic3r {
const int error_code = root.get<int>("error_code", -1);
if (error_code != 0) {
error_message = root.get<std::string>("message", "Printer returned an error");
error_message = root.get<std::string>("message", _u8L("Printer returned an error"));
if (error_message.empty())
error_message = "Printer returned an error";
error_message = _u8L("Printer returned an error");
error_message += " (" + std::to_string(error_code) + ")";
return false;
}
@@ -151,13 +151,13 @@ namespace Slic3r {
if (serial_number != nullptr) {
const auto system_info = root.get_child_optional("system_info");
if (!system_info) {
error_message = "Missing system_info in response";
error_message = _u8L("Missing system_info in response");
return false;
}
const auto sn = system_info->get_optional<std::string>("sn");
if (!sn || sn->empty()) {
error_message = "Missing printer serial number in response";
error_message = _u8L("Missing printer serial number in response");
return false;
}
*serial_number = *sn;
@@ -165,7 +165,7 @@ namespace Slic3r {
return true;
} catch (const std::exception&) {
error_message = "Error parsing response";
error_message = _u8L("Error parsing response");
return false;
}
}
@@ -431,7 +431,7 @@ namespace Slic3r {
if (std::regex_search(body, match, re)) {
res = true;
} else {
msg = format_error(body, "ElegooLink not detected", 0);
msg = format_error(body, _u8L("ElegooLink not detected"), 0);
res = false;
}
})
@@ -472,9 +472,9 @@ namespace Slic3r {
BOOST_LOG_TRIVIAL(error) << boost::format("%1%: Error getting CC2 device info: %2%, HTTP %3%, body: `%4%`") % name % error % status % body;
res = false;
if (status == 401 || status == 403)
msg = format_error(body, "Invalid access code", status);
msg = format_error(body, _u8L("Invalid access code"), status);
else
msg = format_error(body, error.empty() ? "CC2 device not detected" : error, status);
msg = format_error(body, error.empty() ? _u8L("CC2 device not detected") : error, status);
})
.on_complete([&](std::string body, unsigned status) {
BOOST_LOG_TRIVIAL(debug) << boost::format("%1%: Got CC2 device info: %2%") % name % body;
@@ -482,7 +482,7 @@ namespace Slic3r {
std::string serial_number;
if (!parse_cc2_response(body, error_message, &serial_number)) {
res = false;
msg = format_error(body, error_message.empty() ? "CC2 device not detected" : error_message, status);
msg = format_error(body, error_message.empty() ? _u8L("CC2 device not detected") : error_message, status);
return;
}
persist_sn(Http::get_host_header_value(m_host), token, serial_number);
@@ -531,7 +531,7 @@ namespace Slic3r {
if (std::regex_search(body, match, re)) {
res = true;
} else {
msg = format_error(body, "ElegooLink not detected", 0);
msg = format_error(body, _u8L("ElegooLink not detected"), 0);
res = false;
}
})
@@ -570,16 +570,16 @@ namespace Slic3r {
error % status % body;
res = false;
if (status == 401 || status == 403)
msg = format_error(body, "Invalid access code", status);
msg = format_error(body, _u8L("Invalid access code"), status);
else
msg = format_error(body, error.empty() ? "CC2 device not detected" : error, status);
msg = format_error(body, error.empty() ? _u8L("CC2 device not detected") : error, status);
})
.on_complete([&](std::string body, unsigned status) {
std::string error_message;
std::string serial_number;
if (!parse_cc2_response(body, error_message, &serial_number)) {
res = false;
msg = format_error(body, error_message.empty() ? "CC2 device not detected" : error_message, status);
msg = format_error(body, error_message.empty() ? _u8L("CC2 device not detected") : error_message, status);
return;
}
res = true;
@@ -735,7 +735,7 @@ namespace Slic3r {
} else {
// get error messages
pt::ptree messages = root.get_child("messages");
std::string error_message = "ErrorCode : " + code + "\n";
std::string error_message = (boost::format(_u8L("Error code: %1%")) % code).str() + "\n";
for (pt::ptree::value_type& message : messages) {
std::string field = message.second.get<std::string>("field");
std::string msg = message.second.get<std::string>("message");
@@ -745,10 +745,10 @@ namespace Slic3r {
}
} catch (...) {
BOOST_LOG_TRIVIAL(error) << boost::format("%1%: Error parsing response: %2%") % name % body;
error_fn(wxString::FromUTF8("Error parsing response"));
error_fn(_L("Error parsing response"));
}
} else {
error_fn(format_error(body, "upload failed", status));
error_fn(format_error(body, _u8L("Upload failed"), status));
}
})
.on_error([&](std::string body, std::string error, unsigned status) {
@@ -921,7 +921,7 @@ namespace Slic3r {
BOOST_LOG_TRIVIAL(debug) << boost::format("%1%: CC2 chunk uploaded: HTTP %2%: %3%") % name % status % body;
std::string error_message;
if (!parse_cc2_response(body, error_message)) {
error_fn(format_error(body, error_message.empty() ? "CC2 upload failed" : error_message, status));
error_fn(format_error(body, error_message.empty() ? _u8L("CC2 upload failed") : error_message, status));
return;
}
result = true;
@@ -929,9 +929,9 @@ namespace Slic3r {
.on_error([&](std::string body, std::string error, unsigned status) {
BOOST_LOG_TRIVIAL(error) << boost::format("%1%: Error uploading CC2 chunk: %2%, HTTP %3%, body: `%4%`") % name % error % status % body;
if (status == 401 || status == 403)
error_fn(format_error(body, "Invalid access code", status));
error_fn(format_error(body, _u8L("Invalid access code"), status));
else
error_fn(format_error(body, error.empty() ? "CC2 upload failed" : error, status));
error_fn(format_error(body, error.empty() ? _u8L("CC2 upload failed") : error, status));
})
.on_progress([&](Http::Progress progress, bool& cancel) {
if (progress.ultotal == progress.ulnow)

View File

@@ -85,7 +85,7 @@ bool fix_model_with_cgal_gui(ModelObject &model_object, int volume_idx, GUI::Pro
size_t ivolume = 0;
// Orca: Lambda for updating progress from worker thread.
auto on_progress = [&mtx, &condition, &ivolume, &model_object, &progress](const char *msg, unsigned prcnt) {
auto on_progress = [&mtx, &condition, &ivolume, &model_object, &progress](const std::string &msg, unsigned prcnt) {
std::unique_lock<std::mutex> lock(mtx);
progress.message = msg;
const size_t total = std::max<size_t>(1, model_object.volumes.size());
@@ -108,7 +108,7 @@ bool fix_model_with_cgal_gui(ModelObject &model_object, int volume_idx, GUI::Pro
if (canceled)
throw RepairCanceledException();
on_progress(L("Repairing model object"), 10);
on_progress(_u8L("Repairing model object"), 10);
ModelVolume *volume = model_object.volumes[ivolume];
@@ -118,7 +118,7 @@ bool fix_model_with_cgal_gui(ModelObject &model_object, int volume_idx, GUI::Pro
parts_count = volume->split(1, keep_painting);
if (parts_count > 1) {
const std::string msg = Slic3r::format(L("Split into %1% parts"), parts_count);
on_progress(msg.c_str(), 10);
on_progress(msg, 10);
}
}
@@ -145,7 +145,7 @@ bool fix_model_with_cgal_gui(ModelObject &model_object, int volume_idx, GUI::Pro
if (removed_parts >= parts_count) {
ivolume = part_end;
on_progress(L("Repair finished"), 100);
on_progress(_u8L("Repair finished"), 100);
continue;
}
@@ -161,7 +161,7 @@ bool fix_model_with_cgal_gui(ModelObject &model_object, int volume_idx, GUI::Pro
std::string error;
if (!MeshBoolean::cgal::repair(mesh, nullptr, &error))
throw Slic3r::RuntimeError(error.empty() ? L("Repair failed") : error.c_str());
throw Slic3r::RuntimeError(error.empty() ? _u8L("Repair failed") : error);
part_volume->set_mesh(std::move(mesh));
part_volume->calculate_convex_hull();
@@ -175,20 +175,20 @@ bool fix_model_with_cgal_gui(ModelObject &model_object, int volume_idx, GUI::Pro
ivolume = part_end;
on_progress(L("Repair finished"), 100);
on_progress(_u8L("Repair finished"), 100);
}
model_object.invalidate_bounding_box();
if (ivolume > 0)
--ivolume;
on_progress(L("Repair finished"), 100);
on_progress(_u8L("Repair finished"), 100);
success = true;
finished = true;
} catch (RepairCanceledException &) {
canceled = true;
finished = true;
on_progress(L("Repair canceled"), 100);
on_progress(_u8L("Repair canceled"), 100);
} catch (std::exception &ex) {
success = false;
finished = true;

View File

@@ -119,7 +119,7 @@ bool FlashAir::upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, Error
res = boost::icontains(body, "SUCCESS");
if (! res) {
BOOST_LOG_TRIVIAL(error) << boost::format("%1%: Request completed but no SUCCESS message was received.") % name;
error_fn(format_error(body, L("Unknown error occurred"), 0));
error_fn(format_error(body, _u8L("Unknown error occurred"), 0));
}
})
.perform_sync();
@@ -140,7 +140,7 @@ bool FlashAir::upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, Error
res = boost::icontains(body, "SUCCESS");
if (! res) {
BOOST_LOG_TRIVIAL(error) << boost::format("%1%: Request completed but no SUCCESS message was received.") % name;
error_fn(format_error(body, L("Unknown error occurred"), 0));
error_fn(format_error(body, _u8L("Unknown error occurred"), 0));
}
})
.perform_sync();
@@ -156,7 +156,7 @@ bool FlashAir::upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, Error
res = boost::icontains(body, "SUCCESS");
if (! res) {
BOOST_LOG_TRIVIAL(error) << boost::format("%1%: Request completed but no SUCCESS message was received.") % name;
error_fn(format_error(body, L("Unknown error occurred"), 0));
error_fn(format_error(body, _u8L("Unknown error occurred"), 0));
}
})
.on_error([&](std::string body, std::string error, unsigned status) {

View File

@@ -84,7 +84,7 @@ bool MKS::upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn er
int err_code = get_err_code_from_body(body);
if (err_code != 0) {
BOOST_LOG_TRIVIAL(error) << boost::format("MKS: Request completed but error code was received: %1%") % err_code;
error_fn(format_error(body, L("Unknown error occurred"), 0));
error_fn(format_error(body, _u8L("Unknown error occurred"), 0));
res = false;
}
else if (upload_data.post_action == PrintHostPostUploadAction::StartPrint) {

View File

@@ -183,7 +183,7 @@ bool OctoPrint::test_with_resolved_ip(wxString &msg) const
}
catch (const std::exception&) {
res = false;
msg = "Could not parse server response.";
msg = _L("Could not parse server response.");
}
})
.ssl_revoke_best_effort(m_ssl_revoke_best_effort)
@@ -232,7 +232,7 @@ bool OctoPrint::test(wxString& msg) const
}
catch (const std::exception &) {
res = false;
msg = "Could not parse server response";
msg = _L("Could not parse server response.");
}
})
#ifdef WIN32
@@ -635,7 +635,7 @@ bool PrusaLink::test(wxString& msg) const
}
catch (const std::exception&) {
res = false;
msg = "Could not parse server response";
msg = _L("Could not parse server response.");
}
})
#ifdef WIN32
@@ -811,7 +811,7 @@ bool PrusaLink::test_with_method_check(wxString& msg, bool& use_put) const
}
catch (const std::exception&) {
res = false;
msg = "Could not parse server response";
msg = _L("Could not parse server response.");
}
})
#ifdef WIN32
@@ -891,7 +891,7 @@ bool PrusaLink::test_with_resolved_ip_and_method_check(wxString& msg, bool& use_
}
catch (const std::exception&) {
res = false;
msg = "Could not parse server response";
msg = _L("Could not parse server response.");
}
})

View File

@@ -90,7 +90,7 @@ bool Repetier::test(wxString &msg) const
}
catch (const std::exception &) {
res = false;
msg = "Could not parse server response";
msg = _L("Could not parse server response.");
}
})
.perform_sync();