ENH: optimize the copy description format

remove "\n" from _L macro

Change-Id: If1beda4a77f1c2b42945657b7386e155b8bc7a20
Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
Stone Li 2022-12-14 17:00:17 +08:00 committed by Lane.Wei
parent 2da79a3ff0
commit 9bc46daf40
6 changed files with 18 additions and 13 deletions

View file

@ -761,14 +761,14 @@ static StringObjectException layered_print_cleareance_valid(const Print &print,
convex_hulls_temp.push_back(convex_hull);
if (!intersection(convex_hulls_other, convex_hulls_temp).empty()) {
if (warning) {
warning->string = inst->model_instance->get_object()->name + L(" is too close to others, there may be collisions when printing.\n");
warning->string = inst->model_instance->get_object()->name + L(" is too close to others, there may be collisions when printing.") + "\n";
warning->object = inst->model_instance->get_object();
}
}
if (!intersection(exclude_polys, convex_hull).empty()) {
return {inst->model_instance->get_object()->name + L(" is too close to exclusion area, there may be collisions when printing.\n"), inst->model_instance->get_object()};
return {inst->model_instance->get_object()->name + L(" is too close to exclusion area, there may be collisions when printing.") + "\n", inst->model_instance->get_object()};
/*if (warning) {
warning->string = inst->model_instance->get_object()->name + L(" is too close to exclusion area, there may be collisions when printing.\n");
warning->string = inst->model_instance->get_object()->name + L(" is too close to exclusion area, there may be collisions when printing.") + "\n";
warning->object = inst->model_instance->get_object();
}*/
}
@ -1135,7 +1135,8 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
}
StringObjectException except;
except.string = format(L("Plate %d: %s does not support filament %s\n"), this->get_plate_index() + 1, L(bed_type_name), extruder_id + 1);
except.string = format(L("Plate %d: %s does not support filament %s"), this->get_plate_index() + 1, L(bed_type_name), extruder_id + 1);
except.string += "\n";
except.type = STRING_EXCEPT_FILAMENT_NOT_MATCH_BED_TYPE;
except.params.push_back(std::to_string(this->get_plate_index() + 1));
except.params.push_back(L(bed_type_name));

View file

@ -323,7 +323,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
config->opt_bool("enable_overhang_speed"))
{
wxString msg_text = _(L("Arachne engine only works when overhang slowing down is disabled.\n"
"This may cause decline in the quality of overhang surface when print fastly\n"));
"This may cause decline in the quality of overhang surface when print fastly")) + "\n";
if (is_global_config)
msg_text += "\n" + _(L("Disable overhang slowing down automatically? \n"
"Yes - Enable arachne and disable overhang slowing down\n"
@ -444,7 +444,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
if (is_global_config)
msg_text += "\n" + _L("Switch to rectilinear pattern?\n"
"Yes - switch to rectilinear pattern automaticlly\n"
"No - reset density to default non 100% value automaticlly\n");
"No - reset density to default non 100% value automaticlly") + "\n";
MessageDialog dialog(m_msg_dlg_parent, msg_text, "",
wxICON_WARNING | (is_global_config ? wxYES | wxNO : wxOK) );
DynamicPrintConfig new_conf = *config;

View file

@ -3127,7 +3127,7 @@ void MainFrame::on_select_default_preset(SimpleEvent& evt)
"It contains the following information:\n"
"1. The Process presets\n"
"2. The Filament presets\n"
"3. The Printer presets\n"),
"3. The Printer presets"),
_L("Synchronization"),
wxCENTER |
wxYES_DEFAULT | wxYES_NO |

View file

@ -3068,8 +3068,9 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
}
} else if (load_config && (file_version > app_version)) {
if (config_substitutions.unrecogized_keys.size() > 0) {
wxString text = wxString::Format(_L("The 3mf's version %s is newer than %s's version %s, Found following keys unrecognized:\n"),
wxString text = wxString::Format(_L("The 3mf's version %s is newer than %s's version %s, Found following keys unrecognized:"),
file_version.to_string(), std::string(SLIC3R_APP_FULL_NAME), app_version.to_string());
text += "\n";
bool first = true;
// std::string context = into_u8(text);
wxString context = text;
@ -3088,8 +3089,9 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
else {
//if the minor version is not matched
if (file_version.min() != app_version.min()) {
wxString text = wxString::Format(_L("The 3mf's version %s is newer than %s's version %s, Suggest to upgrade your software.\n"),
wxString text = wxString::Format(_L("The 3mf's version %s is newer than %s's version %s, Suggest to upgrade your software."),
file_version.to_string(), std::string(SLIC3R_APP_FULL_NAME), app_version.to_string());
text += "\n";
show_info(q, text, _L("Newer 3mf version"));
}
}
@ -11157,7 +11159,8 @@ void Plater::post_process_string_object_exception(StringObjectException &err)
break;
}
}
err.string = format(L("Plate %d: %s does not support filament %s (%s).\n"), err.params[0], err.params[1], err.params[2], filament_name);
err.string = format(_L("Plate %d: %s does not support filament %s (%s)."), err.params[0], err.params[1], err.params[2], filament_name);
err.string += "\n";
}
} catch (...) {
;

View file

@ -1947,13 +1947,13 @@ void SelectMachineDialog::show_errors(wxString &info)
void SelectMachineDialog::on_ok_btn(wxCommandEvent &event)
{
std::vector<wxString> confirm_text;
confirm_text.push_back(_L("Please check the following infomation and click Confirm to continue sending print:\n"));
confirm_text.push_back(_L("Please check the following infomation and click Confirm to continue sending print:") + "\n");
#if 0
//Check Printer Model Id
bool is_same_printer_type = is_same_printer_model();
if (!is_same_printer_type)
confirm_text.push_back(_L("The printer type used to generate G-code is not the same type as the currently selected physical printer. It is recommend to re-slice by selecting the same printer type.\n"));
confirm_text.push_back(_L("The printer type used to generate G-code is not the same type as the currently selected physical printer. It is recommend to re-slice by selecting the same printer type.") + "\n");
#else
bool is_same_printer_type = true;
#endif

View file

@ -1495,7 +1495,8 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
void Tab::show_timelapse_warning_dialog() {
if (!m_is_timelapse_wipe_tower_already_prompted) {
wxString msg_text = _(L("When recording timelapse without toolhead, it is recommended to add a \"Timelapse Wipe Tower\" \n"
"by right-click the empty position of build plate and choose \"Add Primitive\"->\"Timelapse Wipe Tower\".\n"));
"by right-click the empty position of build plate and choose \"Add Primitive\"->\"Timelapse Wipe Tower\"."));
msg_text += "\n";
MessageDialog dialog(nullptr, msg_text, "", wxICON_WARNING | wxOK);
dialog.ShowModal();
m_is_timelapse_wipe_tower_already_prompted = true;