diff --git a/rkward/dialogs/rksetupwizard.cpp b/rkward/dialogs/rksetupwizard.cpp
index cedcc50a..91fcf4f8 100644
--- a/rkward/dialogs/rksetupwizard.cpp
+++ b/rkward/dialogs/rksetupwizard.cpp
@@ -1,360 +1,360 @@
/***************************************************************************
rksetupwizard - description
-------------------
begin : Fri May 25 20200
copyright : (C) 2020 by Thomas Friedrichsmeier
email : thomas.friedrichsmeier@kdemail.net
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "rksetupwizard.h"
#include %1: %2 This dialog will guide you through a quick check of the basic setup of the required (or recommended) components. The setup assistant has been invoked, automatically, because a new version of RKWard has been detected.
"); l->addWidget(waiting_to_start_label); auto firstpageref = addPage (firstpage, i18n("RKWard Setup Assistant")); setValid(firstpageref, false); // Basic installation page createStandardPage(); reinstallation_required = false; auto idir = new RKSetupWizardItem(i18n("Installation directory")); if (RKCommonFunctions::getRKWardDataDir ().isEmpty ()) { idir->setStatus(RKSetupWizardItem::Error, i18n("Not found.")); idir->setLongLabel("
RKWard either could not find its resource files at all, or only an old version of those files. The most likely cause is that the last installation failed to place the files in the correct place. This can lead to all sorts of problems, from single missing features to complete failure to function.
You should quit RKWard, now, and fix your installation. For help with that, see https://rkward.kde.org/Building_RKWard_From_Source.html.
"); idir->addOption(i18n("Reinstallation required"), i18n("This problem cannot be corrected, automatically. You will have to reinstall RKWard."), [](RKSetupWizard*) {}); reinstallation_required = true; } else { idir->setStatus(RKSetupWizardItem::Good, i18n("Found.")); } appendItem(idir); auto pluginmaps = new RKSetupWizardItem(i18n("RKWard plugins")); if (RKSettingsModulePlugins::pluginMaps().isEmpty()) { pluginmaps->setLongLabel(i18n("No plugins are enabled. This is probably not intended.
")); pluginmaps->setStatus(RKSetupWizardItem::Warning, i18n("None selected")); pluginmaps->addOption(i18n("Restore defaults"), i18n("Enable the default plugins"), [](RKSetupWizard*) { RKSettingsModulePlugins::registerDefaultPluginMaps(RKSettingsModulePlugins::AddIfDefault); }); pluginmaps->addOption(i18n("No change"), i18n("Proceed without plugins"), [](RKSetupWizard*) {}); // TODO: Also offer help, if a suspicioulsy small share of plugins is active? RKSettingsModulePlugins::knownUsablePluginCount(); } else { pluginmaps->setStatus(RKSetupWizardItem::Good, i18n("Found.")); } appendItem(pluginmaps); auto kateplugins = new RKSetupWizardItem(i18n("Kate plugins")); int kateplugincount = RKWardMainWindow::getMain()->katePluginIntegration()->knownPluginCount(); if (kateplugincount < 1) { kateplugins->setLongLabel(i18n("Important functionality in RKWard is provided by kate plugins. It looks like none are installed on this system. On Linux/BSD, this can usually be fixed by installing kate.
")); kateplugins->setStatus(RKSetupWizardItem::Error, i18n("None found")); addSoftwareInstallOptions(kateplugins, QStringLiteral("kate"), "https://kate.kde.org"); } else { - kateplugins->setStatus(RKSetupWizardItem::Good, i18n("Found %1 plugins.", kateplugincount)); + kateplugins->setStatus(RKSetupWizardItem::Good, i18np("Found %1 plugin.", "Found %1 plugins.", kateplugincount)); } appendItem(kateplugins); for (int i = 0; i < settings_items.size(); ++i) { appendItem(settings_items[i]); } current_layout->setRowStretch(++current_row, 1); addPage(current_page, i18n("Basic installation")); // Wait for R Interface, then start dialog setWindowModality(Qt::ApplicationModal); show(); while (!RKGlobals::rInterface()->backendIsIdle()) { if (RKGlobals::rInterface()->backendIsDead()) { - waiting_to_start_label->setText(i18n("R backend has crashed. Click \"Cancel\" to exit setup assitant.")); + waiting_to_start_label->setText(i18n("R backend has crashed. Click \"Cancel\" to exit setup assistant.")); } else { QApplication::processEvents(QEventLoop::AllEvents, 1000); } } waiting_to_start_label->setText(i18n("R backend has started. Click \"Next\" to continue.")); setValid(firstpageref, true); // R packages page // This must be created _after_ the backend has started, for obvious reasons. createStandardPage(); appendItem(makeRPackageCheck("R2HTML", i18n("The R2HTML package is used by nearly all RKWard output functions, and thus required."), RKSetupWizardItem::Error)); appendItem(makeRPackageCheck("rmarkdown", i18n("The rmarkdown package is required for rendering .Rmd files (including preview rendering), which is an optional but recommended feature."), RKSetupWizardItem::Warning)); current_layout->setRowStretch(++current_row, 1); addPage(current_page, i18n("R Packages")); // external software page createStandardPage(); appendItem(makeSoftwareCheck("pandoc", i18n("The pandoc software is needed for rendering (or previewing) R markdown (.Rmd) files. This is optional but recommended."), "https://pandoc.org/installing.html", RKSetupWizardItem::Warning)); appendItem(makeSoftwareCheck("kbibtex", i18n("The kbibtex software is useful for managing citations while writing articles. It integrates into RKWard via the Document Preview kate plugin."), "https://userbase.kde.org/KBibTeX", RKSetupWizardItem::Warning)); current_layout->setRowStretch(++current_row, 1); second_to_last_page_ref = addPage(current_page, i18n("External software")); // summary page createStandardPage(); last_page_label = RKCommonFunctions::linkedWrappedLabel(""); current_layout->addWidget(last_page_label, 0, 0, 0, 3); current_layout->setRowStretch(1, 1); addPage(current_page, i18n("Summary of the next steps")); } RKSetupWizard::~RKSetupWizard() { RK_TRACE (DIALOGS); for(int i = 0; i < items.size(); ++i) { delete items[i]; } } void RKSetupWizard::next() { RK_TRACE (DIALOGS); if (currentPage() == second_to_last_page_ref) { // NOTE: This is not quite clean: Some settings get applied before clicking finish, this way. // However, I don't really want to pop up a separate dialog for a summary page, either. for(int i = 0; i < items.size(); ++i) { items[i]->apply(this); } QString label_text; if (reinstallation_required) { label_text.append(i18n("Your installation of RKWard is broken, and cannot be fixed, automatically. You will have to reinstall RKWard!
")); } label_text = i18n("The following software is recommended for installation, but automatic installation is not (yet) supported. Click on the links, below, for download information:
%1 R packages are marked for installation. The R package installation dialog will be started when you press finish. You may be prompted to select a download mirror.
", packages_to_install.size())); } else { label_text.append(i18n("No R packages to install")); } // TODO: This height calculation is not quite correct, somehow, but good enough for now. int spare_height = height() - last_page_label->parentWidget()->sizeHint().height(); last_page_label->setText(label_text); int new_height = qMax(height(), spare_height+last_page_label->minimumSizeHint().height()); resize(width(), new_height); } KAssistantDialog::next(); } void RKSetupWizard::doAutoCheck() { RK_TRACE (DIALOGS); // query settings modules for any problems QList