Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2020-02-21 15:38:06 +0300
committerbubnikv <bubnikv@gmail.com>2020-02-21 15:38:06 +0300
commita7ffd2a6fe5408a135c1b7c33da33613bc3b63a7 (patch)
tree1c3c7725f2c729c5538315938a147441e4e4ef31 /src/slic3r/GUI/I18N.hpp
parent0486e412f4dc2618a79b81db093bb7dbfa5aa842 (diff)
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.
Diffstat (limited to 'src/slic3r/GUI/I18N.hpp')
-rw-r--r--src/slic3r/GUI/I18N.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/slic3r/GUI/I18N.hpp b/src/slic3r/GUI/I18N.hpp
index bf3103f77..8cf226a73 100644
--- a/src/slic3r/GUI/I18N.hpp
+++ b/src/slic3r/GUI/I18N.hpp
@@ -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