From adc5b81c318f2704fc0e68e51a16d5434111541a Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Fri, 7 Feb 2025 21:11:59 -0600 Subject: [PATCH] DolphinQt: Rename the pack/unpack SD Card buttons. --- .../Android/app/src/main/res/values/strings.xml | 8 ++++---- Source/Core/Common/FatFsUtil.h | 3 +++ Source/Core/Core/Core.cpp | 3 ++- Source/Core/DolphinQt/Settings/WiiPane.cpp | 16 ++++++++-------- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml index aacc57a3be..0dbee76452 100644 --- a/Source/Android/app/src/main/res/values/strings.xml +++ b/Source/Android/app/src/main/res/values/strings.xml @@ -105,10 +105,10 @@ Synchronizes the SD Card with the SD Sync Folder when starting and ending emulation. SD Card Path SD Sync Folder - Convert Folder to File Now - You are about to convert the content of the SD sync folder into the SD card file. All current content of the file will be deleted. Are you sure you want to continue? - Convert File to Folder Now - You are about to convert the content of the SD card file into the SD sync folder. All current content of the folder will be deleted. Are you sure you want to continue? + Pack SD Card Now + You are about to pack the content of the SD sync folder into the SD card file. All current content of the file will be deleted. Are you sure you want to continue? + Unpack SD Card Now + You are about to unpack the content of the SD card file into the SD sync folder. All current content of the folder will be deleted. Are you sure you want to continue? Converting… Conversion done. Conversion failed. diff --git a/Source/Core/Common/FatFsUtil.h b/Source/Core/Common/FatFsUtil.h index df0ef58984..beb6c98208 100644 --- a/Source/Core/Common/FatFsUtil.h +++ b/Source/Core/Common/FatFsUtil.h @@ -9,6 +9,9 @@ namespace Common { +static constexpr auto SD_PACK_TEXT = "Pack SD Card Now"; +static constexpr auto SD_UNPACK_TEXT = "Unpack SD Card Now"; + bool SyncSDFolderToSDImage(const std::function& cancelled, bool deterministic); bool SyncSDImageToSDFolder(const std::function& cancelled); diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index 84a398b7f7..e59c20a0d3 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -537,7 +537,8 @@ static void EmuThread(Core::System& system, std::unique_ptr boot PanicAlertFmtT( "Failed to sync SD card with folder. All changes made this session will be " "discarded on next boot if you do not manually re-issue a resync in Config > " - "Wii > SD Card Settings > Convert File to Folder Now!"); + "Wii > SD Card Settings > {0}!", + Common::GetStringT(Common::SD_UNPACK_TEXT)); } } }}; diff --git a/Source/Core/DolphinQt/Settings/WiiPane.cpp b/Source/Core/DolphinQt/Settings/WiiPane.cpp index 377d17c127..5d6bc23f7e 100644 --- a/Source/Core/DolphinQt/Settings/WiiPane.cpp +++ b/Source/Core/DolphinQt/Settings/WiiPane.cpp @@ -265,12 +265,12 @@ void WiiPane::CreateSDCard() sd_settings_group_layout->addWidget(m_sd_card_size_combo, row, 1); ++row; - m_sd_pack_button = new NonDefaultQPushButton(tr("Convert Folder to File Now")); - m_sd_unpack_button = new NonDefaultQPushButton(tr("Convert File to Folder Now")); + m_sd_pack_button = new NonDefaultQPushButton(tr(Common::SD_PACK_TEXT)); + m_sd_unpack_button = new NonDefaultQPushButton(tr(Common::SD_UNPACK_TEXT)); connect(m_sd_pack_button, &QPushButton::clicked, [this] { auto result = ModalMessageBox::warning( - this, tr("Convert Folder to File Now"), - tr("You are about to convert the content of the folder at %1 into the file at %2. All " + this, tr(Common::SD_PACK_TEXT), + tr("You are about to pack the content of the folder at %1 into the file at %2. All " "current content of the file will be deleted. Are you sure you want to continue?") .arg(QString::fromStdString(File::GetUserPath(D_WIISDCARDSYNCFOLDER_IDX))) .arg(QString::fromStdString(File::GetUserPath(F_WIISDCARDIMAGE_IDX))), @@ -289,13 +289,13 @@ void WiiPane::CreateSDCard() SetQWidgetWindowDecorations(progress_dialog.GetRaw()); progress_dialog.GetRaw()->exec(); if (!success.get()) - ModalMessageBox::warning(this, tr("Convert Folder to File Now"), tr("Conversion failed.")); + ModalMessageBox::warning(this, tr(Common::SD_PACK_TEXT), tr("Conversion failed.")); } }); connect(m_sd_unpack_button, &QPushButton::clicked, [this] { auto result = ModalMessageBox::warning( - this, tr("Convert File to Folder Now"), - tr("You are about to convert the content of the file at %2 into the folder at %1. All " + this, tr(Common::SD_UNPACK_TEXT), + tr("You are about to unpack the content of the file at %2 into the folder at %1. All " "current content of the folder will be deleted. Are you sure you want to continue?") .arg(QString::fromStdString(File::GetUserPath(D_WIISDCARDSYNCFOLDER_IDX))) .arg(QString::fromStdString(File::GetUserPath(F_WIISDCARDIMAGE_IDX))), @@ -314,7 +314,7 @@ void WiiPane::CreateSDCard() SetQWidgetWindowDecorations(progress_dialog.GetRaw()); progress_dialog.GetRaw()->exec(); if (!success.get()) - ModalMessageBox::warning(this, tr("Convert File to Folder Now"), tr("Conversion failed.")); + ModalMessageBox::warning(this, tr(Common::SD_UNPACK_TEXT), tr("Conversion failed.")); } }); sd_settings_group_layout->addWidget(m_sd_pack_button, row, 0, 1, 1);