mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
Fixed mangling of UTF characters when converted implicitely to
wxString on Windows through the + operator.
This commit is contained in:
parent
92875709e1
commit
7dfe2e2595
6 changed files with 30 additions and 27 deletions
|
@ -5,6 +5,9 @@
|
|||
#include <vector>
|
||||
#include "Config.hpp"
|
||||
|
||||
#include <wx/intl.h>
|
||||
#include <wx/string.h>
|
||||
|
||||
class wxApp;
|
||||
class wxWindow;
|
||||
class wxFrame;
|
||||
|
@ -30,6 +33,12 @@ class PresetUpdater;
|
|||
class DynamicPrintConfig;
|
||||
class TabIface;
|
||||
|
||||
#define _(s) Slic3r::translate((s))
|
||||
inline wxString translate(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)); }
|
||||
inline wxString translate(const wchar_t *s) { return wxGetTranslation(s); }
|
||||
inline wxString translate(const std::string &s) { return wxGetTranslation(wxString(s.c_str(), wxConvUTF8)); }
|
||||
inline wxString translate(const std::wstring &s) { return wxGetTranslation(s.c_str()); }
|
||||
|
||||
// !!! If you needed to translate some wxString,
|
||||
// !!! please use _(L(string))
|
||||
// !!! _() - is a standard wxWidgets macro to translate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue