From 3c0737c5880c054431950d89b36d88ec3448c489 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 9 May 2019 15:37:52 +0200 Subject: [PATCH 1/3] Fixed typo in "Machine limits" information strings --- src/libslic3r/PrintConfig.cpp | 44 +++++++++++++++++++---------------- src/slic3r/GUI/Field.cpp | 2 +- src/slic3r/GUI/Tab.cpp | 2 +- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 3a9573ccf..9fec898fe 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -1075,16 +1075,16 @@ void PrintConfigDef::init_fff_params() // Add the machine feedrate limits for XYZE axes. (M203) def = this->add("machine_max_feedrate_" + axis.name, coFloats); def->full_label = (boost::format("Maximum feedrate %1%") % axis_upper).str(); - L("Maximum feedrate x"); - L("Maximum feedrate y"); - L("Maximum feedrate z"); - L("Maximum feedrate e"); + L("Maximum feedrate X"); + L("Maximum feedrate Y"); + L("Maximum feedrate Z"); + L("Maximum feedrate E"); def->category = L("Machine limits"); def->tooltip = (boost::format("Maximum feedrate of the %1% axis") % axis_upper).str(); - L("Maximum feedrate of the x axis"); - L("Maximum feedrate of the y axis"); - L("Maximum feedrate of the z axis"); - L("Maximum feedrate of the e axis"); + L("Maximum feedrate of the X axis"); + L("Maximum feedrate of the Y axis"); + L("Maximum feedrate of the Z axis"); + L("Maximum feedrate of the E axis"); def->sidetext = L("mm/s"); def->min = 0; def->width = machine_limits_opt_width; @@ -1093,12 +1093,16 @@ void PrintConfigDef::init_fff_params() // Add the machine acceleration limits for XYZE axes (M201) def = this->add("machine_max_acceleration_" + axis.name, coFloats); def->full_label = (boost::format("Maximum acceleration %1%") % axis_upper).str(); - L("Maximum acceleration x"); - L("Maximum acceleration y"); - L("Maximum acceleration z"); - L("Maximum acceleration e"); + L("Maximum acceleration X"); + L("Maximum acceleration Y"); + L("Maximum acceleration Z"); + L("Maximum acceleration E"); def->category = L("Machine limits"); def->tooltip = (boost::format("Maximum acceleration of the %1% axis") % axis_upper).str(); + L("Maximum acceleration of the X axis"); + L("Maximum acceleration of the Y axis"); + L("Maximum acceleration of the Z axis"); + L("Maximum acceleration of the E axis"); def->sidetext = L("mm/s²"); def->min = 0; def->width = machine_limits_opt_width; @@ -1107,16 +1111,16 @@ void PrintConfigDef::init_fff_params() // Add the machine jerk limits for XYZE axes (M205) def = this->add("machine_max_jerk_" + axis.name, coFloats); def->full_label = (boost::format("Maximum jerk %1%") % axis_upper).str(); - L("Maximum jerk x"); - L("Maximum jerk y"); - L("Maximum jerk z"); - L("Maximum jerk e"); + L("Maximum jerk X"); + L("Maximum jerk Y"); + L("Maximum jerk Z"); + L("Maximum jerk E"); def->category = L("Machine limits"); def->tooltip = (boost::format("Maximum jerk of the %1% axis") % axis_upper).str(); - L("Maximum jerk of the x axis"); - L("Maximum jerk of the y axis"); - L("Maximum jerk of the z axis"); - L("Maximum jerk of the e axis"); + L("Maximum jerk of the X axis"); + L("Maximum jerk of the Y axis"); + L("Maximum jerk of the Z axis"); + L("Maximum jerk of the E axis"); def->sidetext = L("mm/s"); def->min = 0; def->width = machine_limits_opt_width; diff --git a/src/slic3r/GUI/Field.cpp b/src/slic3r/GUI/Field.cpp index 4f1c024eb..a8a2b7e92 100644 --- a/src/slic3r/GUI/Field.cpp +++ b/src/slic3r/GUI/Field.cpp @@ -1020,7 +1020,7 @@ void StaticText::BUILD() if (m_opt.width >= 0) size.SetWidth(m_opt.width*m_em_unit); const wxString legend(m_opt.get_default_value()->value); - auto temp = new wxStaticText(m_parent, wxID_ANY, legend, wxDefaultPosition, size, wxST_ELLIPSIZE_MIDDLE); + auto temp = new wxStaticText(m_parent, wxID_ANY, _(legend.ToStdString()), wxDefaultPosition, size, wxST_ELLIPSIZE_MIDDLE); temp->SetFont(Slic3r::GUI::wxGetApp().normal_font()); temp->SetBackgroundStyle(wxBG_STYLE_PAINT); temp->SetFont(wxGetApp().bold_font()); diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index c6043e802..d7e6d398c 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -2125,7 +2125,7 @@ void TabPrinter::extruders_count_changed(size_t extruders_count) void TabPrinter::append_option_line(ConfigOptionsGroupShp optgroup, const std::string opt_key) { auto option = optgroup->get_option(opt_key, 0); - auto line = Line{ option.opt.full_label, "" }; + auto line = Line{ _(option.opt.full_label), "" }; line.append_option(option); if (m_use_silent_mode) line.append_option(optgroup->get_option(opt_key, 1)); From 32de7e1bb1616be87008d0d3df4bb0cd27e2719c Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 9 May 2019 16:14:45 +0200 Subject: [PATCH 2/3] Fixed ButtonsDescription localization --- src/slic3r/GUI/Tab.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 8113df643..91424b830 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -3062,21 +3062,25 @@ void Tab::compatible_widget_reload(PresetDependencies &deps) void Tab::fill_icon_descriptions() { - m_icon_descriptions.push_back(t_icon_description(&m_bmp_value_lock, L("LOCKED LOCK;" - "indicates that the settings are the same as the system values for the current option group"))); + m_icon_descriptions.push_back(t_icon_description(&m_bmp_value_lock, L("LOCKED LOCK") ";" + // TRN Description for "LOCKED LOCK" + L("indicates that the settings are the same as the system values for the current option group"))); - m_icon_descriptions.push_back(t_icon_description(&m_bmp_value_unlock, L("UNLOCKED LOCK;" - "indicates that some settings were changed and are not equal to the system values for " + m_icon_descriptions.push_back(t_icon_description(&m_bmp_value_unlock, L("UNLOCKED LOCK") ";" + // TRN Description for "UNLOCKED LOCK" + L("indicates that some settings were changed and are not equal to the system values for " "the current option group.\n" "Click the UNLOCKED LOCK icon to reset all settings for current option group to " "the system values."))); - m_icon_descriptions.push_back(t_icon_description(&m_bmp_white_bullet, L("WHITE BULLET;" - "for the left button: \tindicates a non-system preset,\n" + m_icon_descriptions.push_back(t_icon_description(&m_bmp_white_bullet, L("WHITE BULLET") ";" + // TRN Description for "WHITE BULLET" + L("for the left button: \tindicates a non-system preset,\n" "for the right button: \tindicates that the settings hasn't been modified."))); - m_icon_descriptions.push_back(t_icon_description(&m_bmp_value_revert, L("BACK ARROW;" - "indicates that the settings were changed and are not equal to the last saved preset for " + m_icon_descriptions.push_back(t_icon_description(&m_bmp_value_revert, L("BACK ARROW") ";" + // TRN Description for "BACK ARROW" + L("indicates that the settings were changed and are not equal to the last saved preset for " "the current option group.\n" "Click the BACK ARROW icon to reset all settings for the current option group to " "the last saved preset."))); From 0196fbb60ffefe5ac3156af2b7b376b0f86405f2 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 9 May 2019 16:38:44 +0200 Subject: [PATCH 3/3] AboutDialog localization --- src/slic3r/GUI/AboutDialog.cpp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/slic3r/GUI/AboutDialog.cpp b/src/slic3r/GUI/AboutDialog.cpp index b1a2556e7..85f332f42 100644 --- a/src/slic3r/GUI/AboutDialog.cpp +++ b/src/slic3r/GUI/AboutDialog.cpp @@ -89,21 +89,28 @@ AboutDialog::AboutDialog() int size[] = {fs,fs,fs,fs,fs,fs,fs}; m_html->SetFonts(font.GetFaceName(), font.GetFaceName(), size); m_html->SetBorders(2); + const wxString copyright_str = _(L("Copyright")); + // TRN "Slic3r _is licensed under the_ License" + const wxString is_lecensed_str = _(L("is licensed under the")); + const wxString license_str = _(L("GNU Affero General Public License, version 3")); + const wxString contributors_str = _(L("Contributions by Henrik Brix Andersen, Nicolas Dandrimont, Mark Hindess, Petr Ledvina, Joseph Lenox, Y. Sapir, Mike Sheldrake, Vojtech Bubnik and numerous others.")); const auto text = wxString::Format( "" "" "" - "Copyright © 2016-2019 Prusa Research.
" - "Copyright © 2011-2018 Alessandro Ranellucci.
" - "Slic3r is licensed under the " - "GNU Affero General Public License, version 3." + "%s © 2016-2019 Prusa Research.
" + "%s © 2011-2018 Alessandro Ranellucci.
" + "Slic3r %s " + "%s." "

