Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
fbdc952e by Jeet Baraiya at 2026-01-29T09:19:08+00:00
qt: menus: remove unnecessary translation for shortcuts
Shortcut strings (like "Ctrl+B") do not need to be translated.
Standardizing on QKeySequence handles localization automatically
and avoids potential errors if translators change the key codes.
I verified the codebase using [ grep -r "setShortcut.*qtr" ] and
fixed all 3 instances found in the qt module.
- - - - -
3 changed files:
- modules/gui/qt/menus/custom_menus.cpp
- modules/gui/qt/menus/menus.cpp
- modules/gui/qt/menus/qml_menu_wrapper.cpp
Changes:
=====================================
modules/gui/qt/menus/custom_menus.cpp
=====================================
@@ -414,8 +414,7 @@ RecentMenu::RecentMenu(MLRecentMediaModel* model, MediaLib*
ml, QWidget* parent
BookmarkMenu::BookmarkMenu(MediaLib * mediaLib, vlc_player_t * player, QWidget
* parent)
: QMenu(parent)
{
- // FIXME: Do we really need a translation call for the string shortcut ?
- addAction(qtr("&Manage"), THEDP, &DialogsProvider::bookmarksDialog
)->setShortcut(qtr("Ctrl+B"));
+ addAction(qtr("&Manage"), THEDP, &DialogsProvider::bookmarksDialog
)->setShortcut(QKeySequence("Ctrl+B"));
addSeparator();
=====================================
modules/gui/qt/menus/menus.cpp
=====================================
@@ -675,7 +675,7 @@ void VLCMenuBar::PopupMenuControlEntries( QMenu *menu,
qt_intf_t *p_intf,
#endif
action = menu->addAction( qfut( I_MENU_GOTOTIME ), THEDP,
&DialogsProvider::gotoTimeDialog );
- action->setShortcut( qtr( "Ctrl+T" ) );
+ action->setShortcut( QKeySequence( "Ctrl+T" ) );
menu->addSeparator();
}
=====================================
modules/gui/qt/menus/qml_menu_wrapper.cpp
=====================================
@@ -604,9 +604,7 @@ bool QmlMenuPositioner::eventFilter(QObject * object,
QEvent * event)
// Bookmarks
if (m_ctx->hasMediaLibrary())
{
- // FIXME: Do we really need a translation call for the string shortcut
?
- m_menu->addAction(qtr("&Manage"), THEDP,
&DialogsProvider::bookmarksDialog )->setShortcut( qtr("Ctrl+B"));
-
+ m_menu->addAction(qtr("&Manage"), THEDP,
&DialogsProvider::bookmarksDialog )->setShortcut(QKeySequence("Ctrl+B"));
m_menu->addSeparator();
MLBookmarkModel * bookmarks = new MLBookmarkModel(m_menu.get());
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/fbdc952e4e14a6ec7c34f503d9d8ac748b4240db
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/fbdc952e4e14a6ec7c34f503d9d8ac748b4240db
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits