libslic3r: Fix Slic3r::format declaration

This commit is contained in:
Bastien Nocera 2023-12-13 18:22:16 +01:00 committed by Lane.Wei
parent f54fb4a1cf
commit 4c836314a6
2 changed files with 6 additions and 2 deletions

View File

@ -29,6 +29,8 @@
#include <tbb/blocked_range.h>
#include <tbb/parallel_for.h>
#include "format.hpp"
//BBS: add json support
#include "nlohmann/json.hpp"
@ -1267,7 +1269,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
}
StringObjectException except;
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 = Slic3r::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));

View File

@ -29,6 +29,8 @@
#include <Shiny/Shiny.h>
#include "format.hpp"
using namespace std::literals;
//! macro used to mark string used at localization,
@ -474,7 +476,7 @@ void PrintObject::generate_support_material()
{SharpTail,L("floating regions")},
{Cantilever,L("floating cantilever")},
{LargeOverhang,L("large overhangs")} };
std::string warning_message = format(L("It seems object %s has %s. Please re-orient the object or enable support generation."),
std::string warning_message = Slic3r::format(L("It seems object %s has %s. Please re-orient the object or enable support generation."),
this->model_object()->name, reasons[sntype]);
this->active_step_add_warning(PrintStateBase::WarningLevel::NON_CRITICAL, warning_message, PrintStateBase::SlicingNeedSupportOn);
}