Couple of fixes in phrases

This commit is contained in:
Lukas Matena 2024-09-02 16:33:26 +02:00
parent b1546fa77a
commit 7908291160
5 changed files with 19 additions and 10 deletions

View File

@ -376,6 +376,9 @@ std::ostream& ConfigDef::print_cli_help(std::ostream& out, bool show_defaults, s
return wrapped.str(); return wrapped.str();
}; };
// List of opt_keys that should be hidden from the CLI help.
const std::vector<std::string> silent_options = { "webdev", "single_instance_on_url" };
// get the unique categories // get the unique categories
std::set<std::string> categories; std::set<std::string> categories;
for (const auto& opt : this->options) { for (const auto& opt : this->options) {
@ -396,6 +399,9 @@ std::ostream& ConfigDef::print_cli_help(std::ostream& out, bool show_defaults, s
if (def.category != category || def.cli == ConfigOptionDef::nocli || !filter(def)) if (def.category != category || def.cli == ConfigOptionDef::nocli || !filter(def))
continue; continue;
if (std::find(silent_options.begin(), silent_options.end(), opt.second.opt_key) != silent_options.end())
continue;
// get all possible variations: --foo, --foobar, -f... // get all possible variations: --foo, --foobar, -f...
std::vector<std::string> cli_args = def.cli_args(opt.first); std::vector<std::string> cli_args = def.cli_args(opt.first);
if (cli_args.empty()) if (cli_args.empty())

View File

@ -5665,8 +5665,8 @@ CLIMiscConfigDef::CLIMiscConfigDef()
"Overrides the \"single_instance\" configuration value from application preferences."); "Overrides the \"single_instance\" configuration value from application preferences.");
def = this->add("single_instance_on_url", coBool); def = this->add("single_instance_on_url", coBool);
def->label = L("Single instance mode for prusaslicer url"); def->label = "Single instance mode for prusaslicer url"; // Not translated on purpose - for internal use only.
def->tooltip = L("Works as single_instance but only if prusaslicer url is present."); def->tooltip = "Works as single_instance but only if prusaslicer url is present.";
def = this->add("datadir", coString); def = this->add("datadir", coString);
def->label = L("Data directory"); def->label = L("Data directory");
@ -5684,8 +5684,8 @@ CLIMiscConfigDef::CLIMiscConfigDef()
def->min = 0; def->min = 0;
def = this->add("webdev", coBool); def = this->add("webdev", coBool);
def->label = L("Enable webdev tools"); def->label = "Enable webdev tools"; // Not translated on purpose - for internal use only.
def->tooltip = L("Enable webdev tools"); def->tooltip = "Enable webdev tools";
#if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(SLIC3R_GUI) #if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(SLIC3R_GUI)
def = this->add("sw_renderer", coBool); def = this->add("sw_renderer", coBool);

View File

@ -1256,7 +1256,7 @@ std::string DSForLayers::get_tooltip(int tick/*=-1*/)
tooltip += _u8L("There is an extruder change set to the same extruder.\n" tooltip += _u8L("There is an extruder change set to the same extruder.\n"
"This code won't be processed during G-code generation."); "This code won't be processed during G-code generation.");
else if (conflict == ctNotPossibleToolChange) else if (conflict == ctNotPossibleToolChange)
tooltip += _u8L("There is an extruder change set to the not existing extruder.\n" tooltip += _u8L("There is an extruder change set to a non-existing extruder.\n"
"This code won't be processed during G-code generation."); "This code won't be processed during G-code generation.");
else if (conflict == ctRedundant) else if (conflict == ctRedundant)
tooltip += _u8L("There is a color change for extruder that has not been used before.\n" tooltip += _u8L("There is a color change for extruder that has not been used before.\n"

View File

@ -897,7 +897,10 @@ void PhysicalPrinterDialog::OnOK(wxEvent& event)
if (opt->value == htPrusaConnect) { if (opt->value == htPrusaConnect) {
auto& sc = Utils::ServiceConfig::instance(); auto& sc = Utils::ServiceConfig::instance();
if (printhost_win && printhost_win->GetValue() != GUI::from_u8(sc.connect_url())){ if (printhost_win && printhost_win->GetValue() != GUI::from_u8(sc.connect_url())){
InfoDialog msg(this, _L("Warning"), GUI::format(_L("URL of Prusa Connect is different from %1%. Do you want to continue?"), sc.connect_url()), true, wxYES_NO); InfoDialog msg(this, _L("Warning"),
// TRN: The placeholder expands to https://connect.prusa3d.com. The warning shows when someone select PrusaConnect physical printer, but enters different URL.
GUI::format(_L("URL of Prusa Connect is different from %1%. Do you want to continue?"),
sc.connect_url()), true, wxYES_NO);
if(msg.ShowModal() != wxID_YES){ if(msg.ShowModal() != wxID_YES){
printhost_win->SetValue(GUI::from_u8(Utils::ServiceConfig::instance().connect_url())); printhost_win->SetValue(GUI::from_u8(Utils::ServiceConfig::instance().connect_url()));
return; return;

View File

@ -2660,10 +2660,10 @@ void TabPrinter::build_fff()
for (size_t i = 1; i < nozzle_diameters.size(); ++i) { for (size_t i = 1; i < nozzle_diameters.size(); ++i) {
// if value is differs from first nozzle diameter value // if value is differs from first nozzle diameter value
if (fabs(nozzle_diameters[i] - nozzle_diameters[0]) > EPSILON || high_flow_nozzles[i] != high_flow_nozzles[0]) { if (fabs(nozzle_diameters[i] - nozzle_diameters[0]) > EPSILON || high_flow_nozzles[i] != high_flow_nozzles[0]) {
const wxString msg_text = _(L("Single Extruder Multi Material is selected, \n" const wxString msg_text = _(L("This is a single extruder multimaterial printer, \n"
"and all extruders must have the same diameter and 'High flow' state.\n" "all extruders must have the same nozzle diameter and 'High flow' state.\n"
"Do you want to change these values for all extruders to first extruder values?")); "Do you want to change these values for all extruders to first extruder values?"));
MessageDialog dialog(parent(), msg_text, _(L("Nozzle settings mismatch")), wxICON_WARNING | wxYES_NO); MessageDialog dialog(parent(), msg_text, _(L("Extruder settings do not match")), wxICON_WARNING | wxYES_NO);
DynamicPrintConfig new_conf = *m_config; DynamicPrintConfig new_conf = *m_config;
if (dialog.ShowModal() == wxID_YES) { if (dialog.ShowModal() == wxID_YES) {
@ -3198,7 +3198,7 @@ void TabPrinter::build_extruder_pages(size_t n_before_extruders)
{ {
const wxString msg_text = _L("This is a single extruder multimaterial printer, 'high_flow' state of all extruders " const wxString msg_text = _L("This is a single extruder multimaterial printer, 'high_flow' state of all extruders "
"will be set to the new value. Do you want to proceed?"); "will be set to the new value. Do you want to proceed?");
MessageDialog dialog(parent(), msg_text, _L("High flow"), wxICON_WARNING | wxYES_NO); MessageDialog dialog(parent(), msg_text, _L("Extruder settings do not match"), wxICON_WARNING | wxYES_NO);
DynamicPrintConfig new_conf = *m_config; DynamicPrintConfig new_conf = *m_config;
if (dialog.ShowModal() == wxID_YES) { if (dialog.ShowModal() == wxID_YES) {