mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 18:27:58 -06: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:
parent
3d805a0f43
commit
bc97184c63
6 changed files with 83 additions and 66 deletions
|
@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue