This commit is contained in:
YuSanka 2019-05-09 15:46:24 +02:00
commit bfcaa6cac0
9 changed files with 27 additions and 28 deletions

View file

@ -1050,8 +1050,8 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionBool(false));
def = this->add("silent_mode", coBool);
def->label = L("Supports silent mode");
def->tooltip = L("Set silent mode for the G-code flavor");
def->label = L("Supports stealth mode");
def->tooltip = L("The firmware supports stealth mode");
def->mode = comExpert;
def->set_default_value(new ConfigOptionBool(true));
@ -2430,7 +2430,7 @@ void PrintConfigDef::init_sla_params()
def = this->add("support_pillar_connection_mode", coEnum);
def->label = L("Support pillar connection mode");
def->tooltip = L("Controls the bridge type between two neigboring pillars."
def->tooltip = L("Controls the bridge type between two neighboring pillars."
" Can be zig-zag, cross (double zig-zag) or dynamic which"
" will automatically switch between the first two depending"
" on the distance of the two pillars.");

View file

@ -82,14 +82,13 @@ void BackgroundSlicingProcess::process_fff()
std::string export_path = m_fff_print->print_statistics().finalize_output_path(m_export_path);
if (copy_file(m_temp_output_path, export_path) != 0)
throw std::runtime_error("Copying of the temporary G-code to the output G-code failed");
m_print->set_status(95, L("Running post-processing scripts"));
m_print->set_status(95, _(L("Running post-processing scripts")).ToUTF8().data());
run_post_process_scripts(export_path, m_fff_print->config());
// #ys_FIXME_localization
m_print->set_status(100, L("G-code file exported to ") + export_path);
m_print->set_status(100, (boost::format(_(L("G-code file exported to %1%")).ToUTF8().data()) % export_path).str());
} else if (! m_upload_job.empty()) {
prepare_upload();
} else {
m_print->set_status(100, L("Slicing complete"));
m_print->set_status(100, _(L("Slicing complete")).ToUTF8().data());
}
this->set_step_done(bspsGCodeFinalize);
}
@ -104,11 +103,11 @@ void BackgroundSlicingProcess::process_sla()
const std::string export_path = m_sla_print->print_statistics().finalize_output_path(m_export_path);
m_sla_print->export_raster(export_path);
// #ys_FIXME_localization
m_print->set_status(100, L("Masked SLA file exported to ") + export_path);
m_print->set_status(100, (boost::format(_(L("Masked SLA file exported to %1%")).ToUTF8().data()) % export_path).str());
} else if (! m_upload_job.empty()) {
prepare_upload();
} else {
m_print->set_status(100, L("Slicing complete"));
m_print->set_status(100, _(L("Slicing complete")).ToUTF8().data());
}
this->set_step_done(bspsGCodeFinalize);
}
@ -397,9 +396,9 @@ void BackgroundSlicingProcess::prepare_upload()
/ boost::filesystem::unique_path("." SLIC3R_APP_KEY ".upload.%%%%-%%%%-%%%%-%%%%");
if (m_print == m_fff_print) {
m_print->set_status(95, L("Running post-processing scripts"));
m_print->set_status(95, _(L("Running post-processing scripts")).ToUTF8().data());
if (copy_file(m_temp_output_path, source_path.string()) != 0) {
throw std::runtime_error("Copying of the temporary G-code to the output G-code failed");
throw std::runtime_error(_(L("Copying of the temporary G-code to the output G-code failed")));
}
run_post_process_scripts(source_path.string(), m_fff_print->config());
m_upload_job.upload_data.upload_path = m_fff_print->print_statistics().finalize_output_path(m_upload_job.upload_data.upload_path.string());
@ -409,7 +408,7 @@ void BackgroundSlicingProcess::prepare_upload()
}
// #ys_FIXME_localization
m_print->set_status(100, (boost::format(L("Scheduling upload to `%1%`. See Window -> Print Host Upload Queue")) % m_upload_job.printhost->get_host()).str());
m_print->set_status(100, (boost::format(_(L("Scheduling upload to `%1%`. See Window -> Print Host Upload Queue")).ToUTF8().data()) % m_upload_job.printhost->get_host()).str());
m_upload_job.upload_data.source_path = std::move(source_path);

View file

