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:
bubnikv 2020-02-21 13:38:06 +01:00
parent 0486e412f4
commit a7ffd2a6fe
8 changed files with 19 additions and 12 deletions

View file

@ -3032,7 +3032,7 @@ void Tab::save_preset(std::string name /*= ""*/)
const Preset &preset = m_presets->get_selected_preset();
auto default_name = preset.is_default ? "Untitled" :
// preset.is_system ? (boost::format(_utf8(L("%1% - Copy"))) % preset.name).str() :
preset.is_system ? (boost::format(_CTX_utf8(L_CONTEXT("%1% - Copy", "PresetName"), "PresetName").ToUTF8()) % preset.name).str() :
preset.is_system ? (boost::format(_CTX_utf8(L_CONTEXT("%1% - Copy", "PresetName"), "PresetName")) % preset.name).str() :
preset.name;
bool have_extention = boost::iends_with(default_name, ".ini");