mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-20 01:12:09 +00:00
Localizations refactor (#14254)
This commit is contained in:
@@ -588,7 +588,7 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_
|
||||
auto check = [](bool yes_or_no) {
|
||||
if (yes_or_no)
|
||||
return true;
|
||||
return wxGetApp().check_and_save_current_preset_changes(_L("Application is closing"), _L("Closing Application while some presets are modified."));
|
||||
return wxGetApp().check_and_save_current_preset_changes(_L("Closing application"), _L("Closing Application while some presets are modified."));
|
||||
};
|
||||
|
||||
// BBS: close save project
|
||||
@@ -2870,16 +2870,16 @@ void MainFrame::init_menubar_as_editor()
|
||||
_L("Paste clipboard"), [this](wxCommandEvent&) { m_plater->paste_from_clipboard(); },
|
||||
"menu_paste", nullptr, [this](){return m_plater->can_paste_from_clipboard(); }, this);
|
||||
// BBS Delete selected
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Delete selected") + "\t" + _L("Del"),
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Delete Selected") + "\t" + _L("Del"),
|
||||
_L("Deletes the current selection"),[this](wxCommandEvent&) { m_plater->remove_selected(); },
|
||||
"menu_remove", nullptr, [this](){return can_delete(); }, this);
|
||||
//BBS: delete all
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Delete all") + "\t" + ctrl + "D",
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Delete All") + "\t" + ctrl + "D",
|
||||
_L("Deletes all objects"),[this](wxCommandEvent&) { m_plater->delete_all_objects_from_model(); },
|
||||
"menu_remove", nullptr, [this](){return can_delete_all(); }, this);
|
||||
editMenu->AppendSeparator();
|
||||
// BBS Clone Selected
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Clone selected") /*+ "\t" + ctrl + "M"*/,
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Clone Selected") /*+ "\t" + ctrl + "M"*/,
|
||||
_L("Clone copies of selections"),[this](wxCommandEvent&) {
|
||||
m_plater->clone_selection();
|
||||
},
|
||||
@@ -2955,14 +2955,14 @@ void MainFrame::init_menubar_as_editor()
|
||||
"", nullptr, [this](){return m_plater->can_paste_from_clipboard(); }, this);
|
||||
#if 0
|
||||
// BBS Delete selected
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Delete selected") + "\t" + _L("Backspace"),
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Delete Selected") + "\t" + _L("Backspace"),
|
||||
_L("Deletes the current selection"),[this](wxCommandEvent&) {
|
||||
m_plater->remove_selected();
|
||||
},
|
||||
"", nullptr, [this](){return can_delete(); }, this);
|
||||
#endif
|
||||
//BBS: delete all
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Delete all") + "\t" + ctrl + "D",
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Delete All") + "\t" + ctrl + "D",
|
||||
_L("Deletes all objects"),[this, handle_key_event](wxCommandEvent&) {
|
||||
wxKeyEvent e;
|
||||
e.SetEventType(wxEVT_KEY_DOWN);
|
||||
@@ -2975,7 +2975,7 @@ void MainFrame::init_menubar_as_editor()
|
||||
"", nullptr, [this](){return can_delete_all(); }, this);
|
||||
editMenu->AppendSeparator();
|
||||
// BBS Clone Selected
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Clone selected") + "\t" + ctrl + "K",
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Clone Selected") + "\t" + ctrl + "K",
|
||||
_L("Clone copies of selections"),[this, handle_key_event](wxCommandEvent&) {
|
||||
wxKeyEvent e;
|
||||
e.SetEventType(wxEVT_KEY_DOWN);
|
||||
@@ -2998,7 +2998,7 @@ void MainFrame::init_menubar_as_editor()
|
||||
#endif
|
||||
|
||||
// BBS Select All
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Select all") + sep + ctrl_t + "A",
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Select All") + sep + ctrl_t + "A",
|
||||
_L("Selects all objects"), [this, handle_key_event](wxCommandEvent&) {
|
||||
wxKeyEvent e;
|
||||
e.SetEventType(wxEVT_KEY_DOWN);
|
||||
@@ -3010,7 +3010,7 @@ void MainFrame::init_menubar_as_editor()
|
||||
m_plater->select_all(); },
|
||||
"", nullptr, [this](){return can_select(); }, this);
|
||||
// BBS Deslect All
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Deselect all") + sep + _L("Esc"),
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Deselect All") + sep + _L("Esc"),
|
||||
_L("Deselects all objects"), [this, handle_key_event](wxCommandEvent&) {
|
||||
wxKeyEvent e;
|
||||
e.SetEventType(wxEVT_KEY_DOWN);
|
||||
@@ -3674,8 +3674,8 @@ struct ConfigsOverwriteConfirmDialog : MessageDialog
|
||||
{
|
||||
ConfigsOverwriteConfirmDialog(wxWindow *parent, wxString name, bool exported)
|
||||
: MessageDialog(parent,
|
||||
wxString::Format(exported ? _L("A file exists with the same name: %s, do you want to overwrite it?") :
|
||||
_L("A config exists with the same name: %s, do you want to overwrite it?"),
|
||||
wxString::Format(exported ? _L("A file exists with the same name: %s. Do you want to overwrite it\?") :
|
||||
_L("A config exists with the same name: %s. Do you want to overwrite it\?"),
|
||||
name),
|
||||
exported ? _L("Overwrite file") : _L("Overwrite config"),
|
||||
wxYES_NO | wxNO_DEFAULT)
|
||||
@@ -3711,7 +3711,7 @@ void MainFrame::export_config()
|
||||
m_last_config = from_u8(files.back());
|
||||
MessageDialog dlg(this, wxString::Format(_L_PLURAL("There is %d config exported. (Only non-system configs)",
|
||||
"There are %d configs exported. (Only non-system configs)", files.size()), files.size()),
|
||||
_L("Export result"), wxOK);
|
||||
_L("Export Result"), wxOK);
|
||||
dlg.ShowModal();
|
||||
} catch (const std::exception &ex) {
|
||||
show_error(this, ex.what());
|
||||
@@ -4262,8 +4262,8 @@ void MainFrame::technology_changed()
|
||||
{
|
||||
// update menu titles
|
||||
PrinterTechnology pt = plater()->printer_technology();
|
||||
if (int id = m_menubar->FindMenu(pt == ptFFF ? _omitL("Material Settings") : _L("Filament Settings")); id != wxNOT_FOUND)
|
||||
m_menubar->SetMenuLabel(id, pt == ptSLA ? _omitL("Material Settings") : _L("Filament Settings"));
|
||||
if (int id = m_menubar->FindMenu(pt == ptFFF ? _omitL("Material Settings") : _L("Filament settings")); id != wxNOT_FOUND)
|
||||
m_menubar->SetMenuLabel(id, pt == ptSLA ? _omitL("Material Settings") : _L("Filament settings"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user