diff --git a/src/PrusaSlicer.cpp b/src/PrusaSlicer.cpp index 7dc94ddff1..21bd6938c9 100644 --- a/src/PrusaSlicer.cpp +++ b/src/PrusaSlicer.cpp @@ -1012,7 +1012,6 @@ bool CLI::processed_profiles_sharing() std::string cmdline_param = m_config.opt_string("output"); if (cmdline_param.empty()) { - printf("\n"); if (ret.empty()) printf("Wrong request"); else diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 1ec641d672..413e01b5ab 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -5125,29 +5125,36 @@ CLIProfilesSharingConfigDef::CLIProfilesSharingConfigDef() { ConfigOptionDef* def; + // Information from this def will be used just for console output. + // So, don't use L marker to label and tooltips values to avoid extract those phrases to translation. + def = this->add("query-printer-models", coBool); - def->label = L("Get list of printer models"); - def->tooltip = L("Get available printer models into JSON.\n" - "Note:\nTo print printer models for required technology use 'printer-technology' option. By default printer_technology is FFF.\n" - "To print out JSON into file use 'output' option."); + def->label = ("Get list of printer models"); + def->tooltip = ("Get list of installed printer models into JSON.\n" + "Note:\n" + "To print printer models for required technology use 'printer-technology' option with value FFF or SLA. By default printer_technology is FFF.\n" + "To print out JSON into file use 'output' option.\n" + "To specify configuration folder use 'datadir' option."); /* def = this->add("query-printer-profiles", coBool); - def->label = L("Get list of printer profiles in respect to selected printer model and printer variant"); - def->tooltip = L("Get list of printer profiles in respect to selected 'printer-model' and 'printer-variant' into JSON.\n" + def->label = ("Get list of printer profiles for the selected printer model and printer variant"); + def->tooltip = ("Get list of printer profiles for the selected 'printer-model' and 'printer-variant' into JSON.\n" "Note:\n" - "To print out JSON into file use 'output' option."); + "To print out JSON into file use 'output' option.\n" + "To specify configuration folder use 'datadir' option."); */ def = this->add("query-print-filament-profiles", coBool); - def->label = L("Get list of prints and filaments profiles in respect to selected printer profile"); - def->tooltip = L("Get list of prints and filaments profiles in respect to selected 'printer-profile' into JSON.\n" + def->label = ("Get list of print profiles and filament profiles for the selected printer profile"); + def->tooltip = ("Get list of print profiles and filament profiles for the selected 'printer-profile' into JSON.\n" "Note:\n" - "To print out JSON into file use 'output' option."); + "To print out JSON into file use 'output' option.\n" + "To specify configuration folder use 'datadir' option."); def = this->add("printer-profile", coString); - def->label = L("Printer preset name"); - def->tooltip = L("Name of the printer preset used for slicing."); + def->label = ("Printer preset name"); + def->tooltip = ("Name of the printer preset used for slicing."); def->set_default_value(new ConfigOptionString()); } diff --git a/src/libslic3r/ProfilesSharingUtils.cpp b/src/libslic3r/ProfilesSharingUtils.cpp index 018ec64f6b..dfe72381f5 100644 --- a/src/libslic3r/ProfilesSharingUtils.cpp +++ b/src/libslic3r/ProfilesSharingUtils.cpp @@ -268,6 +268,9 @@ static void get_printer_profiles_node(pt::ptree& printer_profiles_node, const PrinterPresetCollection& printer_presets, const PrinterAttr& attr) { + printer_profiles_node.clear(); + user_printer_profiles_node.clear(); + for (const Preset& printer_preset : printer_presets) { if (printer_preset.is_user()) { @@ -465,23 +468,23 @@ DynamicPrintConfig load_full_print_config(const std::string& print_preset_name, if (print_preset) config.apply_only(print_preset->config, print_preset->config.keys()); else - printf("Print profile '%s' wasn't found.\n", print_preset->name.c_str()); + BOOST_LOG_TRIVIAL(warning) << Slic3r::format("Print profile '%1%' wasn't found.", print_preset_name); const Preset* filament_preset = preset_bundle.filaments.find_preset(filament_preset_name); if (filament_preset) config.apply_only(filament_preset->config, filament_preset->config.keys()); else - printf("Filament profile '%s' wasn't found.\n", filament_preset->name.c_str()); + BOOST_LOG_TRIVIAL(warning) << Slic3r::format("Filament profile '%1%' wasn't found.", filament_preset_name); const Preset* printer_preset = preset_bundle.printers.find_preset(printer_preset_name); if (printer_preset) config.apply_only(printer_preset->config, printer_preset->config.keys()); else - printf("Printer profile '%s' wasn't found.\n", printer_preset->name.c_str()); + BOOST_LOG_TRIVIAL(warning) << Slic3r::format("Printer profile '%1%' wasn't found.", printer_preset_name); } } else - printf("Datadir wasn't found\n"); + BOOST_LOG_TRIVIAL(error) << "Datadir wasn't found\n"; return config; }