mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-01 09:32:50 +00:00
Fixed #735 & PresetHints.cpp is marked to localization
* Macro _LC is created to put translated string into std::string correctly. * Macro _LU8 is changed to function L_str. * Created function from_u8
This commit is contained in:
@@ -25,13 +25,10 @@ class TabIface;
|
||||
|
||||
//! macro used to localization, return wxString
|
||||
#define _L(s) wxGetTranslation(s)
|
||||
|
||||
//! macro used to localization of ConfigOptionDef's std::strings
|
||||
//! Explicitly specify that the source string is already in UTF-8 encoding
|
||||
#define _LU8(s) wxGetTranslation(wxString(s.c_str(), wxConvUTF8))
|
||||
|
||||
//! macro used to mark string used at localization,
|
||||
//! return same string
|
||||
//! macro used to localization, return wxScopedCharBuffer
|
||||
//! With wxConvUTF8 explicitly specify that the source string is already in UTF-8 encoding
|
||||
#define _LC(s) wxGetTranslation(wxString(s, wxConvUTF8)).utf8_str()
|
||||
//! macro used to mark string used at localization, return same string
|
||||
#define _LS(s) s
|
||||
|
||||
namespace GUI {
|
||||
@@ -112,6 +109,11 @@ void create_combochecklist(wxComboCtrl* comboCtrl, std::string text, std::string
|
||||
// encoded inside an int.
|
||||
int combochecklist_get_flags(wxComboCtrl* comboCtrl);
|
||||
|
||||
// Return translated std::string as a wxString
|
||||
wxString L_str(std::string str);
|
||||
// Return wxString from std::string in UTF8
|
||||
wxString from_u8(std::string str);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user