diff --git a/src/libslic3r/GCode/PostProcessor.cpp b/src/libslic3r/GCode/PostProcessor.cpp index 89456dfca..ced74e3eb 100644 --- a/src/libslic3r/GCode/PostProcessor.cpp +++ b/src/libslic3r/GCode/PostProcessor.cpp @@ -20,11 +20,6 @@ #include #include -//! macro used to mark string used at localization, -//! return same string -#define L(s) (s) -#define _(s) Slic3r::I18N::translate(s) - // https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/ // This routine appends the given argument to a command line such that CommandLineToArgvW will return the argument string unchanged. // Arguments in a command line should be separated by spaces; this function does not add these spaces. @@ -190,6 +185,11 @@ static int run_script(const std::string &script, const std::string &gcode, std:: namespace Slic3r { +//! macro used to mark string used at localization, +//! return same string +#define L(s) (s) +#define _(s) Slic3r::I18N::translate(s) + // Run post processing script / scripts if defined. // Returns true if a post-processing script was executed. // Returns false if no post-processing script was defined. @@ -285,10 +285,10 @@ bool run_post_process_scripts(std::string &src_path, bool make_copy, const std:: throw Slic3r::RuntimeError(msg); } if (! boost::filesystem::exists(gcode_file)) { - const std::string msg = (boost::format(_( + const std::string msg = (boost::format(_(L( "Post-processing script %1% failed.\n\n" "The post-processing script is expected to change the G-code file %2% in place, but the G-code file was deleted and likely saved under a new name.\n" - "Please adjust the post-processing script to change the G-code in place and consult the manual on how to optionally rename the post-processed G-code file.\n")) + "Please adjust the post-processing script to change the G-code in place and consult the manual on how to optionally rename the post-processed G-code file.\n"))) % script % path).str(); BOOST_LOG_TRIVIAL(error) << msg; throw Slic3r::RuntimeError(msg);