ENH: Login Language use Bambu Config
JIRA: none Change-Id: I3c12441af0daad6a92843226886b0f15c60aa16a
This commit is contained in:
parent
cbaf4d9a12
commit
d415d8e728
|
@ -79,9 +79,8 @@ ZUserLogin::ZUserLogin() : wxDialog((wxWindow *) (wxGetApp().mainframe), wxID_AN
|
|||
TargetUrl = host_url + "/sign-in";
|
||||
m_networkOk = false;
|
||||
|
||||
wxString strlang = wxGetApp().current_language_code_safe();
|
||||
wxString strlang = wxString::FromUTF8(GetStudioLanguage()).BeforeFirst('_');
|
||||
if (strlang != "") {
|
||||
strlang.Replace("_", "-");
|
||||
TargetUrl = host_url + "/" + strlang + "/sign-in";
|
||||
}
|
||||
|
||||
|
@ -411,4 +410,12 @@ bool ZUserLogin::ShowErrorPage()
|
|||
}
|
||||
|
||||
|
||||
std::string ZUserLogin::GetStudioLanguage()
|
||||
{
|
||||
std::string strLanguage = wxGetApp().app_config->get("language");
|
||||
if (strLanguage.empty()) strLanguage = "en";
|
||||
|
||||
return strLanguage;
|
||||
}
|
||||
|
||||
}} // namespace Slic3r::GUI
|
||||
|
|
|
@ -61,6 +61,8 @@ public:
|
|||
|
||||
bool run();
|
||||
|
||||
std::string GetStudioLanguage();
|
||||
|
||||
static int web_sequence_id;
|
||||
private:
|
||||
wxTimer *m_timer { nullptr };
|
||||
|
|
Loading…
Reference in New Issue