mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
Merge pull request #150 from pejakm/master
Added Wiktionary back and renamed Translate menu item
This commit is contained in:
commit
030d1b8c08
@ -566,7 +566,8 @@ void WebView::contextMenuEvent(QContextMenuEvent* event)
|
||||
|
||||
QString langCode = mApp->getActiveLanguage().left(2);
|
||||
QUrl googleTranslateUrl = QUrl(QString("http://translate.google.com/#auto|%1|%2").arg(langCode, selectedText));
|
||||
m_menu->addAction(QIcon(":icons/menu/translate.png"), tr("Dictionary (Google Translate)"), this, SLOT(openUrlInNewTab()))->setData(googleTranslateUrl);
|
||||
m_menu->addAction(QIcon(":icons/menu/translate.png"), tr("Google Translate"), this, SLOT(openUrlInNewTab()))->setData(googleTranslateUrl);
|
||||
m_menu->addAction(tr("Dictionary"), this, SLOT(openUrlInNewTab()))->setData("http://" + (langCode != "" ? langCode + "." : langCode) + "wiktionary.org/wiki/Special:Search?search=" + selectedText);
|
||||
m_menu->addSeparator();
|
||||
|
||||
QString selectedString = selectedText.trimmed();
|
||||
|
Loading…
Reference in New Issue
Block a user