From 3e259bd6cf24e7cb0574fd7f7cc0218ba1f77a3e Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 2 Jun 2024 13:24:46 +0200 Subject: [PATCH] Allow expanding paths in libsyncthing directory paths Implements https://github.com/Martchus/syncthingtray/issues/243 --- .../go/src/github.com/syncthing/syncthing | 2 +- syncthing/interface.cpp | 2 +- syncthing/interface.h | 1 + .../translations/syncthingmodel_cs_CZ.ts | 63 +++++++--- .../translations/syncthingmodel_de_DE.ts | 63 +++++++--- .../translations/syncthingmodel_en_US.ts | 63 +++++++--- .../translations/syncthingmodel_zh_CN.ts | 63 +++++++--- syncthingwidgets/misc/syncthinglauncher.cpp | 3 + .../settings/launcheroptionpage.ui | 50 +++++++- syncthingwidgets/settings/settings.cpp | 2 + syncthingwidgets/settings/settings.h | 1 + syncthingwidgets/settings/settingsdialog.cpp | 4 +- .../translations/syncthingwidgets_cs_CZ.ts | 117 +++++++++++------- .../translations/syncthingwidgets_de_DE.ts | 117 +++++++++++------- .../translations/syncthingwidgets_en_US.ts | 117 +++++++++++------- .../translations/syncthingwidgets_zh_CN.ts | 117 +++++++++++------- 16 files changed, 532 insertions(+), 253 deletions(-) diff --git a/syncthing/go/src/github.com/syncthing/syncthing b/syncthing/go/src/github.com/syncthing/syncthing index 388f287..178e288 160000 --- a/syncthing/go/src/github.com/syncthing/syncthing +++ b/syncthing/go/src/github.com/syncthing/syncthing @@ -1 +1 @@ -Subproject commit 388f287fcbb3212879033c2c2d19faa51e48dd7c +Subproject commit 178e288821a189e3bb70474ce45c660038e94790 diff --git a/syncthing/interface.cpp b/syncthing/interface.cpp index e765dec..8e851e0 100644 --- a/syncthing/interface.cpp +++ b/syncthing/interface.cpp @@ -167,7 +167,7 @@ std::int64_t runSyncthing(const RuntimeOptions &options) return ::libst_run_syncthing(gostr(options.configDir), gostr(options.dataDir), gostr(options.guiAddress), gostr(options.guiApiKey), options.flags & RuntimeFlags::Verbose, options.flags & RuntimeFlags::AllowNewerConfig, options.flags & RuntimeFlags::NoDefaultConfig, options.flags & RuntimeFlags::SkipPortProbing, options.flags & RuntimeFlags::EnsureConfigDirExists, - options.flags & RuntimeFlags::EnsureDataDirExists); + options.flags & RuntimeFlags::EnsureDataDirExists, options.flags & RuntimeFlags::ExpandPathsFromEnv); } /*! diff --git a/syncthing/interface.h b/syncthing/interface.h index bdcec96..3644a97 100644 --- a/syncthing/interface.h +++ b/syncthing/interface.h @@ -19,6 +19,7 @@ enum class RuntimeFlags : std::uint64_t { EnsureConfigDirExists = (1 << 3), EnsureDataDirExists = (1 << 4), SkipPortProbing = (1 << 5), + ExpandPathsFromEnv = (1 << 6), }; constexpr bool operator&(RuntimeFlags lhs, RuntimeFlags rhs) diff --git a/syncthingmodel/translations/syncthingmodel_cs_CZ.ts b/syncthingmodel/translations/syncthingmodel_cs_CZ.ts index c2270bc..081c524 100644 --- a/syncthingmodel/translations/syncthingmodel_cs_CZ.ts +++ b/syncthingmodel/translations/syncthingmodel_cs_CZ.ts @@ -382,77 +382,108 @@ Data::SyncthingFileModel - + Name - + Size - + Last modified - + Ignore pattern - + %1 elements - + Refresh - + Deselect recursively - + Select recursively - + Deselect single item - + Select single item - + Open local version - + Copy local path - + Browse locally - - Discard selection + + Discard selection and staged changes - + + Review and apply staged changes + + + + + Do you want to apply the folliwng changes? + + + + + Cannot apply ignore patterns while a previous request for ignore patterns is still pending. + + + + + Unable to change ignore patterns: +%1 + + + + + Ignore patterns have been changed. + + + + + Cannot query ignore patterns while a previous request for ignore patterns is still pending. + + + + Remove related ignore patterns diff --git a/syncthingmodel/translations/syncthingmodel_de_DE.ts b/syncthingmodel/translations/syncthingmodel_de_DE.ts index 6fbf10e..4f2e385 100644 --- a/syncthingmodel/translations/syncthingmodel_de_DE.ts +++ b/syncthingmodel/translations/syncthingmodel_de_DE.ts @@ -380,77 +380,108 @@ Data::SyncthingFileModel - + Name - + Size Größe - + Last modified Zuletzt geändert - + Ignore pattern - + %1 elements - + Refresh Aktualisieren - + Deselect recursively - + Select recursively - + Deselect single item - + Select single item - + Open local version - + Copy local path - + Browse locally - - Discard selection + + Discard selection and staged changes - + + Review and apply staged changes + + + + + Do you want to apply the folliwng changes? + + + + + Cannot apply ignore patterns while a previous request for ignore patterns is still pending. + + + + + Unable to change ignore patterns: +%1 + + + + + Ignore patterns have been changed. + + + + + Cannot query ignore patterns while a previous request for ignore patterns is still pending. + + + + Remove related ignore patterns diff --git a/syncthingmodel/translations/syncthingmodel_en_US.ts b/syncthingmodel/translations/syncthingmodel_en_US.ts index 7bb7c8d..6db402e 100644 --- a/syncthingmodel/translations/syncthingmodel_en_US.ts +++ b/syncthingmodel/translations/syncthingmodel_en_US.ts @@ -380,77 +380,108 @@ Data::SyncthingFileModel - + Name - + Size - + Last modified - + Ignore pattern - + %1 elements - + Refresh - + Deselect recursively - + Select recursively - + Deselect single item - + Select single item - + Open local version - + Copy local path - + Browse locally - - Discard selection + + Discard selection and staged changes - + + Review and apply staged changes + + + + + Do you want to apply the folliwng changes? + + + + + Cannot apply ignore patterns while a previous request for ignore patterns is still pending. + + + + + Unable to change ignore patterns: +%1 + + + + + Ignore patterns have been changed. + + + + + Cannot query ignore patterns while a previous request for ignore patterns is still pending. + + + + Remove related ignore patterns diff --git a/syncthingmodel/translations/syncthingmodel_zh_CN.ts b/syncthingmodel/translations/syncthingmodel_zh_CN.ts index ffe81cd..7c6a592 100644 --- a/syncthingmodel/translations/syncthingmodel_zh_CN.ts +++ b/syncthingmodel/translations/syncthingmodel_zh_CN.ts @@ -378,77 +378,108 @@ Data::SyncthingFileModel - + Name - + Size - + Last modified - + Ignore pattern - + %1 elements - + Refresh - + Deselect recursively - + Select recursively - + Deselect single item - + Select single item - + Open local version - + Copy local path - + Browse locally - - Discard selection + + Discard selection and staged changes - + + Review and apply staged changes + + + + + Do you want to apply the folliwng changes? + + + + + Cannot apply ignore patterns while a previous request for ignore patterns is still pending. + + + + + Unable to change ignore patterns: +%1 + + + + + Ignore patterns have been changed. + + + + + Cannot query ignore patterns while a previous request for ignore patterns is still pending. + + + + Remove related ignore patterns diff --git a/syncthingwidgets/misc/syncthinglauncher.cpp b/syncthingwidgets/misc/syncthinglauncher.cpp index bc98e27..29a40cd 100644 --- a/syncthingwidgets/misc/syncthinglauncher.cpp +++ b/syncthingwidgets/misc/syncthinglauncher.cpp @@ -187,6 +187,9 @@ void SyncthingLauncher::launch(const Settings::Launcher &launcherSettings) auto options = LibSyncthing::RuntimeOptions(); options.configDir = libSyncthingSettings.configDir.toStdString(); options.dataDir = libSyncthingSettings.dataDir.isEmpty() ? options.configDir : libSyncthingSettings.dataDir.toStdString(); + if (libSyncthingSettings.expandPaths) { + options.flags = options.flags | LibSyncthing::RuntimeFlags::ExpandPathsFromEnv; + } setLibSyncthingLogLevel(libSyncthingSettings.logLevel); launch(options); #else diff --git a/syncthingwidgets/settings/launcheroptionpage.ui b/syncthingwidgets/settings/launcheroptionpage.ui index 407edaa..dae629c 100644 --- a/syncthingwidgets/settings/launcheroptionpage.ui +++ b/syncthingwidgets/settings/launcheroptionpage.ui @@ -77,14 +77,14 @@ - + Log level - + @@ -126,6 +126,20 @@ + + + + Options + + + + + + + Replace ${var} or $var in directories with values from environment + + + @@ -419,5 +433,37 @@ + + useBuiltInVersionCheckBox + toggled(bool) + optionsLabel + setVisible(bool) + + + 240 + 62 + + + 125 + 165 + + + + + useBuiltInVersionCheckBox + toggled(bool) + expandEnvCheckBox + setVisible(bool) + + + 240 + 62 + + + 336 + 165 + + + diff --git a/syncthingwidgets/settings/settings.cpp b/syncthingwidgets/settings/settings.cpp index 9a4c581..7e04d86 100644 --- a/syncthingwidgets/settings/settings.cpp +++ b/syncthingwidgets/settings/settings.cpp @@ -389,6 +389,7 @@ bool restore() launcher.libSyncthing.dataDir = settings.value(QStringLiteral("libSyncthingDataDir"), launcher.libSyncthing.dataDir).toString(); launcher.libSyncthing.logLevel = static_cast( settings.value(QStringLiteral("libSyncthingLogLevel"), static_cast(launcher.libSyncthing.logLevel)).toInt()); + launcher.libSyncthing.expandPaths = settings.value(QStringLiteral("libSyncthingExpandPaths")).toBool(); #endif launcher.syncthingPath = settings.value(QStringLiteral("syncthingPath"), launcher.syncthingPath).toString(); launcher.syncthingArgs = settings.value(QStringLiteral("syncthingArgs"), launcher.syncthingArgs).toString(); @@ -519,6 +520,7 @@ bool save() settings.setValue(QStringLiteral("libSyncthingConfigDir"), launcher.libSyncthing.configDir); settings.setValue(QStringLiteral("libSyncthingDataDir"), launcher.libSyncthing.dataDir); settings.setValue(QStringLiteral("libSyncthingLogLevel"), static_cast(launcher.libSyncthing.logLevel)); + settings.setValue(QStringLiteral("libSyncthingExpandPaths"), launcher.libSyncthing.expandPaths); #endif settings.setValue(QStringLiteral("syncthingPath"), launcher.syncthingPath); settings.setValue(QStringLiteral("syncthingArgs"), launcher.syncthingArgs); diff --git a/syncthingwidgets/settings/settings.h b/syncthingwidgets/settings/settings.h index 70ee7b2..a7990ce 100644 --- a/syncthingwidgets/settings/settings.h +++ b/syncthingwidgets/settings/settings.h @@ -102,6 +102,7 @@ struct SYNCTHINGWIDGETS_EXPORT Launcher { QString configDir; QString dataDir; ::LibSyncthing::LogLevel logLevel = ::LibSyncthing::LogLevel::Info; + bool expandPaths = false; } libSyncthing; #endif diff --git a/syncthingwidgets/settings/settingsdialog.cpp b/syncthingwidgets/settings/settingsdialog.cpp index 6dcecd3..db2c0ab 100644 --- a/syncthingwidgets/settings/settingsdialog.cpp +++ b/syncthingwidgets/settings/settingsdialog.cpp @@ -1124,7 +1124,7 @@ QWidget *LauncherOptionPage::setupWidget() // hide libsyncthing-controls by default (as the checkbox is unchecked by default) for (auto *const lstWidget : std::initializer_list{ ui()->configDirLabel, ui()->configDirPathSelection, ui()->dataDirLabel, - ui()->dataDirPathSelection, ui()->logLevelLabel, ui()->logLevelComboBox }) { + ui()->dataDirPathSelection, ui()->logLevelLabel, ui()->logLevelComboBox, ui()->optionsLabel, ui()->expandEnvCheckBox }) { lstWidget->setVisible(false); } @@ -1196,6 +1196,7 @@ bool LauncherOptionPage::apply() settings.libSyncthing.configDir = ui()->configDirPathSelection->lineEdit()->text(); settings.libSyncthing.dataDir = ui()->dataDirPathSelection->lineEdit()->text(); settings.libSyncthing.logLevel = static_cast(ui()->logLevelComboBox->currentIndex()); + settings.libSyncthing.expandPaths = ui()->expandEnvCheckBox->isChecked(); #endif settings.syncthingPath = ui()->syncthingPathSelection->lineEdit()->text(); settings.syncthingArgs = ui()->argumentsLineEdit->text(); @@ -1225,6 +1226,7 @@ void LauncherOptionPage::reset() ui()->configDirPathSelection->lineEdit()->setText(settings.libSyncthing.configDir); ui()->dataDirPathSelection->lineEdit()->setText(settings.libSyncthing.dataDir); ui()->logLevelComboBox->setCurrentIndex(static_cast(settings.libSyncthing.logLevel)); + ui()->expandEnvCheckBox->setChecked(settings.libSyncthing.expandPaths); #endif ui()->syncthingPathSelection->lineEdit()->setText(settings.syncthingPath); ui()->argumentsLineEdit->setText(settings.syncthingArgs); diff --git a/syncthingwidgets/translations/syncthingwidgets_cs_CZ.ts b/syncthingwidgets/translations/syncthingwidgets_cs_CZ.ts index af66683..6ad5ace 100644 --- a/syncthingwidgets/translations/syncthingwidgets_cs_CZ.ts +++ b/syncthingwidgets/translations/syncthingwidgets_cs_CZ.ts @@ -462,7 +462,7 @@ QtGui::BuiltinWebViewOptionPage - + Built-in web view @@ -482,7 +482,7 @@ - + Syncthing Tray has not been built with vieb view support utilizing either Qt WebKit or Qt WebEngine. @@ -965,12 +965,12 @@ - + Custom command to launch Syncthing's UI - - + <p>Enter a custom command to launch Syncthing's UI. The expression <code>%SYNCTHING_URL%</code> will be replaced with the Syncthing-URL.</p><p>Leave the command empty to use the auto-detection.</p> @@ -1206,12 +1206,22 @@ - + + Options + + + + + Replace ${var} or $var in directories with values from environment + + + + Show start/stop button on tray for local instance - + Consider process status for notifications and reconnect attempts concerning local instance • Don't reconnect when the process is not running • Try to reconnect when starting the process @@ -1219,33 +1229,33 @@ - + Stop automatically when network connection is metered - + Syncthing log (interleaved stdout/stderr) - + Apply and launch now - - + + Stop launched instance - + No log messages available yet - + Ensure latest log is visible @@ -1280,52 +1290,52 @@ - + %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 @@ -1524,70 +1534,85 @@ QtGui::OtherDialogs - + Own device ID - + device ID is unknown - + Copy to clipboard - + Remote/global tree of folder "%1" - + Selection - + Ignore patterns of folder "%1" + + + Do you want to save the changes? + + + + + Ignore patterns have been changed. + + + + + Unable to save ignore patterns: %1 + + QtGui::SettingsDialog - + Tray - + Web view - + Startup - + additional tool - + Extra launcher - + Settings - + Start wizard @@ -1753,8 +1778,8 @@ This dialog closes automatically when the process finally terminates. - - + + unknown @@ -1794,27 +1819,27 @@ This dialog closes automatically when the process finally terminates. - + Reload all unit files - + 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 @@ -1822,8 +1847,8 @@ This dialog closes automatically when the process finally terminates. QtGui::TextViewDialog - - + + Log @@ -2118,7 +2143,7 @@ This dialog closes automatically when the process finally terminates. Settings::Connection - + Backup of %1 (created by wizard) diff --git a/syncthingwidgets/translations/syncthingwidgets_de_DE.ts b/syncthingwidgets/translations/syncthingwidgets_de_DE.ts index bf3fa09..3962187 100644 --- a/syncthingwidgets/translations/syncthingwidgets_de_DE.ts +++ b/syncthingwidgets/translations/syncthingwidgets_de_DE.ts @@ -606,7 +606,7 @@ Die Weboberfläche wird stattdessen im Standardwebrowser geöffnet. - + Built-in web view Eingebaute Webanzeige @@ -626,7 +626,7 @@ Die Weboberfläche wird stattdessen im Standardwebrowser geöffnet.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. Syncthing Tray wurde nicht mit Unterstützung für die eingebaute Anzeige der Weboberfläche unter Verwendung von Qt WebKit oder Qt WebEngine gebaut. @@ -1120,12 +1120,12 @@ Die Weboberfläche wird stattdessen im Standardwebrowser geöffnet. - + Custom command to launch Syncthing's UI - Befehl zum Starten der Syncthing-Oberfläche - - + <p>Enter a custom command to launch Syncthing's UI. The expression <code>%SYNCTHING_URL%</code> will be replaced with the Syncthing-URL.</p><p>Leave the command empty to use the auto-detection.</p> <p>Gib den Befehl ein, mit dem die Syncthing-Oberfläche gestartet werden soll. Der Ausdruck <code>%SYNCTHING_URL%</code> wird durch die Syncthing-URL ersetzt.</p><p>Lasse den Befehl leer, um die automatische Erkennung zu verwenden.</p> @@ -1379,12 +1379,22 @@ Die Weboberfläche wird stattdessen im Standardwebrowser geöffnet.Datenverzeichnis - + + Options + Optionen + + + + Replace ${var} or $var in directories with values from environment + Ersetze ${var} or $var in Verzeichnispfaden mit Werten der Umgebung + + + Show start/stop button on tray for local instance Zeige Start/Stop-Button für die lokale Instanz - + Consider process status for notifications and reconnect attempts concerning local instance • Don't reconnect when the process is not running • Try to reconnect when starting the process @@ -1395,7 +1405,7 @@ Die Weboberfläche wird stattdessen im Standardwebrowser geöffnet. - + Stop automatically when network connection is metered Stoppe Syncthing automatisch solange die Netzwerkverbindung getaktet ist @@ -1408,28 +1418,28 @@ Die Weboberfläche wird stattdessen im Standardwebrowser geöffnet. - + Syncthing log (interleaved stdout/stderr) Syncthing-Log (stdout/stderr) - + Apply and launch now Jetzt starten - - + + Stop launched instance Stoppen - + No log messages available yet Bisher keine Log-Meldungen - + Ensure latest log is visible Log folgen @@ -1468,52 +1478,52 @@ Die Weboberfläche wird stattdessen im Standardwebrowser geöffnet.Syncthing Releases/Downloads zeigen - + %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 @@ -1720,45 +1730,60 @@ Die Weboberfläche wird stattdessen im Standardwebrowser geöffnet. QtGui::OtherDialogs - + Own device ID Eigene Geräte-ID - + device ID is unknown Geräte-ID ist unbekannt - + Copy to clipboard In Zwischenablage kopieren - + Remote/global tree of folder "%1" Globale Dateistruktur von "%1" - + Selection - + Ignore patterns of folder "%1" + + + Do you want to save the changes? + + + + + Ignore patterns have been changed. + + + + + Unable to save ignore patterns: %1 + + QtGui::SettingsDialog - + Web view Webanzeige - + Startup Starten @@ -1767,27 +1792,27 @@ Die Weboberfläche wird stattdessen im Standardwebrowser geöffnet.Zusatztool - + Tray - + Extra launcher Extra-Starter - + additional tool Zusatztool - + Settings Einstellungen - + Start wizard Einrichtungsassistenten öffnen @@ -1985,8 +2010,8 @@ Dieser Dialog schließt sich automatisch, wenn der Prozess beendet wird. - - + + unknown unbekannt @@ -2019,27 +2044,27 @@ Dieser Dialog schließt sich automatisch, wenn der Prozess beendet wird.Stoppen - + Reload all unit files Alle Unit-Dateien neu laden - + 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 @@ -2047,8 +2072,8 @@ Dieser Dialog schließt sich automatisch, wenn der Prozess beendet wird. QtGui::TextViewDialog - - + + Log @@ -2394,7 +2419,7 @@ Dieser Dialog schließt sich automatisch, wenn der Prozess beendet wird. Settings::Connection - + Backup of %1 (created by wizard) Sicherung von %1 (vom Einrichtungsassistenten erstellt) diff --git a/syncthingwidgets/translations/syncthingwidgets_en_US.ts b/syncthingwidgets/translations/syncthingwidgets_en_US.ts index eed918c..5f8d30f 100644 --- a/syncthingwidgets/translations/syncthingwidgets_en_US.ts +++ b/syncthingwidgets/translations/syncthingwidgets_en_US.ts @@ -462,7 +462,7 @@ QtGui::BuiltinWebViewOptionPage - + Built-in web view @@ -482,7 +482,7 @@ - + Syncthing Tray has not been built with vieb view support utilizing either Qt WebKit or Qt WebEngine. @@ -964,12 +964,12 @@ - + Custom command to launch Syncthing's UI - - + <p>Enter a custom command to launch Syncthing's UI. The expression <code>%SYNCTHING_URL%</code> will be replaced with the Syncthing-URL.</p><p>Leave the command empty to use the auto-detection.</p> @@ -1204,12 +1204,22 @@ - + + Options + + + + + Replace ${var} or $var in directories with values from environment + + + + Show start/stop button on tray for local instance - + Consider process status for notifications and reconnect attempts concerning local instance • Don't reconnect when the process is not running • Try to reconnect when starting the process @@ -1217,33 +1227,33 @@ - + Stop automatically when network connection is metered - + Syncthing log (interleaved stdout/stderr) - + Apply and launch now - - + + Stop launched instance - + No log messages available yet - + Ensure latest log is visible @@ -1278,52 +1288,52 @@ - + %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 @@ -1522,70 +1532,85 @@ QtGui::OtherDialogs - + Own device ID - + device ID is unknown - + Copy to clipboard - + Remote/global tree of folder "%1" - + Selection - + Ignore patterns of folder "%1" + + + Do you want to save the changes? + + + + + Ignore patterns have been changed. + + + + + Unable to save ignore patterns: %1 + + QtGui::SettingsDialog - + Tray - + Web view - + Startup - + additional tool - + Extra launcher - + Settings - + Start wizard @@ -1755,8 +1780,8 @@ This dialog closes automatically when the process finally terminates. - - + + unknown @@ -1796,27 +1821,27 @@ This dialog closes automatically when the process finally terminates. - + Reload all unit files - + 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 @@ -1824,8 +1849,8 @@ This dialog closes automatically when the process finally terminates. QtGui::TextViewDialog - - + + Log @@ -2120,7 +2145,7 @@ This dialog closes automatically when the process finally terminates. Settings::Connection - + Backup of %1 (created by wizard) diff --git a/syncthingwidgets/translations/syncthingwidgets_zh_CN.ts b/syncthingwidgets/translations/syncthingwidgets_zh_CN.ts index 5218563..d0fee27 100644 --- a/syncthingwidgets/translations/syncthingwidgets_zh_CN.ts +++ b/syncthingwidgets/translations/syncthingwidgets_zh_CN.ts @@ -480,7 +480,7 @@ The Web UI will be opened in the default web browser instead. - + Built-in web view @@ -500,7 +500,7 @@ The Web UI will be opened in the default web browser instead. 当前未显示时保持网页视图运行 - + Syncthing Tray has not been built with vieb view support utilizing either Qt WebKit or Qt WebEngine. @@ -985,12 +985,12 @@ The Web UI will be opened in the default web browser instead. - + Custom command to launch Syncthing's UI - - + <p>Enter a custom command to launch Syncthing's UI. The expression <code>%SYNCTHING_URL%</code> will be replaced with the Syncthing-URL.</p><p>Leave the command empty to use the auto-detection.</p> @@ -1224,12 +1224,22 @@ The Web UI will be opened in the default web browser instead. 数据目录 - + + Options + + + + + Replace ${var} or $var in directories with values from environment + + + + Show start/stop button on tray for local instance 在托盘上为本地实例显示开始/停止按钮 - + Consider process status for notifications and reconnect attempts concerning local instance • Don't reconnect when the process is not running • Try to reconnect when starting the process @@ -1237,7 +1247,7 @@ The Web UI will be opened in the default web browser instead. - + Stop automatically when network connection is metered @@ -1250,28 +1260,28 @@ The Web UI will be opened in the default web browser instead. • 启动进程时尝试重新连接 - + Syncthing log (interleaved stdout/stderr) 同步日志(交错的标准输出/标准错误) - + Apply and launch now 立即应用并启动 - - + + Stop launched instance 停止启动的实例 - + No log messages available yet 尚无可用的日志消息 - + Ensure latest log is visible 确保最新日志可见 @@ -1306,52 +1316,52 @@ The Web UI will be opened in the default web browser instead. 显示 Syncthing 发布/下载 - + %1 exited with exit code %2 %1 退出,退出代码为 %2 - + %1 crashed with exit code %2 %1 崩溃,退出代码为 %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 运行 %1 时出错: %2 - + Kill launched instance 强制终止启动的实例 @@ -1558,70 +1568,85 @@ The Web UI will be opened in the default web browser instead. QtGui::OtherDialogs - + Own device ID 本设备 ID - + device ID is unknown 设备 ID 未知 - + Copy to clipboard 复制至剪贴板 - + Remote/global tree of folder "%1" - + Selection - + Ignore patterns of folder "%1" + + + Do you want to save the changes? + + + + + Ignore patterns have been changed. + + + + + Unable to save ignore patterns: %1 + + QtGui::SettingsDialog - + Tray 托盘 - + Web view 网页视图 - + Startup 启动 - + additional tool 附加工具 - + Extra launcher 额外启动器 - + Settings 设置 - + Start wizard @@ -1810,8 +1835,8 @@ This dialog closes automatically when the process finally terminates. - - + + unknown 未知 @@ -1846,27 +1871,27 @@ This dialog closes automatically when the process finally terminates. 禁用 - + Reload all unit files - + 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. 无法同时显示 systemd 服务和内部启动器的启动/停止按钮。 systemd 服务优先。 - + It is not possible to consider the systemd service and the internal launcher for reconnects at the same time. The systemd service precedes. 无法同时考虑 systemd 服务和内部启动器进行重新连接。 systemd 服务优先。 - + specified unit is either inactive or doesn't exist 指定的单位不活动或不存在 - + since 自从 @@ -1874,8 +1899,8 @@ This dialog closes automatically when the process finally terminates. QtGui::TextViewDialog - - + + Log 日志 @@ -2207,7 +2232,7 @@ The Web UI will be opened in the default web browser instead. Settings::Connection - + Backup of %1 (created by wizard)