Some fixes in phrases

This commit is contained in:
Lukas Matena 2025-02-18 23:34:01 +01:00 committed by YuSanka
parent c19ce2cbaa
commit 40fe9de63d
11 changed files with 57 additions and 26 deletions

View File

@ -738,6 +738,7 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionFloat(60));
def = this->add("over_bridge_speed", coFloatOrPercent);
// TRN: Label for speed used to print infill above bridges.
def->label = L("Over bridges");
def->category = L("Speed");
def->tooltip = L("Speed for printing solid infill above bridges. Set to 0 to use solid infill speed. "
@ -1128,8 +1129,8 @@ void PrintConfigDef::init_fff_params()
def = this->add("extruder_clearance_height", coFloat);
def->label = L("Height");
def->tooltip = L("Only used when 'Print Settings -> Complete individual objects' is active. Set this to the vertical "
"distance between your nozzle tip and (usually) the X carriage rods so slicer can check for collisions "
"with previously printed objects and prevent them when arranging.\n"
"distance between your nozzle tip and (usually) the X carriage rods. Used to check for collisions "
"with previously printed objects and to prevent them when arranging.\n"
"The value is ignored for most Prusa printers, which come with more detailed extruder model.");
def->sidetext = L("mm");
def->min = 0;
@ -1138,8 +1139,9 @@ void PrintConfigDef::init_fff_params()
def = this->add("extruder_clearance_radius", coFloat);
def->label = L("Radius");
def->tooltip = L("Only used when 'Print Settings -> Complete individual objects' is active. Set this so slicer can "
"check for collisions with previously printed objects and prevent them when arranging.\n"
def->tooltip = L("Only used when 'Print Settings -> Complete individual objects' is active. Set this to a radius "
"of a nozzle-centered cylinder big enough to enclose the extruder assembly. Used to check for collisions "
"with previously printed objects and to prevent them when arranging.\n"
"The value is ignored for most Prusa printers, which come with more detailed extruder model.");
def->sidetext = L("mm");
def->min = 0;
@ -2018,7 +2020,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("interlocking_orientation", coFloat);
def->label = L("Interlocking direction");
def->tooltip = L("Orientation of interlock beams.");
def->tooltip = L("Orientation of interlocking beams.");
def->sidetext = L("°");
def->min = 0;
def->max = 360;
@ -5788,7 +5790,7 @@ CLIActionsConfigDef::CLIActionsConfigDef()
def->label = L("Slice");
// def->tooltip = L("Slice the model as FFF or SLA based on the printer_technology configuration value.");
def->tooltip = L("Slice the model as FFF or SLA based on the printer_technology configuration value "
"and export FFF printing toolpaths as G-code or SLA printing layers as PNG.");
"and export the result.");
def->cli = "slice|s";
def->set_default_value(new ConfigOptionBool(false));

View File

@ -1540,8 +1540,8 @@ bool GUI_App::on_init_inner()
Bind(EVT_CONFIG_UPDATER_FAILED_ARCHIVE, [this](const wxCommandEvent& evt) {
assert(!evt.GetString().empty());
// TRN Notification text, 1 is list of vendors.
std::string notification_text = format(_u8L("Update Check Failed for the Following Vendors:\n\n%1%\nThis may be due to an account logout or a lost connection. Please verify your account status and internet connection. Then select \"Check for Configuration Updates\" to repeat."), evt.GetString());
// TRN Notification text, %1% is list of vendors.
std::string notification_text = format(_u8L("Update check failed for the following vendors:\n\n%1%\nThis may be due to an account logout or a lost connection. Please verify your account status and internet connection. Then select \"Check for Configuration Updates\" to repeat."), evt.GetString());
notification_manager()->push_notification(NotificationType::FailedSecretVendorUpdateSync,
NotificationManager::NotificationLevel::WarningNotificationLevel,
notification_text);
@ -4229,6 +4229,14 @@ void GUI_App::open_link_in_printables(const std::string& url)
mainframe->show_printables_tab(url);
}
bool GUI_App::is_account_logged_in() const
{
if (!plater_ || !plater_->get_user_account()) {
return false;
}
return plater_->get_user_account()->is_logged();
}
bool LogGui::ignorred_message(const wxString& msg)
{
for(const wxString& err : std::initializer_list<wxString>{ wxString("cHRM chunk does not match sRGB"),

View File

@ -432,6 +432,7 @@ public:
void printables_slice_request(const std::string& download_url, const std::string& model_url);
void printables_login_request();
void open_link_in_printables(const std::string& url);
bool is_account_logged_in() const;
private:
bool on_init_inner();
void init_app_config();

View File

@ -1100,6 +1100,8 @@ void Plater::priv::init()
this->notification_manager->push_notification(NotificationType::AccountTransientRetry
, NotificationManager::NotificationLevel::RegularNotificationLevel
, evt.data
// TRN: This is a hyperlink in a notification. It is preceded by a message from PrusaAccount (therefore not in this dictionary)
// saying something like "connection not established, I will keep trying".
, _u8L("Stop now.")
, [this](wxEvtHandler* ) {
this->user_account->do_logout();
@ -2169,8 +2171,12 @@ void Plater::priv::process_validation_warning(const std::vector<std::string>& wa
return true;
};
} else if (text == "_BED_TEMPS_DIFFER" || text == "_BED_TEMPS_CHANGED") {
// TRN: Text of a notification, followed by (single) hyperlink to two of the config options. The sentence had to be split because of the hyperlink, sorry.
// The hyperlink part of the sentence reads "'Bed temperature by extruder' and 'Wipe tower extruder'", and it is also to be translated.
text = _u8L("Bed temperatures for the used filaments differ significantly.\n"
"For multi-material prints it is recommended to set the ");
// TRN: The other part of the sentence starting "Bed temperatures for the used" (also in the dictionary). Sorry for splitting it, technical reasons -
// this part of the sentence is a hyperlink.
hypertext = _u8L("'Bed temperature by extruder' and 'Wipe tower extruder'");
multiline = true;
notification_type = NotificationType::BedTemperaturesDiffer;

View File

@ -163,10 +163,17 @@ void RepositoryUpdateUIManager::fill_grids()
if (entry.not_in_manifest) {
wxStaticBitmap* bmp = new wxStaticBitmap(m_parent, wxID_ANY, *get_bmp_bundle("notification_warning"));
//wxGetApp().plater()->get_user_account()
if (wxGetApp().is_account_logged_in()) {
// TRN tooltip in Configuration Wizard - Configuration Sources
bmp->SetToolTip(_L("This source has installed vendors, yet you do not have rights to receive updates of it.\n"
"This may be because you are logged out. Log in to restore access to all your subscribed sources.\n"
"If you are logged in, please concider unsubscribing this source."));
bmp->SetToolTip(_L("Some vendors were installed from this source, but you do not have the rights to receive updates from it.\n"
"This source may no longer be active, or your account may no longer be subscribed.\n"
"Please consider unsubscribing from this source."));
} else {
// TRN tooltip in Configuration Wizard - Configuration Sources
bmp->SetToolTip(_L("Some vendors were installed from this source, but you do not have rights to receive updates from it.\n"
"Please log in to restore access to all your subscribed sources or consider unsubscribing from this source."));
}
add(bmp);
} else if (!entry.visibility.empty()) {
wxStaticBitmap* bmp = new wxStaticBitmap(m_parent, wxID_ANY, *get_bmp_bundle("info"));

View File

@ -60,7 +60,7 @@ bool UserAccount::get_remember_session()
return m_communication->get_remember_session();
}
bool UserAccount::is_logged()
bool UserAccount::is_logged() const
{
return m_communication->is_logged();
}

View File

@ -35,7 +35,7 @@ public:
UserAccount(wxEvtHandler* evt_handler, Slic3r::AppConfig* app_config, const std::string& instance_hash);
~UserAccount();
bool is_logged();
bool is_logged() const;
void do_login();
void do_logout();
wxString generate_login_redirect_url() { return m_communication->generate_login_redirect_url(); }

View File

@ -429,7 +429,7 @@ void UserAccountCommunication::login_redirect()
wxQueueEvent(m_evt_handler,new OpenPrusaAuthEvent(GUI::EVT_OPEN_PRUSAAUTH, {std::move(url1), std::move(url2)}));
}
bool UserAccountCommunication::is_logged()
bool UserAccountCommunication::is_logged() const
{
return !m_username.empty();
}

View File

@ -46,7 +46,7 @@ public:
// UI Session thread Interface
//
bool is_logged();
bool is_logged() const;
void do_login();
void do_logout();
void do_clear();

View File

@ -251,7 +251,7 @@ void WifiConfigDialog::on_ok(wxCommandEvent& e)
}
if (boost::filesystem::exists(file_path)) {
// TRN placeholder 1 is path to file
// TRN placeholder %1% is path to file
wxString msg_text = GUI::format_wxstr(_L("%1% already exists. Do you want to rewrite it?\n(Other items than Wi-Fi credentials will stay unchanged)"), file_path.string());
WarningDialog dialog(m_parent, msg_text, _L("Warning"), wxYES | wxNO);
if (dialog.ShowModal() == wxID_NO) {

View File

@ -43,13 +43,20 @@ std::string proccess_failed_archives(const std::vector<std::string>& failed_arch
}
return failed_vendors;
}
void display_failed_vendors_dialog(wxWindow *parent, const std::string& failed_vendors)
void display_failed_vendors_dialog(wxWindow *parent, const std::string& failed_vendors, bool logged)
{
// TRN Dialog text, 1 is list of vendors.
std::string dialog_text = format(_u8L("Update Check Failed for the Following Vendors:\n\n%1%\n"
"This may be because you are logged out. Log in to restore access to all your subscribed sources.\n"
"If you are logged in and a vendor is failing, it may no longer be available in your subscribed sources."), failed_vendors);
GUI::WarningDialog dialog(parent, dialog_text, _L("Update Check Failed"), wxOK);
std::string dialog_text;
if (logged) {
// TRN Dialog text, %1% is list of vendors.
dialog_text = format(_u8L("Update check failed for the following vendors:\n\n%1%\n"
"This may be because you are no longer subscribed to some configuration sources.\n"
"Please manage your configuration sources in Configuration Wizard"), failed_vendors);
} else {
// TRN Dialog text, %1% is list of vendors.
dialog_text = format(_u8L("Update check failed for the following vendors:\n\n%1%\n"
"Please log in to restore access to all your subscribed configuration sources."), failed_vendors);
}
GUI::WarningDialog dialog(parent, dialog_text, _L("Warning"), wxOK);
dialog.ShowModal();
}
}
@ -125,7 +132,7 @@ bool PresetUpdaterWrapper::wizard_sync(const PresetBundle* preset_bundle, const
const SharedArchiveRepositoryVector &repos = m_preset_archive_database->get_selected_archive_repositories();
std::string failed_vendors = proccess_failed_archives(m_ui_status->get_failed_archives(), vendors_copy, repos);
if (!failed_vendors.empty()) {
display_failed_vendors_dialog(parent, failed_vendors);
display_failed_vendors_dialog(parent, failed_vendors, GUI::wxGetApp().is_account_logged_in());
}
// Offer update installation.
@ -208,7 +215,7 @@ PresetUpdater::UpdateResult PresetUpdaterWrapper::check_updates_on_user_request(
const SharedArchiveRepositoryVector &repos = m_preset_archive_database->get_selected_archive_repositories();
std::string failed_vendors = proccess_failed_archives(m_ui_status->get_failed_archives(), vendors_copy, repos);
if (!failed_vendors.empty()) {
display_failed_vendors_dialog(parent, failed_vendors);
display_failed_vendors_dialog(parent, failed_vendors, GUI::wxGetApp().is_account_logged_in());
}
// preset_updater::config_update does show wxDialog