From 92f874cdea47e97bf90d26a67b69ee8aa5909e5b Mon Sep 17 00:00:00 2001 From: YuSanka Date: Tue, 12 Jul 2022 14:06:12 +0200 Subject: [PATCH] Fix for #8450 - Tip Of The Day - configuration snapshots shortcut not work in the language Portuguese Brazil Note: This bug was related not just for the language Portuguese Brazil but for all another dictionaries, where for "&MenuItem" and "MenuItem" are used "&LocalMenuItem1" and "LocalMenuItem2" instead of "&LocalMenuItem" and "LocalMenuItem" --- resources/data/hints.ini | 8 ++++---- src/slic3r/GUI/HintNotification.cpp | 2 +- src/slic3r/GUI/MainFrame.cpp | 6 +++++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/resources/data/hints.ini b/resources/data/hints.ini index 3558e86ae..26d7f1d35 100644 --- a/resources/data/hints.ini +++ b/resources/data/hints.ini @@ -41,8 +41,8 @@ # hypertext_type = gallery # #Open top menubar item -#hypertext_menubar_menu_name = (Name in english visible as menu name: File, ) -#hypertext_menubar_item_name = (Name of item in english, if there are three dots at the end of name, put name without three dots) +#hypertext_menubar_menu_name = (Exact Name in english visible as menu name: File, ) Note: If it contains "&", you have to leave it +#hypertext_menubar_item_name = (Exact Name of item in english, if there are three dots at the end of name, put name without three dots) Note: If it contains "&", you have to leave it # # # Each notification can have disabled and enabled modes and techs - divided by ; and space @@ -200,8 +200,8 @@ disabled_tags = SLA text = Configuration snapshots\nDid you know that you can roll back to a complete backup of all system and user profiles? You can view and move back and forth between snapshots using the Configuration - Configuration snapshots menu. documentation_link = https://help.prusa3d.com/en/article/configuration-snapshots_1776 hypertext_type = menubar -hypertext_menubar_menu_name = Configuration -hypertext_menubar_item_name = Configuration Snapshots +hypertext_menubar_menu_name = &Configuration +hypertext_menubar_item_name = &Configuration Snapshots [hint:Minimum shell thickness] text = Minimum shell thickness\nDid you know that instead of the number of top and bottom layers, you can define theMinimum shell thicknessin millimeters? This feature is especially useful when using the variable layer height function. diff --git a/src/slic3r/GUI/HintNotification.cpp b/src/slic3r/GUI/HintNotification.cpp index 14ebbc6a0..e88947d4d 100644 --- a/src/slic3r/GUI/HintNotification.cpp +++ b/src/slic3r/GUI/HintNotification.cpp @@ -442,7 +442,7 @@ void HintDatabase::load_hints_from_file(const boost::filesystem::path& path) }; m_loaded_hints.emplace_back(hint_data); } else if (dict["hypertext_type"] == "menubar") { - wxString menu(_("&" + dict["hypertext_menubar_menu_name"])); + wxString menu(_(dict["hypertext_menubar_menu_name"])); wxString item(_(dict["hypertext_menubar_item_name"])); HintData hint_data{ id_string, text1, weight, was_displayed, hypertext_text, follow_text, disabled_tags, enabled_tags, true, documentation_link, [menu, item]() { wxGetApp().mainframe->open_menubar_item(menu, item); } }; m_loaded_hints.emplace_back(hint_data); diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 5c544c86a..478766df6 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -1097,7 +1097,11 @@ static wxMenu* generate_help_menu() else append_menu_item(helpMenu, wxID_ANY, wxString::Format(_L("&About %s"), GCODEVIEWER_APP_NAME), _L("Show about dialog"), [](wxCommandEvent&) { Slic3r::GUI::about(); }); - append_menu_item(helpMenu, wxID_ANY, _L("Show Tip of the Day"), _L("Opens Tip of the day notification in bottom right corner or shows another tip if already opened."), + append_menu_item(helpMenu, wxID_ANY, _L("Show Tip of the Day") +#if 0//debug + + "\tCtrl+Shift+T" +#endif + ,_L("Opens Tip of the day notification in bottom right corner or shows another tip if already opened."), [](wxCommandEvent&) { wxGetApp().plater()->get_notification_manager()->push_hint_notification(false); }); helpMenu->AppendSeparator(); append_menu_item(helpMenu, wxID_ANY, _L("Keyboard Shortcuts") + sep + "&?", _L("Show the list of the keyboard shortcuts"),