Unified usage of localization macros in slic3r/libslic3r

This commit is contained in:
YuSanka 2023-03-20 10:38:34 +01:00 committed by Lukas Matena
parent 9cb50e6586
commit 19f2a1d9e9
44 changed files with 211 additions and 264 deletions

View file

@ -56,10 +56,6 @@
using namespace std::literals;
//! macro used to mark string used at localization,
//! return same string
#define L(s) Slic3r::I18N::translate(s)
#ifdef SLIC3R_DEBUG_SLICE_PROCESSING
#define SLIC3R_DEBUG
#endif
@ -153,7 +149,7 @@ void PrintObject::make_perimeters()
if (! this->set_started(posPerimeters))
return;
m_print->set_status(20, L("Generating perimeters"));
m_print->set_status(20, _u8L("Generating perimeters"));
BOOST_LOG_TRIVIAL(info) << "Generating perimeters..." << log_memory_info();
// Revert the typed slices into untyped slices.
@ -258,7 +254,7 @@ void PrintObject::prepare_infill()
if (! this->set_started(posPrepareInfill))
return;
m_print->set_status(30, L("Preparing infill"));
m_print->set_status(30, _u8L("Preparing infill"));
if (m_typed_slices) {
// To improve robustness of detect_surfaces_type() when reslicing (working with typed slices), see GH issue #7442.
@ -403,7 +399,7 @@ void PrintObject::infill()
this->prepare_infill();
if (this->set_started(posInfill)) {
m_print->set_status(45, L("making infill"));
m_print->set_status(45, _u8L("making infill"));
const auto& adaptive_fill_octree = this->m_adaptive_fill_octrees.first;
const auto& support_fill_octree = this->m_adaptive_fill_octrees.second;
@ -450,7 +446,7 @@ void PrintObject::generate_support_spots()
{
if (this->set_started(posSupportSpotsSearch)) {
BOOST_LOG_TRIVIAL(debug) << "Searching support spots - start";
m_print->set_status(65, L("Searching support spots"));
m_print->set_status(65, _u8L("Searching support spots"));
if (!this->shared_regions()->generated_support_points.has_value()) {
PrintTryCancel cancel_func = m_print->make_try_cancel();
SupportSpotsGenerator::Params params{this->print()->m_config.filament_type.values,
@ -475,7 +471,7 @@ void PrintObject::generate_support_material()
if (this->set_started(posSupportMaterial)) {
this->clear_support_layers();
if ((this->has_support() && m_layers.size() > 1) || (this->has_raft() && ! m_layers.empty())) {
m_print->set_status(70, L("Generating support material"));
m_print->set_status(70, _u8L("Generating support material"));
this->_generate_support_material();
m_print->throw_if_canceled();
} else {
@ -496,7 +492,7 @@ void PrintObject::estimate_curled_extrusions()
if (this->set_started(posEstimateCurledExtrusions)) {
if (this->print()->config().avoid_crossing_curled_overhangs) {
BOOST_LOG_TRIVIAL(debug) << "Estimating areas with curled extrusions - start";
m_print->set_status(88, L("Estimating curled extrusions"));
m_print->set_status(88, _u8L("Estimating curled extrusions"));
// Estimate curling of support material and add it to the malformaition lines of each layer
float support_flow_width = support_material_flow(this, this->config().layer_height).width();