@ -1019,8 +1019,8 @@ void StaticText::BUILD()
if (m_opt.height >= 0) size.SetHeight(m_opt.height*m_em_unit);
if (m_opt.width >= 0) size.SetWidth(m_opt.width*m_em_unit);
const wxString legend(m_opt.get_default_value<ConfigOptionString>()->value);
auto temp = new wxStaticText(m_parent, wxID_ANY, _(legend.ToStdString()), wxDefaultPosition, size, wxST_ELLIPSIZE_MIDDLE);
const wxString legend = wxString::FromUTF8(m_opt.get_default_value<ConfigOptionString>()->value.c_str());
auto temp = new wxStaticText(m_parent, wxID_ANY, legend, wxDefaultPosition, size, wxST_ELLIPSIZE_MIDDLE);
temp->SetFont(Slic3r::GUI::wxGetApp().normal_font());
temp->SetBackgroundStyle(wxBG_STYLE_PAINT);
temp->SetFont(wxGetApp().bold_font());

View file

@ -465,7 +465,7 @@ public:
void set_value(const std::string& value, bool change_event = false) {
m_disable_change_event = !change_event;
dynamic_cast<wxStaticText*>(window)->SetLabel(value);
dynamic_cast<wxStaticText*>(window)->SetLabel(wxString::FromUTF8(value.data()));
m_disable_change_event = false;
}
void set_value(const boost::any& value, bool change_event = false) {

View file

@ -749,10 +749,10 @@ void GUI_App::add_config_menu(wxMenuBar *menu)
* and draw user's attention to the application restarting after a language change
*/
wxMessageDialog dialog(nullptr,
_(L("Application will be restarted after language change.")) + "\n" +
_(L("3D-Scene will be cleaned.")) + "\n\n" +
_(L("Please, check your changes before.")),
_(L("Attention!")),
_(L("Switching the language will trigger application restart.\n"
"You will lose all your unsaved data (content of the plater, modified presets).")) + "\n\n" +
_(L("Do you want to proceed?")),
wxString(SLIC3R_APP_NAME) + " - " + _(L("Language selection")),
wxICON_QUESTION | wxOK | wxCANCEL);
if ( dialog.ShowModal() == wxID_CANCEL)
return;

View file

@ -120,9 +120,9 @@ void KBShortcutsDialog::fill_shortcuts()
main_shortcuts.push_back(Shortcut(ctrl+"6" ,L("Switch to Preview")));
main_shortcuts.push_back(Shortcut(ctrl+"P" ,L("Preferences")));
main_shortcuts.push_back(Shortcut(ctrl+"J" ,L("Print host upload queue")));
main_shortcuts.push_back(Shortcut("0-6" ,L("Camera view ")));
main_shortcuts.push_back(Shortcut("+" ,L("Add Instance to selected object ")));
main_shortcuts.push_back(Shortcut("-" ,L("Remove Instance from selected object")));
main_shortcuts.push_back(Shortcut("0-6" ,L("Camera view")));
main_shortcuts.push_back(Shortcut("+" ,L("Add Instance of the selected object")));
main_shortcuts.push_back(Shortcut("-" ,L("Remove Instance of the selected object")));
main_shortcuts.push_back(Shortcut("?" ,L("Show keyboard shortcuts list")));
main_shortcuts.push_back(Shortcut(ctrl/*+"LeftMouse"*/,L("Press to select multiple object or move multiple object with mouse")));

View file

@ -1081,7 +1081,7 @@ void Sidebar::show_sliced_info_sizer(const bool show)
info_text += wxString::Format("\n%s", ps.estimated_normal_print_time);
}
if (ps.estimated_silent_print_time != "N/A") {
new_label += wxString::Format("\n - %s", _(L("silent mode")));
new_label += wxString::Format("\n - %s", _(L("stealth mode")));
info_text += wxString::Format("\n%s", ps.estimated_silent_print_time);
}
p->sliced_info->SetTextAndShow(siEstimatedTime, info_text, new_label);

View file

@ -2148,14 +2148,14 @@ PageShp TabPrinter::build_kinematics_page()
def.width = 15;
def.gui_type = "legend";
def.mode = comAdvanced;
def.tooltip = L("Values in this column are for Full Power mode");
def.set_default_value(new ConfigOptionString{ L("Full Power") });
def.tooltip = L("Values in this column are for Normal mode");
def.set_default_value(new ConfigOptionString{ _(L("Normal")).ToUTF8().data() });
auto option = Option(def, "full_power_legend");
line.append_option(option);
def.tooltip = L("Values in this column are for Silent mode");
def.set_default_value(new ConfigOptionString{ L("Silent") });
def.tooltip = L("Values in this column are for Stealth mode");
def.set_default_value(new ConfigOptionString{ _(L("Stealth")).ToUTF8().data() });
option = Option(def, "silent_legend");
line.append_option(option);

View file

@ -192,7 +192,7 @@ const char* SL1Host::get_name() const { return "SL1Host"; }
wxString SL1Host::get_test_ok_msg () const
{
return _(L("Connection to Prusa SLA works correctly."));
return _(L("Connection to Prusa SL1 works correctly."));
}
wxString SL1Host::get_test_failed_msg (wxString &msg) const