1
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:
David Rosca 2012-01-09 23:07:33 -08:00
commit 030d1b8c08

View File

@ -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();