mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Localization fixes.
This commit is contained in:
parent
b91c3d26e3
commit
8a82e3d5be
2 changed files with 21 additions and 23 deletions
|
@ -350,17 +350,15 @@ bool GUI_App::on_init_inner()
|
||||||
// Slic3r::debugf "wxWidgets version %s, Wx version %s\n", wxVERSION_STRING, wxVERSION;
|
// Slic3r::debugf "wxWidgets version %s, Wx version %s\n", wxVERSION_STRING, wxVERSION;
|
||||||
|
|
||||||
std::string msg = Http::tls_global_init();
|
std::string msg = Http::tls_global_init();
|
||||||
wxRichMessageDialog
|
|
||||||
dlg(nullptr,
|
|
||||||
wxString::Format(_(L("%s\nDo you want to continue?")), _(msg)),
|
|
||||||
"PrusaSlicer", wxICON_QUESTION | wxYES_NO);
|
|
||||||
|
|
||||||
bool ssl_accept = app_config->get("tls_cert_store_accepted") == "yes";
|
|
||||||
std::string ssl_cert_store = app_config->get("tls_accepted_cert_store_location");
|
std::string ssl_cert_store = app_config->get("tls_accepted_cert_store_location");
|
||||||
ssl_accept = ssl_accept && ssl_cert_store == Http::tls_system_cert_store();
|
bool ssl_accept = app_config->get("tls_cert_store_accepted") == "yes" && ssl_cert_store == Http::tls_system_cert_store();
|
||||||
|
|
||||||
dlg.ShowCheckBox(_(L("Remember my choice")));
|
|
||||||
if (!msg.empty() && !ssl_accept) {
|
if (!msg.empty() && !ssl_accept) {
|
||||||
|
wxRichMessageDialog
|
||||||
|
dlg(nullptr,
|
||||||
|
wxString::Format(_(L("%s\nDo you want to continue?")), msg),
|
||||||
|
"PrusaSlicer", wxICON_QUESTION | wxYES_NO);
|
||||||
|
dlg.ShowCheckBox(_(L("Remember my choice")));
|
||||||
if (dlg.ShowModal() != wxID_YES) return false;
|
if (dlg.ShowModal() != wxID_YES) return false;
|
||||||
|
|
||||||
app_config->set("tls_cert_store_accepted",
|
app_config->set("tls_cert_store_accepted",
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define L(s) s
|
#include <libslic3r/libslic3r.h>
|
||||||
|
#include <libslic3r/Utils.hpp>
|
||||||
#include "libslic3r/libslic3r.h"
|
#include <slic3r/GUI/I18N.hpp>
|
||||||
#include "libslic3r/Utils.hpp"
|
#include <slic3r/GUI/format.hpp>
|
||||||
|
|
||||||
namespace fs = boost::filesystem;
|
namespace fs = boost::filesystem;
|
||||||
|
|
||||||
|
@ -70,26 +70,26 @@ struct CurlGlobalInit
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!bundle)
|
if (!bundle)
|
||||||
message = L("Could not detect system SSL certificate store. "
|
message = _u8L("Could not detect system SSL certificate store. "
|
||||||
"PrusaSlicer will be unable to establish secure "
|
"PrusaSlicer will be unable to establish secure "
|
||||||
"network connections.");
|
"network connections.");
|
||||||
else
|
else
|
||||||
message = string_printf(
|
message = Slic3r::format(
|
||||||
L("PrusaSlicer detected system SSL certificate store in: %s"),
|
_L("PrusaSlicer detected system SSL certificate store in: %1%"),
|
||||||
bundle);
|
bundle);
|
||||||
|
|
||||||
message += string_printf(
|
message += "\n" + Slic3r::format(
|
||||||
L("\nTo specify the system certificate store manually, please "
|
_L("To specify the system certificate store manually, please "
|
||||||
"set the %s environment variable to the correct CA bundle "
|
"set the %1% environment variable to the correct CA bundle "
|
||||||
"and restart the application."),
|
"and restart the application."),
|
||||||
SSL_CA_FILE);
|
SSL_CA_FILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // OPENSSL_CERT_OVERRIDE
|
#endif // OPENSSL_CERT_OVERRIDE
|
||||||
|
|
||||||
if (CURLcode ec = ::curl_global_init(CURL_GLOBAL_DEFAULT)) {
|
if (CURLcode ec = ::curl_global_init(CURL_GLOBAL_DEFAULT)) {
|
||||||
message = L("CURL init has failed. PrusaSlicer will be unable to establish "
|
message += _u8L("CURL init has failed. PrusaSlicer will be unable to establish "
|
||||||
"network connections. See logs for additional details.");
|
"network connections. See logs for additional details.");
|
||||||
|
|
||||||
BOOST_LOG_TRIVIAL(error) << ::curl_easy_strerror(ec);
|
BOOST_LOG_TRIVIAL(error) << ::curl_easy_strerror(ec);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue