From f0458daceb864dbbe704a37fba50aaf369fd02e5 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Fri, 20 Oct 2023 13:33:56 +0200 Subject: [PATCH] Fixes in phrases --- src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp | 4 +++- src/slic3r/GUI/MainFrame.cpp | 2 +- src/slic3r/GUI/Plater.cpp | 21 ++++++++------------- src/slic3r/GUI/WifiConfigDialog.cpp | 11 +++++++---- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp index 54d4b665d0..58ed9ac29f 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp @@ -1136,8 +1136,10 @@ std::vector create_shape_warnings(const EmbossShape &shape, float s } std::string fill_warning = create_fill_warning(*shape); - if (!fill_warning.empty()) + if (!fill_warning.empty()) { + // TRN: The first placeholder is shape identifier, the second one is text describing the problem. add_warning(shape_index * 2, GUI::format(_L("Fill of shape (%1%) contains unsupported: %2% "), shape->id, fill_warning)); + } float minimal_width_in_mm = 1e-3f; if (shape->strokeWidth <= minimal_width_in_mm * scale) { diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 26befcb803..74f28933ec 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -1928,7 +1928,7 @@ void MainFrame::load_config_file() DynamicPrintConfig config = wxGetApp().preset_bundle->full_config(); const auto* post_process = config.opt("post_process"); if (post_process != nullptr && !post_process->values.empty()) { - const wxString msg = _L("The selected config file contains a post-processing script") + "\n" + _L("Please review the script carefully before running it."); + const wxString msg = _L("The selected config file contains a post-processing script.\nPlease review the script carefully before exporting G-code."); wxString text; for (const auto& s : post_process->values) { text += s; diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 102d53a39f..67f5c1fe75 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -2616,13 +2616,12 @@ std::vector Plater::priv::load_files(const std::vector& input_ if (!config.empty()) { const auto* post_process = config.opt("post_process"); if (post_process != nullptr && !post_process->values.empty()) { - wxString msg = type_3mf ? _L("The selected 3MF file contains a post-processing script") : - _L("The selected AMF file contains a post-processing script"); - msg += "\n" + _L("Please review the script carefully before running it."); + // TRN The placeholder is either "3MF" or "AMF" + wxString msg = GUI::format_wxstr(_L("The selected %1% file contains a post-processing script.\n" + "Please review the script carefully before exporting G-code."), type_3mf ? "3MF" : "AMF" ); wxString text; - for (const auto& s : post_process->values) { + for (const auto& s : post_process->values) text += s; - } InfoDialog msg_dlg(nullptr, msg, text, true, wxOK | wxICON_WARNING); msg_dlg.set_caption(wxString(SLIC3R_APP_NAME " - ") + _L("Attention!")); @@ -5589,10 +5588,8 @@ void Plater::convert_gcode_to_ascii() } else { output_file = rename_file(output_file, ".gcode"); - wxString msg = _L("You are trying to convert to ASCII a binary file whose extension is '.gcode'."); - msg += "\n" + _L("The exported file will be renamed as:"); - msg += "\n\n" + output_file; - msg += "\n\n" + _L("Continue with export?"); + wxString msg = GUI::format_wxstr("The converted binary G-code file has '.gcode' extension.\n" + "The exported file will be renamed to:\n\n%1%\n\nDo you want to continue?", output_file); MessageDialog msg_dlg(this, msg, _L("Warning"), wxYES_NO); if (msg_dlg.ShowModal() != wxID_YES) return; @@ -5669,10 +5666,8 @@ void Plater::convert_gcode_to_binary() } else { output_file = rename_file(output_file, ".bgcode"); - wxString msg = _L("You are trying to convert to binary an ASCII file whose extension is '.bgcode'."); - msg += "\n" + _L("The exported file will be renamed as:"); - msg += "\n\n" + output_file; - msg += "\n\n" + _L("Continue with export?"); + wxString msg = GUI::format_wxstr("The converted ASCII G-code file has '.bgcode' extension.\n" + "The exported file will be renamed to:\n\n%1%\n\nDo you want to continue?", output_file); MessageDialog msg_dlg(this, msg, _L("Warning"), wxYES_NO); if (msg_dlg.ShowModal() != wxID_YES) return; diff --git a/src/slic3r/GUI/WifiConfigDialog.cpp b/src/slic3r/GUI/WifiConfigDialog.cpp index 0f0928af79..1636839ad0 100644 --- a/src/slic3r/GUI/WifiConfigDialog.cpp +++ b/src/slic3r/GUI/WifiConfigDialog.cpp @@ -18,7 +18,10 @@ namespace Slic3r { namespace GUI { +const char* WIFI_CONFIGFILE_NAME = "prusa_printer_settings.ini"; + WifiConfigDialog::WifiConfigDialog(wxWindow* parent, std::string& file_path, RemovableDriveManager* removable_manager) + // TRN: This is the dialog title. : DPIDialog(parent, wxID_ANY, _L("Wi-Fi Configuration File Generator"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) , m_wifi_scanner(new WifiScanner()) , out_file_path(file_path) @@ -33,14 +36,14 @@ WifiConfigDialog::WifiConfigDialog(wxWindow* parent, std::string& file_path, Rem // TRN Wifi config dialog explanation line 1. wxStaticText* explain_label1 = new wxStaticText(panel, wxID_ANY, _L("Generate a file to be loaded by a Prusa printer to configure its Wi-Fi connection.")); // TRN Wifi config dialog explanation line 2. - wxStaticText* explain_label2 = new wxStaticText(panel, wxID_ANY, _L("Write this file on a USB flash drive. Its name will be prusa_printer_settings.ini.")); + wxStaticText* explain_label2 = new wxStaticText(panel, wxID_ANY, GUI::format_wxstr(_L("Write this file on the USB flash drive. Its name will be %1%."), WIFI_CONFIGFILE_NAME)); // TRN Wifi config dialog explanation line 3. wxStaticText* explain_label3 = new wxStaticText(panel, wxID_ANY, _L("Your Prusa Printer should load this file automatically.")); // TRN Wifi config dialog explanation line 4. - wxStaticText* explain_label4 = new wxStaticText(panel, wxID_ANY, _L("Note: This file will contains SSID and password in plain text.")); + wxStaticText* explain_label4 = new wxStaticText(panel, wxID_ANY, _L("Note: This file will contain the SSID and password in plain text.")); auto* ssid_sizer = new wxBoxSizer(wxHORIZONTAL); - // TRN SSID of WiFi network. + // TRN SSID of WiFi network. It is a standard abbreviation which should probably not change in most languages. wxStaticText* ssid_label = new wxStaticText(panel, wxID_ANY, GUI::format_wxstr("%1%:", _L("SSID"))); m_ssid_combo = new ::ComboBox(panel, wxID_ANY); #if __APPLE__ @@ -212,7 +215,7 @@ void WifiConfigDialog::on_ok(wxCommandEvent& e) return; } - boost::filesystem::path file_path = boost::filesystem::path(selected_path) / "prusa_printer_settings.ini"; + boost::filesystem::path file_path = boost::filesystem::path(selected_path) / WIFI_CONFIGFILE_NAME; bool path_on_removable_media = m_removable_manager->set_and_verify_last_save_path(file_path.string()); if (!path_on_removable_media) {