Preparations to the localization update & new Slic3rPE.pot

This commit is contained in:
YuSanka 2018-05-02 13:20:36 +02:00
parent 4758b68e55
commit 16d5faac20
16 changed files with 1864 additions and 985 deletions

View file

@ -1011,8 +1011,7 @@ void PresetBundle::export_configbundle(const std::string &path) //, const Dynami
// an optional "(modified)" suffix will be removed from the filament name.
void PresetBundle::set_filament_preset(size_t idx, const std::string &name)
{
if (name == "------- System presets -------" ||
name == "------- User presets -------")
if (name.find_first_of("-------") == 0)
return;
if (idx >= filament_presets.size())
@ -1066,7 +1065,7 @@ void PresetBundle::update_platter_filament_ui(unsigned int idx_extruder, wxBitma
std::map<wxString, wxBitmap*> nonsys_presets;
wxString selected_str = "";
if (!this->filaments().front().is_visible)
ui->Append("------- System presets -------", wxNullBitmap);
ui->Append("------- " + _(L("System presets")) + " -------", wxNullBitmap);
for (int i = this->filaments().front().is_visible ? 0 : 1; i < int(this->filaments().size()); ++i) {
const Preset &preset = this->filaments.preset(i);
bool selected = this->filament_presets[idx_extruder] == preset.name;
@ -1119,12 +1118,12 @@ void PresetBundle::update_platter_filament_ui(unsigned int idx_extruder, wxBitma
selected_str = wxString::FromUTF8((preset.name + (preset.is_dirty ? Preset::suffix_modified() : "")).c_str());
}
if (preset.is_default)
ui->Append("------- System presets -------", wxNullBitmap);
ui->Append("------- " + _(L("System presets")) + " -------", wxNullBitmap);
}
if (!nonsys_presets.empty())
{
ui->Append("------- User presets -------", wxNullBitmap);
ui->Append("------- " + _(L("User presets")) + " -------", wxNullBitmap);
for (std::map<wxString, wxBitmap*>::iterator it = nonsys_presets.begin(); it != nonsys_presets.end(); ++it) {
ui->Append(it->first, *it->second);
if (it->first == selected_str)