Fix untranslated language dialog captions (#15600)

This commit is contained in:
Kiss Lorand
2026-09-10 18:15:06 -03:00
committed by GitHub
parent d97dea2c41
commit 0a630738f1
29 changed files with 4 additions and 430 deletions
-4
View File
@@ -2293,8 +2293,6 @@ msgstr ""
msgid "%s has been removed."
msgstr ""
msgid "Switching application language"
msgstr ""
msgid "Select the language"
msgstr ""
@@ -8294,8 +8292,6 @@ msgstr ""
msgid "Language selection"
msgstr ""
msgid "Switching application language while some presets are modified."
msgstr ""
msgid "Asia-Pacific"
msgstr ""
-4
View File
@@ -2522,8 +2522,6 @@ msgstr "Hi ha una actualització disponible. Obriu el quadre de diàleg del paqu
msgid "%s has been removed."
msgstr "%s s'ha eliminat."
msgid "Switching application language"
msgstr "Canvi d'idioma de l'aplicació"
msgid "Select the language"
msgstr "Seleccioneu l'idioma"
@@ -8924,8 +8922,6 @@ msgstr "Voleu continuar?"
msgid "Language selection"
msgstr "Selecció d'idiomes"
msgid "Switching application language while some presets are modified."
msgstr "Canviant l'idioma de l'aplicació mentre es modifiquen alguns perfils."
msgid "Asia-Pacific"
msgstr "Àsia-Pacífic"
-4
View File
@@ -2482,8 +2482,6 @@ msgstr "Je k dispozici aktualizace. Otevřete dialog balíčku předvoleb a prov
msgid "%s has been removed."
msgstr "%s bylo odstraněno."
msgid "Switching application language"
msgstr "Přepnutí jazyka aplikace"
msgid "Select the language"
msgstr "Zvolte jazyk"
@@ -8882,8 +8880,6 @@ msgstr "Chcete pokračovat?"
msgid "Language selection"
msgstr "Výběr jazyka"
msgid "Switching application language while some presets are modified."
msgstr "Přepnutí jazyka aplikace, když jsou některé předvolby upraveny."
msgid "Asia-Pacific"
msgstr "Asie-Pacifik"
-4
View File
@@ -2430,8 +2430,6 @@ msgstr "Es ist ein Update verfügbar. Öffnen Sie den Profilbündel-Dialog, um e
msgid "%s has been removed."
msgstr "%s wurde entfernt."
msgid "Switching application language"
msgstr "Wechsel der Sprache"
msgid "Select the language"
msgstr "Sprache wählen"
@@ -8754,8 +8752,6 @@ msgstr "Möchten Sie fortfahren?"
msgid "Language selection"
msgstr "Sprachauswahl"
msgid "Switching application language while some presets are modified."
msgstr "Umschalten der Anwendungssprache, während einige Profile geändert werden."
msgid "Asia-Pacific"
msgstr "Asien-Pazifik"
-4
View File
@@ -2289,8 +2289,6 @@ msgstr ""
msgid "%s has been removed."
msgstr ""
msgid "Switching application language"
msgstr ""
msgid "Select the language"
msgstr ""
@@ -8290,8 +8288,6 @@ msgstr ""
msgid "Language selection"
msgstr ""
msgid "Switching application language while some presets are modified."
msgstr ""
msgid "Asia-Pacific"
msgstr ""
-4
View File
@@ -2356,8 +2356,6 @@ msgstr "Hay una actualización disponible. Abra el cuadro de diálogo del paquet
msgid "%s has been removed."
msgstr "Se ha eliminado %s."
msgid "Switching application language"
msgstr "Cambiando el idioma de la aplicación"
msgid "Select the language"
msgstr "Seleccionar el idioma"
@@ -8529,8 +8527,6 @@ msgstr "¿Quieres continuar?"
msgid "Language selection"
msgstr "Selección de idiomas"
msgid "Switching application language while some presets are modified."
msgstr "Cambiando idioma de la aplicación mientras se modifican algunos perfiles."
msgid "Asia-Pacific"
msgstr "Asia-Pacífico"
-4
View File
@@ -2390,8 +2390,6 @@ msgstr "Eguneratze bat dago erabilgarri. Ireki aurrezarpen-paketeen elkarrizketa
msgid "%s has been removed."
msgstr "%s kendu da."
msgid "Switching application language"
msgstr "Aplikazioaren hizkuntza aldatzen"
msgid "Select the language"
msgstr "Hautatu hizkuntza"
@@ -8610,8 +8608,6 @@ msgstr "Jarraitu nahi duzu?"
msgid "Language selection"
msgstr "Hizkuntza-hautaketa"
msgid "Switching application language while some presets are modified."
msgstr "Aplikazioaren hizkuntza aldatzen ari da aurrezarpen batzuk aldatuta dauden bitartean."
msgid "Asia-Pacific"
msgstr "Asia-Pazifikoa"
-4
View File
@@ -2414,8 +2414,6 @@ msgstr "Une mise à jour est disponible. Ouvrez la boîte de dialogue du paquet
msgid "%s has been removed."
msgstr "%s a été supprimé."
msgid "Switching application language"
msgstr "Changer la langue de l'application"
msgid "Select the language"
msgstr "Sélectionner la langue"
@@ -8678,8 +8676,6 @@ msgstr "Voulez-vous continuer ?"
msgid "Language selection"
msgstr "Sélection de la langue"
msgid "Switching application language while some presets are modified."
msgstr "Changement de langue de l’application alors que certains préréglages sont modifiés."
msgid "Asia-Pacific"
msgstr "Asie-Pacifique"
-4
View File
@@ -2460,8 +2460,6 @@ msgstr "Frissítés érhető el. Nyisd meg a beállításcsomag párbeszédablak
msgid "%s has been removed."
msgstr "%s eltávolítva."
msgid "Switching application language"
msgstr "Alkalmazás nyelvének váltása"
msgid "Select the language"
msgstr "Válaszd ki a nyelvet"
@@ -8806,8 +8804,6 @@ msgstr "Szeretnéd folytatni?"
msgid "Language selection"
msgstr "Nyelv kiválasztása"
msgid "Switching application language while some presets are modified."
msgstr "Alkalmazás nyelvének átváltása, miközben egyes beállítások módosultak."
msgid "Asia-Pacific"
msgstr "Ázsia-Csendes-óceáni térség"
-4
View File
@@ -2466,8 +2466,6 @@ msgstr "È disponibile un aggiornamento. Apri la finestra di dialogo del bundle
msgid "%s has been removed."
msgstr "%s è stato rimosso."
msgid "Switching application language"
msgstr "Cambio lingua applicazione"
msgid "Select the language"
msgstr "Seleziona la lingua"
@@ -8807,8 +8805,6 @@ msgstr "Vuoi continuare?"
msgid "Language selection"
msgstr "Selezione lingua"
msgid "Switching application language while some presets are modified."
msgstr "Cambio lingua applicazione durante la modifica di alcuni profili."
msgid "Asia-Pacific"
msgstr "Asia-Pacifico"
-4
View File
@@ -2473,8 +2473,6 @@ msgstr "アップデートが利用可能です。プリセットバンドルの
msgid "%s has been removed."
msgstr "%sを削除しました。"
msgid "Switching application language"
msgstr "アプリケーション言語の切り替え"
msgid "Select the language"
msgstr "言語を選択"
@@ -8825,8 +8823,6 @@ msgstr "続行しますか?"
msgid "Language selection"
msgstr "言語選択"
msgid "Switching application language while some presets are modified."
msgstr "アプリケーション言語を切り替える時に、プリセットの変更があります"
msgid "Asia-Pacific"
msgstr "アジア太平洋地域"
-4
View File
@@ -2481,8 +2481,6 @@ msgstr "사용 가능한 업데이트가 있습니다. 사전 설정 번들 대
msgid "%s has been removed."
msgstr "%s이(가) 제거되었습니다."
msgid "Switching application language"
msgstr "응용 프로그램 언어 전환"
msgid "Select the language"
msgstr "언어 선택"
@@ -8860,8 +8858,6 @@ msgstr "계속하시겠습니까?"
msgid "Language selection"
msgstr "언어 선택"
msgid "Switching application language while some presets are modified."
msgstr "일부 사전 설정이 수정되는 동안 응용 프로그램 언어를 전환합니다."
msgid "Asia-Pacific"
msgstr "아시아 태평양"
-4
View File
@@ -2449,8 +2449,6 @@ msgstr "Yra prieinamas atnaujinimas. Atidarykite profilių paketo dialogo langą
msgid "%s has been removed."
msgstr "%s buvo pašalintas."
msgid "Switching application language"
msgstr "Perjungiama programos kalba"
msgid "Select the language"
msgstr "Pasirinkite kalbą"
@@ -8797,8 +8795,6 @@ msgstr "Ar norite tęsti?"
msgid "Language selection"
msgstr "Kalbos pasirinkimas"
msgid "Switching application language while some presets are modified."
msgstr "Keičiama programos kalba, kai yra pakeistų profilių."
msgid "Asia-Pacific"
msgstr "Azija-Ramusis vandenynas"
-4
View File
@@ -2679,8 +2679,6 @@ msgstr "Er is een update beschikbaar. Open het dialoogvenster voor de voorinstel
msgid "%s has been removed."
msgstr "%s is verwijderd."
msgid "Switching application language"
msgstr "De taal van de applicatie wordt aangepast"
msgid "Select the language"
msgstr "Kies de taal"
@@ -9602,8 +9600,6 @@ msgstr "Wilt u doorgaan?"
msgid "Language selection"
msgstr "Taal selectie"
msgid "Switching application language while some presets are modified."
msgstr "De taal van de toepassing aanpaasen terwijl sommige voorinstellingen zijn aangepast."
msgid "Asia-Pacific"
msgstr "Azië-Pacific"
-4
View File
@@ -2512,8 +2512,6 @@ msgstr "Dostępna jest aktualizacja. Otwórz okno pakietu profili, aby ją zains
msgid "%s has been removed."
msgstr "%s został usunięty."
msgid "Switching application language"
msgstr "Zmiana języka aplikacji"
msgid "Select the language"
msgstr "Wybierz język"
@@ -9016,8 +9014,6 @@ msgstr "Czy kontynuować?"
msgid "Language selection"
msgstr "Wybór języka"
msgid "Switching application language while some presets are modified."
msgstr "Zmiana języka aplikacji przy jednoczesnym istniejących zmodyfikowanych ustawieniach."
msgid "Asia-Pacific"
msgstr "Azja i Pacyfik"
@@ -2356,8 +2356,6 @@ msgstr "Há uma atualização disponível. Abra a caixa de diálogo do pacote de
msgid "%s has been removed."
msgstr "%s foi removido."
msgid "Switching application language"
msgstr "Alternando o idioma do aplicativo"
msgid "Select the language"
msgstr "Selecione o idioma"
@@ -8572,8 +8570,6 @@ msgstr "Você deseja continuar?"
msgid "Language selection"
msgstr "Seleção de idioma"
msgid "Switching application language while some presets are modified."
msgstr "Alternando idioma do aplicativo enquanto algumas predefinições são modificadas."
msgid "Asia-Pacific"
msgstr "Ásia-Pacífico"
-4
View File
@@ -2431,8 +2431,6 @@ msgstr "Доступно обновление. Проверьте меню па
msgid "%s has been removed."
msgstr "%s был удалён."
msgid "Switching application language"
msgstr "Изменение языка приложения"
msgid "Select the language"
msgstr "Выбор языка"
@@ -8852,8 +8850,6 @@ msgstr "Хотите продолжить?"
msgid "Language selection"
msgstr "Выбор языка"
msgid "Switching application language while some presets are modified."
msgstr "Смена языка приложения при изменении некоторых профилей."
msgid "Asia-Pacific"
msgstr "Азиатско-Тихоокеанский"
-4
View File
@@ -2767,8 +2767,6 @@ msgstr "Det finns en uppdatering tillgänglig. Öppna dialogrutan för förinst
msgid "%s has been removed."
msgstr "%s har tagits bort."
msgid "Switching application language"
msgstr "Byt applikationsspråk"
msgid "Select the language"
msgstr "Välj språk"
@@ -9694,8 +9692,6 @@ msgstr "Fortsätta?"
msgid "Language selection"
msgstr "Språkval"
msgid "Switching application language while some presets are modified."
msgstr "Byter språk medans inställningarna ändras."
msgid "Asia-Pacific"
msgstr "Asien-Stillahavsområdet"
-4
View File
@@ -2456,8 +2456,6 @@ msgstr "มีอัปเดตพร้อมใช้งาน เปิด
msgid "%s has been removed."
msgstr "ลบ %s แล้ว"
msgid "Switching application language"
msgstr "การเปลี่ยนภาษาของแอปพลิเคชัน"
msgid "Select the language"
msgstr "เลือกภาษา"
@@ -8758,8 +8756,6 @@ msgstr "ต้องการดำเนินการต่อหรือไ
msgid "Language selection"
msgstr "การเลือกภาษา"
msgid "Switching application language while some presets are modified."
msgstr "การสลับภาษาของแอปพลิเคชันในขณะที่มีการแก้ไขค่าที่ตั้งไว้บางส่วน"
msgid "Asia-Pacific"
msgstr "เอเชียแปซิฟิก"
-4
View File
@@ -2480,8 +2480,6 @@ msgstr "Kullanılabilir bir güncelleme var. Güncellemek için ön ayar paketi
msgid "%s has been removed."
msgstr "%s kaldırıldı."
msgid "Switching application language"
msgstr "Uygulama dilini değiştirme"
msgid "Select the language"
msgstr "Dili seçin"
@@ -8860,8 +8858,6 @@ msgstr "Devam etmek istiyor musun?"
msgid "Language selection"
msgstr "Dil seçimi"
msgid "Switching application language while some presets are modified."
msgstr "Bazı ön ayarlar değiştirilirken uygulama dilinin değiştirilmesi."
msgid "Asia-Pacific"
msgstr "Asya Pasifik"
-4
View File
@@ -2424,8 +2424,6 @@ msgstr "Доступне оновлення. Відкрийте вікно на
msgid "%s has been removed."
msgstr "%s вилучено."
msgid "Switching application language"
msgstr "Зміна мови програми"
msgid "Select the language"
msgstr "Вибрати мову"
@@ -8874,8 +8872,6 @@ msgstr "Ви хочете продовжувати?"
msgid "Language selection"
msgstr "Вибір мови"
msgid "Switching application language while some presets are modified."
msgstr "Зміна мови програми при зміні деяких профілів."
msgid "Asia-Pacific"
msgstr "Азіатсько-Тихоокеанський регіон"
-4
View File
@@ -2568,8 +2568,6 @@ msgstr "Có bản cập nhật khả dụng. Hãy mở hộp thoại gói cài
msgid "%s has been removed."
msgstr "%s đã bị xóa."
msgid "Switching application language"
msgstr "Đang chuyển ngôn ngữ ứng dụng"
msgid "Select the language"
msgstr "Chọn ngôn ngữ"
@@ -9309,8 +9307,6 @@ msgstr "Bạn có muốn tiếp tục?"
msgid "Language selection"
msgstr "Chọn ngôn ngữ"
msgid "Switching application language while some presets are modified."
msgstr "Đang chuyển đổi ngôn ngữ ứng dụng trong khi một số preset đã được chỉnh sửa."
msgid "Asia-Pacific"
msgstr "Châu Á-Thái Bình Dương"
@@ -2361,8 +2361,6 @@ msgstr "有更新可用。打开预设包对话框进行更新。"
msgid "%s has been removed."
msgstr "%s 已被移除。"
msgid "Switching application language"
msgstr "切换应用程序语言"
msgid "Select the language"
msgstr "选择语言"
@@ -8587,8 +8585,6 @@ msgstr "是否继续?"
msgid "Language selection"
msgstr "语言选择"
msgid "Switching application language while some presets are modified."
msgstr "在切换应用语言之前发现某些参数预设有更改。"
msgid "Asia-Pacific"
msgstr "亚太"
@@ -2425,8 +2425,6 @@ msgstr "有可用的更新。請開啟預設組合對話框進行更新。"
msgid "%s has been removed."
msgstr "%s 已移除。"
msgid "Switching application language"
msgstr "切換應用程式語言"
msgid "Select the language"
msgstr "選擇語言"
@@ -8753,8 +8751,6 @@ msgstr "是否繼續?"
msgid "Language selection"
msgstr "語言選擇"
msgid "Switching application language while some presets are modified."
msgstr "在切換應用程式語言之前發現某些參數預設有更改。"
msgid "Asia-Pacific"
msgstr "亞太"
-221
View File
@@ -7769,21 +7769,6 @@ void GUI_App::stop_http_server()
m_http_server.stop();
}
void GUI_App::switch_staff_pick(bool on)
{
mainframe->m_webview->SendDesignStaffpick(on);
}
bool GUI_App::switch_language()
{
if (select_language()) {
recreate_GUI(_L("Switching application language") + dots);
return true;
} else {
return false;
}
}
#ifdef __linux__
static const wxLanguageInfo* linux_get_existing_locale_language(const wxLanguageInfo* language,
const wxLanguageInfo* system_language)
@@ -7878,72 +7863,6 @@ int GUI_App::GetSingleChoiceIndex(const wxString& message,
#endif
}
// select language from the list of installed languages
bool GUI_App::select_language()
{
wxArrayString translations = wxTranslations::Get()->GetAvailableTranslations(SLIC3R_APP_KEY);
std::vector<const wxLanguageInfo*> language_infos;
language_infos.emplace_back(wxLocale::GetLanguageInfo(wxLANGUAGE_ENGLISH));
for (size_t i = 0; i < translations.GetCount(); ++ i) {
const wxLanguageInfo *langinfo = wxLocale::FindLanguageInfo(translations[i]);
if (langinfo != nullptr)
language_infos.emplace_back(langinfo);
}
sort_remove_duplicates(language_infos);
std::sort(language_infos.begin(), language_infos.end(), [](const wxLanguageInfo* l, const wxLanguageInfo* r) { return l->Description < r->Description; });
wxArrayString names;
names.Alloc(language_infos.size());
// Some valid language should be selected since the application start up.
const wxString active_language_code = current_language_code();
const wxLanguageInfo* active_language_info = wxLocale::FindLanguageInfo(active_language_code);
const wxLanguage current_language = active_language_info != nullptr ? wxLanguage(active_language_info->Language) : wxLanguage(m_wxLocale->GetLanguage());
const wxString active_lang_prefix = active_language_code.BeforeFirst('_');
int init_selection = -1;
int init_selection_alt = -1;
int init_selection_default = -1;
for (size_t i = 0; i < language_infos.size(); ++ i) {
if (wxLanguage(language_infos[i]->Language) == current_language)
// The dictionary matches the active language and country.
init_selection = i;
else if ((language_infos[i]->CanonicalName.BeforeFirst('_') == active_lang_prefix) ||
// if the active language is Slovak, mark the Czech language as active.
(language_infos[i]->CanonicalName.BeforeFirst('_') == "cs" && active_lang_prefix == "sk"))
// The dictionary matches the active language, it does not necessarily match the country.
init_selection_alt = i;
if (language_infos[i]->CanonicalName.BeforeFirst('_') == "en")
// This will be the default selection if the active language does not match any dictionary.
init_selection_default = i;
names.Add(language_infos[i]->Description);
}
if (init_selection == -1)
// This is the dictionary matching the active language.
init_selection = init_selection_alt;
if (init_selection != -1)
// This is the language to highlight in the choice dialog initially.
init_selection_default = init_selection;
const long index = GetSingleChoiceIndex(_L("Select the language"), _L("Language"), names, init_selection_default);
// Try to load a new language.
if (index != -1 && (init_selection == -1 || init_selection != index)) {
const wxLanguageInfo *new_language_info = language_infos[index];
if (this->load_language(new_language_info->CanonicalName, false)) {
// Save language at application config.
// Which language to save as the selected dictionary language?
// 1) Hopefully the language set to wxTranslations by this->load_language(), but that API is weird and we don't want to rely on its
// stability in the future:
// wxTranslations::Get()->GetBestTranslation(SLIC3R_APP_KEY, wxLANGUAGE_ENGLISH);
// 2) Current locale language may not match the dictionary name, see GH issue #3901
// m_wxLocale->GetCanonicalName()
// 3) new_language_info->CanonicalName is a safe bet. It points to a valid dictionary name.
app_config->set("language", new_language_info->CanonicalName.ToUTF8().data());
return true;
}
}
return false;
}
// Load gettext translation files and activate them at the start of the application,
// based on the "language" key stored in the application config.
@@ -8330,146 +8249,6 @@ void GUI_App::show_ip_address_enter_dialog_handler(wxCommandEvent& evt)
show_modal_ip_address_enter_dialog(mode == -1?false:true, title);
}
//void GUI_App::add_config_menu(wxMenuBar *menu)
//void GUI_App::add_config_menu(wxMenu *menu)
//{
// auto local_menu = new wxMenu();
// wxWindowID config_id_base = wxWindow::NewControlId(int(ConfigMenuCnt));
//
// const auto config_wizard_name = _(ConfigWizard::name(true));
// const auto config_wizard_tooltip = from_u8((boost::format(_utf8(L("Open %s"))) % config_wizard_name).str());
// // Cmd+, is standard on OS X - what about other operating systems?
// if (is_editor()) {
// local_menu->Append(config_id_base + ConfigMenuWizard, config_wizard_name + dots, config_wizard_tooltip);
// local_menu->Append(config_id_base + ConfigMenuUpdate, _L("Check for Configuration Updates"), _L("Check for configuration updates"));
// local_menu->AppendSeparator();
// }
// local_menu->Append(config_id_base + ConfigMenuPreferences, _L("Preferences") + dots +
//#ifdef __APPLE__
// "\tCtrl+,",
//#else
// "\tCtrl+P",
//#endif
// _L("Application preferences"));
// wxMenu* mode_menu = nullptr;
// if (is_editor()) {
// local_menu->AppendSeparator();
// mode_menu = new wxMenu();
// mode_menu->AppendRadioItem(config_id_base + ConfigMenuModeSimple, _L("Simple"), _L("Simple Mode"));
// mode_menu->AppendRadioItem(config_id_base + ConfigMenuModeAdvanced, _L("Advanced"), _L("Advanced Mode"));
// Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { if (get_mode() == comSimple) evt.Check(true); }, config_id_base + ConfigMenuModeSimple);
// Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { if (get_mode() == comAdvanced) evt.Check(true); }, config_id_base + ConfigMenuModeAdvanced);
//
// local_menu->AppendSubMenu(mode_menu, _L("Mode"), wxString::Format(_L("%s Mode"), SLIC3R_APP_NAME));
// }
// local_menu->AppendSeparator();
// local_menu->Append(config_id_base + ConfigMenuLanguage, _L("Language"));
// if (is_editor()) {
// local_menu->AppendSeparator();
// }
//
// local_menu->Bind(wxEVT_MENU, [this, config_id_base](wxEvent &event) {
// switch (event.GetId() - config_id_base) {
// case ConfigMenuWizard:
// run_wizard(ConfigWizard::RR_USER);
// break;
// case ConfigMenuUpdate:
// check_updates(true);
// break;
//#ifdef __linux__
// case ConfigMenuDesktopIntegration:
// show_desktop_integration_dialog();
// break;
//#endif
// case ConfigMenuSnapshots:
// //BBS do not support task snapshot
// break;
// case ConfigMenuPreferences:
// {
// //BBS GUI refactor: remove unuse layout logic
// //bool app_layout_changed = false;
// {
// // the dialog needs to be destroyed before the call to recreate_GUI()
// // or sometimes the application crashes into wxDialogBase() destructor
// // so we put it into an inner scope
// PreferencesDialog dlg(mainframe);
// dlg.ShowModal();
// //BBS GUI refactor: remove unuse layout logic
// //app_layout_changed = dlg.settings_layout_changed();
// if (dlg.seq_top_layer_only_changed())
// this->plater_->refresh_print();
//
// if (dlg.recreate_GUI()) {
// recreate_GUI(_L("Restart application") + dots);
// return;
// }
//#ifdef _WIN32
// if (is_editor()) {
// if (app_config->get("associate_3mf") == "true")
// associate_3mf_files();
// if (app_config->get("associate_stl") == "true")
// associate_stl_files();
// }
// else {
// if (app_config->get("associate_gcode") == "true")
// associate_gcode_files();
// }
//#endif // _WIN32
// }
// //BBS GUI refactor: remove unuse layout logic
// /*if (app_layout_changed) {
// // hide full main_sizer for mainFrame
// mainframe->GetSizer()->Show(false);
// mainframe->update_layout();
// mainframe->select_tab(size_t(0));
// }*/
// break;
// }
// case ConfigMenuLanguage:
// {
// /* Before change application language, let's check unsaved changes on 3D-Scene
// * and draw user's attention to the application restarting after a language change
// */
// {
// // the dialog needs to be destroyed before the call to switch_language()
// // or sometimes the application crashes into wxDialogBase() destructor
// // so we put it into an inner scope
// wxString title = is_editor() ? wxString(SLIC3R_APP_NAME) : wxString(GCODEVIEWER_APP_NAME);
// title += " - " + _L("Choose language");
// //wxMessageDialog dialog(nullptr,
// MessageDialog dialog(nullptr,
// _L("Switching the language requires application restart.\n") + "\n\n" +
// _L("Do you want to continue?"),
// title,
// wxICON_QUESTION | wxOK | wxCANCEL);
// if (dialog.ShowModal() == wxID_CANCEL)
// return;
// }
//
// switch_language();
// break;
// }
// case ConfigMenuFlashFirmware:
// //BBS FirmwareDialog::run(mainframe);
// break;
// default:
// break;
// }
// });
//
// using std::placeholders::_1;
//
// if (mode_menu != nullptr) {
// auto modfn = [this](int mode, wxCommandEvent&) { if (get_mode() != mode) save_mode(mode); };
// mode_menu->Bind(wxEVT_MENU, std::bind(modfn, comSimple, _1), config_id_base + ConfigMenuModeSimple);
// mode_menu->Bind(wxEVT_MENU, std::bind(modfn, comAdvanced, _1), config_id_base + ConfigMenuModeAdvanced);
// }
//
// // BBS
// //menu->Append(local_menu, _L("Configuration"));
// menu->AppendSubMenu(local_menu, _L("Configuration"));
//}
void GUI_App::open_presetbundledialog(size_t open_on_tab, const std::string& highlight_option)
{
bool app_layout_changed = false;
-3
View File
@@ -569,7 +569,6 @@ public:
void start_http_server(const std::string& provider = ORCA_CLOUD_PROVIDER);
void start_http_server(int port, const std::string& provider = ORCA_CLOUD_PROVIDER);
void stop_http_server();
void switch_staff_pick(bool on);
void on_show_check_privacy_dlg(int online_login = 0, const std::string& provider = ORCA_CLOUD_PROVIDER);
void show_check_privacy_dlg(wxCommandEvent& evt);
@@ -583,7 +582,6 @@ public:
void persist_window_geometry(wxTopLevelWindow *window, bool default_maximized = false);
void update_ui_from_settings();
bool switch_language();
bool load_language(wxString language, bool initial);
Tab* get_tab(Preset::Type type);
@@ -801,7 +799,6 @@ private:
bool window_pos_restore(wxTopLevelWindow* window, const std::string &name, bool default_maximized = false);
void window_pos_sanitize(wxTopLevelWindow* window);
void window_pos_center(wxTopLevelWindow *window);
bool select_language();
// Dynamic printer agent selection - internal helpers for switch_printer_agent
// and the plugin load/unload callbacks (init_plugin_gui_wiring).
-89
View File
@@ -3275,98 +3275,9 @@ void MainFrame::init_menubar_as_editor()
auto preference_item = new wxMenuItem(parent_menu, ConfigMenuPreferences + config_id_base, _L("Preferences") + "\t" + ctrl + "P", "");
#endif
//auto printer_item = new wxMenuItem(parent_menu, ConfigMenuPrinter + config_id_base, _L("Printer"), "");
//auto language_item = new wxMenuItem(parent_menu, ConfigMenuLanguage + config_id_base, _L("Switch Language"), "");
// parent_menu->Bind(wxEVT_MENU, [this, config_id_base](wxEvent& event) {
// switch (event.GetId() - config_id_base) {
// //case ConfigMenuLanguage:
// //{
// // /* Before change application language, let's check unsaved changes on 3D-Scene
// // * and draw user's attention to the application restarting after a language change
// // */
// // {
// // // the dialog needs to be destroyed before the call to switch_language()
// // // or sometimes the application crashes into wxDialogBase() destructor
// // // so we put it into an inner scope
// // wxString title = _L("Language selection");
// // wxMessageDialog dialog(nullptr,
// // _L("Switching the language requires application restart.\n") + "\n\n" +
// // _L("Do you want to continue?"),
// // title,
// // wxICON_QUESTION | wxOK | wxCANCEL);
// // if (dialog.ShowModal() == wxID_CANCEL)
// // return;
// // }
//
// // wxGetApp().switch_language();
// // break;
// //}
// //case ConfigMenuWizard:
// //{
// // wxGetApp().run_wizard(ConfigWizard::RR_USER);
// // break;
// //}
// case ConfigMenuPrinter:
// {
// wxGetApp().params_dialog()->Popup();
// wxGetApp().get_tab(Preset::TYPE_PRINTER)->restore_last_select_item();
// break;
// }
// case ConfigMenuPreferences:
// {
// CallAfter([this] {
// PreferencesDialog dlg(this);
// dlg.ShowModal();
//#if ENABLE_GCODE_LINES_ID_IN_H_SLIDER
// if (dlg.seq_top_layer_only_changed() || dlg.seq_seq_top_gcode_indices_changed())
//#else
// if (dlg.seq_top_layer_only_changed())
//#endif // ENABLE_GCODE_LINES_ID_IN_H_SLIDER
// plater()->refresh_print();
//#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
//#ifdef _WIN32
// /*
// if (wxGetApp().app_config()->get("associate_3mf") == "true")
// wxGetApp().associate_3mf_files();
// if (wxGetApp().app_config()->get("associate_stl") == "true")
// wxGetApp().associate_stl_files();
// /*if (wxGetApp().app_config()->get("associate_step") == "true")
// wxGetApp().associate_step_files();*/
//#endif // _WIN32
//#endif
// });
// break;
// }
// default:
// break;
// }
// });
#ifdef __APPLE__
wxString about_title = wxString::Format(_L("&About %s"), SLIC3R_APP_FULL_NAME);
//auto about_item = new wxMenuItem(parent_menu, OrcaSlicerMenuAbout + bambu_studio_id_base, about_title, "");
//parent_menu->Bind(wxEVT_MENU, [this, bambu_studio_id_base](wxEvent& event) {
// switch (event.GetId() - bambu_studio_id_base) {
// case OrcaSlicerMenuAbout:
// Slic3r::GUI::about();
// break;
// case OrcaSlicerMenuPreferences:
// CallAfter([this] {
// PreferencesDialog dlg(this);
// dlg.ShowModal();
//#if ENABLE_GCODE_LINES_ID_IN_H_SLIDER
// if (dlg.seq_top_layer_only_changed() || dlg.seq_seq_top_gcode_indices_changed())
//#else
// if (dlg.seq_top_layer_only_changed())
//#endif // ENABLE_GCODE_LINES_ID_IN_H_SLIDER
// plater()->refresh_print();
// });
// break;
// default:
// break;
// }
//});
//parent_menu->Insert(0, about_item);
append_menu_item(
parent_menu, wxID_ANY, _L(about_title), "",
[](wxCommandEvent &) { Slic3r::GUI::about();},
+3 -20
View File
@@ -507,26 +507,14 @@ wxBoxSizer *PreferencesDialog::create_item_language_combobox(wxString title, wxS
}
}
// the dialog needs to be destroyed before the call to switch_language()
// or sometimes the application crashes into wxDialogBase() destructor
// so we put it into an inner scope
MessageDialog msg_wingow(nullptr, _L("Switching languages requires the application to restart.\n") + "\n" + _L("Do you want to continue?"),
L("Language selection"), wxICON_QUESTION | wxOK | wxCANCEL);
if (msg_wingow.ShowModal() == wxID_CANCEL) {
MessageDialog msg_window(nullptr, _L("Switching languages requires the application to restart.\n") + "\n" + _L("Do you want to continue?"),
_L("Language selection"), wxICON_QUESTION | wxOK | wxCANCEL);
if (msg_window.ShowModal() == wxID_CANCEL) {
combobox->SetSelection(m_current_language_selected);
return;
}
}
auto check = [](bool yes_or_no) {
// if (yes_or_no)
// return true;
int act_btns = ActionButtons::SAVE;
return wxGetApp().check_and_keep_current_preset_changes(_L("Switching application language"),
_L("Switching application language while some presets are modified."), act_btns);
};
m_current_language_selected = combobox->GetSelection();
if (m_current_language_selected >= 0 && m_current_language_selected < vlist.size()) {
m_pending_language = vlist[m_current_language_selected]->CanonicalName.ToUTF8().data();
@@ -1031,11 +1019,6 @@ wxBoxSizer *PreferencesDialog::create_item_checkbox(wxString title, wxString too
app_config->set_bool(param, checkbox->GetValue());
app_config->save();
// if (param == "staff_pick_switch") {
// bool pbool = app_config->get("staff_pick_switch") == "true";
// wxGetApp().switch_staff_pick(pbool);
// }
if (param == "sync_user_preset") {
bool sync = app_config->get("sync_user_preset") == "true" ? true : false;
if (sync) {
+1 -1
View File
@@ -995,7 +995,7 @@ void FanControlPopupNew::init_names(MachineObject* obj) {
radio_btn_name[AIR_DUCT::AIR_DUCT_HEATING_INTERNAL_FILT] = _L("Heating");
radio_btn_name[AIR_DUCT::AIR_DUCT_EXHAUST] = _L("Exhaust");
radio_btn_name[AIR_DUCT::AIR_DUCT_FULL_COOLING] = _L("Full Cooling");
radio_btn_name[AIR_DUCT::AIR_DUCT_INIT] = L("Init");
radio_btn_name[AIR_DUCT::AIR_DUCT_INIT] = _L("Init");
air_door_func_name[AIR_DOOR::AIR_DOOR_FUNC_CHAMBER] = _L("Chamber");
air_door_func_name[AIR_DOOR::AIR_DOOR_FUNC_INNERLOOP] = _L("Innerloop");