diff --git a/bin/locale/cs_CZ.qm b/bin/locale/cs_CZ.qm index 08b0d8cf2..f1b46f7c2 100644 Binary files a/bin/locale/cs_CZ.qm and b/bin/locale/cs_CZ.qm differ diff --git a/bin/locale/sk_SK.qm b/bin/locale/sk_SK.qm index 136fc166f..87e347943 100644 Binary files a/bin/locale/sk_SK.qm and b/bin/locale/sk_SK.qm differ diff --git a/src/QupZilla.pro b/src/QupZilla.pro index 0a6e65433..f378970b6 100644 --- a/src/QupZilla.pro +++ b/src/QupZilla.pro @@ -55,6 +55,7 @@ INCLUDEPATH += 3rdparty\ adblock\ desktopnotifications\ opensearch\ + bookmarksimport\ SOURCES += main.cpp\ 3rdparty/qtwin.cpp \ @@ -159,7 +160,11 @@ SOURCES += main.cpp\ opensearch/opensearchenginedelegate.cpp \ opensearch/searchenginesmanager.cpp \ opensearch/searchenginesdialog.cpp \ - opensearch/editsearchengine.cpp + opensearch/editsearchengine.cpp \ + bookmarksimport/firefoximporter.cpp \ + bookmarksimport/chromeimporter.cpp \ + bookmarksimport/operaimporter.cpp \ + bookmarksimport/bookmarksimportdialog.cpp HEADERS += \ 3rdparty/qtwin.h \ @@ -266,7 +271,11 @@ HEADERS += \ opensearch/opensearchenginedelegate.h \ opensearch/searchenginesmanager.h \ opensearch/searchenginesdialog.h \ - opensearch/editsearchengine.h + opensearch/editsearchengine.h \ + bookmarksimport/firefoximporter.h \ + bookmarksimport/chromeimporter.h \ + bookmarksimport/operaimporter.h \ + bookmarksimport/bookmarksimportdialog.h FORMS += \ preferences/autofillmanager.ui \ @@ -306,7 +315,8 @@ FORMS += \ preferences/acceptlanguage.ui \ preferences/addacceptlanguage.ui \ opensearch/searchenginesdialog.ui \ - opensearch/editsearchengine.ui + opensearch/editsearchengine.ui \ + bookmarksimport/bookmarksimportdialog.ui RESOURCES += \ data/icons.qrc \ @@ -378,6 +388,15 @@ message($$DEFINES) + + + + + + + + + diff --git a/src/app/mainapplication.cpp b/src/app/mainapplication.cpp index 26bbc90d3..3384131c4 100644 --- a/src/app/mainapplication.cpp +++ b/src/app/mainapplication.cpp @@ -40,6 +40,7 @@ #include "globalfunctions.h" #include "profileupdater.h" #include "searchenginesmanager.h" +#include "operaimporter.h" MainApplication::MainApplication(const QList &cmdActions, int &argc, char **argv) : QtSingleApplication("QupZillaWebBrowser", argc, argv) @@ -275,6 +276,11 @@ void MainApplication::loadSettings() m_downloadManager->loadSettings(); } +void MainApplication::restoreCursor() +{ + QApplication::restoreOverrideCursor(); +} + void MainApplication::setupJumpList() { QtWin::setupJumpList(); diff --git a/src/app/mainapplication.h b/src/app/mainapplication.h index e48691e8a..a1cb498bb 100644 --- a/src/app/mainapplication.h +++ b/src/app/mainapplication.h @@ -108,7 +108,7 @@ signals: private slots: void setupJumpList(); - void restoreCursor() { QApplication::restoreOverrideCursor(); } + void restoreCursor(); private: void connectDatabase(); diff --git a/src/app/qupzilla.cpp b/src/app/qupzilla.cpp index b6e8c555d..41ba3e6e6 100644 --- a/src/app/qupzilla.cpp +++ b/src/app/qupzilla.cpp @@ -57,6 +57,7 @@ #include "navigationbar.h" #include "pagescreen.h" #include "webinspectordockwidget.h" +#include "bookmarksimportdialog.h" const QString QupZilla::VERSION = "1.0.0-rc1"; const QString QupZilla::BUILDTIME = __DATE__" "__TIME__; @@ -240,6 +241,8 @@ void QupZilla::setupMenu() m_menuFile->addAction(tr("Save Page Screen"), this, SLOT(savePageScreen())); m_menuFile->addAction(tr("Send Link..."), this, SLOT(sendLink())); m_menuFile->addAction(QIcon::fromTheme("document-print"), tr("&Print"), this, SLOT(printPage())); m_menuFile->addSeparator(); + m_menuFile->addSeparator(); + m_menuFile->addAction(tr("Import bookmarks..."), this, SLOT(showBookmarkImport())); m_menuFile->addAction(QIcon::fromTheme("application-exit"), tr("Quit"), this, SLOT(quitApp()))->setShortcut(QKeySequence("Ctrl+Q")); menuBar()->addMenu(m_menuFile); @@ -525,15 +528,16 @@ void QupZilla::aboutToShowBookmarksMenu() query.exec("SELECT name FROM folders"); while(query.next()) { - QMenu* tempFolder = new QMenu(query.value(0).toString(), m_menuBookmarks); + QString folderName = query.value(0).toString(); + QMenu* tempFolder = new QMenu(folderName, m_menuBookmarks); tempFolder->setIcon(QIcon(style()->standardIcon(QStyle::SP_DirOpenIcon))); QSqlQuery query2; - query2.exec("SELECT title, url, icon FROM bookmarks WHERE folder='"+query.value(0).toString()+"'"); + query2.exec("SELECT title, url, icon FROM bookmarks WHERE folder='" + folderName + "'"); while(query2.next()) { - QString title = query.value(0).toString(); - QUrl url = query.value(1).toUrl(); - QIcon icon = IconProvider::iconFromBase64(query.value(2).toByteArray()); + QString title = query2.value(0).toString(); + QUrl url = query2.value(1).toUrl(); + QIcon icon = IconProvider::iconFromBase64(query2.value(2).toByteArray()); if (title.length()>40) { title.truncate(40); title+=".."; @@ -923,6 +927,12 @@ void QupZilla::showWebInspector() addDockWidget(Qt::BottomDockWidgetArea, m_webInspectorDock); } +void QupZilla::showBookmarkImport() +{ + BookmarksImportDialog* b = new BookmarksImportDialog(this); + b->show(); +} + void QupZilla::refreshHistory() { m_navigationBar->refreshHistory(); diff --git a/src/app/qupzilla.h b/src/app/qupzilla.h index 879fbf442..410f6a20e 100644 --- a/src/app/qupzilla.h +++ b/src/app/qupzilla.h @@ -160,6 +160,7 @@ private slots: void showStatusbar(); void showClearPrivateData(); void showPreferences(); + void showBookmarkImport(); void refreshHistory(); void bookmarkAllTabs(); diff --git a/src/bookmarks/bookmarksmodel.cpp b/src/bookmarks/bookmarksmodel.cpp index de8b6349e..596a564ad 100644 --- a/src/bookmarks/bookmarksmodel.cpp +++ b/src/bookmarks/bookmarksmodel.cpp @@ -240,6 +240,12 @@ bool BookmarksModel::editBookmark(int id, const QString &title, const QUrl &url, bool BookmarksModel::createFolder(const QString &name) { QSqlQuery query; + query.prepare("SELECT name FROM folders WHERE name = ?"); + query.bindValue(0, name); + query.exec(); + if (query.next()) + return false; + query.prepare("INSERT INTO folders (name) VALUES (?)"); query.bindValue(0, name); if (!query.exec()) diff --git a/src/bookmarks/bookmarksmodel.h b/src/bookmarks/bookmarksmodel.h index 64fb36eda..389f1f264 100644 --- a/src/bookmarks/bookmarksmodel.h +++ b/src/bookmarks/bookmarksmodel.h @@ -37,6 +37,13 @@ public: QString folder; QUrl url; QIcon icon; + + bool operator==(const Bookmark &other) + { + return (this->title == other.title && + this->folder == other.folder && + this->url == other.url); + } }; void loadSettings(); diff --git a/src/bookmarksimport/bookmarksimportdialog.cpp b/src/bookmarksimport/bookmarksimportdialog.cpp new file mode 100644 index 000000000..357b579f2 --- /dev/null +++ b/src/bookmarksimport/bookmarksimportdialog.cpp @@ -0,0 +1,291 @@ +#include "bookmarksimportdialog.h" +#include "ui_bookmarksimportdialog.h" +#include "firefoximporter.h" +#include "chromeimporter.h" +#include "operaimporter.h" +#include "mainapplication.h" + +BookmarksImportDialog::BookmarksImportDialog(QWidget* parent) + : QDialog(parent) + , ui(new Ui::BookmarksImportDialog) + , m_currentPage(0) +{ + setAttribute(Qt::WA_DeleteOnClose); + ui->setupUi(this); + + ui->browserList->setCurrentRow(0); + + connect(ui->nextButton, SIGNAL(clicked()), this, SLOT(nextPage())); + connect(ui->chooseFile, SIGNAL(clicked()), this, SLOT(setFile())); + connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(close())); + connect(ui->stopButton, SIGNAL(clicked()), this, SLOT(stopDownloading())); +} + +void BookmarksImportDialog::nextPage() +{ + switch (m_currentPage) { + case 0: + if (!ui->browserList->currentItem()) + return; + + m_browser = (Browser) (ui->browserList->currentRow()); + setupBrowser(m_browser); + ui->iconLabel->setPixmap(m_browserPixmap); + ui->importingFromLabel->setText(tr("Importing from %1").arg(m_browserName)); + ui->fileText1->setText(m_browserFileText); + ui->fileText2->setText(m_browserFileText2); + ui->standardDirLabel->setText("" + m_standardDir + ""); + ui->nextButton->setEnabled(false); + + m_currentPage++; + ui->stackedWidget->setCurrentIndex(m_currentPage); + break; + + case 1: + if (ui->fileLine->text().isEmpty()) + return; + + if (exportedOK()) { + m_currentPage++; + ui->stackedWidget->setCurrentIndex(m_currentPage); + startFetchingIcons(); + } + break; + + case 2: + addExportedBookmarks(); + close(); + break; + + default: + break; + } +} + +void BookmarksImportDialog::startFetchingIcons() +{ + ui->nextButton->setText(tr("Finish")); + ui->nextButton->setEnabled(false); + ui->progressBar->setValue(0); + ui->progressBar->setMaximum(m_exportedBookmarks.count()); + + int i = 0; + foreach (BookmarksModel::Bookmark b, m_exportedBookmarks) { + QTreeWidgetItem* item = new QTreeWidgetItem(); + item->setText(0, b.title); + item->setIcon(0, QWebSettings::globalSettings()->webGraphic(QWebSettings::DefaultFrameIconGraphic)); + item->setText(1, b.url.toString()); + item->setWhatsThis(0, QString::number(i)); + + ui->treeWidget->addTopLevelItem(item); + i++; + + QWebPage* page = new QWebPage(); + QWebFrame* frame = page->mainFrame(); + frame->load(b.url); + connect(frame, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished())); + connect(frame, SIGNAL(iconChanged()), this, SLOT(iconChanged())); + QPair pair; + pair.first = frame; + pair.second = b.url; + m_webViews.append(pair); + } +} + +void BookmarksImportDialog::stopDownloading() +{ + ui->nextButton->setEnabled(true); + ui->progressBar->setValue(ui->progressBar->maximum()); +} + +void BookmarksImportDialog::loadFinished() +{ + ui->progressBar->setValue(ui->progressBar->value() + 1); + + if (ui->progressBar->value() == ui->progressBar->maximum()) + ui->nextButton->setEnabled(true); +} + +void BookmarksImportDialog::iconChanged() +{ + QWebFrame* view = qobject_cast(sender()); + if (!view) + return; + + QUrl url; + for (int i = 0; i < m_webViews.count(); i++) { + QPair pair = m_webViews.at(i); + if (pair.first == view) { + url = pair.second; + break; + } + } + + if (url.isEmpty()) + return; + + QList items = ui->treeWidget->findItems(url.toString(), Qt::MatchExactly, 1); + if (items.count() == 0) + return; + + QTreeWidgetItem* item = items.at(0); + + item->setIcon(0, view->icon()); + + foreach (BookmarksModel::Bookmark b, m_exportedBookmarks) { + if (b.url == url) { + m_exportedBookmarks.removeOne(b); + b.icon = view->icon(); + m_exportedBookmarks.append(b); + break; + } + } +} + +bool BookmarksImportDialog::exportedOK() +{ + if (m_browser == Firefox) { + FirefoxImporter firefox(this); + firefox.setFile(ui->fileLine->text()); + if (firefox.openDatabase()) + m_exportedBookmarks = firefox.exportBookmarks(); + + if (firefox.error()) { + QMessageBox::critical(this, tr("Error!"), firefox.errorString()); + return false; + } + return true; + } else if (m_browser == Chrome) { + ChromeImporter chrome(this); + chrome.setFile(ui->fileLine->text()); + if (chrome.openFile()) + m_exportedBookmarks = chrome.exportBookmarks(); + + if (chrome.error()) { + QMessageBox::critical(this, tr("Error!"), chrome.errorString()); + return false; + } + return true; + } else if (m_browser == Opera) { + OperaImporter opera(this); + opera.setFile(ui->fileLine->text()); + if (opera.openFile()) + m_exportedBookmarks = opera.exportBookmarks(); + + if (opera.error()) { + QMessageBox::critical(this, tr("Error!"), opera.errorString()); + return false; + } + return true; + } + + return false; +} + +void BookmarksImportDialog::setFile() +{ +#ifdef Q_WS_WIN + if (m_browser == IE) { + QString path = QFileDialog::getExistingDirectory(this, tr("Choose directory...")); + if (!path.isEmpty()) + ui->fileLine->setText(path); + } else +#endif + { + QString path = QFileDialog::getOpenFileName(this, tr("Choose file..."), QDir::homePath(), m_browserBookmarkFile); + if (!path.isEmpty()) + ui->fileLine->setText(path); + } + + ui->nextButton->setEnabled(!ui->fileLine->text().isEmpty()); +} + +void BookmarksImportDialog::addExportedBookmarks() +{ + qApp->setOverrideCursor(Qt::WaitCursor); + + BookmarksModel* model = mApp->bookmarksModel(); + + if (m_exportedBookmarks.count() > 0) + model->createFolder(m_exportedBookmarks.at(0).folder); + + foreach (BookmarksModel::Bookmark b, m_exportedBookmarks) + model->saveBookmark(b.url, b.title, b.icon, b.folder); + + qApp->restoreOverrideCursor(); +} + +void BookmarksImportDialog::setupBrowser(Browser browser) +{ + switch (browser) { + case Firefox: + m_browserPixmap = QPixmap(":icons/browsers/firefox.png"); + m_browserName = "Mozilla Firefox"; + m_browserBookmarkFile = "places.sqlite"; + m_browserFileText = tr("Mozilla Firefox stores its bookmarks in places.sqlite SQLite database. " + "This file is usually located in "); + m_browserFileText2 = tr("Please choose this file to begin importing bookmarks."); + m_standardDir = +#ifdef Q_WS_WIN + "%APPDATA%/Mozilla/"; +#else + "/home/user/.mozilla/firefox/profilename/"; +#endif + break; + + case Chrome: + m_browserPixmap = QPixmap(":icons/browsers/chrome.png"); + m_browserName = "Google Chrome"; + m_browserBookmarkFile = "Bookmarks"; + m_browserFileText = tr("Google Chrome stores its bookmarks in Bookmarks text file. " + "This file is usually located in "); + m_browserFileText2 = tr("Please choose this file to begin importing bookmarks."); + m_standardDir = +#ifdef Q_WS_WIN + "%APPDATA%/Opera/"; +#else + "/home/user/.config/chrome/Default/"; +#endif + + break; + + case Opera: + m_browserPixmap = QPixmap(":icons/browsers/opera.png"); + m_browserName = "Opera"; + m_browserBookmarkFile = "bookmarks.adr"; + m_browserFileText = tr("Opera stores its bookmarks in bookmarks.adr text file. " + "This file is usually located in "); + m_browserFileText2 = tr("Please choose this file to begin importing bookmarks."); + m_standardDir = +#ifdef Q_WS_WIN + "%APPDATA%/Chrome/Default/"; +#else + "/home/user/.opera/"; +#endif + break; + + case IE: + m_browserPixmap = QPixmap(":icons/browsers/ie.png"); + m_browserName = "Internet Explorer"; + m_browserFileText = tr("Internet Explorer stores its bookmarks in Favorites folder. " + "This folder is usually located in "); + m_browserFileText2 = tr("Please choose this folder to begin importing bookmarks."); + m_standardDir = "C:\\Users\\username\\Favorites\\"; + break; + + default: + break; + } +} + +BookmarksImportDialog::~BookmarksImportDialog() +{ + if (m_webViews.count() > 0) { + for (int i = 0; i < m_webViews.count(); i++) {tr(""); + QWebFrame* frame= m_webViews.at(i).first; + delete frame->page(); + } + } + + delete ui; +} diff --git a/src/bookmarksimport/bookmarksimportdialog.h b/src/bookmarksimport/bookmarksimportdialog.h new file mode 100644 index 000000000..5263b09b7 --- /dev/null +++ b/src/bookmarksimport/bookmarksimportdialog.h @@ -0,0 +1,60 @@ +#ifndef BOOKMARKSIMPORTDIALOG_H +#define BOOKMARKSIMPORTDIALOG_H + +#include +#include +#include +#include +#include +#include +#include + +#include "bookmarksmodel.h" + +namespace Ui { + class BookmarksImportDialog; +} + +class BookmarksImportDialog : public QDialog +{ + Q_OBJECT + +public: + explicit BookmarksImportDialog(QWidget* parent = 0); + ~BookmarksImportDialog(); + +private slots: + void nextPage(); + void setFile(); + + + void stopDownloading(); + void iconChanged(); + void loadFinished(); + +private: + enum Browser { Firefox = 0, Chrome = 1, Opera = 2, IE = 3}; + + void setupBrowser(Browser browser); + bool exportedOK(); + void startFetchingIcons(); + void addExportedBookmarks(); + + Ui::BookmarksImportDialog *ui; + + int m_currentPage; + Browser m_browser; + QString m_browserName; + QString m_browserFileText; + QString m_browserFileText2; + QString m_standardDir; + + QPixmap m_browserPixmap; + QString m_browserBookmarkFile; + + QList m_exportedBookmarks; + + QList > m_webViews; +}; + +#endif // BOOKMARKSIMPORTDIALOG_H diff --git a/src/bookmarksimport/bookmarksimportdialog.ui b/src/bookmarksimport/bookmarksimportdialog.ui new file mode 100644 index 000000000..0742e6756 --- /dev/null +++ b/src/bookmarksimport/bookmarksimportdialog.ui @@ -0,0 +1,347 @@ + + + BookmarksImportDialog + + + + 0 + 0 + 505 + 329 + + + + Import Bookmarks + + + + + + <b>Import Bookmarks</b> + + + + + + + 0 + + + + + + + + 48 + 48 + + + + + Mozilla Firefox + + + + :/icons/browsers/firefox.png:/icons/browsers/firefox.png + + + + + Google Chrome + + + + :/icons/browsers/chrome.png:/icons/browsers/chrome.png + + + + + Opera + + + + :/icons/browsers/opera.png:/icons/browsers/opera.png + + + + + + + + Qt::Vertical + + + + 0 + 0 + + + + + + + + Choose browser from which you want to import bookmarks: + + + + + + + + + + + + 48 + 48 + + + + + 48 + 48 + + + + + + + + + + + + + false + + + + + + + Choose... + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + true + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + 0 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Fetching icons, please wait... + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 20 + + + + + + + + 24 + + + + + + + + + + + :/icons/faenza/stop.png:/icons/faenza/stop.png + + + + 16 + 16 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 20 + + + + + + + + + + + + 220 + + + + Title + + + + + Url + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Next + + + + + + + Cancel + + + + + + + + + + + + diff --git a/src/bookmarksimport/chromeimporter.cpp b/src/bookmarksimport/chromeimporter.cpp new file mode 100644 index 000000000..6b18d03bc --- /dev/null +++ b/src/bookmarksimport/chromeimporter.cpp @@ -0,0 +1,73 @@ +#include "chromeimporter.h" +#include "globalfunctions.h" + +#include + +ChromeImporter::ChromeImporter(QObject* parent) + : QObject(parent) + , m_error(false) + , m_errorString(tr("No Error")) +{ +} + +void ChromeImporter::setFile(const QString &path) +{ + m_path = path; +} + +bool ChromeImporter::openFile() +{ + m_file.setFileName(m_path); + + if (!m_file.open(QFile::ReadOnly)) { + m_error = true; + m_errorString = tr("Unable to open file."); + return false; + } + + return true; +} + +QList ChromeImporter::exportBookmarks() +{ + QList list; + + QString bookmarks = m_file.readAll(); + m_file.close(); + + QStringList parsedBookmarks; + QRegExp rx("\\{(\\s*)\"date_added(.*)\"(\\s*)\\}", Qt::CaseSensitive); + rx.setMinimal(true); + + int pos = 0; + while ((pos = rx.indexIn(bookmarks, pos)) != -1) { + parsedBookmarks << rx.cap(0); + pos += rx.matchedLength(); + } + + QScriptEngine* scriptEngine = new QScriptEngine(); + foreach (QString parsedString, parsedBookmarks) { + parsedString = "(" + parsedString + ")"; + if (scriptEngine->canEvaluate(parsedString)) { + QScriptValue object = scriptEngine->evaluate(parsedString); + QString name = object.property("name").toString(); + QString url = object.property("url").toString(); + + if (name.isEmpty() || url.isEmpty()) + continue; + + BookmarksModel::Bookmark b; + b.folder = "Chrome Import"; + b.title = name; + b.url = url; + + list.append(b); + } else { + m_error = true; + m_errorString = tr("Cannot evaluate JSON code."); + } + } + + return list; +} + diff --git a/src/bookmarksimport/chromeimporter.h b/src/bookmarksimport/chromeimporter.h new file mode 100644 index 000000000..0e54257ab --- /dev/null +++ b/src/bookmarksimport/chromeimporter.h @@ -0,0 +1,40 @@ +#ifndef CHROMEIMPORTER_H +#define CHROMEIMPORTER_H + +#include +#include +#include +#include +#include +#include + +#include "bookmarksmodel.h" + +class ChromeImporter : public QObject +{ + Q_OBJECT +public: + explicit ChromeImporter(QObject* parent = 0); + + void setFile(const QString &path); + bool openFile(); + + QList exportBookmarks(); + + bool error() { return m_error; } + QString errorString() { return m_errorString; } + +signals: + +public slots: + +private: + QString m_path; + QFile m_file; + + bool m_error; + QString m_errorString; + +}; + +#endif // CHROMEIMPORTER_H diff --git a/src/bookmarksimport/firefoximporter.cpp b/src/bookmarksimport/firefoximporter.cpp new file mode 100644 index 000000000..00ab381a3 --- /dev/null +++ b/src/bookmarksimport/firefoximporter.cpp @@ -0,0 +1,74 @@ +#include "firefoximporter.h" + +#include +#include + +FirefoxImporter::FirefoxImporter(QObject *parent) + : QObject(parent) + , m_error(false) + , m_errorString(tr("No Error")) +{ +} + +void FirefoxImporter::setFile(const QString &path) +{ + m_path = path; +} + +bool FirefoxImporter::openDatabase() +{ + db = QSqlDatabase::cloneDatabase(QSqlDatabase::database(), "import"); + + if (!QFile::exists(m_path)) { + m_error = true; + m_errorString = tr("File does not exists."); + return false; + } + db.setDatabaseName(m_path); + bool open = db.open(); + + if (!open) { + m_error = true; + m_errorString = tr("Unable to open database. Is Firefox running?"); + return false; + } + + return true; +} + +QList FirefoxImporter::exportBookmarks() +{ + QList list; + + QSqlQuery query(db); + query.exec("SELECT title, fk FROM moz_bookmarks WHERE title != ''"); + while(query.next()) { + QString title = query.value(0).toString(); + int placesId = query.value(1).toInt(); + + QSqlQuery query2(db); + query2.exec("SELECT url FROM moz_places WHERE id=" + QString::number(placesId)); + + if (!query2.next()) + continue; + + QString url = query2.value(0).toString(); + + if (title.isEmpty() || url.isEmpty() || url.startsWith("place:")) + continue; + + BookmarksModel::Bookmark b; + b.folder = "Firefox Import"; + b.title = title; + b.url = url; + + list.append(b); + } + + if (query.lastError().isValid()) { + m_error = true; + m_errorString = query.lastError().text(); + } + + return list; +} diff --git a/src/bookmarksimport/firefoximporter.h b/src/bookmarksimport/firefoximporter.h new file mode 100644 index 000000000..b222be380 --- /dev/null +++ b/src/bookmarksimport/firefoximporter.h @@ -0,0 +1,38 @@ +#ifndef FIREFOXIMPORTER_H +#define FIREFOXIMPORTER_H + +#include +#include +#include +#include + +#include "bookmarksmodel.h" + +class FirefoxImporter : public QObject +{ + Q_OBJECT +public: + explicit FirefoxImporter(QObject* parent = 0); + + void setFile(const QString &path); + bool openDatabase(); + + QList exportBookmarks(); + + bool error() { return m_error; } + QString errorString() { return m_errorString; } + +signals: + +public slots: + +private: + QString m_path; + QSqlDatabase db; + + bool m_error; + QString m_errorString; + +}; + +#endif // FIREFOXIMPORTER_H diff --git a/src/bookmarksimport/operaimporter.cpp b/src/bookmarksimport/operaimporter.cpp new file mode 100644 index 000000000..70c053efe --- /dev/null +++ b/src/bookmarksimport/operaimporter.cpp @@ -0,0 +1,66 @@ +#include "operaimporter.h" + +#include + +OperaImporter::OperaImporter(QObject* parent) + : QObject(parent) + , m_error(false) + , m_errorString(tr("No Error")) +{ +} + +void OperaImporter::setFile(const QString &path) +{ + m_path = path; +} + +bool OperaImporter::openFile() +{ + m_file.setFileName(m_path); + + if (!m_file.open(QFile::ReadOnly)) { + m_error = true; + m_errorString = tr("Unable to open file."); + return false; + } + + return true; +} + +QList OperaImporter::exportBookmarks() +{ + QList list; + + QString bookmarks = m_file.readAll(); + m_file.close(); + + QRegExp rx("#URL(.*)CREATED", Qt::CaseSensitive); + rx.setMinimal(true); + + int pos = 0; + while ((pos = rx.indexIn(bookmarks, pos)) != -1) { + QString string = rx.cap(1); + pos += rx.matchedLength(); + + QRegExp rx2("NAME=(.*)\\n"); + rx2.setMinimal(true); + rx2.indexIn(string); + QString name = rx2.cap(1); + + rx2.setPattern("URL=(.*)\\n"); + rx2.indexIn(string); + QString url = rx2.cap(1); + + if (name.isEmpty() || url.isEmpty()) + continue; + + BookmarksModel::Bookmark b; + b.folder = "Opera Import"; + b.title = name; + b.url = url; + + list.append(b); + } + + return list; +} diff --git a/src/bookmarksimport/operaimporter.h b/src/bookmarksimport/operaimporter.h new file mode 100644 index 000000000..be3c0dd44 --- /dev/null +++ b/src/bookmarksimport/operaimporter.h @@ -0,0 +1,36 @@ +#ifndef OPERAIMPORTER_H +#define OPERAIMPORTER_H + +#include +#include + +#include "bookmarksmodel.h" + +class OperaImporter : public QObject +{ + Q_OBJECT +public: + explicit OperaImporter(QObject* parent = 0); + + void setFile(const QString &path); + bool openFile(); + + QList exportBookmarks(); + + bool error() { return m_error; } + QString errorString() { return m_errorString; } + +signals: + +public slots: + +private: + QString m_path; + QFile m_file; + + bool m_error; + QString m_errorString; + +}; + +#endif // OPERAIMPORTER_H diff --git a/src/data/icons.qrc b/src/data/icons.qrc index 7179eb0b7..4a190fbf9 100644 --- a/src/data/icons.qrc +++ b/src/data/icons.qrc @@ -63,5 +63,8 @@ icons/menu/gear.png icons/menu/wikipedia.png icons/menu/yahoo.png + icons/browsers/firefox.png + icons/browsers/chrome.png + icons/browsers/opera.png diff --git a/src/data/icons/browsers/chrome.png b/src/data/icons/browsers/chrome.png new file mode 100644 index 000000000..1928880f7 Binary files /dev/null and b/src/data/icons/browsers/chrome.png differ diff --git a/src/data/icons/browsers/firefox.png b/src/data/icons/browsers/firefox.png new file mode 100644 index 000000000..437b53b9e Binary files /dev/null and b/src/data/icons/browsers/firefox.png differ diff --git a/src/data/icons/browsers/opera.png b/src/data/icons/browsers/opera.png new file mode 100644 index 000000000..c55b63714 Binary files /dev/null and b/src/data/icons/browsers/opera.png differ diff --git a/translations/cs_CZ.ts b/translations/cs_CZ.ts index c11332883..80760f05a 100644 --- a/translations/cs_CZ.ts +++ b/translations/cs_CZ.ts @@ -338,6 +338,125 @@ p, li { white-space: pre-wrap; } Upravit záložku + + BookmarksImportDialog + + + Import Bookmarks + Import záložek + + + + <b>Import Bookmarks</b> + <b>Import záložek</b> + + + + Choose browser from which you want to import bookmarks: + Vyberte ze kterého prohlížeče chcete importovat záložky: + + + + Choose... + Vybrat... + + + + Fetching icons, please wait... + Získávám ikony, prosím čekejte... + + + + Title + Titulek + + + + Url + Adresa + + + + Next + Další + + + + Cancel + Zrušit + + + + <b>Importing from %1</b> + <b>Importuji z %1</b> + + + + Finish + Dokončit + + + + + + Error! + Chyba! + + + + Choose directory... + Zvolte složku... + + + + Choose file... + Vyberte soubor... + + + + Mozilla Firefox stores its bookmarks in <b>places.sqlite</b> SQLite database. This file is usually located in + Mozilla Firefox ukládá své záložky v SQLite databázi <b>places.sqlite</b>. Tento soubor se obvykle nachází v + + + + Google Chrome stores its bookmarks in <b>Bookmarks</b> text file. This file is usually located in + Google Chrome ukládá své záložky v textovém souboru <b>Bookmarks</b>. Tento soubor se obvykle nachází v + + + + Opera stores its bookmarks in <b>bookmarks.adr</b> text file. This file is usually located in + Opera ukládá své záložky v textovém souboru <b>bookmarks.adr</b>. Tento soubor se obvykle nachází v + + + + Internet Explorer stores its bookmarks in <b>Favorites</b> folder. This folder is usually located in + Internet Explorer ukládá své záložky ve složce <b>Oblíbené</b>. Tato složka se obvykle nachází v + + + Mozilla Firefox stores its bookmarks in <b>places.sqlite</b> SQLite database.This file is usually located in + Mozzila Firefox ukládá své záložky v SQLite databázi <b>places.sqlite</b>. Tento soubor se obvykle nachází v + + + + + + Please choose this file to begin importing bookmarks. + Vyberte prosím tento soubor pro zahájení importu. + + + Google Chrome stores its bookmarks in <b>Bookmarks</b> text file.This file is usually located in + Google Chrome ukládá své záložky v textovém souboru <b>Bookmarks</b>. Tento soubor je obvykle nachází v + + + Opera stores its bookmarks in <b>bookmarks.adr</b> text file.This file is usually located in + Opera ukládá své záložky v textovém souboru <b>bookmarks.adr</b>. Tento soubor se obvykle nachází v + + + + Please choose this folder to begin importing bookmarks. + Vyberte prosím tuto složku pro zahájení importu. + + BookmarksManager @@ -459,22 +578,22 @@ p, li { white-space: pre-wrap; } BookmarksModel - - - + + + Bookmarks In Menu Záložky v menu - - - + + + Bookmarks In ToolBar Panel záložek - - + + Unsorted Bookmarks Nesetříděné záložky @@ -720,6 +839,24 @@ p, li { white-space: pre-wrap; } <není součástí certifikátu> + + ChromeImporter + + + No Error + Žádná chyba + + + + Unable to open file. + Nepodařilo se otevřít soubor. + + + + Cannot evaluate JSON code. + Nelze spustit JSON kód. + + ClearPrivateData @@ -1249,6 +1386,24 @@ nebyl nalezen! Vybrat ikonu... + + FirefoxImporter + + + No Error + Žádná chyba + + + + File does not exists. + Soubor neexistuje. + + + + Unable to open database. Is Firefox running? + Nepodařilo se otevřít databázi. Je Firefox spuštěn? + + HistoryManager @@ -1486,12 +1641,12 @@ nebyl nalezen! MainApplication - + Last session crashed Poslední relace spadla - + <b>QupZilla crashed :-(</b><br/>Oops, last session of QupZilla ends with its crash. We are very sorry. Would you try to restore saved state? <b>QupZilla spadla :-(</b><br/>Oops, poslední relace QupZilly skončila jejím pádem. Velice se omlouváme. Přejete si obnovit uložený stav? @@ -1605,6 +1760,19 @@ nebyl nalezen! Proxy %1 požaduje uživatelské jméno a heslo. + + OperaImporter + + + No Error + Žádná chyba + + + + Unable to open file. + Nepodařilo se otevřít soubor. + + PageScreen @@ -2438,252 +2606,257 @@ nebyl nalezen! QupZilla - + File Soubor - + Edit Úpravy - + Tools Nástroje - + Help Nápověda - + View Zobrazení - - + + Bookmarks Záložky - - + + History Historie - + Quit Konec - + New Tab Nový panel - + Close Tab Zavřít panel - + IP Address of current page IP Adresa aktuální stránky - + &New Window &Nové okno - + Open &File Otevřít &soubor - + &Save Page As... &Uložit stránku jako... - + &Print &Tisk - + + Import bookmarks... + Importovat záložky... + + + &Undo &Zpět - + &Redo &Vpřed - + &Cut V&yjmout - + C&opy &Kopírovat - + &Paste V&ložit - + &Delete &Odstranit - + Select &All Vyb&rat vše - + &Find &Najít - + &Navigation Toolbar &Navigační lišta - + &Bookmarks Toolbar Panel &záložek - + Sta&tus Bar Sta&tus bar - + Toolbars Nástrojové lišty - + Sidebars Postranní lišta - + &Page Source Zdrojový &kód stránky - + &Menu Bar &Menu - + &Fullscreen &Celá obrazovka - + &Stop Z&astavit - + &Reload O&bnovit - + Character &Encoding Kó&dování znaků - + Zoom &In Zoo&m + - + Zoom &Out Z&oom - - + Reset Původní - + Close Window Zavřít okno - + Open Location Otevřít adresu - + Send Link... Poslat odkaz... - + Other Ostatní - + Default Defaultní - + Current cookies cannot be accessed. Současné cookies nejsou dostupné. - + Your session is not stored. Vaše relace není uložena. - + Start Private Browsing Spustit anonymní prohlížení - + Private Browsing Enabled Soukromé prohlížení zapnuto - + Restore &Closed Tab Obnovit zavř&ený panel - + Bookmarks In ToolBar Bookmarks In Toolbar Panel záložek - - - + + + Empty Prázdný @@ -2693,128 +2866,128 @@ nebyl nalezen! Nový panel - + Bookmark &This Page Přidat &stránku do záložek - + Bookmark &All Tabs Přidat &všechny panely do záložek - + Organize &Bookmarks Organizovat &záložky - + &Back &Zpět - + &Forward &Vpřed - + &Home &Domů - + Show &All History Zobrazit celou &historii - + Closed Tabs Zavřené panely - + Save Page Screen Uložit snímek stránky - - + + (Private Browsing) (Soukromé prohlížení) - + Restore All Closed Tabs Obnovit všechny zavřené panely - + Clear list Vyčistit seznam - + About &Qt O &Qt - + &About QupZilla &O QupZille - + Informations about application Informace o aplikaci - + Report &Issue Nahlásit &problém - + &Web Search Hledání na &webu - + Page &Info Informace o &stránce - + &Download Manager Správce s&tahování - + &Cookies Manager Správce coo&kies - + &AdBlock &AdBlock - + RSS &Reader &RSS čtečka - + Clear Recent &History Vymazat nedá&vnou historii - + &Private Browsing Soukromé prohlíž&ení - + Pr&eferences Předvo&lby @@ -2823,32 +2996,32 @@ nebyl nalezen! Web Inspektor - + Open file... Otevřít soubor... - + Are you sure you want to turn on private browsing? Jste si jistý že chcete zapnout soukromé prohlížení? - + When private browsing is turned on, some actions concerning your privacy will be disabled: Se zapnutým soukromým prohlížením jsou některé akce týkající se soukromí vypnuty: - + Webpages are not added to the history. Stránky nejsou přidávány do historie. - + Until you close the window, you can still click the Back and Forward buttons to return to the webpages you have opened. Než zavřete prohlížeč, stále můžete použít tlačítka Zpět a Vpřed k vrácení se na stránky které jste otevřeli. - + There are still %1 open tabs and your session won't be stored. Are you sure to quit? Ještě je otevřeno %1 panelů a Vaše relace nebude uložena. Opravdu chcete skončit? diff --git a/translations/de_DE.ts b/translations/de_DE.ts index f352bbc8d..615e4f7f2 100644 --- a/translations/de_DE.ts +++ b/translations/de_DE.ts @@ -342,6 +342,113 @@ p, li { white-space: pre-wrap; } Dieses Lesezeichen bearbeiten + + BookmarksImportDialog + + + Import Bookmarks + + + + + <b>Import Bookmarks</b> + + + + + Choose browser from which you want to import bookmarks: + + + + + Choose... + + + + + Fetching icons, please wait... + + + + + Title + Titel + + + + Url + Url + + + + Next + + + + + Cancel + + + + + <b>Importing from %1</b> + + + + + Finish + + + + + + + Error! + Fehler! + + + + Choose directory... + + + + + Choose file... + Datei wählen... + + + + Mozilla Firefox stores its bookmarks in <b>places.sqlite</b> SQLite database. This file is usually located in + + + + + Google Chrome stores its bookmarks in <b>Bookmarks</b> text file. This file is usually located in + + + + + Opera stores its bookmarks in <b>bookmarks.adr</b> text file. This file is usually located in + + + + + Internet Explorer stores its bookmarks in <b>Favorites</b> folder. This folder is usually located in + + + + + + + Please choose this file to begin importing bookmarks. + + + + + Please choose this folder to begin importing bookmarks. + + + BookmarksManager @@ -463,22 +570,22 @@ p, li { white-space: pre-wrap; } BookmarksModel - - - + + + Bookmarks In Menu Lesezeichen im Menü - - - + + + Bookmarks In ToolBar Lesezeichen in Werkzeug-Leiste - - + + Unsorted Bookmarks Unsortierte Lesezeichen @@ -724,6 +831,24 @@ p, li { white-space: pre-wrap; } <Im Zertifkat nicht vorhanden> + + ChromeImporter + + + No Error + Kein Fehler + + + + Unable to open file. + + + + + Cannot evaluate JSON code. + + + ClearPrivateData @@ -1252,6 +1377,24 @@ p, li { white-space: pre-wrap; } + + FirefoxImporter + + + No Error + Kein Fehler + + + + File does not exists. + + + + + Unable to open database. Is Firefox running? + + + HistoryManager @@ -1488,12 +1631,12 @@ p, li { white-space: pre-wrap; } MainApplication - + Last session crashed Die letzte Sitzung wurde unerwartet beendet - + <b>QupZilla crashed :-(</b><br/>Oops, last session of QupZilla ends with its crash. We are very sorry. Would you try to restore saved state? <b>QupZilla ist abgestürzt :-(</b><br/>Hoppla,die letzte Sitzung wurde unerwartet beendet. Verzeihung. Möchten Sie den letzten Status wiederherstellen? @@ -1607,6 +1750,19 @@ p, li { white-space: pre-wrap; } Bitte Nutzername und Passwort zur Anmeldung an Proxy %1 angeben. + + OperaImporter + + + No Error + Kein Fehler + + + + Unable to open file. + + + PageScreen @@ -2440,251 +2596,256 @@ p, li { white-space: pre-wrap; } QupZilla - + File Datei - + Edit Bearbeiten - + Tools Werkzeuge - + Help Hilfe - + View Ansicht - - + + Bookmarks Lesezeichen - - + + History Verlauf - + Quit Beenden - + New Tab Neuer Tab - + Close Tab Tab schließen - + IP Address of current page IP Adresse der aktuellen Seite - + &New Window Neues &Fenster - + Open &File Datei ö&ffnen - + &Save Page As... Seite speichern &unter... - + &Print &Drucken - + + Import bookmarks... + + + + &Undo &Rückgängig - + &Redo &Wiederherstellen - + &Cut &Ausschneiden - + C&opy &Kopieren - + &Paste E&infügen - + &Delete &Löschen - + Select &All Alles au&swählen - + &Find &Suchen - + &Navigation Toolbar &Navigations-Symbolleiste - + &Bookmarks Toolbar &Lesezeichen-Werkzeug-Leiste - + Sta&tus Bar Sta&tus-Leiste - + Toolbars Werkzeugleisten - + Sidebars Seiten-Leiste - + &Page Source Seiten-&Quelltext - + &Menu Bar &Menü-Leiste - + &Fullscreen &Vollbild - + &Stop &Stopp - + &Reload &Neu laden - + Character &Encoding &Zeichenkodierung - + Zoom &In Ver&größern - + Zoom &Out Ver&kleinern - + Reset Zurücksetzen - + Close Window Fenster schließen - + Open Location Adresse aufrufen - + Send Link... Link senden... - + Other Andere - + Default Standard - + Current cookies cannot be accessed. Auf aktuelle Cookies kann nicht zugegriffen werden. - + Your session is not stored. Ihre Sitzung wird nicht gespeichert. - + Start Private Browsing Privaten Modus starten - + Private Browsing Enabled Privater Modus aktiv - + Restore &Closed Tab Geschlossenen Tab &wiederherstellen - + Bookmarks In ToolBar Lesezeichen in Werkzeug-Leiste - - - + + + Empty Leer @@ -2694,128 +2855,128 @@ p, li { white-space: pre-wrap; } Neuer Tab - + Bookmark &This Page &Lesezeichen für diese Seite hinzufügen - + Bookmark &All Tabs Lesezeichen für alle &geöffneten Tabs hinzufügen - + Organize &Bookmarks Bookmarks &bearbeiten - + &Back &Zurück - + &Forward &Vor - + &Home &Startseite - + Show &All History &Vollständigen Verlauf anzeigen - + Closed Tabs Geschlossene Tabs - + Save Page Screen Bildschirmseite speichern - - + + (Private Browsing) (Privater Modus) - + Restore All Closed Tabs Alle geschlossenen Tabs wiederherstellen - + Clear list Liste leeren - + About &Qt Üb&er Qt - + &About QupZilla Über Qup&Zilla - + Informations about application Informationen über QupZilla - + Report &Issue &Fehlerbericht senden - + &Web Search Web&suche - + Page &Info S&eiteninformationen anzeigen - + &Download Manager &Download Manager - + &Cookies Manager &Cookie Manager - + &AdBlock &AdBlock - + RSS &Reader RSS &Reader - + Clear Recent &History &Verlauf löschen - + &Private Browsing &Privater Modus - + Pr&eferences &Einstellungen @@ -2824,32 +2985,32 @@ p, li { white-space: pre-wrap; } Web Inspector - + Open file... Datei öffnen... - + Are you sure you want to turn on private browsing? Möchten Sie wirklich den privaten Modus starten? - + When private browsing is turned on, some actions concerning your privacy will be disabled: Wenn der private Modus aktiv ist, stehen einige Aktionen nicht zur Verfügung: - + Webpages are not added to the history. Webseiten werden nicht zum Verlauf hinzugefügt. - + Until you close the window, you can still click the Back and Forward buttons to return to the webpages you have opened. Solange dieses Fenster geöffnet ist, können Sie über die Symbole "Zurück" und "Vor" zu den Webseiten zurückkehren, die Sie geöffnet haben. - + There are still %1 open tabs and your session won't be stored. Are you sure to quit? Es sind noch %1 Tabs geöffnet und Ihre Sitzung wird nicht gespeichert. Möchten Sie QupZilla wirklich beenden? diff --git a/translations/es.ts b/translations/es.ts index 7b4a48f21..11dfd5b44 100644 --- a/translations/es.ts +++ b/translations/es.ts @@ -330,6 +330,113 @@ p, li { white-space: pre-wrap; } + + BookmarksImportDialog + + + Import Bookmarks + + + + + <b>Import Bookmarks</b> + + + + + Choose browser from which you want to import bookmarks: + + + + + Choose... + + + + + Fetching icons, please wait... + + + + + Title + + + + + Url + + + + + Next + + + + + Cancel + + + + + <b>Importing from %1</b> + + + + + Finish + + + + + + + Error! + + + + + Choose directory... + + + + + Choose file... + + + + + Mozilla Firefox stores its bookmarks in <b>places.sqlite</b> SQLite database. This file is usually located in + + + + + Google Chrome stores its bookmarks in <b>Bookmarks</b> text file. This file is usually located in + + + + + Opera stores its bookmarks in <b>bookmarks.adr</b> text file. This file is usually located in + + + + + Internet Explorer stores its bookmarks in <b>Favorites</b> folder. This folder is usually located in + + + + + + + Please choose this file to begin importing bookmarks. + + + + + Please choose this folder to begin importing bookmarks. + + + BookmarksManager @@ -451,22 +558,22 @@ p, li { white-space: pre-wrap; } BookmarksModel - - - + + + Bookmarks In Menu - - - + + + Bookmarks In ToolBar - - + + Unsorted Bookmarks @@ -708,6 +815,24 @@ p, li { white-space: pre-wrap; } + + ChromeImporter + + + No Error + + + + + Unable to open file. + + + + + Cannot evaluate JSON code. + + + ClearPrivateData @@ -1234,6 +1359,24 @@ p, li { white-space: pre-wrap; } + + FirefoxImporter + + + No Error + + + + + File does not exists. + + + + + Unable to open database. Is Firefox running? + + + HistoryManager @@ -1461,12 +1604,12 @@ p, li { white-space: pre-wrap; } MainApplication - + Last session crashed - + <b>QupZilla crashed :-(</b><br/>Oops, last session of QupZilla ends with its crash. We are very sorry. Would you try to restore saved state? @@ -1580,6 +1723,19 @@ p, li { white-space: pre-wrap; } + + OperaImporter + + + No Error + + + + + Unable to open file. + + + PageScreen @@ -2399,407 +2555,412 @@ p, li { white-space: pre-wrap; } QupZilla - + Private Browsing Enabled - + IP Address of current page - + Tools - + Help - - + + Bookmarks - - + + History - + File - + &New Window - + New Tab - + Open Location - + Open &File - + Close Tab - + Close Window - + &Save Page As... - + Save Page Screen - + Send Link... - + &Print - - Quit + + Import bookmarks... + Quit + + + + Edit - + &Undo - + &Redo - + &Cut - + C&opy - + &Paste - + &Delete - + Select &All - + &Find - + View - + &Navigation Toolbar - + &Bookmarks Toolbar - + Sta&tus Bar - + &Menu Bar - + &Fullscreen - + &Stop - + &Reload - + Character &Encoding - + Toolbars - + Sidebars - + Zoom &In - + Zoom &Out - + Reset - + &Page Source - + Closed Tabs - + Restore &Closed Tab - - + + (Private Browsing) - + Bookmark &This Page - + Bookmark &All Tabs - + Organize &Bookmarks - + Bookmarks In ToolBar - - - + + + Empty - + &Back - + &Forward - + &Home - + Show &All History - + Restore All Closed Tabs - + Clear list - + About &Qt - + &About QupZilla - + Informations about application - + Report &Issue - + &Web Search - + Page &Info - + &Download Manager - + &Cookies Manager - + &AdBlock - + RSS &Reader - + Clear Recent &History - + &Private Browsing - + Pr&eferences - + Other - + Default - + Open file... - + Are you sure you want to turn on private browsing? - + When private browsing is turned on, some actions concerning your privacy will be disabled: - + Webpages are not added to the history. - + Current cookies cannot be accessed. - + Your session is not stored. - + Until you close the window, you can still click the Back and Forward buttons to return to the webpages you have opened. - + Start Private Browsing - + There are still %1 open tabs and your session won't be stored. Are you sure to quit? diff --git a/translations/nl_NL.ts b/translations/nl_NL.ts index fa5c8e7d6..6b2efd132 100644 --- a/translations/nl_NL.ts +++ b/translations/nl_NL.ts @@ -338,6 +338,113 @@ p, li { white-space: pre-wrap; } Bewerk deze bladwijzer + + BookmarksImportDialog + + + Import Bookmarks + + + + + <b>Import Bookmarks</b> + + + + + Choose browser from which you want to import bookmarks: + + + + + Choose... + + + + + Fetching icons, please wait... + + + + + Title + Titel + + + + Url + URL + + + + Next + + + + + Cancel + + + + + <b>Importing from %1</b> + + + + + Finish + + + + + + + Error! + Fout! + + + + Choose directory... + + + + + Choose file... + Kies bestand... + + + + Mozilla Firefox stores its bookmarks in <b>places.sqlite</b> SQLite database. This file is usually located in + + + + + Google Chrome stores its bookmarks in <b>Bookmarks</b> text file. This file is usually located in + + + + + Opera stores its bookmarks in <b>bookmarks.adr</b> text file. This file is usually located in + + + + + Internet Explorer stores its bookmarks in <b>Favorites</b> folder. This folder is usually located in + + + + + + + Please choose this file to begin importing bookmarks. + + + + + Please choose this folder to begin importing bookmarks. + + + BookmarksManager @@ -459,22 +566,22 @@ p, li { white-space: pre-wrap; } BookmarksModel - - - + + + Bookmarks In Menu Bladwijzers in menu - - - + + + Bookmarks In ToolBar Bladwijzers op werkbalk - - + + Unsorted Bookmarks Ongesorteerde bladwijzers @@ -720,6 +827,24 @@ p, li { white-space: pre-wrap; } <niet aangegeven in certificaat> + + ChromeImporter + + + No Error + Geen fout + + + + Unable to open file. + + + + + Cannot evaluate JSON code. + + + ClearPrivateData @@ -1249,6 +1374,24 @@ werd niet gevonden! + + FirefoxImporter + + + No Error + Geen fout + + + + File does not exists. + + + + + Unable to open database. Is Firefox running? + + + HistoryManager @@ -1486,12 +1629,12 @@ werd niet gevonden! MainApplication - + Last session crashed Laatste sessie gecrashed - + <b>QupZilla crashed :-(</b><br/>Oops, last session of QupZilla ends with its crash. We are very sorry. Would you try to restore saved state? <b>QupZilla crashte :-(</b><br/>Oeps, de laatste sessie van QupZilla eindigde met een crash. We verontschuldigen ons. Wilt u proberen om de opgeslagen status te herstellen? @@ -1605,6 +1748,19 @@ werd niet gevonden! Er wordt om een gebruikersnaam en wachtwoord gevraagd door proxy %1. + + OperaImporter + + + No Error + Geen fout + + + + Unable to open file. + + + PageScreen @@ -2438,252 +2594,257 @@ werd niet gevonden! QupZilla - + File Bestand - + Edit Bewerken - + Tools Hulpmiddelen - + Help Help - + View Beeld - - + + Bookmarks Bladwijzers - - + + History Geschiedenis - + Quit Sluit af - + New Tab Nieuw tabblad - + Close Tab Sluit tabblad - + IP Address of current page IP-adres van huidige pagina - + &New Window &Nieuw venster - + Open &File Open &bestand - + &Save Page As... &Sla pagina op als... - + &Print &Afdrukken - + + Import bookmarks... + + + + &Undo &Ongedaan maken - + &Redo &Herhalen - + &Cut &Knippen - + C&opy K&opiëren - + &Paste &Plakken - + &Delete &Verwijderen - + Select &All Selecteer &Alles - + &Find &Zoeken - + &Navigation Toolbar &Navigatiewerkbalk - + &Bookmarks Toolbar &Bladwijzerwerkbalk - + Sta&tus Bar Sta&tusbalk - + Toolbars Werkbalken - + Sidebars Zijpanelen - + &Page Source &Pagina-broncode - + &Menu Bar &Menubalk - + &Fullscreen &Volledig scherm - + &Stop &Stoppen - + &Reload &Herladen - + Character &Encoding &Karakter-tekenset - + Zoom &In Zoo&m in - + Zoom &Out Z&oom uit - + Reset Herstart - + Close Window Sluit venster - + Open Location Open locatie - + Send Link... Verstuur link... - + Other Overig - + Default Standaard - + Current cookies cannot be accessed. Huidige cookies kunnen niet worden benaderd. - + Your session is not stored. Uw sessie is niet bewaard. - + Start Private Browsing Start incognito browsen - + Private Browsing Enabled Incognito browsen ingeschakeld - + Restore &Closed Tab Herstel &gesloten tabblad - + Bookmarks In ToolBar Bookmarks In Toolbar Bladwijzers op werkbalk - - - + + + Empty Leeg @@ -2693,128 +2854,128 @@ werd niet gevonden! Nieuw tabblad - + Bookmark &This Page Bladwijzer &deze pagina - + Bookmark &All Tabs Bladwijzer &alle tabbladen - + Organize &Bookmarks Organiseer &bladwijzers - + &Back &Terug - + &Forward &Vooruit - + &Home &Startpagina - + Show &All History Toon &alle geschiedenis - + Closed Tabs Gesloten tabbladen - + Save Page Screen Sla schermafbeelding op - - + + (Private Browsing) (Incognito browsen) - + Restore All Closed Tabs Herstel alle gesloten tabbladen - + Clear list Wis lijst - + About &Qt Over &Qt - + &About QupZilla &Over QupZilla - + Informations about application Informatie over programma - + Report &Issue Rapporteer &probleem - + &Web Search &Webzoeken - + Page &Info Pagina-&info - + &Download Manager &Downloadbeheerder - + &Cookies Manager &Cookies-beheerder - + &AdBlock &AdBlock - + RSS &Reader &RSS-lezer - + Clear Recent &History Wis recente &geschiedenis - + &Private Browsing &Incognito browsen - + Pr&eferences &Instellingen @@ -2823,32 +2984,32 @@ werd niet gevonden! Web-inspecteur - + Open file... Open bestand... - + Are you sure you want to turn on private browsing? Weet u zeker dat u incognito browsen wilt inschakelen? - + When private browsing is turned on, some actions concerning your privacy will be disabled: Wanneer incognito browsen is ingeschakeld, zullen sommige acties aangaande uw privacy uitgeschakeld worden: - + Webpages are not added to the history. Webpagina's worden niet toegevoegd aan uw geschiedenis. - + Until you close the window, you can still click the Back and Forward buttons to return to the webpages you have opened. Totdat u dit venster afsluit, kunt nog steeds op de Terug en Vooruit-knoppen klikken om terug naar de webpagina's te gaan die u hebt geopend. - + There are still %1 open tabs and your session won't be stored. Are you sure to quit? U heeft nog steeds %1 geopende tabs en uw sessie zal niet worden opgeslagen. Weet u zeker dat u wilt afsluiten? diff --git a/translations/sk_SK.ts b/translations/sk_SK.ts index 4d04ce542..ae4fcb5ea 100644 --- a/translations/sk_SK.ts +++ b/translations/sk_SK.ts @@ -289,7 +289,7 @@ p, li { white-space: pre-wrap; } Are you sure to delete all passwords on your computer? - Ste si istý, že chcete vymazať všetky heslá na vašom počítači? + Ste si istý, že chcete vymazať všetky heslá vo vašom počítači? @@ -342,6 +342,113 @@ p, li { white-space: pre-wrap; } Upraviť túto záložku + + BookmarksImportDialog + + + Import Bookmarks + Import záložiek + + + + <b>Import Bookmarks</b> + <b>Import záložiek</b> + + + + Choose browser from which you want to import bookmarks: + Vyberte prehliadač, z ktorého chcete importovať záložky: + + + + Choose... + Vybrať... + + + + Fetching icons, please wait... + Získavám ikony, prosím čakajte... + + + + Title + Názov + + + + Url + Url + + + + Next + Ďalší + + + + Cancel + Zrušiť + + + + <b>Importing from %1</b> + <b>Importovať z %1</b> + + + + Finish + Dokončené + + + + + + Error! + Chyba! + + + + Choose directory... + Zvoľte umiestnenie... + + + + Choose file... + Zvoľte súbor... + + + + Mozilla Firefox stores its bookmarks in <b>places.sqlite</b> SQLite database. This file is usually located in + Mozilla Firefox ukladá svoje záložky v SQLite databáze <b>places.sqlite</b>. Tento súbor sa obvykle nachádza v + + + + Google Chrome stores its bookmarks in <b>Bookmarks</b> text file. This file is usually located in + Google Chrome ukladá svoje záložky v SQLite databáze <b>places.sqlite</b>. Tento súbor sa obvykle nachádza v + + + + Opera stores its bookmarks in <b>bookmarks.adr</b> text file. This file is usually located in + Opera ukladá svoje záložky v SQLite databáze <b>places.sqlite</b>. Tento súbor sa obvykle nachádza v + + + + Internet Explorer stores its bookmarks in <b>Favorites</b> folder. This folder is usually located in + Internet Explorer ukladá svoje záložky v SQLite databáze <b>places.sqlite</b>. Tento súbor sa obvykle nachádza v + + + + + + Please choose this file to begin importing bookmarks. + Prosím zvoľte tento súbor pre zahájenie importu. + + + + Please choose this folder to begin importing bookmarks. + Prosím zvoľte tento priečinok pre zahájenie importu. + + BookmarksManager @@ -463,22 +570,22 @@ p, li { white-space: pre-wrap; } BookmarksModel - - - + + + Bookmarks In Menu Záložky v menu - - - + + + Bookmarks In ToolBar Panel záložiek - - + + Unsorted Bookmarks Neroztriedené záložky @@ -724,6 +831,24 @@ p, li { white-space: pre-wrap; } <nie je súčasťou certifikátu> + + ChromeImporter + + + No Error + Žiadna chyba + + + + Unable to open file. + Nepodarilo sa otvoriť súbor. + + + + Cannot evaluate JSON code. + Nie je možné spustiť JSON kód. + + ClearPrivateData @@ -1232,32 +1357,50 @@ p, li { white-space: pre-wrap; } Url: - + Url: Shortcut: - + Skratka: Icon: - + Ikona: <b>Note: </b>%s in url represent searched string - + <b>Poznámka: </b>%s v url reprezentuje hľadaný reťazec Add from file ... - + Pridať zo súboru... Choose icon... - + Zvoľte ikonu... + + + + FirefoxImporter + + + No Error + Žiadna chyba + + + + File does not exists. + Súbor neexistuje. + + + + Unable to open database. Is Firefox running? + Nepodarilo sa otvoriť databázu. Je Firefox zapnutý? @@ -1496,12 +1639,12 @@ p, li { white-space: pre-wrap; } MainApplication - + Last session crashed Minulá relácia spadla - + <b>QupZilla crashed :-(</b><br/>Oops, last session of QupZilla ends with its crash. We are very sorry. Would you try to restore saved state? <b>QupZilla spadla :-(</b><br/>Oops, minulá relácia QupZilly skončila pádom. Veľmi sa ospravedlňujeme. Chcete sa pokúsiť obnoviť uložený stav? @@ -1615,6 +1758,19 @@ p, li { white-space: pre-wrap; } Proxy %1 požaduje meno používateľa a heslo. + + OperaImporter + + + No Error + Žiadna chyba + + + + Unable to open file. + Nepodarilo sa otvoriť súbor. + + PageScreen @@ -2405,7 +2561,7 @@ p, li { white-space: pre-wrap; } The file is not an OpenSearch 1.1 file. - + Tento súbor nie je kompatibilný s OpenSearh 1.1. @@ -2444,251 +2600,256 @@ p, li { white-space: pre-wrap; } QupZilla - + File Súbor - + Edit Úpravy - + Tools Nástroje - + Help Nápoveda - + View Zobraziť - - + + Bookmarks Záložky - - + + History História - + Quit Koniec - + New Tab Nová karta - + Close Tab Zatvoriť kartu - + IP Address of current page IP adresa aktuálnej stránky - + &New Window &Nové okno - + Open &File Otvoriť &súbor - + &Save Page As... &Uložiť stránku ako... - + &Print &Tlačiť - + + Import bookmarks... + Importovať záložky... + + + &Undo &Späť - + &Redo &Dopredu - + &Cut &Vystrihnúť - + C&opy &Kopírovať - + &Paste &Prilepiť - + &Delete &Odstrániť - + Select &All Vybrať vš&etko - + &Find &Nájsť - + &Navigation Toolbar Panel &navigácie - + &Bookmarks Toolbar Panel &záložiek - + Sta&tus Bar Stavový &riadok - + Toolbars Panely nástrojov - + Sidebars Bočné panely - + &Page Source Zdrojový &kód stránky - + &Menu Bar &Menu panel - + &Fullscreen &Celá obrazovka - + &Stop Za&staviť - + &Reload &Obnoviť - + Character &Encoding Kódovani&e znakov - + Zoom &In Priblíž&iť - + Zoom &Out &Oddialiť - + Reset Resetovať - + Close Window Zatvoriť okno - + Open Location Otvoriť umiestnenie - + Send Link... Poslať odkaz... - + Other Ostatné - + Default Štandardné - + Current cookies cannot be accessed. Aktuálne cookies nie sú dostupné. - + Your session is not stored. Vaša relácia nie je uložená. - + Start Private Browsing Spustiť súkromné prehliadanie - + Private Browsing Enabled Súkromné prehliadanie je zapnuté - + Restore &Closed Tab Obnoviť zatvorenú &kartu - + Bookmarks In ToolBar Záložky v paneli nástrojov - - - + + + Empty Prázdne @@ -2698,128 +2859,128 @@ p, li { white-space: pre-wrap; } Nová karta - + Bookmark &This Page Pridať túto &stránku do záložiek - + Bookmark &All Tabs Pridať &všetky karty do záložiek - + Organize &Bookmarks &Organizovať záložky - + &Back &Späť - + &Forward &Dopredu - + &Home Do&mov - + Show &All History Zobraziť celú &históriu - + Closed Tabs Zatvorené karty - + Save Page Screen Uložiť obrázok stránky - - + + (Private Browsing) (Súkromné prehliadanie) - + Restore All Closed Tabs Obnoviť všetky zatvorené karty - + Clear list Vyčistiť zoznam - + About &Qt O &Qt - + &About QupZilla &O QupZille - + Informations about application Informácie o programe - + Report &Issue Nahlásiť &problém - + &Web Search Hladať na &webe - + Page &Info &Informácie o stránke - + &Download Manager Správca &sťahovania - + &Cookies Manager Správca &cookies - + &AdBlock &AdBlock - + RSS &Reader &RSS čítačka - + Clear Recent &History Vymazať nedávnu &históriu - + &Private Browsing Súkromné prehlia&danie - + Pr&eferences Nastav&enia @@ -2828,32 +2989,32 @@ p, li { white-space: pre-wrap; } Web inšpektor - + Open file... Otvoriť súbor... - + Are you sure you want to turn on private browsing? Ste si istý, že chcete zapnúť súkromné prehliadanie? - + When private browsing is turned on, some actions concerning your privacy will be disabled: Keď je zapnuté súkromné prehliadanie, niektoré akcie týkajúce sa vášho súkromia sú vypnuté: - + Webpages are not added to the history. Stránky nie sú pridávané do histórie. - + Until you close the window, you can still click the Back and Forward buttons to return to the webpages you have opened. Kým nezatvoríte okno, stále môžte používať tlačidlá Späť a Dopredu k vráteniu sa na stránky, ktoré ste mali otvorené. - + There are still %1 open tabs and your session won't be stored. Are you sure to quit? Stále sú otvorené %1 karty a vaša relácia nebude uložená. Ste si istý, že chcete skončiť? @@ -3290,7 +3451,7 @@ Po pridaní či odobratí ciest k certifikátom je nutné reštartovať prehliad Manage Search Engines - + Spravovať vyhľadávače @@ -3300,37 +3461,37 @@ Po pridaní či odobratí ciest k certifikátom je nutné reštartovať prehliad Remove - + Odstrániť Edit - + Upraviť Defaults - + Pôvodné Search Engine - + Vyhľadávač Shortcut - + Zástupca Add Search Engine - + Pridať vyhľadávač Edit Search Engine - + Upraviť vyhľadávač @@ -3338,17 +3499,17 @@ Po pridaní či odobratí ciest k certifikátom je nutné reštartovať prehliad Search Engine Added - + Pridaný vyhľadávač Search Engine "%1" has been successfuly added. - + Vyhľadávač "%1" bol úspešne pridaný. Search Engine is not valid! - + Vyhľadávač nie je platný! @@ -3358,7 +3519,7 @@ Po pridaní či odobratí ciest k certifikátom je nutné reštartovať prehliad Error while adding Search Engine <br><b>Error Message: </b> %1 - + Chyba pri pridávaní vyhľadávača <br><b>Chybová správa: </b> %1 @@ -4028,12 +4189,12 @@ Po pridaní či odobratí ciest k certifikátom je nutné reštartovať prehliad Manage Search Engines - + Spravovať vyhľadávače Add %1 ... - + Pridať %1 ...