From bd018399fb60934ce7c5cb801a6126623ee9d3ce Mon Sep 17 00:00:00 2001 From: Hachi-R Date: Sat, 12 Apr 2025 15:52:18 -0300 Subject: [PATCH] fix: typo --- src/locales/en/translation.json | 2 +- src/locales/pt-BR/translation.json | 2 +- src/renderer/src/hooks/use-download.ts | 2 +- .../src/pages/settings/settings-behavior.tsx | 12 ++++++------ src/types/level.types.ts | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 57a43435..bfab174f 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -355,7 +355,7 @@ "common_redist_description": "Common redistributables are required to run some games. Installing them is recommended to avoid issues.", "install_common_redist": "Install", "installing_common_redist": "Installing…", - "show_download_speed_in_megabits": "Show download speed in megabits per second" + "show_download_speed_in_megabytes": "Show download speed in megabytes per second" }, "notifications": { "download_complete": "Download complete", diff --git a/src/locales/pt-BR/translation.json b/src/locales/pt-BR/translation.json index 4f27bcf9..65a97dc3 100644 --- a/src/locales/pt-BR/translation.json +++ b/src/locales/pt-BR/translation.json @@ -342,7 +342,7 @@ "common_redist_description": "Componentes recomendados são necessários para executar alguns jogos. A instalação deles é recomendada para evitar problemas.", "install_common_redist": "Instalar", "installing_common_redist": "Instalando…", - "show_download_speed_in_megabits": "Exibir taxas de download em megabits por segundo" + "show_download_speed_in_megabytes": "Exibir taxas de download em megabytes por segundo" }, "notifications": { "download_complete": "Download concluído", diff --git a/src/renderer/src/hooks/use-download.ts b/src/renderer/src/hooks/use-download.ts index a3b655d1..f6cc071f 100644 --- a/src/renderer/src/hooks/use-download.ts +++ b/src/renderer/src/hooks/use-download.ts @@ -102,7 +102,7 @@ export function useDownload() { }; const formatDownloadSpeed = (downloadSpeed: number): string => { - return userPrefs?.showDownloadSpeedInMegabits + return userPrefs?.showDownloadSpeedInMegabytes ? `${formatBytes(downloadSpeed)}/s` : formatBytesToMbps(downloadSpeed); }; diff --git a/src/renderer/src/pages/settings/settings-behavior.tsx b/src/renderer/src/pages/settings/settings-behavior.tsx index 230bd065..0afbf5b6 100644 --- a/src/renderer/src/pages/settings/settings-behavior.tsx +++ b/src/renderer/src/pages/settings/settings-behavior.tsx @@ -23,7 +23,7 @@ export function SettingsBehavior() { enableAutoInstall: false, seedAfterDownloadComplete: false, showHiddenAchievementsDescription: false, - showDownloadSpeedInMegabits: false, + showDownloadSpeedInMegabytes: false, }); const { t } = useTranslation("settings"); @@ -41,8 +41,8 @@ export function SettingsBehavior() { userPreferences.seedAfterDownloadComplete ?? false, showHiddenAchievementsDescription: userPreferences.showHiddenAchievementsDescription ?? false, - showDownloadSpeedInMegabits: - userPreferences.showDownloadSpeedInMegabits ?? false, + showDownloadSpeedInMegabytes: + userPreferences.showDownloadSpeedInMegabytes ?? false, }); } }, [userPreferences]); @@ -144,11 +144,11 @@ export function SettingsBehavior() { /> handleChange({ - showDownloadSpeedInMegabits: !form.showDownloadSpeedInMegabits, + showDownloadSpeedInMegabytes: !form.showDownloadSpeedInMegabytes, }) } /> diff --git a/src/types/level.types.ts b/src/types/level.types.ts index cc5b1d8a..21836870 100644 --- a/src/types/level.types.ts +++ b/src/types/level.types.ts @@ -85,7 +85,7 @@ export interface UserPreferences { repackUpdatesNotificationsEnabled?: boolean; achievementNotificationsEnabled?: boolean; friendRequestNotificationsEnabled?: boolean; - showDownloadSpeedInMegabits?: boolean; + showDownloadSpeedInMegabytes?: boolean; } export interface ScreenState {