From 0c64f615bfc43cd6dbfa5650e882759d3d67272d Mon Sep 17 00:00:00 2001 From: luddens Date: Tue, 17 Mar 2020 14:56:21 +0100 Subject: [PATCH 1/9] english translations file --- resources/i18n/en.json | 90 ++++++++++++++++++++++++++++++++++++++ resources/translations.qrc | 1 + 2 files changed, 91 insertions(+) create mode 100644 resources/i18n/en.json diff --git a/resources/i18n/en.json b/resources/i18n/en.json new file mode 100644 index 0000000..bd4e851 --- /dev/null +++ b/resources/i18n/en.json @@ -0,0 +1,90 @@ +{ + "@metadata": { + "authors": [ + ] + }, + "name":"English", + "error-downloader-window-title":"Cannot create downloader", + "error-downloader-launch-message":"Impossible to launch downloader, Kiwix-desktop will start but all download functions will not working !", + "open-zim":"Open Zim", + "local-kiwix-server":"Local Kiwix Server", + "random-article":"Random Article", + "home-page":"Home page", + "print":"Print", + "new-tab":"New tab", + "close-tab":"Close tab", + "reopen-closed-tab":"Reopen closed tab", + "browse-library":"Browse library", + "open-file":"Open file", + "open-recent":"Open recent", + "search-article":"Search arcticle", + "search-in-library":"Search in library", + "find-in-page":"Find in page", + "set-fullscreen":"Set fullscreen", + "quit-fullscreen":"Quit fullScreen", + "table-of-content":"Table of content", + "reading-list":"Reading list", + "reading-list-title":"Reading List", + "zoom-in":"Zoom in", + "zoom-out":"Zoom out", + "zoom-reset":"Zoom reset", + "help":"Help", + "feedback":"Feedback", + "report-a-bug":"Report a bug", + "request-a-feature":"Request a feature", + "about-kiwix":"About Kiwix", + "donate-to-support-kiwix":"Donate to support Kiwix", + "exit":"Exit", + "save-file-as-window-title":"Save File as", + "download-finished-message":"The document has been downloaded.", + "file":"File", + "edit":"Edit", + "view":"View", + "tools":"Tools", + "window-title":"Library - Kiwix", + "search":"Search", + "browse-directory":"Browse Directory", + "settings":"Settings", + "back":"Back", + "forward":"Forward", + "search-files":"Search files", + "title":"Title", + "size":"Size", + "date":"Date", + "content-type":"Content type", + "reset-sort":"reset sort", + "open":"Open", + "delete":"Delete", + "download":"Download", + "resume":"Resume", + "pause":"Pause", + "cancel":"Cancel", + "apply":"Apply", + "port-for-local-kiwix-server-setting":"Port for local Kiwix server :", + "zoom-level-setting":"Zoom level :", + "download-directory-setting":"Download directory :", + "reset":"Reset", + "browse":"Browse", + "kiwix-desktop-description":"Kiwix enables you to have the whole Wikipedia at hand wherever you go! On a boat, in the middle of nowhere or in jail, Kiwix gives you access to the whole human knowledge. You don't need Internet, everything is store on your computer.", + "learn-more-about-kiwix":"Learn more about Kiwix", + "release":"Release", + "source-code":"This software is released under the terms of the GNU General Public License version 3. View the source code on", + "version":"Version", + "build-date":"Build date", + "reporting-problem":"Reporting problem", + "report-issue-1/3":"To open an issue, visit", + "report-issue-2/3":"and open an issue describing your problem.", + "report-issue-3/3":"Please mention the version and the build date in the issue.", + "libraries":"Libraries", + "kiwix-server-running-message":"The Kiwix Server is running and can be accessed in the local network at :", + "kiwix-server-description":"Starting a server allows other computers in the local network to access your Kiwix library with a standard web browser.", + "fullscreen-notification":"You are now in full screen mode. Press ESC to quit!", + "all-files":"All Files", + "local-files":"Local Files", + "browse-by-category":"Browse By Category", + "browse-by-language":"Browse By Language", + "hide":"Hide", + "open-in-browser":"Open in browser", + "start-kiwix-server":"Start Kiwix Server", + "stop-kiwix-server":"Stop Kiwix Server" +} \ No newline at end of file diff --git a/resources/translations.qrc b/resources/translations.qrc index 94ea8f5..d3dab71 100644 --- a/resources/translations.qrc +++ b/resources/translations.qrc @@ -1,5 +1,6 @@ i18n/kiwix-desktop_fr.qm + i18n/en.json From 7251c89c7d2e0033cf2292881cba3af6c53fff63 Mon Sep 17 00:00:00 2001 From: luddens Date: Tue, 17 Mar 2020 15:38:40 +0100 Subject: [PATCH 2/9] Translation class --- kiwix-desktop.pro | 2 ++ src/kiwixapp.cpp | 6 ++++++ src/translation.cpp | 51 +++++++++++++++++++++++++++++++++++++++++++++ src/translation.h | 23 ++++++++++++++++++++ 4 files changed, 82 insertions(+) create mode 100644 src/translation.cpp create mode 100644 src/translation.h diff --git a/kiwix-desktop.pro b/kiwix-desktop.pro index 7baec7b..1611c16 100644 --- a/kiwix-desktop.pro +++ b/kiwix-desktop.pro @@ -46,6 +46,7 @@ DEFINES += QT_DEPRECATED_WARNINGS SOURCES += \ src/findinpagebar.cpp \ + src/translation.cpp \ src/main.cpp \ src/mainwindow.cpp \ src/kiwixapp.cpp \ @@ -75,6 +76,7 @@ SOURCES += \ HEADERS += \ src/findinpagebar.h \ + src/translation.h \ src/mainwindow.h \ src/kiwixapp.h \ src/kprofile.h \ diff --git a/src/kiwixapp.cpp b/src/kiwixapp.cpp index 3ed2858..a11c76d 100644 --- a/src/kiwixapp.cpp +++ b/src/kiwixapp.cpp @@ -24,6 +24,12 @@ KiwixApp::KiwixApp(int& argc, char *argv[]) appendToDirectory(m_libraryDirectory.toStdString(),"library.xml"), m_settingsManager.getKiwixServerPort())) { + try { + m_translation.setTranslation(QLocale()); + } catch (exception& e) { + QMessageBox::critical(nullptr, "Translation error", e.what()); + return; + } m_qtTranslator.load(QLocale(), "qt", "_", QLibraryInfo::location(QLibraryInfo::TranslationsPath)); installTranslator(&m_qtTranslator); diff --git a/src/translation.cpp b/src/translation.cpp new file mode 100644 index 0000000..21c3e77 --- /dev/null +++ b/src/translation.cpp @@ -0,0 +1,51 @@ +#include "translation.h" +#include +#include +#include +#include + +Translation::Translation() +{ +} + +void Translation::setTranslation(QLocale locale) +{ + auto defaultText = JsonFileToQMap(":/i18n/en.json"); + if (defaultText.isEmpty()) { + throw std::runtime_error("Invalid translation file"); + } + if (locale.bcp47Name() == "en") { + m_translations = defaultText; + return; + } + m_translations = JsonFileToQMap(":/i18n/" + locale.bcp47Name() + ".json"); + for (auto &key : defaultText.keys()) { + if (!m_translations.contains(key) || m_translations.value(key).isEmpty()) { + m_translations.insert(key, defaultText.value(key)); + } + } +} + +QMap Translation::JsonFileToQMap(const QString &filePath) +{ + QMap translations; + QFile file(filePath); + if (!file.open(QIODevice::ReadOnly)) { + return translations; + } + QJsonDocument doc = QJsonDocument::fromJson(file.readAll()); + file.close(); + if (doc.isNull()) { + return translations; + } + auto jsonObj = doc.object(); + for (auto &key : jsonObj.keys()) { + translations.insert(key, jsonObj.value(key).toString()); + } + return translations; +} + +QString Translation::getText(const QString &key) +{ + return (m_translations.contains(key)) ? m_translations.value(key) : key; +} diff --git a/src/translation.h b/src/translation.h new file mode 100644 index 0000000..d7ea1ed --- /dev/null +++ b/src/translation.h @@ -0,0 +1,23 @@ +#ifndef TRANSLATION_H +#define TRANSLATION_H + +#include +#include +#include + +class Translation +{ +public: + Translation(); + + void setTranslation(QLocale locale); + QString getText(const QString &key); + +private: + QMap JsonFileToQMap(const QString &filePath); + +private: + QMap m_translations; +}; + +#endif // TRANSLATION_H From 716d7b59cbf9bbdf4fe9f3f3061ba3bf2882f9da Mon Sep 17 00:00:00 2001 From: luddens Date: Tue, 17 Mar 2020 18:38:58 +0100 Subject: [PATCH 3/9] replace translations --- src/fullscreennotification.cpp | 3 +- src/kiwixapp.cpp | 66 ++++++++++++++++++---------------- src/kiwixapp.h | 5 +++ src/kprofile.cpp | 4 +-- src/mainmenu.cpp | 10 +++--- src/mainwindow.cpp | 2 +- src/searchbar.cpp | 2 +- src/settingsmanager.cpp | 2 +- src/tabbar.cpp | 2 +- src/topwidget.cpp | 8 ++--- 10 files changed, 57 insertions(+), 47 deletions(-) diff --git a/src/fullscreennotification.cpp b/src/fullscreennotification.cpp index 35133d8..641002b 100644 --- a/src/fullscreennotification.cpp +++ b/src/fullscreennotification.cpp @@ -1,4 +1,5 @@ #include "fullscreennotification.h" +#include "kiwixapp.h" #include #include #include @@ -7,7 +8,7 @@ FullScreenNotification::FullScreenNotification(QWidget *parent) : QLabel(parent) , m_previouslyVisible(false) { - setText(tr("You are now in full screen mode. Press ESC to quit!")); + setText(gt("fullscreen-notification")); setStyleSheet( "font-size: 24px;" "color: white;" diff --git a/src/kiwixapp.cpp b/src/kiwixapp.cpp index a11c76d..112037d 100644 --- a/src/kiwixapp.cpp +++ b/src/kiwixapp.cpp @@ -40,8 +40,8 @@ KiwixApp::KiwixApp(int& argc, char *argv[]) try { mp_downloader = new kiwix::Downloader(); } catch (exception& e) { - QMessageBox::critical(nullptr, tr("Cannot create downloader"), - tr("Impossible to launch downloader, Kiwix-desktop will start but all download functions will not working !

") + e.what()); + QMessageBox::critical(nullptr, gt("error-downloader-window-title"), + gt("error-downloader-launch-message") + "

" + e.what()); } mp_manager = new ContentManager(&m_library, mp_downloader); @@ -133,13 +133,17 @@ KiwixApp *KiwixApp::instance() return static_cast(QApplication::instance()); } +QString gt(const QString &key) { + return KiwixApp::instance()->getText(key); +} + void KiwixApp::openZimFile(const QString &zimfile) { QString _zimfile = zimfile; if (_zimfile.isEmpty()) { _zimfile = QFileDialog::getOpenFileName( getMainWindow(), - tr("Open Zim"), + gt("open-zim"), QString(), "ZimFile (*.zim*)"); _zimfile = QDir::toNativeSeparators(_zimfile); @@ -267,43 +271,43 @@ bool KiwixApp::isCurrentArticleBookmarked() void KiwixApp::createAction() { - CREATE_ACTION_ICON(KiwixServeAction, "share", tr("Local Kiwix Server")); + CREATE_ACTION_ICON(KiwixServeAction, "share", gt("local-kiwix-server")); SET_SHORTCUT(KiwixServeAction, QKeySequence(Qt::CTRL+Qt::Key_I)); - CREATE_ACTION_ICON(RandomArticleAction, "random", tr("Random Article")); + CREATE_ACTION_ICON(RandomArticleAction, "random", gt("random-article")); SET_SHORTCUT(RandomArticleAction, QKeySequence(Qt::CTRL+Qt::Key_R)); connect(mpa_actions[RandomArticleAction], &QAction::triggered, this, [=]() { this->openRandomUrl(false); }); - CREATE_ACTION(OpenHomePageAction, tr("Home page")); + CREATE_ACTION(OpenHomePageAction, gt("random-article")); SET_SHORTCUT(OpenHomePageAction, QKeySequence(Qt::ALT + Qt::Key_Home)); - CREATE_ACTION_ICON(PrintAction, "print", tr("Print")); + CREATE_ACTION_ICON(PrintAction, "print", gt("print")); SET_SHORTCUT(PrintAction, QKeySequence::Print); connect(mpa_actions[PrintAction], &QAction::triggered, this, &KiwixApp::printPage); - CREATE_ACTION(NewTabAction, tr("New tab")); + CREATE_ACTION(NewTabAction, gt("new-tab")); SET_SHORTCUT(NewTabAction, QKeySequence::AddTab); - CREATE_ACTION_ICON(CloseTabAction, "close", tr("Close tab")); + CREATE_ACTION_ICON(CloseTabAction, "close", gt("close-tab")); SET_SHORTCUT(CloseTabAction, QKeySequence::Close); mpa_actions[CloseTabAction]->setIconVisibleInMenu(false); - CREATE_ACTION(ReopenClosedTabAction, tr("Reopen closed tab")); + CREATE_ACTION(ReopenClosedTabAction, gt("reopen-closed-tab")); SET_SHORTCUT(ReopenClosedTabAction, QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_T)); HIDE_ACTION(ReopenClosedTabAction); - CREATE_ACTION(BrowseLibraryAction, tr("Browse library")); + CREATE_ACTION(BrowseLibraryAction, gt("browse-library")); SET_SHORTCUT(BrowseLibraryAction, QKeySequence(Qt::CTRL+Qt::Key_E)); HIDE_ACTION(BrowseLibraryAction); - CREATE_ACTION_ICON(OpenFileAction, "open-file", tr("Open file")); + CREATE_ACTION_ICON(OpenFileAction, "open-file", gt("open-file")); SET_SHORTCUT(OpenFileAction, QKeySequence::Open); connect(mpa_actions[OpenFileAction], &QAction::triggered, this, [=]() { openZimFile(); }); - CREATE_ACTION(OpenRecentAction, tr("Open recent")); + CREATE_ACTION(OpenRecentAction, gt("open-recent")); HIDE_ACTION(OpenRecentAction); /* TODO See https://github.com/kiwix/kiwix-desktop/issues/77 @@ -312,35 +316,35 @@ void KiwixApp::createAction() HIDE_ACTION(SavePageAsAction); */ - CREATE_ACTION(SearchArticleAction, tr("Search article")); + CREATE_ACTION(SearchArticleAction, gt("search-article")); SET_SHORTCUT(SearchArticleAction, QKeySequence(Qt::CTRL+Qt::Key_L)); HIDE_ACTION(SearchArticleAction); - CREATE_ACTION(SearchLibraryAction, tr("Search in library")); + CREATE_ACTION(SearchLibraryAction, gt("search-in-library")); SET_SHORTCUT(SearchLibraryAction, QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_R)); HIDE_ACTION(SearchLibraryAction); - CREATE_ACTION(FindInPageAction, tr("Find in page")); + CREATE_ACTION(FindInPageAction, gt("find-in-page")); mpa_actions[FindInPageAction]->setShortcuts({QKeySequence::Find, Qt::Key_F3}); connect(mpa_actions[FindInPageAction], &QAction::triggered, this, [=]() { mp_tabWidget->openFindInPageBar(); }); - CREATE_ACTION_ICON(ToggleFullscreenAction, "full-screen-enter", tr("Set fullScreen")); + CREATE_ACTION_ICON(ToggleFullscreenAction, "full-screen-enter", gt("set-fullscreen")); SET_SHORTCUT(ToggleFullscreenAction, QKeySequence::FullScreen); connect(mpa_actions[ToggleFullscreenAction], &QAction::toggled, this, [=](bool checked) { auto action = mpa_actions[ToggleFullscreenAction]; action->setIcon( QIcon(checked ? ":/icons/full-screen-exit.svg" : ":/icons/full-screen-enter.svg")); - action->setText(checked ? tr("Quit fullScreen") : tr("Set fullScreen")); + action->setText(checked ? gt("quit-fullscreen") : gt("set-fullscreen")); }); mpa_actions[ToggleFullscreenAction]->setCheckable(true); - CREATE_ACTION(ToggleTOCAction, tr("Table of content")); + CREATE_ACTION(ToggleTOCAction, gt("table-of-content")); SET_SHORTCUT(ToggleTOCAction, QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_1)); HIDE_ACTION(ToggleTOCAction); - CREATE_ACTION_ICON(ToggleReadingListAction, "reading-list" ,tr("Reading list")); + CREATE_ACTION_ICON(ToggleReadingListAction, "reading-list" ,gt("reading-list")); SET_SHORTCUT(ToggleReadingListAction, QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_2)); connect(mpa_actions[ToggleReadingListAction], &QAction::triggered, this, [=]() { toggleSideBar(READINGLIST_BAR); }); @@ -350,37 +354,37 @@ void KiwixApp::createAction() QIcon((type == READINGLIST_BAR) ? ":/icons/reading-list-active.svg" : ":/icons/reading-list.svg")); }); - CREATE_ACTION(ZoomInAction, tr("Zoom in")); + CREATE_ACTION(ZoomInAction, gt("zoom-in")); SET_SHORTCUT(ZoomInAction, QKeySequence::ZoomIn); - CREATE_ACTION(ZoomOutAction, tr("Zoom out")); + CREATE_ACTION(ZoomOutAction, gt("zoom-out")); SET_SHORTCUT(ZoomOutAction, QKeySequence::ZoomOut); - CREATE_ACTION(ZoomResetAction, tr("Zoom reset")); + CREATE_ACTION(ZoomResetAction, gt("zoom-reset")); SET_SHORTCUT(ZoomResetAction, QKeySequence(Qt::CTRL+Qt::Key_0)); - CREATE_ACTION(HelpAction, tr("Help")); + CREATE_ACTION(HelpAction, gt("help")); SET_SHORTCUT(HelpAction, QKeySequence::HelpContents); HIDE_ACTION(HelpAction); - CREATE_ACTION(FeedbackAction, tr("Feedback")); + CREATE_ACTION(FeedbackAction, gt("feedback")); HIDE_ACTION(FeedbackAction); - CREATE_ACTION(ReportBugAction, tr("Repost a bug")); + CREATE_ACTION(ReportBugAction, gt("report-a-bug")); HIDE_ACTION(ReportBugAction); - CREATE_ACTION(RequestFeatureAction, tr("Request a feature")); + CREATE_ACTION(RequestFeatureAction, gt("request-a-feature")); HIDE_ACTION(RequestFeatureAction); - CREATE_ACTION(AboutAction, tr("About Kiwix")); + CREATE_ACTION(AboutAction, gt("about-kiwix")); - CREATE_ACTION_ICON(SettingAction, "settings", tr("Settings")); + CREATE_ACTION_ICON(SettingAction, "settings", gt("settings")); SET_SHORTCUT(SettingAction, QKeySequence(Qt::Key_F12)); - CREATE_ACTION_ICON(DonateAction, "donate", tr("Donate to support Kiwix")); + CREATE_ACTION_ICON(DonateAction, "donate", gt("donate-to-support-kiwix")); SET_SHORTCUT(DonateAction, QKeySequence(Qt::CTRL+Qt::Key_D)); - CREATE_ACTION_ICON(ExitAction, "exit", tr("Exit")); + CREATE_ACTION_ICON(ExitAction, "exit", gt("exit")); SET_SHORTCUT(ExitAction, QKeySequence::Quit); } diff --git a/src/kiwixapp.h b/src/kiwixapp.h index c86c02b..3de2302 100644 --- a/src/kiwixapp.h +++ b/src/kiwixapp.h @@ -10,6 +10,7 @@ #include "kprofile.h" #include "urlschemehandler.h" #include "settingsmanager.h" +#include "translation.h" #include #include @@ -77,6 +78,7 @@ public: kiwix::KiwixServe* getLocalServer() { return mp_server; } SettingsManager* getSettingsManager() { return &m_settingsManager; }; SideBarType getSideType() { return m_currentSideType; } + QString getText(const QString &key) { return m_translation.getText(key); }; bool isCurrentArticleBookmarked(); @@ -110,10 +112,13 @@ private: SideBarType m_currentSideType; QErrorMessage* mp_errorDialog; kiwix::KiwixServe* mp_server; + Translation m_translation; QAction* mpa_actions[MAX_ACTION]; QString findLibraryDirectory(); }; +QString gt(const QString &key); + #endif // KIWIXAPP_H diff --git a/src/kprofile.cpp b/src/kprofile.cpp index 4b0e755..ec63507 100644 --- a/src/kprofile.cpp +++ b/src/kprofile.cpp @@ -17,7 +17,7 @@ void KProfile::startDownload(QWebEngineDownloadItem* download) { QString defaultFileName = download->url().fileName(); QString fileName = QFileDialog::getSaveFileName(KiwixApp::instance()->getMainWindow(), - tr("Save File as"), defaultFileName); + gt("save-file-as-window-title"), defaultFileName); if (fileName.isEmpty()) { return; } @@ -33,6 +33,6 @@ void KProfile::startDownload(QWebEngineDownloadItem* download) void KProfile::downloadFinished() { QMessageBox msgBox; - msgBox.setText(tr("The document has been downloaded.")); + msgBox.setText(gt("download-finished-message")); msgBox.exec(); } diff --git a/src/mainmenu.cpp b/src/mainmenu.cpp index 08e5609..6a99d37 100644 --- a/src/mainmenu.cpp +++ b/src/mainmenu.cpp @@ -17,7 +17,7 @@ MainMenu::MainMenu(QWidget *parent) : ADD_ACTION(PrintAction); addSeparator(); - m_fileMenu.setTitle(tr("File")); + m_fileMenu.setTitle(gt("file")); m_fileMenu.ADD_ACTION(NewTabAction); m_fileMenu.ADD_ACTION(CloseTabAction); m_fileMenu.ADD_ACTION(ReopenClosedTabAction); @@ -31,13 +31,13 @@ MainMenu::MainMenu(QWidget *parent) : addMenu(&m_fileMenu); - m_editMenu.setTitle(tr("Edit")); + m_editMenu.setTitle(gt("edit")); m_editMenu.ADD_ACTION(SearchArticleAction); m_editMenu.ADD_ACTION(SearchLibraryAction); m_editMenu.ADD_ACTION(FindInPageAction); addMenu(&m_editMenu); - m_viewMenu.setTitle(tr("View")); + m_viewMenu.setTitle(gt("view")); m_viewMenu.ADD_ACTION(ToggleFullscreenAction); m_viewMenu.ADD_ACTION(ToggleTOCAction); m_viewMenu.ADD_ACTION(ToggleReadingListAction); @@ -46,11 +46,11 @@ MainMenu::MainMenu(QWidget *parent) : m_viewMenu.ADD_ACTION(ZoomResetAction); addMenu(&m_viewMenu); - m_toolsMenu.setTitle(tr("Tools")); + m_toolsMenu.setTitle(gt("tools")); // m_toolsMenu.addAction(); // addMenu(&m_toolsMenu); - m_helpMenu.setTitle(tr("Help")); + m_helpMenu.setTitle(gt("help")); m_helpMenu.ADD_ACTION(HelpAction); m_helpMenu.ADD_ACTION(FeedbackAction); m_helpMenu.ADD_ACTION(ReportBugAction); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 28f5b86..e23afee 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -32,7 +32,7 @@ MainWindow::MainWindow(QWidget *parent) : if (!title.isEmpty() && !title.startsWith("zim://")) setWindowTitle(title + " - Kiwix"); else - setWindowTitle(tr("Library") + " - Kiwix"); + setWindowTitle(gt("window-title")); }); addAction(app->getAction(KiwixApp::OpenHomePageAction)); #if !SYSTEMTITLEBAR diff --git a/src/searchbar.cpp b/src/searchbar.cpp index c56cea4..9a9cf80 100644 --- a/src/searchbar.cpp +++ b/src/searchbar.cpp @@ -62,7 +62,7 @@ SearchBar::SearchBar(QWidget *parent) : m_completer(&m_completionModel, this), m_button(this) { - setPlaceholderText(tr("Search")); + setPlaceholderText(gt("search")); m_completer.setCompletionMode(QCompleter::UnfilteredPopupCompletion); m_completer.setCaseSensitivity(Qt::CaseInsensitive); setCompleter(&m_completer); diff --git a/src/settingsmanager.cpp b/src/settingsmanager.cpp index 3a22513..c2ed0b7 100644 --- a/src/settingsmanager.cpp +++ b/src/settingsmanager.cpp @@ -85,7 +85,7 @@ void SettingsManager::resetDownloadDir() void SettingsManager::browseDownloadDir() { QString dir = QFileDialog::getExistingDirectory(KiwixApp::instance()->getMainWindow(), - tr("Browse Directory"), + gt("browse-directory"), QString(), QFileDialog::ShowDirsOnly); emit(downloadDirChanged(dir)); diff --git a/src/tabbar.cpp b/src/tabbar.cpp index 9c1a741..f3ec3d1 100644 --- a/src/tabbar.cpp +++ b/src/tabbar.cpp @@ -52,7 +52,7 @@ TabBar::TabBar(QWidget *parent) : m_settingsIndex = index; auto view = KiwixApp::instance()->getSettingsManager()->getView(); mp_stackedWidget->insertWidget(index, view); - insertTab(index,QIcon(":/icons/settings.svg"), tr("Settings")); + insertTab(index,QIcon(":/icons/settings.svg"), gt("settings")); QToolButton *tb = new QToolButton(this); tb->setDefaultAction(KiwixApp::instance()->getAction(KiwixApp::CloseTabAction)); setTabButton(index, QTabBar::RightSide, tb); diff --git a/src/topwidget.cpp b/src/topwidget.cpp index cf9416c..dff4b5f 100644 --- a/src/topwidget.cpp +++ b/src/topwidget.cpp @@ -12,8 +12,8 @@ TopWidget::TopWidget(QWidget *parent) : { mp_historyBackAction = new QAction(this); mp_historyBackAction->setIcon(QIcon(":/icons/back.svg")); - mp_historyBackAction->setText(tr("back")); - mp_historyBackAction->setToolTip(tr("back")); + mp_historyBackAction->setText(gt("back")); + mp_historyBackAction->setToolTip(gt("back")); mp_historyBackAction->setEnabled(false); connect(mp_historyBackAction, &QAction::triggered, [](){ KiwixApp::instance()->getTabWidget()->triggerWebPageAction(QWebEnginePage::Back); @@ -22,8 +22,8 @@ TopWidget::TopWidget(QWidget *parent) : widgetForAction(mp_historyBackAction)->setObjectName("backButton"); mp_historyForwardAction = new QAction(this); mp_historyForwardAction->setIcon(QIcon(":/icons/forward.svg")); - mp_historyForwardAction->setText(tr("forward")); - mp_historyForwardAction->setToolTip(tr("forward")); + mp_historyForwardAction->setText(gt("forward")); + mp_historyForwardAction->setToolTip(gt("forward")); mp_historyForwardAction->setEnabled(false); connect(mp_historyForwardAction, &QAction::triggered, [](){ KiwixApp::instance()->getTabWidget()->triggerWebPageAction(QWebEnginePage::Forward); From fb582627dc3b29e2154c7d5173f7f03029b396fa Mon Sep 17 00:00:00 2001 From: luddens Date: Wed, 18 Mar 2020 08:09:24 +0100 Subject: [PATCH 4/9] translate contentmanager html page --- resources/js/_contentManager.js | 23 ++++++++++++++++++++++- resources/texts/_contentManager.html | 24 ++++++++++++------------ src/contentmanager.cpp | 10 ++++++++++ src/contentmanager.h | 1 + 4 files changed, 45 insertions(+), 13 deletions(-) diff --git a/resources/js/_contentManager.js b/resources/js/_contentManager.js index 91ae5c8..d80684d 100644 --- a/resources/js/_contentManager.js +++ b/resources/js/_contentManager.js @@ -18,6 +18,10 @@ function getIndexById(id) { return index; } +function setTranslations(translations) { + app.translations = createDict(TRANSLATION_KEYS, translations); +} + function createDict(keys, values) { var d = {} for(var i=0; i
- Title - Size - Date - Content type + {{ gt("title") }} + {{ gt("size") }} + {{ gt("date") }} + {{ gt("content-type") }} - +
diff --git a/src/contentmanager.cpp b/src/contentmanager.cpp index c1f39d4..beb6eec 100644 --- a/src/contentmanager.cpp +++ b/src/contentmanager.cpp @@ -36,6 +36,16 @@ void ContentManager::setLocal(bool local) { emit(filterParamsChanged()); } +QStringList ContentManager::getTranslations(const QStringList &keys) +{ + QStringList translations; + + for(auto& key: keys) { + translations.append(KiwixApp::instance()->getText(key)); + } + return translations; +} + #define ADD_V(KEY, METH) {if(key==KEY) values.append(QString::fromStdString((b->METH())));} QStringList ContentManager::getBookInfos(QString id, const QStringList &keys) { diff --git a/src/contentmanager.h b/src/contentmanager.h index b5ba1f4..f778423 100644 --- a/src/contentmanager.h +++ b/src/contentmanager.h @@ -52,6 +52,7 @@ signals: void pendingRequest(const bool); public slots: + QStringList getTranslations(const QStringList &keys); QStringList getBookInfos(QString id, const QStringList &keys); void openBook(const QString& id); QStringList updateDownloadInfos(QString id, const QStringList& keys); From 3b300f90e59778e1598deaea71d98fa69201a047 Mon Sep 17 00:00:00 2001 From: luddens Date: Fri, 27 Mar 2020 02:38:38 +0100 Subject: [PATCH 5/9] translate settingsmanager html page --- resources/js/_contentManager.js | 7 ------- resources/js/_settingsManager.js | 17 +++++++++++++++++ resources/js/tools.js | 7 +++++++ resources/kiwix.qrc | 1 + resources/texts/_contentManager.html | 1 + resources/texts/_settingsManager.html | 15 ++++++++------- src/settingsmanager.cpp | 10 ++++++++++ src/settingsmanager.h | 1 + 8 files changed, 45 insertions(+), 14 deletions(-) create mode 100644 resources/js/tools.js diff --git a/resources/js/_contentManager.js b/resources/js/_contentManager.js index d80684d..9fc5f6d 100644 --- a/resources/js/_contentManager.js +++ b/resources/js/_contentManager.js @@ -22,13 +22,6 @@ function setTranslations(translations) { app.translations = createDict(TRANSLATION_KEYS, translations); } -function createDict(keys, values) { - var d = {} - for(var i=0; iicons/new-tab-icon.svg icons/library-icon.svg icons/open-file.svg + js/tools.js texts/fr/about.html diff --git a/resources/texts/_contentManager.html b/resources/texts/_contentManager.html index 03d5040..1c94537 100644 --- a/resources/texts/_contentManager.html +++ b/resources/texts/_contentManager.html @@ -4,6 +4,7 @@ + diff --git a/resources/texts/_settingsManager.html b/resources/texts/_settingsManager.html index 73d3a40..c674466 100644 --- a/resources/texts/_settingsManager.html +++ b/resources/texts/_settingsManager.html @@ -4,27 +4,28 @@ +
- +
- +
- + - - + +
diff --git a/src/settingsmanager.cpp b/src/settingsmanager.cpp index c2ed0b7..82df7e3 100644 --- a/src/settingsmanager.cpp +++ b/src/settingsmanager.cpp @@ -91,6 +91,16 @@ void SettingsManager::browseDownloadDir() emit(downloadDirChanged(dir)); } +QStringList SettingsManager::getTranslations(const QStringList &keys) +{ + QStringList translations; + + for(auto& key: keys) { + translations.append(KiwixApp::instance()->getText(key)); + } + return translations; +} + void SettingsManager::initSettings() { m_kiwixServerPort = m_settings.value("localKiwixServer/port", 8181).toInt(); diff --git a/src/settingsmanager.h b/src/settingsmanager.h index 275d621..79ff5b6 100644 --- a/src/settingsmanager.h +++ b/src/settingsmanager.h @@ -25,6 +25,7 @@ public: qreal getZoomFactorByZimId(const QString &id); public slots: + QStringList getTranslations(const QStringList &keys); void setKiwixServerPort(int port); int getKiwixServerPort() { return m_kiwixServerPort; }; void setZoomFactor(qreal zoomFactor); From c113787abbbb3f91949adb7ec3f76843004ba642 Mon Sep 17 00:00:00 2001 From: luddens Date: Mon, 30 Mar 2020 18:47:01 +0200 Subject: [PATCH 6/9] about page translation --- resources/texts/about.html | 20 ++++++++++---------- src/about.cpp | 12 ++++++++++++ 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/resources/texts/about.html b/resources/texts/about.html index 83b6d7b..cc9a737 100644 --- a/resources/texts/about.html +++ b/resources/texts/about.html @@ -3,18 +3,18 @@

Kiwix Desktop

-

Kiwix enables you to have the whole Wikipedia at hand wherever you go! On a boat, in the middle of nowhere or in jail, Kiwix gives you access to the whole human knowledge. You don't need Internet, everything is store on your computer.

-

Learn more About Kiwix

-

Release

+

%%KIWIX_DESKTOP_DESCRIPTION%%

+

%%LEARN_MORE_ABOUT_KIWIX%%

+

%%RELEASE%%

-This software is released under the terms of the GNU General Public License version 3. View the source code on Github. +%%SOURCE_CODE%% Github.

-

Version : %%VERSION%%

-

Build date : %%BUILD_DATE%%

-

Reporting problem

-

To open an issue, visit Kiwix-desktop issue and open an issue describing your problem.

-

Please mention the version and the build date in the issue.

-

Libraries

+

%%VERSION_LABEL%% : %%VERSION%%

+

%%BUILD_DATE_LABEL%% : %%BUILD_DATE%%

+

%%REPORTING_PROBLEM%%

+

%%REPORT_ISSUE_1%% Kiwix-desktop issue %%REPORT_ISSUE_2%%

+

%%REPORT_ISSUE_3%%

+

%%LIBRARIES%%

  • Libzim - GPLv3 (openzim.org)
  • Libkiwix - GPLv3 (https://github.com/kiwix/kiwix-lib)
  • diff --git a/src/about.cpp b/src/about.cpp index ce7e4b5..900f038 100644 --- a/src/about.cpp +++ b/src/about.cpp @@ -1,5 +1,6 @@ #include "about.h" #include "ui_about.h" +#include "kiwixapp.h" #define _STR(...) # __VA_ARGS__ #define STR(X) _STR(X) @@ -10,8 +11,19 @@ About::About(QWidget *parent) : { ui->setupUi(this); auto htmlText = ui->aboutText->toHtml(); + htmlText = htmlText.replace("%%KIWIX_DESKTOP_DESCRIPTION%%", gt("kiwix-desktop-description")); + htmlText = htmlText.replace("%%LEARN_MORE_ABOUT_KIWIX%%", gt("learn-more-about-kiwix")); + htmlText = htmlText.replace("%%RELEASE%%", gt("release")); + htmlText = htmlText.replace("%%SOURCE_CODE%%", gt("source-code")); + htmlText = htmlText.replace("%%VERSION_LABEL%%", gt("version")); htmlText = htmlText.replace("%%VERSION%%", STR(GIT_VERSION)); + htmlText = htmlText.replace("%%BUILD_DATE_LABEL%%", gt("build-date")); htmlText = htmlText.replace("%%BUILD_DATE%%", STR(BUILD_DATE)); + htmlText = htmlText.replace("%%REPORTING_PROBLEM%%", gt("reporting-problem")); + htmlText = htmlText.replace("%%REPORT_ISSUE_1%%", gt("report-issue-1/3")); + htmlText = htmlText.replace("%%REPORT_ISSUE_2%%", gt("report-issue-2/3")); + htmlText = htmlText.replace("%%REPORT_ISSUE_3%%", gt("report-issue-3/3")); + htmlText = htmlText.replace("%%LIBRARIES%%", gt("Libraries")); ui->aboutText->setHtml(htmlText); } From f203eb63e8c7b97c38bfd76dd18d34d16d7d3820 Mon Sep 17 00:00:00 2001 From: luddens Date: Mon, 30 Mar 2020 18:47:54 +0200 Subject: [PATCH 7/9] local kiwix server page translation --- resources/kiwix.qrc | 2 -- resources/texts/kiwixServerRunningText.html | 7 ------- resources/texts/kiwixServerText.html | 7 ------- src/localkiwixserver.cpp | 15 +++++++++------ ui/localkiwixserver.ui | 11 ++++++++--- 5 files changed, 17 insertions(+), 25 deletions(-) delete mode 100644 resources/texts/kiwixServerRunningText.html delete mode 100644 resources/texts/kiwixServerText.html diff --git a/resources/kiwix.qrc b/resources/kiwix.qrc index 13acc85..53a73d9 100644 --- a/resources/kiwix.qrc +++ b/resources/kiwix.qrc @@ -61,8 +61,6 @@ fonts/SegoeUI/seguisb.ttf fonts/SegoeUI/segoeui.ttf texts/about.html - texts/kiwixServerText.html - texts/kiwixServerRunningText.html icons/search_backward.svg icons/search_forward.svg icons/kiwix-app-icons-square.svg diff --git a/resources/texts/kiwixServerRunningText.html b/resources/texts/kiwixServerRunningText.html deleted file mode 100644 index 0ea2000..0000000 --- a/resources/texts/kiwixServerRunningText.html +++ /dev/null @@ -1,7 +0,0 @@ - - -

    Local Kiwix server

    -


    -

    The Kiwix Server is running and can be accessed in the local network at :

    \ No newline at end of file diff --git a/resources/texts/kiwixServerText.html b/resources/texts/kiwixServerText.html deleted file mode 100644 index a54b59f..0000000 --- a/resources/texts/kiwixServerText.html +++ /dev/null @@ -1,7 +0,0 @@ - - -

    Local Kiwix server

    -


    -

    Starting a server allows other computers in the local network to access your Kiwix library with a standard web browser.

    \ No newline at end of file diff --git a/src/localkiwixserver.cpp b/src/localkiwixserver.cpp index af64535..dcb33d2 100644 --- a/src/localkiwixserver.cpp +++ b/src/localkiwixserver.cpp @@ -32,6 +32,11 @@ LocalKiwixServer::LocalKiwixServer(QWidget *parent) : break; } } + ui->label->setText(gt("local-kiwix-server")); + ui->label->setStyleSheet("font-weight: bold;"); + ui->KiwixServerText->setText(gt("kiwix-server-description")); + ui->OpenInBrowserButton->setText(gt("open-in-browser")); + ui->KiwixServerButton->setText(gt("start-kiwix-server")); ui->OpenInBrowserButton->setVisible(false); ui->IpAddress->setVisible(false); } @@ -69,15 +74,13 @@ void LocalKiwixServer::runOrStopServer() } if (m_active) { - ui->KiwixServerButton->setText("Stop Kiwix Server"); - QUrl url("qrc:/texts/kiwixServerRunningText.html"); - ui->KiwixServerText->setSource(url); + ui->KiwixServerButton->setText(gt("stop-kiwix-server")); + ui->KiwixServerText->setText(gt("kiwix-server-running-message")); ui->OpenInBrowserButton->setVisible(true); ui->IpAddress->setVisible(true); } else { - ui->KiwixServerButton->setText("Start Kiwix Server"); - QUrl url("qrc:/texts/kiwixServerText.html"); - ui->KiwixServerText->setSource(url); + ui->KiwixServerButton->setText(gt("start-kiwix-server")); + ui->KiwixServerText->setText(gt("kiwix-server-description")); ui->OpenInBrowserButton->setVisible(false); ui->IpAddress->setVisible(false); } diff --git a/ui/localkiwixserver.ui b/ui/localkiwixserver.ui index 29a8219..780b602 100644 --- a/ui/localkiwixserver.ui +++ b/ui/localkiwixserver.ui @@ -24,9 +24,7 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-weight:600;">Local Kiwix server</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-weight:600;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu';">Starting a server allows other computers in the local network to access your Kiwix library with a standard web browser.</span></p></body></html> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> @@ -98,6 +96,13 @@ p, li { white-space: pre-wrap; } + + + + Local Kiwix Server + + + From 1325d52d77b3fc8cd972ed8dd1bd0a1d991f5438 Mon Sep 17 00:00:00 2001 From: luddens Date: Mon, 30 Mar 2020 18:48:17 +0200 Subject: [PATCH 8/9] many ui translations --- src/contentmanagerside.cpp | 5 +++++ src/findinpagebar.cpp | 1 + src/readinglistbar.cpp | 1 + 3 files changed, 7 insertions(+) diff --git a/src/contentmanagerside.cpp b/src/contentmanagerside.cpp index 0e2f02d..28863c5 100644 --- a/src/contentmanagerside.cpp +++ b/src/contentmanagerside.cpp @@ -1,5 +1,6 @@ #include "contentmanagerside.h" #include "ui_contentmanagerside.h" +#include "kiwixapp.h" #include @@ -22,6 +23,10 @@ ContentManagerSide::ContentManagerSide(QWidget *parent) : checked ?"*{font-weight: bold}" : "");}); mp_ui->localFileButton->setStyleSheet("*{font-weight: bold}"); + mp_ui->allFileButton->setText(gt("all-files")); + mp_ui->localFileButton ->setText(gt("local-files")); + mp_ui->languageButton->setText(gt("browse-by-language")); + mp_ui->categoryButton->setText(gt("browse-by-category")); mp_languageButton = mp_ui->languageButton; mp_languageSelector = mp_ui->languageSelector; connect(mp_languageButton, &QCheckBox::toggled, this, [=](bool checked) { mp_languageSelector->setHidden(!checked); }); diff --git a/src/findinpagebar.cpp b/src/findinpagebar.cpp index 06ec6cf..3e5097d 100644 --- a/src/findinpagebar.cpp +++ b/src/findinpagebar.cpp @@ -8,6 +8,7 @@ FindInPageBar::FindInPageBar(QWidget *parent) : { mp_ui->setupUi(this); mp_findLineEdit = mp_ui->findEdit; + mp_ui->hideButton->setText(gt("hide")); connect(mp_ui->hideButton, &QPushButton::released, this, &FindInPageBar::findClose); connect(mp_ui->fNextButton, &QPushButton::released, diff --git a/src/readinglistbar.cpp b/src/readinglistbar.cpp index 55913fc..686e5bd 100644 --- a/src/readinglistbar.cpp +++ b/src/readinglistbar.cpp @@ -15,6 +15,7 @@ ReadingListBar::ReadingListBar(QWidget *parent) : this, &ReadingListBar::on_itemActivated); setupList(); + ui->label->setText(gt("reading-list-title")); } ReadingListBar::~ReadingListBar() From ffdfff514e169eea42ba7b3d86b48f01120c505e Mon Sep 17 00:00:00 2001 From: luddens Date: Mon, 30 Mar 2020 19:08:40 +0200 Subject: [PATCH 9/9] remove Qt translation files --- resources/i18n/kiwix-desktop_fr.qm | Bin 3261 -> 0 bytes resources/i18n/kiwix-desktop_fr.ts | 448 ----------------------------- resources/translations.qrc | 1 - 3 files changed, 449 deletions(-) delete mode 100644 resources/i18n/kiwix-desktop_fr.qm delete mode 100644 resources/i18n/kiwix-desktop_fr.ts diff --git a/resources/i18n/kiwix-desktop_fr.qm b/resources/i18n/kiwix-desktop_fr.qm deleted file mode 100644 index 6ce289cd7d275813ba7d1dcb45b35470b03c9abe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3261 zcmai0U2GIp6h7OX{b_e8ZG$Nq0z-qShy@j2&<9#*#Zdmbi^cMwv%7bF;OI@U=&RZ7^B2Cn($ykG{NY1?(EKXyHniF{M~!c zchC9G-+k-vtMBT8pV&D!u)j_?ma*hUqz3<{yFh)?3FB$_7oi|K8$tm(&cm4 z@%?jT_2F|wvHpm-d4?!C6}frkW5~T4xwU)`=3i_}9NY-$N80{AegU}M(Vo(GnExgE zqg%rF-sp`ry^z1GT{zN56x|j(b^HyCzZ9EW<6yiR?>+q`;%4_OT2UOdD!!N;_6?}Gx|>|en}D~wxmw3dK2>3QXjr>2=jgE_*+Am ze?R@;0qC97)8`{D*8P_Le(ighx0lHuekDrXx$IWyae7->TQQKOuH0ep$#+zfjn)cP2`cF8QfjG8S^-dUScpQ-$RBRCcLQw))y!AE_GEhvz`2S+c1#)Hr3H>i4@;|{OG_^sCD96* zM6^hbk6?dor!dQ{3)fRd?L3V;2LpS|h8_lde!YYWb0qgYAy8uC0qPAOzZR=E4u)Glv=6V z2`CN(PEWSA4#l=xK~R`ATDcxriV0N>@XkbYnQ1a$sv^{mMPYaqCnPA>(GX-=^-{n! z@9Y;r7p(>VfRe6^F)dVO&<$7b@9%FlV|_@?@$-cl3L+zb?92$m$xrCUQcw~n&# zBlpRA#B-6TSN*v~KwViQXA0de>UrDpLhC}B#$l8V2%YW^I8Th*$U7O5zYEtt5UfwC z^|kX!bHCb*)S5@+aI0kJ`cdfOS?g2SxPUa!>4>jL0NSBI9pQ?QjP0Zg5c44yHal&o zQ0tnz4QcHbRz;mWI-5&tu!lBWuf$EuZ`Z_{7N%9uamMj9ug4wfB5f3~a2>=g)EKF?S*rtW-}sRqU`Sj`(R z_*B9@>ZDOW7^r6;8u#;s#oGPXLBoke|HUs@qYc}R>XjW?JD-sSp_V|R2hs2MwRx3J v=xPn2`az{VYnR7lp(MPT12YH`iN43>udzN+w4JKq6qF_nk>l8=EgJa`Uqg>v diff --git a/resources/i18n/kiwix-desktop_fr.ts b/resources/i18n/kiwix-desktop_fr.ts deleted file mode 100644 index 51bf2fa..0000000 --- a/resources/i18n/kiwix-desktop_fr.ts +++ /dev/null @@ -1,448 +0,0 @@ - - - - - AboutDialog - - - About - À propos - - - - qrc:/texts/about.html - qrc:/texts/about.html - - - - KiwixApp - - - Open Zim - Ouvrir un Zim - - - - Local Kiwix Server - Serveur local Kiwix - - - - Random Article - Article au hasard - - - - Print - Imprimer - - - - New tab - Nouvel onglet - - - - Close tab - Fermer l'onglet - - - - Reopen closed tab - Rouvrir l'onglet fermé - - - - Browse library - Parcourir la bibliothèque - - - - Open file - Ouvrir un fichier - - - - Open recent - Fichiers récemment ouverts - - - - Save page as ... - Enregister sous... - - - - Search article - Chercher un article - - - - Search in library - Chercher dans la bibliothèque - - - - Find in page - Chercher dans la page - - - Find next - Trouver le suivant - - - Find previous - Trouver le précédent - - - - - Set fullScreen - Mode plein écran - - - - Quit fullScreen - Quitter le plein écran - - - - Table of content - Table des matières - - - - Reading list - Liste de lecture - - - - Zoom in - Agrandir - - - - Zoom out - Réduire - - - - Zoom reset - Réinitialisation du zoom - - - - Help - Aide - - - - Feedback - Retour d'information - - - - Repost a bug - Déclarer un bogue - - - - Request a feature - Demander une nouvelle fonctionnalité - - - - About Kiwix - À propos de Kiwix - - - - Settings - Paramètres - - - - Donate to support Kiwix - Faire un don pour soutenir Kiwix - - - - Exit - Quitter - - - - MainMenu - - - File - Fichier - - - - Edit - Édition - - - - View - Affichage - - - - Tools - Outils - - - - Help - Aide - - - - MainWindow - - - MainWindow - Fenêtre principale - - - Find in page - Chercher dans la page - - - - Library - Bibliothèque - - - - QObject - - Open Zim - Ouvrir un Zim - - - Local Kiwix Server - Serveur local Kiwix - - - Random Article - Article au hasard - - - Print - Imprimer - - - New tab - Nouvel onglet - - - Close tab - Fermer l'onglet - - - Reopen closed tab - Rouvrir l'onglet fermé - - - Browse library - Parcourir la bibliothèque - - - Open file - Ouvrir un fichier - - - Open recent - Fichiers récemment ouverts - - - Save page as ... - Enregister sous... - - - Search article - Chercher un article - - - Search in library - Chercher dans la bibliothèque - - - Find in page - Chercher dans la page - - - Set fullScreen - Mode plein écran - - - Quit fullScreen - Quitter le pein écran - - - Table of content - Table des matières - - - Reading list - Liste de lecture - - - Zoom in - Agrandir - - - Zoom out - Réduire - - - Zoom reset - Réinitialisation du zoom - - - Help - Aide - - - Feedback - Retour d'information - - - Repost a bug - Déclarer un bogue - - - Request a feature - Demander une nouvelle fonctionnalité - - - About Kiwix - À propos de Kiwix - - - Settings - Paramètres - - - Donate to support Kiwix - Faire un don pour soutenir Kiwix - - - Exit - Quitter - - - File - Fichier - - - Edit - Édition - - - View - Affichage - - - Tools - Outils - - - Search - Recherche - - - back - Précédent - - - forward - Suivant - - - - SearchBar - - - Search - Rechercher - - - - TocSideBar - - - Form - - - - - Hide - Masquer - - - - TopWidget - - - - back - Précédent - - - - - forward - Suivant - - - - contentmanagerside - - - Form - - - - - All Files - Tous les fichiers - - - - Local Files - Fichiers locaux - - - - Browse By Language - Parcourir par langues - - - - Browse By Category - Parcourir par catégories - - - - Content Type - Type de contenu - - - - readinglistbar - - - Form - - - - - Reading List - Liste de lecture - - - diff --git a/resources/translations.qrc b/resources/translations.qrc index d3dab71..475d317 100644 --- a/resources/translations.qrc +++ b/resources/translations.qrc @@ -1,6 +1,5 @@ - i18n/kiwix-desktop_fr.qm i18n/en.json