" - "Contributions by Henrik Brix Andersen, Nicolas Dandrimont, Mark Hindess, Petr Ledvina, Joseph Lenox, Y. Sapir, Mike Sheldrake, Vojtech Bubnik and numerous others. " - "Manual by Gary Hodgson. Inspired by the RepRap community.
" - "Slic3r logo designed by Corey Daniels, Silk Icon Set designed by Mark James. " + "%s" "
" "" - "", bgr_clr_str, text_clr_str, text_clr_str); + "", bgr_clr_str, text_clr_str, text_clr_str, + copyright_str, copyright_str, + is_lecensed_str, + license_str, + contributors_str); m_html->SetPage(text); vsizer->Add(m_html, 1, wxEXPAND | wxBOTTOM, 10); m_html->Bind(wxEVT_HTML_LINK_CLICKED, &AboutDialog::onLinkClicked, this); @@ -113,9 +120,6 @@ AboutDialog::AboutDialog() this->SetEscapeId(wxID_CLOSE); this->Bind(wxEVT_BUTTON, &AboutDialog::onCloseDialog, this, wxID_CLOSE); vsizer->Add(buttons, 0, wxEXPAND | wxRIGHT | wxBOTTOM, 3); - -// this->Bind(wxEVT_LEFT_DOWN, &AboutDialog::onCloseDialog, this); -// logo->Bind(wxEVT_LEFT_DOWN, &AboutDialog::onCloseDialog, this); SetSizer(main_sizer); main_sizer->SetSizeHints(this);