Skip to content

Commit

Permalink
Fix for #8450 - Tip Of The Day - configuration snapshots shortcut not…
Browse files Browse the repository at this point in the history
… 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"
  • Loading branch information
YuSanka authored and lukasmatena committed Jul 12, 2022
1 parent 1afc6fb commit 92f874c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions resources/data/hints.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 - <a>Configuration snapshots menu</a>.
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 the<a>Minimum shell thickness</a>in millimeters? This feature is especially useful when using the variable layer height function.
Expand Down
2 changes: 1 addition & 1 deletion src/slic3r/GUI/HintNotification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 5 additions & 1 deletion src/slic3r/GUI/MainFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down

0 comments on commit 92f874c

Please sign in to comment.