From 7eceab59af5489b833a03ba7ff3d3073a8a107ff Mon Sep 17 00:00:00 2001 From: Volkor Date: Mon, 18 Nov 2024 21:55:22 +1100 Subject: [PATCH] Fix up wording of messages --- .../DocumentHistory/DocumentHistoryModal.ts | 6 +- .../ModuleInteractiveConflictResolver.ts | 2 +- src/modules/features/ModuleObsidianSetting.ts | 14 +- .../ModuleObsidianSettingAsMarkdown.ts | 2 +- src/modules/features/ModuleSetupObsidian.ts | 14 +- .../ObsidianLiveSyncSettingTab.ts | 153 +++++++++--------- .../SettingDialogue/settingConstants.ts | 56 +++---- src/modules/main/ModuleLiveSyncMain.ts | 16 +- 8 files changed, 136 insertions(+), 127 deletions(-) diff --git a/src/modules/features/DocumentHistory/DocumentHistoryModal.ts b/src/modules/features/DocumentHistory/DocumentHistoryModal.ts index ff53ff4..9327235 100644 --- a/src/modules/features/DocumentHistory/DocumentHistoryModal.ts +++ b/src/modules/features/DocumentHistory/DocumentHistoryModal.ts @@ -98,9 +98,9 @@ export class DocumentHistoryModal extends Modal { this.range.max = "0"; this.range.value = ""; this.range.disabled = true; - this.contentView.setText(`History of this file was not recorded.`); + this.contentView.setText(`We don't have any history for this note.`); } else { - this.contentView.setText(`Error occurred.`); + this.contentView.setText(`Error while loading file.`); Logger(ex, LOG_LEVEL_VERBOSE); } } @@ -268,7 +268,7 @@ export class DocumentHistoryModal extends Modal { const leaf = this.plugin.app.workspace.getLeaf(false); await leaf.openFile(targetFile); } else { - Logger("The file could not view on the editor", LOG_LEVEL_NOTICE); + Logger("Unable to display the file in the editor", LOG_LEVEL_NOTICE); } }; buttons.createEl("button", { text: "Back to this revision" }, (e) => { diff --git a/src/modules/features/ModuleInteractiveConflictResolver.ts b/src/modules/features/ModuleInteractiveConflictResolver.ts index 5d6d9f7..d98ad2d 100644 --- a/src/modules/features/ModuleInteractiveConflictResolver.ts +++ b/src/modules/features/ModuleInteractiveConflictResolver.ts @@ -148,7 +148,7 @@ export class ModuleInteractiveConflictResolver extends AbstractObsidianModule im this._log(`Conflicted: ${note.path}`); } } else { - this._log(`There are no conflicted files`, LOG_LEVEL_VERBOSE); + this._log(`There are no conflicting files`, LOG_LEVEL_VERBOSE); } return true; } diff --git a/src/modules/features/ModuleObsidianSetting.ts b/src/modules/features/ModuleObsidianSetting.ts index 4d33d07..876693c 100644 --- a/src/modules/features/ModuleObsidianSetting.ts +++ b/src/modules/features/ModuleObsidianSetting.ts @@ -52,7 +52,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO const passphrase = await this.getPassphrase(settings); if (passphrase === false) { this._log( - "Could not determine passphrase to save data.json! You probably make the configuration sure again!", + "Failed to obtain passphrase when saving data.json! Please verify the configuration.", LOG_LEVEL_URGENT ); return ""; @@ -76,7 +76,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO settings.deviceAndVaultName = ""; if (this.usedPassphrase == "" && !(await this.getPassphrase(settings))) { this._log( - "Could not determine passphrase for saving data.json! Our data.json have insecure items!", + "Failed to retrieve passphrase. data.json contains unencrypted items!", LOG_LEVEL_NOTICE ); } else { @@ -145,7 +145,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO const passphrase = await this.getPassphrase(settings); if (passphrase === false) { this._log( - "Could not determine passphrase for reading data.json! DO NOT synchronize with the remote before making sure your configuration is!", + "No passphrase found for data.json! Verify configuration before syncing.", LOG_LEVEL_URGENT ); } else { @@ -173,7 +173,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO } } else { this._log( - "Could not decrypt passphrase for reading data.json! DO NOT synchronize with the remote before making sure your configuration is!", + "Failed to decrypt passphrase from data.json! Ensure configuration is correct before syncing with remote.", LOG_LEVEL_URGENT ); for (const key of keys) { @@ -189,7 +189,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO settings.passphrase = decrypted; } else { this._log( - "Could not decrypt passphrase for reading data.json! DO NOT synchronize with the remote before making sure your configuration is!", + "Failed to decrypt passphrase from data.json! Ensure configuration is correct before syncing with remote.", LOG_LEVEL_URGENT ); settings.passphrase = ""; @@ -220,7 +220,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO } if (isCloudantURI(this.settings.couchDB_URI) && this.settings.customChunkSize != 0) { this._log( - "Configuration verification founds problems with your configuration. This has been fixed automatically. But you may already have data that cannot be synchronised. If this is the case, please rebuild everything.", + "Configuration issues detected and automatically resolved. However, unsynchronized data may exist. Consider rebuilding if necessary.", LOG_LEVEL_NOTICE ); this.settings.customChunkSize = 0; @@ -228,7 +228,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO this.core.$$setDeviceAndVaultName(localStorage.getItem(lsKey) || ""); if (this.core.$$getDeviceAndVaultName() == "") { if (this.settings.usePluginSync) { - this._log("Device name is not set. Plug-in sync has been disabled.", LOG_LEVEL_NOTICE); + this._log("Device name missing. Disabling plug-in sync.", LOG_LEVEL_NOTICE); this.settings.usePluginSync = false; } } diff --git a/src/modules/features/ModuleObsidianSettingAsMarkdown.ts b/src/modules/features/ModuleObsidianSettingAsMarkdown.ts index 133c5db..f73ed79 100644 --- a/src/modules/features/ModuleObsidianSettingAsMarkdown.ts +++ b/src/modules/features/ModuleObsidianSettingAsMarkdown.ts @@ -92,7 +92,7 @@ export class ModuleObsidianSettingsAsMarkdown extends AbstractObsidianModule imp if (automated && !this.settings.notifyAllSettingSyncFile) { if (!this.settings.settingSyncFile || this.settings.settingSyncFile != filename) { this._log( - `Setting file (${filename}) is not matched to the current configuration. skipped.`, + `Setting file (${filename}) does not match the current configuration. skipped.`, LOG_LEVEL_DEBUG ); return; diff --git a/src/modules/features/ModuleSetupObsidian.ts b/src/modules/features/ModuleSetupObsidian.ts index e00b185..0153b33 100644 --- a/src/modules/features/ModuleSetupObsidian.ts +++ b/src/modules/features/ModuleSetupObsidian.ts @@ -139,11 +139,11 @@ export class ModuleSetupObsidian extends AbstractObsidianModule implements IObsi newSettingW.encryptedPassphrase = ""; newSettingW.encryptedCouchDBConnection = ""; newSettingW.additionalSuffixOfDatabaseName = `${"appId" in this.app ? this.app.appId : ""}`; - const setupJustImport = "Just import setting"; - const setupAsNew = "Set it up as secondary or subsequent device"; - const setupAsMerge = "Secondary device but try keeping local changes"; - const setupAgain = "Reconfigure and reconstitute the data"; - const setupManually = "Leave everything to me"; + const setupJustImport = "Don't sync anything, just apply the settings."; + const setupAsNew = "This is a new client - sync everything from the remote server."; + const setupAsMerge = "This is an existing client - merge existing files with the server."; + const setupAgain = "This is a new server - reset remote server and use local files."; + const setupManually = "Continue and configure manually."; newSettingW.syncInternalFiles = false; newSettingW.usePluginSync = false; newSettingW.isConfigured = true; @@ -171,10 +171,10 @@ export class ModuleSetupObsidian extends AbstractObsidianModule implements IObsi await this.core.rebuilder.$fetchLocal(true); } else if (setupType == setupAgain) { const confirm = - "I know this operation will rebuild all my databases with files on this device, and files that are on the remote database and I didn't synchronize to any other devices will be lost and want to proceed indeed."; + "This operation will rebuild all databases with files on this device. Any files on the remote database not synced here will be lost."; if ( (await this.core.confirm.askSelectStringDialogue( - "Do you really want to do this?", + "Are you sure you want to do this?", ["Cancel", confirm], { defaultAction: "Cancel" } )) != confirm diff --git a/src/modules/features/SettingDialogue/ObsidianLiveSyncSettingTab.ts b/src/modules/features/SettingDialogue/ObsidianLiveSyncSettingTab.ts index 43d4e62..3e160f8 100644 --- a/src/modules/features/SettingDialogue/ObsidianLiveSyncSettingTab.ts +++ b/src/modules/features/SettingDialogue/ObsidianLiveSyncSettingTab.ts @@ -463,7 +463,7 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab { // And modified. this.plugin.confirm.askInPopup( `config-reloaded-${k}`, - `The setting "${getConfName(k as AllSettingItemKey)}" being in editing has been changed from somewhere. We can discard modification and reload by clicking {HERE}. Click elsewhere to ignore changes`, + `The setting "${getConfName(k as AllSettingItemKey)}" was modified from another device. Click {HERE} to reload settings. Click elsewhere to ignore changes`, (anchor) => { anchor.text = "HERE"; anchor.addEventListener("click", () => { @@ -622,7 +622,7 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab { | Symbol | Meaning | |: ------ :| ------- | -| ⇔ | Synchronised or well balanced | +| ⇔ | Up to Date | | ⇄ | Synchronise to balance | | ⇐,⇒ | Transfer to overwrite | | ⇠,⇢ | Transfer to overwrite from other side | @@ -847,7 +847,7 @@ Store only the settings. **Caution: This may lead to data corruption**; database return true; } else { Logger( - "ERROR: Passphrase is not compatible with the remote server! Please confirm it again!", + "ERROR: Passphrase is not compatible with the remote server! Please check it again!", LOG_LEVEL_NOTICE ); return false; @@ -856,7 +856,7 @@ Store only the settings. **Caution: This may lead to data corruption**; database }; const isPassphraseValid = async () => { if (this.editingSettings.encrypt && this.editingSettings.passphrase == "") { - Logger("If you enable encryption, you have to set the passphrase", LOG_LEVEL_NOTICE); + Logger("You cannot enable encryption without a passphrase", LOG_LEVEL_NOTICE); return false; } if (this.editingSettings.encrypt && !(await testCrypt())) { @@ -870,11 +870,11 @@ Store only the settings. **Caution: This may lead to data corruption**; database method: "localOnly" | "remoteOnly" | "rebuildBothByThisDevice" | "localOnlyWithChunks" ) => { if (this.editingSettings.encrypt && this.editingSettings.passphrase == "") { - Logger("If you enable encryption, you have to set the passphrase", LOG_LEVEL_NOTICE); + Logger("You cannot enable encryption without a passphrase", LOG_LEVEL_NOTICE); return; } if (this.editingSettings.encrypt && !(await testCrypt())) { - Logger("WARNING! Your device does not support encryption.", LOG_LEVEL_NOTICE); + Logger("Your device does not support encryption.", LOG_LEVEL_NOTICE); return; } if (!this.editingSettings.encrypt) { @@ -886,7 +886,7 @@ Store only the settings. **Caution: This may lead to data corruption**; database this.reloadAllSettings(); this.editingSettings.isConfigured = true; Logger( - "All synchronizations have been temporarily disabled. Please enable them after the fetching, if you need them.", + "Syncing has been disabled, fetch and re-enabled if desired.", LOG_LEVEL_NOTICE ); await this.saveAllDirtySettings(); @@ -896,14 +896,14 @@ Store only the settings. **Caution: This may lead to data corruption**; database }; // Panes - void addPane(containerEl, "Update Information", "💬", 100, false).then((paneEl) => { + void addPane(containerEl, "Change Log", "💬", 100, false).then((paneEl) => { const informationDivEl = this.createEl(paneEl, "div", { text: "" }); const tmpDiv = createDiv(); // tmpDiv.addClass("sls-header-button"); tmpDiv.addClass("op-warn-info"); - tmpDiv.innerHTML = `

Did you come here because of an upgrade notification? Read the version history and, if you are satisfied, press the button. I will bring it out again in the next version.

`; + tmpDiv.innerHTML = `

Here due to an upgrade notification? Please review the version history. If you're satisfied, click the button. A new update will prompt this again.

`; if (lastVersion > (this.editingSettings?.lastReadUpdates || 0)) { const informationButtonDiv = informationDivEl.appendChild(tmpDiv); informationButtonDiv.querySelector("button")?.addEventListener("click", () => { @@ -922,8 +922,8 @@ Store only the settings. **Caution: This may lead to data corruption**; database void addPane(containerEl, "Setup", "🧙‍♂️", 110, false).then((paneEl) => { void addPanel(paneEl, "Quick Setup").then((paneEl) => { new Setting(paneEl) - .setName("Use the copied setup URI") - .setDesc("To setup Self-hosted LiveSync, this method is the most preferred one.") + .setName("Connect with Setup URI") + .setDesc("This is the recommended method to set up Self-hosted LiveSync with a Setup URI.") .addButton((text) => { text.setButtonText("Use").onClick(() => { this.closeSetting(); @@ -931,13 +931,16 @@ Store only the settings. **Caution: This may lead to data corruption**; database }); }); - new Setting(paneEl).setName("Minimal setup").addButton((text) => { - text.setButtonText("Start").onClick(async () => { - await this.enableMinimalSetup(); - }); + new Setting(paneEl) + .setName("Manual setup").addButton((text) + .setDesc("Not recommended, but useful if you don't have a Setup URI") => { + text.setButtonText("Start").onClick(async () => { + await this.enableMinimalSetup(); + }); }); new Setting(paneEl) - .setName("Enable LiveSync on this device as the setup was completed manually") + .setName("Enable LiveSync") + .setDesc("Only enable this after configuring either of the above two options.") .addOnUpdate(visibleOnly(() => !this.isConfiguredAs("isConfigured", true))) .addButton((text) => { text.setButtonText("Enable").onClick(async () => { @@ -954,11 +957,14 @@ Store only the settings. **Caution: This may lead to data corruption**; database undefined, visibleOnly(() => this.isConfiguredAs("isConfigured", true)) ).then((paneEl) => { - new Setting(paneEl).setName("Copy current settings as a new setup URI").addButton((text) => { - text.setButtonText("Copy").onClick(() => { - // await this.plugin.addOnSetup.command_copySetupURI(); - eventHub.emitEvent(EVENT_REQUEST_COPY_SETUP_URI); - }); + new Setting(paneEl) + .setName("Copy the current settings to a Setup URI") + .setDesc("Perfect for setting up a new device!") + .addButton((text) => { + text.setButtonText("Copy").onClick(() => { + // await this.plugin.addOnSetup.command_copySetupURI(); + eventHub.emitEvent(EVENT_REQUEST_COPY_SETUP_URI); + }); }); }); void addPanel(paneEl, "Reset").then((paneEl) => { @@ -1182,7 +1188,7 @@ Store only the settings. **Caution: This may lead to data corruption**; database }; addResult("---Notice---", ["ob-btn-config-head"]); addResult( - "If the server configuration is not persistent (e.g., running on docker), the values set from here will also be volatile. Once you are able to connect, please reflect the settings in the server's local.ini.", + "If the server configuration is not persistent (e.g., running on docker), the values here may change. Once you are able to connect, please update the settings in the server's local.ini.", ["ob-btn-config-info"] ); @@ -1191,9 +1197,9 @@ Store only the settings. **Caution: This may lead to data corruption**; database // Admin check // for database creation and deletion if (!(this.editingSettings.couchDB_USER in responseConfig.admins)) { - addResult(`⚠ You do not have administrative privileges.`); + addResult(`⚠ You do not have administrator privileges.`); } else { - addResult("✔ You have administrative privileges."); + addResult("✔ You have administrator privileges."); } // HTTP user-authorization check if (responseConfig?.chttpd?.require_valid_user != "true") { @@ -1313,7 +1319,7 @@ Store only the settings. **Caution: This may lead to data corruption**; database } addResult("--Done--", ["ob-btn-config-head"]); addResult( - "If you have some trouble with Connection-check even though all Config-check has been passed, please check your reverse proxy's configuration.", + "If you're having trouble with the Connection-check (even after checking config), please check your reverse proxy configuration.", ["ob-btn-config-info"] ); Logger(`Checking configuration done`, LOG_LEVEL_INFO); @@ -1348,13 +1354,14 @@ Store only the settings. **Caution: This may lead to data corruption**; database const syncWarnMinio = this.createEl(paneEl, "div", { text: "", }); - const ObjectStorageMessage = `Kindly notice: this is a pretty experimental feature, hence we have some limitations. -- Append only architecture. It will not shrink used storage if we do not perform a rebuild. + const ObjectStorageMessage = `WARNING: This feature is a Work In Progress, so please keep in mind the following: +- Append only architecture. A rebuild is required to shrink the storage. - A bit fragile. -- During the first synchronization, the entire history to date will be transferred. For this reason, it is preferable to do this while connected to a Wi-Fi network. -- From the second, we always transfer only differences. +- When first syncing, all history will be transferred from the server. Be mindful of data caps and slow speeds. +- Only differences are synced live. -However, your report is needed to stabilise this. I appreciate you for your great dedication. +If you run into any issues, or have ideas about this feature, please create a issue on GitHub. +I appreciate you for your great dedication. `; void MarkdownRenderer.render( @@ -1408,7 +1415,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea paneEl, "div", { - text: `Configured as using non-HTTPS. We cannot connect to the remote. Please set up the credentials and use HTTPS for the remote URI.`, + text: `Cannot connect to non-HTTPS URI. Please update your config and try again.`, }, undefined, visibleOnly(() => !this.editingSettings.couchDB_URI.startsWith("https://")) @@ -1418,7 +1425,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea paneEl, "div", { - text: `Configured as using non-HTTPS. We might fail on mobile devices.`, + text: `Configured as non-HTTPS URI. Be warned that this may not work on mobile devices.`, }, undefined, visibleOnly(() => !this.editingSettings.couchDB_URI.startsWith("https://")) @@ -1429,7 +1436,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea paneEl, "div", { - text: `These settings are kept locked while any synchronization options are enabled. Disable these options in the "Sync Settings" tab to unlock.`, + text: `These settings are unable to be changed during synchronization. Please disable all syncing in the "Sync Settings" to unlock.`, }, undefined, visibleOnly(() => isAnySyncEnabled()) @@ -1457,7 +1464,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea .setName("Test Database Connection") .setClass("wizardHidden") .setDesc( - "Open database connection. If the remote database is not found and you have the privilege to create a database, the database will be created." + "Open database connection. If the remote database is not found and you have permission to create a database, the database will be created." ) .addButton((button) => button @@ -1469,8 +1476,8 @@ However, your report is needed to stabilise this. I appreciate you for your grea ); new Setting(paneEl) - .setName("Check and fix database configuration") - .setDesc("Check the database configuration, and fix if there are any problems.") + .setName("Validate Database Configuration") + .setDesc("Checks and fixes any potential issues with the database config.") .addButton((button) => button .setButtonText("Check") @@ -1501,7 +1508,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea new Setting(paneEl).autoWireNumeric("notifyThresholdOfRemoteStorageSize", {}).setClass("wizardHidden"); }); - void addPanel(paneEl, "Confidentiality").then((paneEl) => { + void addPanel(paneEl, "Privacy & Encryption").then((paneEl) => { new Setting(paneEl).autoWireToggle("encrypt", { holdValue: true }); const isEncryptEnabled = visibleOnly(() => this.isConfiguredAs("encrypt", true)); @@ -1526,8 +1533,8 @@ However, your report is needed to stabilise this. I appreciate you for your grea void addPanel(paneEl, "Fetch settings").then((paneEl) => { new Setting(paneEl) - .setName("Fetch tweaks from the remote") - .setDesc("Fetch other necessary settings from already configured remote.") + .setName("Fetch config from server") + .setDesc("Fetch necessary settings from already configured server.") .addButton((button) => button .setButtonText("Fetch") @@ -1563,7 +1570,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea if (isEncryptionFullyEnabled) { if ( (await this.plugin.confirm.askYesNoDialog( - "Enabling End-to-End Encryption and Path Obfuscation is strongly recommended. Do you surely want to continue without encryption?", + "We recommend enabling End-To-End Encryption, and Path Obfuscation. Are you sure you want to continue without encryption?", { defaultOption: "No", title: "Encryption is not enabled" } )) == "no" ) { @@ -1576,8 +1583,8 @@ However, your report is needed to stabilise this. I appreciate you for your grea if (!(await isPassphraseValid())) { if ( (await this.plugin.confirm.askYesNoDialog( - "End-to-End encryption seems to have trouble. Do you surely want to continue with the current settings?", - { defaultOption: "No", title: "Encryption has some trouble" } + "Your encryption passphrase might be invalid. Are you sure you want to continue?", + { defaultOption: "No", title: "Encryption Passphrase Invalid?" } )) == "no" ) { return; @@ -1592,8 +1599,8 @@ However, your report is needed to stabilise this. I appreciate you for your grea } if ( (await this.plugin.confirm.askYesNoDialog( - "Do you want to fetch the tweaks from the remote?", - { defaultOption: "Yes", title: "Fetch tweaks" } + "Do you want to fetch the config from the server?", + { defaultOption: "Yes", title: "Fetch config" } )) == "yes" ) { const trialSetting = { ...this.initialSettings, ...this.editingSettings }; @@ -1702,18 +1709,18 @@ However, your report is needed to stabilise this. I appreciate you for your grea ...this.editingSettings, ...presetLiveSync, }; - Logger("Synchronization setting configured as LiveSync.", LOG_LEVEL_NOTICE); + Logger("Configured synchronization mode: LiveSync", LOG_LEVEL_NOTICE); } else if (currentPreset == "PERIODIC") { this.editingSettings = { ...this.editingSettings, ...presetPeriodic, }; Logger( - "Synchronization setting configured as Periodic sync with batch database update.", + "Configured synchronization mode: Periodic", LOG_LEVEL_NOTICE ); } else { - Logger("All synchronizations disabled.", LOG_LEVEL_NOTICE); + Logger("Configured synchronization mode: DISABLED", LOG_LEVEL_NOTICE); this.editingSettings = { ...this.editingSettings, ...presetAllDisabled, @@ -1731,7 +1738,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea // this.resetEditingSettings(); if ( (await this.plugin.confirm.askYesNoDialog( - "All done!, do you want to generate a setup URI to set up other devices?", + "All done! Do you want to generate a setup URI to set up other devices?", { defaultOption: "Yes", title: "Congratulations!" } )) == "yes" ) { @@ -1752,7 +1759,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea } }); }); - void addPanel(paneEl, "Synchronization Methods").then((paneEl) => { + void addPanel(paneEl, "Synchronization Method").then((paneEl) => { paneEl.addClass("wizardHidden"); // const onlyOnLiveSync = visibleOnly(() => this.isConfiguredAs("syncMode", "LIVESYNC")); @@ -1763,10 +1770,10 @@ However, your report is needed to stabilise this. I appreciate you for your grea this.editingSettings.remoteType == REMOTE_COUCHDB ? { ONEVENTS: "On events", - PERIODIC: "Periodic and On events", + PERIODIC: "Periodic and on events", LIVESYNC: "LiveSync", } - : { ONEVENTS: "On events", PERIODIC: "Periodic and On events" }; + : { ONEVENTS: "On events", PERIODIC: "Periodic and on events" }; new Setting(paneEl) .autoWireDropDown("syncMode", { @@ -1852,7 +1859,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea new Setting(paneEl).autoWireToggle("notifyAllSettingSyncFile"); }); - void addPanel(paneEl, "Hidden files", undefined, undefined, LEVEL_ADVANCED).then((paneEl) => { + void addPanel(paneEl, "Hidden Files", undefined, undefined, LEVEL_ADVANCED).then((paneEl) => { paneEl.addClass("wizardHidden"); const LABEL_ENABLED = "🔁 : Enabled"; @@ -2778,7 +2785,7 @@ ${stringifyYaml(pluginConfig)}`; paneEl, "div", { - text: "To prevent unwanted vault corruption, the remote database has been locked for synchronization, and this device was not marked as 'resolved'. It caused by some operations like this. Re-initialized. Local database initialization should be required. Please back your vault up, reset the local database, and press 'Mark this device as resolved'. This warning kept showing until confirming the device is resolved by the replication.", + text: "The remote database is locked for synchronization to prevent vault corruption because this device isn't marked as 'resolved'. Please backup your vault, reset the local database, and select 'Mark this device as resolved'. This warning will persist until the device is confirmed as resolved by replication.", cls: "op-warn", }, (c) => { @@ -2786,7 +2793,7 @@ ${stringifyYaml(pluginConfig)}`; c, "button", { - text: "I'm ready, mark this device 'resolved'", + text: "I've made a backup, mark this device 'resolved'", cls: "mod-warning", }, (e) => { @@ -2830,8 +2837,8 @@ ${stringifyYaml(pluginConfig)}`; void addPanel(paneEl, "Scram!").then((paneEl) => { new Setting(paneEl) - .setName("Lock remote") - .setDesc("Lock remote to prevent synchronization with other devices.") + .setName("Lock Server") + .setDesc("Lock the remote server to prevent synchronization with other devices.") .addButton((button) => button .setButtonText("Lock") @@ -2844,7 +2851,7 @@ ${stringifyYaml(pluginConfig)}`; new Setting(paneEl) .setName("Emergency restart") - .setDesc("place the flag file to prevent all operation and restart.") + .setDesc("Disables all synchronization and restart.") .addButton((button) => button .setButtonText("Flag and restart") @@ -2857,7 +2864,7 @@ ${stringifyYaml(pluginConfig)}`; ); }); - void addPanel(paneEl, "Data-complementary Operations").then((paneEl) => { + void addPanel(paneEl, "Syncing").then((paneEl) => { new Setting(paneEl) .setName("Resend") .setDesc("Resend all chunks to the remote.") @@ -2982,9 +2989,9 @@ ${stringifyYaml(pluginConfig)}`; }); void addPanel(paneEl, "Rebuilding Operations (Remote Only)").then((paneEl) => { new Setting(paneEl) - .setName("Perform compaction") + .setName("Perform cleanup") .setDesc( - "Compaction discards all of Eden in the non-latest revisions, reducing the storage usage. However, this operation requires the same free space on the remote as the current database." + "Reduces storage space by discarding all non-latest revisions. This requires the same amount of free space on the remote server and the local client." ) .addButton((button) => button @@ -2992,11 +2999,11 @@ ${stringifyYaml(pluginConfig)}`; .setDisabled(false) .onClick(async () => { const replicator = this.plugin.replicator as LiveSyncCouchDBReplicator; - Logger(`Compaction has been began`, LOG_LEVEL_NOTICE, "compaction"); + Logger(`Cleanup has been began`, LOG_LEVEL_NOTICE, "compaction"); if (await replicator.compactRemote(this.editingSettings)) { - Logger(`Compaction has been completed!`, LOG_LEVEL_NOTICE, "compaction"); + Logger(`Cleanup has been completed!`, LOG_LEVEL_NOTICE, "compaction"); } else { - Logger(`Compaction has been failed!`, LOG_LEVEL_NOTICE, "compaction"); + Logger(`Cleanup has been failed!`, LOG_LEVEL_NOTICE, "compaction"); } }) ) @@ -3032,7 +3039,7 @@ ${stringifyYaml(pluginConfig)}`; new Setting(paneEl) .setName("Purge all journal counter") - .setDesc("Purge all sending and downloading cache.") + .setDesc("Purge all download/upload cache.") .addButton((button) => button .setButtonText("Reset all") @@ -3040,14 +3047,14 @@ ${stringifyYaml(pluginConfig)}`; .setDisabled(false) .onClick(async () => { await this.getMinioJournalSyncClient().resetAllCaches(); - Logger(`Journal sending and downloading cache has been cleared.`, LOG_LEVEL_NOTICE); + Logger(`Journal download/upload cache has been cleared.`, LOG_LEVEL_NOTICE); }) ) .addOnUpdate(onlyOnMinIO); new Setting(paneEl) - .setName("Make empty the bucket") - .setDesc("Delete all data on the remote.") + .setName("Fresh Start Wipe") + .setDesc("Delete all data on the remote server.") .addButton((button) => button .setButtonText("Delete") @@ -3063,18 +3070,18 @@ ${stringifyYaml(pluginConfig)}`; sentFiles: new Set(), })); await this.resetRemoteBucket(); - Logger(`the bucket has been cleared.`, LOG_LEVEL_NOTICE); + Logger(`Deleted all data on remote server`, LOG_LEVEL_NOTICE); }) ) .addOnUpdate(onlyOnMinIO); }); - void addPanel(paneEl, "Niches").then((paneEl) => { + void addPanel(paneEl, "Deprecated").then((paneEl) => { new Setting(paneEl) .setClass("sls-setting-obsolete") - .setName("(Obsolete) Clean up databases") + .setName("Run database cleanup") .setDesc( - "Delete unused chunks to shrink the database. However, this feature could be not effective in some cases. Please use rebuild everything instead." + "Attempt to shrink the database by deleting unused chunks. This may not work consistently. Use the 'Rebuild everything' under Total Overhaul." ) .addButton((button) => button @@ -3098,10 +3105,10 @@ ${stringifyYaml(pluginConfig)}`; }); void addPanel(paneEl, "Reset").then((paneEl) => { new Setting(paneEl) - .setName("Discard local database to reset or uninstall Self-hosted LiveSync") + .setName("Delete local database to reset or uninstall Self-hosted LiveSync") .addButton((button) => button - .setButtonText("Discard") + .setButtonText("Delete") .setWarning() .setDisabled(false) .onClick(async () => { diff --git a/src/modules/features/SettingDialogue/settingConstants.ts b/src/modules/features/SettingDialogue/settingConstants.ts index adb99a8..b2c035d 100644 --- a/src/modules/features/SettingDialogue/settingConstants.ts +++ b/src/modules/features/SettingDialogue/settingConstants.ts @@ -45,7 +45,7 @@ export const SettingInformation: Partial { this._log(`Additional safety scan..`, LOG_LEVEL_VERBOSE); if (!(await this.core.$allScanStat())) { - this._log(`Additional safety scan has been failed on some module`, LOG_LEVEL_NOTICE); + this._log(`Additional safety scan has failed on a module`, LOG_LEVEL_NOTICE); } else { - this._log(`Additional safety scan done`, LOG_LEVEL_VERBOSE); + this._log(`Additional safety scan completed`, LOG_LEVEL_VERBOSE); } }); } @@ -82,7 +82,7 @@ Do you want to resume them and restart Obsidian? eventHub.emitEvent(EVENT_PLUGIN_LOADED, this.core); this._log("loading plugin"); if (!(await this.core.$everyOnloadStart())) { - this._log("Plugin initialising has been cancelled by some module", LOG_LEVEL_NOTICE); + this._log("Plugin initialisation was cancelled by a module", LOG_LEVEL_NOTICE); return; } // this.addUIs(); @@ -94,7 +94,7 @@ Do you want to resume them and restart Obsidian? this._log($f`Self-hosted LiveSync${" v"}${manifestVersion} ${packageVersion}`); await this.core.$$loadSettings(); if (!(await this.core.$everyOnloadAfterLoadSettings())) { - this._log("Plugin initialising has been cancelled by some module", LOG_LEVEL_NOTICE); + this._log("Plugin initialisation was cancelled by a module", LOG_LEVEL_NOTICE); return; } const lsKey = "obsidian-live-sync-ver" + this.core.$$getVaultName(); @@ -102,7 +102,7 @@ Do you want to resume them and restart Obsidian? const lastVersion = ~~(versionNumberString2Number(manifestVersion) / 1000); if (lastVersion > this.settings.lastReadUpdates && this.settings.isConfigured) { - this._log($f`You have some unread release notes! Please read them once!`, LOG_LEVEL_NOTICE); + this._log($f`LiveSync has updated, please read the changelog!`, LOG_LEVEL_NOTICE); } //@ts-ignore @@ -117,7 +117,7 @@ Do you want to resume them and restart Obsidian? this.settings.syncOnFileOpen = false; this.settings.syncAfterMerge = false; this.settings.periodicReplication = false; - this.settings.versionUpFlash = $f`Self-hosted LiveSync has been upgraded and some behaviors have changed incompatibly. All automatic synchronization is now disabled temporary. Ensure that other devices are also upgraded, and enable synchronization again.`; + this.settings.versionUpFlash = $f`LiveSync has been updated, In case of breaking updates, all automatic synchronization has been temporarily disabled. Ensure that all devices are up to date before enabling.`; await this.saveSettings(); } localStorage.setItem(lsKey, `${VER}`);