mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-07-29 12:54:31 +03:00
Added machine evelope configuration parameters
(the MachineEnvelopeConfig class). Added localization support for libslic3r through a callback (the callback is not registered yet, so the localization does nothing). Localized the Print::validate() error messages.
This commit is contained in:
16
xs/src/libslic3r/I18N.hpp
Normal file
16
xs/src/libslic3r/I18N.hpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef slic3r_I18N_hpp_
|
||||
#define slic3r_I18N_hpp_
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
typedef std::string (*translate_fn_type)(const char*);
|
||||
extern translate_fn_type translate_fn;
|
||||
inline void set_translate_callback(translate_fn_type fn) { translate_fn = fn; }
|
||||
inline std::string translate(const std::string &s) { return (translate_fn == nullptr) ? s : (*translate_fn)(s.c_str()); }
|
||||
inline std::string translate(const char *ptr) { return (translate_fn == nullptr) ? std::string(ptr) : (*translate_fn)(ptr); }
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
#endif /* slic3r_I18N_hpp_ */
|
||||
Reference in New Issue
Block a user