mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Follow-up of c7cdb2fd3e
-> Fixed localization of error messages for .3mf and .amf version check
This commit is contained in:
parent
7f589e79f7
commit
b5c57fc134
2 changed files with 16 additions and 2 deletions
|
@ -11,6 +11,8 @@
|
|||
#include "../GCode.hpp"
|
||||
#include "../PrintConfig.hpp"
|
||||
#include "../Utils.hpp"
|
||||
#include "../I18N.hpp"
|
||||
|
||||
#include "AMF.hpp"
|
||||
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
|
@ -42,6 +44,11 @@ const char* SLIC3R_CONFIG_TYPE = "slic3rpe_config";
|
|||
namespace Slic3r
|
||||
{
|
||||
|
||||
//! macro used to mark string used at localization,
|
||||
//! return same string
|
||||
#define L(s) (s)
|
||||
#define _(s) Slic3r::I18N::translate(s)
|
||||
|
||||
struct AMFParserContext
|
||||
{
|
||||
AMFParserContext(XML_Parser parser, DynamicPrintConfig* config, Model* model) :
|
||||
|
@ -803,7 +810,7 @@ bool extract_model_from_archive(mz_zip_archive& archive, const mz_zip_archive_fi
|
|||
|
||||
if (check_version && (ctx.m_version > VERSION_AMF))
|
||||
{
|
||||
std::string msg = "The selected amf file has been saved with a newer version of " + std::string(SLIC3R_APP_NAME) + " and is not compatibile.";
|
||||
std::string msg = _(L("The selected amf file has been saved with a newer version of " + std::string(SLIC3R_APP_NAME) + " and is not compatibile."));
|
||||
throw std::runtime_error(msg.c_str());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue