mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
GUI::show_error() is now generalized for std::string and const char*
Fixed return type of std::string translate_utf8() with context (incorrectly returned wxString, should return std::string). Fixed double translation of BackgroundSlicingProcess::validate() in Plater.
This commit is contained in:
parent
0486e412f4
commit
a7ffd2a6fe
8 changed files with 19 additions and 12 deletions
|
@ -67,10 +67,10 @@ namespace I18N {
|
|||
inline wxString translate(const std::string &s, const char* ctx) { return _wxGetTranslation_ctx(wxString(s.c_str(), wxConvUTF8), ctx); }
|
||||
inline wxString translate(const std::wstring &s, const char* ctx) { return _wxGetTranslation_ctx(s.c_str(), ctx); }
|
||||
|
||||
inline wxString translate_utf8(const char *s, const char* ctx) { return _wxGetTranslation_ctx(wxString(s, wxConvUTF8), ctx).ToUTF8().data(); }
|
||||
inline wxString translate_utf8(const wchar_t *s, const char* ctx) { return _wxGetTranslation_ctx(s, ctx).ToUTF8().data(); }
|
||||
inline wxString translate_utf8(const std::string &s, const char* ctx) { return _wxGetTranslation_ctx(wxString(s.c_str(), wxConvUTF8), ctx).ToUTF8().data(); }
|
||||
inline wxString translate_utf8(const std::wstring &s, const char* ctx) { return _wxGetTranslation_ctx(s.c_str(), ctx).ToUTF8().data(); }
|
||||
inline std::string translate_utf8(const char *s, const char* ctx) { return _wxGetTranslation_ctx(wxString(s, wxConvUTF8), ctx).ToUTF8().data(); }
|
||||
inline std::string translate_utf8(const wchar_t *s, const char* ctx) { return _wxGetTranslation_ctx(s, ctx).ToUTF8().data(); }
|
||||
inline std::string translate_utf8(const std::string &s, const char* ctx) { return _wxGetTranslation_ctx(wxString(s.c_str(), wxConvUTF8), ctx).ToUTF8().data(); }
|
||||
inline std::string translate_utf8(const std::wstring &s, const char* ctx) { return _wxGetTranslation_ctx(s.c_str(), ctx).ToUTF8().data(); }
|
||||
|
||||
#undef _wxGetTranslation_ctx
|
||||
} // namespace I18N
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue