From e10eca68f940812f862a8fb82353f7eb61b5d873 Mon Sep 17 00:00:00 2001 From: Martchus Date: Thu, 9 Jul 2020 21:08:46 +0200 Subject: [PATCH] Rename "Inotify-launcher" to "Extra launcher" The external inotify tool is likely not used anymore. It makes sense to keep the concept of supporting additional tools because it might be used in the future again. So it seems best to give the additional launcher a more generic name. --- widgets/settings/settingsdialog.cpp | 19 +++-- widgets/settings/settingsdialog.h | 5 +- .../translations/syncthingwidgets_cs_CZ.ts | 66 +++++++++------- .../translations/syncthingwidgets_de_DE.ts | 76 ++++++++++++------- .../translations/syncthingwidgets_en_US.ts | 66 +++++++++------- 5 files changed, 138 insertions(+), 94 deletions(-) diff --git a/widgets/settings/settingsdialog.cpp b/widgets/settings/settingsdialog.cpp index 2cc4326..7d787b0 100644 --- a/widgets/settings/settingsdialog.cpp +++ b/widgets/settings/settingsdialog.cpp @@ -851,7 +851,7 @@ LauncherOptionPage::LauncherOptionPage(QWidget *parentWidget) { } -LauncherOptionPage::LauncherOptionPage(const QString &tool, QWidget *parentWidget) +LauncherOptionPage::LauncherOptionPage(const QString &tool, const QString &toolName, const QString &windowTitle, QWidget *parentWidget) : QObject(parentWidget) , LauncherOptionPageBase(parentWidget) , m_process(&Launcher::toolProcess(tool)) @@ -859,6 +859,8 @@ LauncherOptionPage::LauncherOptionPage(const QString &tool, QWidget *parentWidge , m_restoreArgsAction(nullptr) , m_kill(false) , m_tool(tool) + , m_toolName(toolName) + , m_windowTitle(windowTitle) { } @@ -873,10 +875,12 @@ QWidget *LauncherOptionPage::setupWidget() // adjust labels to use name of additional tool instead of "Syncthing" const auto isSyncthing = m_tool.isEmpty(); if (!isSyncthing) { - widget->setWindowTitle(tr("%1-launcher").arg(m_tool)); - ui()->enabledCheckBox->setText(tr("Launch %1 when starting the tray icon").arg(m_tool)); - ui()->syncthingPathLabel->setText(tr("%1 executable").arg(m_tool)); - ui()->logLabel->setText(tr("%1 log (interleaved stdout/stderr)").arg(m_tool)); + widget->setWindowTitle(m_windowTitle.isEmpty() ? tr("%1-launcher").arg(m_tool) : m_windowTitle); + ui()->enabledCheckBox->setText(tr("Launch %1 when starting the tray icon").arg(m_toolName.isEmpty() ? m_tool : m_toolName)); + auto toolNameStartingSentence = m_toolName.isEmpty() ? m_tool : m_toolName; + toolNameStartingSentence[0] = toolNameStartingSentence[0].toUpper(); + ui()->syncthingPathLabel->setText(tr("%1 executable").arg(toolNameStartingSentence)); + ui()->logLabel->setText(tr("%1 log (interleaved stdout/stderr)").arg(toolNameStartingSentence)); // hide "consider for reconnect" and "show start/stop button on tray" checkboxes for tools ui()->considerForReconnectCheckBox->setVisible(false); @@ -1341,9 +1345,10 @@ SettingsDialog::SettingsDialog(Data::SyncthingConnection *connection, QWidget *p category = new OptionCategory(this); category->setDisplayName(tr("Startup")); - category->assignPages({ new AutostartOptionPage, new LauncherOptionPage, new LauncherOptionPage(QStringLiteral("Inotify")) + category->assignPages({ new AutostartOptionPage, new LauncherOptionPage, + new LauncherOptionPage(QStringLiteral("Inotify"), tr("additional tool"), tr("Extra launcher")) #ifdef LIB_SYNCTHING_CONNECTOR_SUPPORT_SYSTEMD - , + , new SystemdOptionPage #endif }); diff --git a/widgets/settings/settingsdialog.h b/widgets/settings/settingsdialog.h index fff4400..b81e9d7 100644 --- a/widgets/settings/settingsdialog.h +++ b/widgets/settings/settingsdialog.h @@ -105,7 +105,8 @@ class QT_UTILITIES_EXPORT LauncherOptionPage : public QObject, public ::QtUtilit public: LauncherOptionPage(QWidget *parentWidget = nullptr); - LauncherOptionPage(const QString &tool, QWidget *parentWidget = nullptr); + LauncherOptionPage( + const QString &tool, const QString &toolName = QString(), const QString &windowTitle = QString(), QWidget *parentWidget = nullptr); ~LauncherOptionPage() override; bool apply() override; void reset() override; @@ -129,7 +130,7 @@ private: Data::SyncthingLauncher *const m_launcher; QAction *m_restoreArgsAction; bool m_kill; - QString m_tool; + QString m_tool, m_toolName, m_windowTitle; }; #ifdef LIB_SYNCTHING_CONNECTOR_SUPPORT_SYSTEMD diff --git a/widgets/translations/syncthingwidgets_cs_CZ.ts b/widgets/translations/syncthingwidgets_cs_CZ.ts index 2f10827..7bbda7e 100644 --- a/widgets/translations/syncthingwidgets_cs_CZ.ts +++ b/widgets/translations/syncthingwidgets_cs_CZ.ts @@ -684,7 +684,7 @@ - + Stop launched instance @@ -699,77 +699,77 @@ - + %1-launcher - + Launch %1 when starting the tray icon - + %1 executable - + %1 log (interleaved stdout/stderr) - + Restore default - + %1 exited with exit code %2 - + %1 crashed with exit code %2 - + failed to start (e.g. executable does not exist or not permission error) - + process crashed - + timeout error - + read error - + write error - + unknown process error - + An error occurred when running %1: %2 - + Kill launched instance @@ -888,22 +888,32 @@ QtGui::SettingsDialog - + Tray - + Web view - + Startup - + + Extra launcher + + + + + additional tool + + + + Settings @@ -1063,8 +1073,8 @@ This dialog closes automatically when the process finally terminates. - - + + unknown @@ -1104,22 +1114,22 @@ This dialog closes automatically when the process finally terminates. - + It is not possible to show the start/stop button for the systemd service and the internal launcher at the same time. The systemd service precedes. - + It is not possible to consider the systemd service and the internal launcher for reconnects at the same time. The systemd service precedes. - + specified unit is either inactive or doesn't exist - + since @@ -1153,7 +1163,7 @@ This dialog closes automatically when the process finally terminates. QtGui::WebViewOptionPage - + General @@ -1183,7 +1193,7 @@ This dialog closes automatically when the process finally terminates. - + Syncthing Tray has not been built with vieb view support utilizing either Qt WebKit or Qt WebEngine. The Web UI will be opened in the default web browser instead. diff --git a/widgets/translations/syncthingwidgets_de_DE.ts b/widgets/translations/syncthingwidgets_de_DE.ts index 1e1e315..f2b2c1c 100644 --- a/widgets/translations/syncthingwidgets_de_DE.ts +++ b/widgets/translations/syncthingwidgets_de_DE.ts @@ -684,7 +684,7 @@ - + Stop launched instance Stoppen @@ -699,77 +699,81 @@ Log folgen - + %1-launcher %1-Starter - + Launch %1 when starting the tray icon Starte %1 beim Starten des Tray-Icons - + %1 launcher + %1-Starter {1 ?} + + + %1 executable Ausführbare Datei von %1 - + %1 log (interleaved stdout/stderr) - %1-Log (stdout/stderr) + Log von %1 (stdout/stderr) - + Restore default Auf Vorgabe zurücksetzen - + %1 exited with exit code %2 %1 wurde mit dem Statuscode %2 beendet - + %1 crashed with exit code %2 %1 ist mit dem Statuscode %2 abgestürzt - + failed to start (e.g. executable does not exist or not permission error) Start fehlgeschlagen (z. B. weil Programmdatei nicht existiert oder nicht ausführbar ist) - + process crashed Prozess ist abgestürzt - + timeout error Time-out - + read error Lesefehler - + write error Schreibfehler - + unknown process error unbekannter Fehler - + An error occurred when running %1: %2 Beim Ausführen von %1 ist ein Fehler aufgetreten: %2 - + Kill launched instance Töten @@ -888,22 +892,36 @@ QtGui::SettingsDialog - + Tray - + Web view Weboberfläche - + Startup Starten - + Additional tool + Zusatztool + + + + Extra launcher + Extra-Starter + + + + additional tool + Zusatztool + + + Settings Einstellungen @@ -1069,8 +1087,8 @@ Dieser Dialog schließt sich automatisch, wenn der Prozess beendet wird. - - + + unknown unbekannt @@ -1104,22 +1122,22 @@ Dieser Dialog schließt sich automatisch, wenn der Prozess beendet wird.Stoppen - + It is not possible to show the start/stop button for the systemd service and the internal launcher at the same time. The systemd service precedes. Es ist nicht möglich, den Start-/Stop-Button für den Systemd-Dienst und den internen Starter gleichzeitig anzugeigen. Wenn verfügbar, wird der Button den Systemd-Dienst kontrollieren. - + It is not possible to consider the systemd service and the internal launcher for reconnects at the same time. The systemd service precedes. Es ist nicht möglich, den Status des Systemd-Dienstes und den des internen Starters gleichzeitig für Verbindungsveruche einzubeziehen. Wenn verfügbar, wird der Status des Systemd-Dienstes verwendet. - + specified unit is either inactive or doesn't exist angegebene Unit entweder nicht geladen oder existiert nicht - + since seit @@ -1153,7 +1171,7 @@ Dieser Dialog schließt sich automatisch, wenn der Prozess beendet wird.QtGui::WebViewOptionPage - + General Allgemein @@ -1183,7 +1201,7 @@ Dieser Dialog schließt sich automatisch, wenn der Prozess beendet wird.Lasse Weboberfläche im Hintgergrund weiter offen, wenn Fenster nicht offen - + Syncthing Tray has not been built with vieb view support utilizing either Qt WebKit or Qt WebEngine. The Web UI will be opened in the default web browser instead. Syncthing Tray wurde nicht mit Unterstützung für die eingebaute Anzeige der Weboberfläche unter Verwendung von Qt WebKit oder Qt WebEngine gebaut. diff --git a/widgets/translations/syncthingwidgets_en_US.ts b/widgets/translations/syncthingwidgets_en_US.ts index 387435f..c5435d7 100644 --- a/widgets/translations/syncthingwidgets_en_US.ts +++ b/widgets/translations/syncthingwidgets_en_US.ts @@ -682,7 +682,7 @@ - + Stop launched instance @@ -697,77 +697,77 @@ - + %1-launcher - + Launch %1 when starting the tray icon - + %1 executable - + %1 log (interleaved stdout/stderr) - + Restore default - + %1 exited with exit code %2 - + %1 crashed with exit code %2 - + failed to start (e.g. executable does not exist or not permission error) - + process crashed - + timeout error - + read error - + write error - + unknown process error - + An error occurred when running %1: %2 - + Kill launched instance @@ -886,22 +886,32 @@ QtGui::SettingsDialog - + Tray - + Web view - + Startup - + + Extra launcher + + + + + additional tool + + + + Settings @@ -1057,8 +1067,8 @@ This dialog closes automatically when the process finally terminates. - - + + unknown @@ -1098,22 +1108,22 @@ This dialog closes automatically when the process finally terminates. - + It is not possible to show the start/stop button for the systemd service and the internal launcher at the same time. The systemd service precedes. - + It is not possible to consider the systemd service and the internal launcher for reconnects at the same time. The systemd service precedes. - + specified unit is either inactive or doesn't exist - + since @@ -1147,7 +1157,7 @@ This dialog closes automatically when the process finally terminates. QtGui::WebViewOptionPage - + General @@ -1177,7 +1187,7 @@ This dialog closes automatically when the process finally terminates. - + Syncthing Tray has not been built with vieb view support utilizing either Qt WebKit or Qt WebEngine. The Web UI will be opened in the default web browser instead.