diff --git a/src/modules/features/SettingDialogue/PaneHatch.ts b/src/modules/features/SettingDialogue/PaneHatch.ts index 70ef112..8d13ec2 100644 --- a/src/modules/features/SettingDialogue/PaneHatch.ts +++ b/src/modules/features/SettingDialogue/PaneHatch.ts @@ -48,7 +48,7 @@ export function paneHatch(this: ObsidianLiveSyncSettingTab, paneEl: HTMLElement, .setDesc($msg("Setting.TroubleShooting.Doctor.Desc")) .addButton((button) => button - .setButtonText("Run Doctor") + .setButtonText($msg("Run Doctor")) .setCta() .setDisabled(false) .onClick(() => { @@ -69,9 +69,9 @@ export function paneHatch(this: ObsidianLiveSyncSettingTab, paneEl: HTMLElement, eventHub.emitEvent(EVENT_REQUEST_RUN_FIX_INCOMPLETE); }) ); - new Setting(paneEl).setName("Prepare the 'report' to create an issue").addButton((button) => + new Setting(paneEl).setName($msg("Prepare the 'report' to create an issue")).addButton((button) => button - .setButtonText("Copy Report to clipboard") + .setButtonText($msg("Copy Report to clipboard")) .setCta() .setDisabled(false) .onClick(async () => { @@ -189,20 +189,20 @@ ${stringifyYaml({ }) ); new Setting(paneEl) - .setName("Analyse database usage") - .setDesc( + .setName($msg("Analyse database usage")) + .setDesc($msg( "Analyse database usage and generate a TSV report for diagnosis yourself. You can paste the generated report with any spreadsheet you like." - ) + )) .addButton((button) => - button.setButtonText("Analyse").onClick(() => { + button.setButtonText($msg("Analyse")).onClick(() => { eventHub.emitEvent(EVENT_ANALYSE_DB_USAGE); }) ); new Setting(paneEl) - .setName("Reset notification threshold and check the remote database usage") - .setDesc("Reset the remote storage size threshold and check the remote storage size again.") + .setName($msg("Reset notification threshold and check the remote database usage")) + .setDesc($msg("Reset the remote storage size threshold and check the remote storage size again.")) .addButton((button) => - button.setButtonText("Check").onClick(() => { + button.setButtonText($msg("Check")).onClick(() => { eventHub.emitEvent(EVENT_REQUEST_CHECK_REMOTE_SIZE); }) ); diff --git a/src/modules/features/SettingDialogue/PaneRemoteConfig.ts b/src/modules/features/SettingDialogue/PaneRemoteConfig.ts index 46c3568..cd3473e 100644 --- a/src/modules/features/SettingDialogue/PaneRemoteConfig.ts +++ b/src/modules/features/SettingDialogue/PaneRemoteConfig.ts @@ -92,7 +92,7 @@ export function paneRemoteConfig( } { void addPanel(paneEl, $msg("obsidianLiveSyncSettingTab.titleRemoteServer"), () => {}).then((paneEl) => { - const setting = new Setting(paneEl).setName("Active Remote Configuration"); + const setting = new Setting(paneEl).setName($msg("Active Remote Configuration")); const el = setting.controlEl.createDiv({}); el.setText(`${remoteNameMap[this.editingSettings.remoteType] || " - "}`); diff --git a/src/modules/features/SettingDialogue/PaneSetup.ts b/src/modules/features/SettingDialogue/PaneSetup.ts index 03f21c4..0b131a1 100644 --- a/src/modules/features/SettingDialogue/PaneSetup.ts +++ b/src/modules/features/SettingDialogue/PaneSetup.ts @@ -31,10 +31,10 @@ export function paneSetup( }); new Setting(paneEl) - .setName("Rerun Onboarding Wizard") - .setDesc("Rerun the onboarding wizard to set up Self-hosted LiveSync again.") + .setName($msg("Rerun Onboarding Wizard")) + .setDesc($msg("Rerun the onboarding wizard to set up Self-hosted LiveSync again.")) .addButton((text) => { - text.setButtonText("Rerun Wizard").onClick(async () => { + text.setButtonText($msg("Rerun Wizard")).onClick(async () => { const setupManager = this.plugin.getModule(SetupManager); await setupManager.onOnboard(UserMode.ExistingUser); // await this.plugin.moduleSetupObsidian.onBoardingWizard(true);