From a28c40309322c02c6098e9f42871a5c48299d9e8 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Mon, 9 Feb 2026 22:19:49 -0800 Subject: [PATCH] adjust wording and toggles for analytics/updates (#1654) --- src/i18n/locales/en.json | 5 ++++- .../components/advanced/analytics-settings.tsx | 17 +++++++++-------- .../components/window/update-settings.tsx | 13 +++++++------ 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index b611caa87..fef87af0b 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -713,6 +713,8 @@ "albumBackgroundBlur": "album background image blur size", "analyticsDisable": "Opt-out of usage based analytics", "analyticsDisable_description": "Anonymized usage data is sent to the developer to help improve the application", + "analyticsEnable": "Send usage-based analytics", + "analyticsEnable_description": "Anonymized usage data is sent to the developer to help improve the application", "applicationHotkeys_description": "configure application hotkeys. toggle the checkbox to set as a global hotkey (desktop only)", "applicationHotkeys": "application hotkeys", "artistBackground": "artist background image", @@ -749,7 +751,8 @@ "customCssNotice": "Warning: while there is some sanitization (disallowing url() and content:), using custom css can still pose risks by changing the interface", "customFontPath_description": "sets the path to the custom font to use for the application", "customFontPath": "custom font path", - "disableAutomaticUpdates": "disable automatic updates", + "automaticUpdates": "Automatic updates", + "automaticUpdates_description": "Check for and install updates automatically", "releaseChannel_optionAlpha": "alpha (nightly)", "releaseChannel_optionBeta": "beta", "releaseChannel_optionLatest": "latest", diff --git a/src/renderer/features/settings/components/advanced/analytics-settings.tsx b/src/renderer/features/settings/components/advanced/analytics-settings.tsx index d416f55ad..3e69810e9 100644 --- a/src/renderer/features/settings/components/advanced/analytics-settings.tsx +++ b/src/renderer/features/settings/components/advanced/analytics-settings.tsx @@ -10,11 +10,11 @@ import { Switch } from '/@/shared/components/switch/switch'; export const AnalyticsSettings = memo(() => { const { t } = useTranslation(); - const handleToggleAnalytics = (disable: boolean) => { - if (disable) { - localStorage.setItem('umami.disabled', '1'); - } else { + const handleSetSendAnalytics = (send: boolean) => { + if (send) { localStorage.removeItem('umami.disabled'); + } else { + localStorage.setItem('umami.disabled', '1'); } }; @@ -22,12 +22,13 @@ export const AnalyticsSettings = memo(() => { { control: ( handleToggleAnalytics(e.currentTarget.checked)} + aria-label={t('setting.analyticsEnable', { postProcess: 'sentenceCase' })} + defaultChecked={localStorage.getItem('umami.disabled') !== '1'} + onChange={(e) => handleSetSendAnalytics(e.currentTarget.checked)} /> ), - description: t('setting.analyticsDisable_description', { postProcess: 'sentenceCase' }), - title: t('setting.analyticsDisable', { postProcess: 'sentenceCase' }), + description: t('setting.analyticsEnable_description', { postProcess: 'sentenceCase' }), + title: t('setting.analyticsEnable', { postProcess: 'sentenceCase' }), }, ]; diff --git a/src/renderer/features/settings/components/window/update-settings.tsx b/src/renderer/features/settings/components/window/update-settings.tsx index de0f886a4..3badac7cf 100644 --- a/src/renderer/features/settings/components/window/update-settings.tsx +++ b/src/renderer/features/settings/components/window/update-settings.tsx @@ -71,26 +71,27 @@ export const UpdateSettings = memo(() => { { control: ( { if (!e) return; - localSettings?.set('disable_auto_updates', e.currentTarget.checked); + const enabled = e.currentTarget.checked; + localSettings?.set('disable_auto_updates', !enabled); setSettings({ window: { - disableAutoUpdate: e.currentTarget.checked, + disableAutoUpdate: !enabled, }, }); }} /> ), - description: t('setting.disableAutomaticUpdates', { + description: t('setting.automaticUpdates', { context: 'description', postProcess: 'sentenceCase', }), isHidden: disableAutoUpdates(), - title: t('setting.disableAutomaticUpdates', { postProcess: 'sentenceCase' }), + title: t('setting.automaticUpdates', { postProcess: 'sentenceCase' }), }, ];