Commit 07666b17 authored by nikunj goyal's avatar nikunj goyal Committed by Nate Graham
Browse files

Added translations for other keyboard shortcuts

parent e13f5912
Pipeline #35379 passed with stage
in 10 minutes and 34 seconds
...@@ -155,16 +155,18 @@ void ElisaApplication::setupActions(const QString &actionName) ...@@ -155,16 +155,18 @@ void ElisaApplication::setupActions(const QString &actionName)
if (actionName == QLatin1String("toggle_playlist") && KAuthorized::authorizeAction(actionName)) { if (actionName == QLatin1String("toggle_playlist") && KAuthorized::authorizeAction(actionName)) {
auto togglePlaylistAction = d->mCollection.addAction(actionName, this, &ElisaApplication::togglePlaylist); auto togglePlaylistAction = d->mCollection.addAction(actionName, this, &ElisaApplication::togglePlaylist);
togglePlaylistAction->setShortcut(QKeySequence(Qt::Key_F9)); togglePlaylistAction->setShortcut(QKeySequence(Qt::Key_F9));
togglePlaylistAction->setText(QStringLiteral("Toggle Playlist")); togglePlaylistAction->setText(i18n("Toggle Playlist"));
} }
if (actionName == QLatin1String("Seek") && KAuthorized::authorizeAction(actionName)) { if (actionName == QLatin1String("Seek") && KAuthorized::authorizeAction(actionName)) {
auto seekAction = d->mCollection.addAction(actionName, this, &ElisaApplication::seek); auto seekAction = d->mCollection.addAction(actionName, this, &ElisaApplication::seek);
seekAction->setText(i18n("Seek forward 10 seconds"));
d->mCollection.setDefaultShortcut(seekAction, QKeySequence(Qt::SHIFT + Qt::Key_Right)); d->mCollection.setDefaultShortcut(seekAction, QKeySequence(Qt::SHIFT + Qt::Key_Right));
} }
if (actionName == QLatin1String("Scrub") && KAuthorized::authorizeAction(actionName)) { if (actionName == QLatin1String("Scrub") && KAuthorized::authorizeAction(actionName)) {
auto scrubAction = d->mCollection.addAction(actionName, this, &ElisaApplication::scrub); auto scrubAction = d->mCollection.addAction(actionName, this, &ElisaApplication::scrub);
scrubAction->setText(i18n("Scrub backwards 10 seconds"));
d->mCollection.setDefaultShortcut(scrubAction, QKeySequence(Qt::SHIFT + Qt::Key_Left)); d->mCollection.setDefaultShortcut(scrubAction, QKeySequence(Qt::SHIFT + Qt::Key_Left));
} }
...@@ -182,6 +184,7 @@ void ElisaApplication::setupActions(const QString &actionName) ...@@ -182,6 +184,7 @@ void ElisaApplication::setupActions(const QString &actionName)
if (actionName == QLatin1String("Play-Pause") && KAuthorized::authorizeAction(actionName)) { if (actionName == QLatin1String("Play-Pause") && KAuthorized::authorizeAction(actionName)) {
auto playPauseAction = d->mCollection.addAction(actionName, this, &ElisaApplication::playPause); auto playPauseAction = d->mCollection.addAction(actionName, this, &ElisaApplication::playPause);
playPauseAction->setText(i18n("Play/pause"));
d->mCollection.setDefaultShortcut(playPauseAction, QKeySequence(Qt::Key_Space)); d->mCollection.setDefaultShortcut(playPauseAction, QKeySequence(Qt::Key_Space));
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment