Qt: Rename 'Input Profile' to 'Controller Preset'

Hopefully more noob-proof?
This commit is contained in:
Stenzek 2025-01-11 20:10:21 +10:00
parent e4c11aa905
commit d3bee3ce67
No known key found for this signature in database
5 changed files with 42 additions and 41 deletions

View File

@ -3872,7 +3872,7 @@ void FullscreenUI::DoLoadInputProfile()
coptions.reserve(profiles.size()); coptions.reserve(profiles.size());
for (std::string& name : profiles) for (std::string& name : profiles)
coptions.emplace_back(std::move(name), false); coptions.emplace_back(std::move(name), false);
OpenChoiceDialog(FSUI_ICONSTR(ICON_FA_FOLDER_OPEN, "Load Profile"), false, std::move(coptions), OpenChoiceDialog(FSUI_ICONSTR(ICON_FA_FOLDER_OPEN, "Load Preset"), false, std::move(coptions),
[](s32 index, const std::string& title, bool checked) { [](s32 index, const std::string& title, bool checked) {
if (index < 0) if (index < 0)
return; return;
@ -3889,7 +3889,7 @@ void FullscreenUI::DoLoadInputProfile()
SettingsInterface* dsi = GetEditingSettingsInterface(); SettingsInterface* dsi = GetEditingSettingsInterface();
InputManager::CopyConfiguration(dsi, ssi, true, true, true, IsEditingGameSettings(dsi)); InputManager::CopyConfiguration(dsi, ssi, true, true, true, IsEditingGameSettings(dsi));
SetSettingsChanged(dsi); SetSettingsChanged(dsi);
ShowToast(std::string(), fmt::format(FSUI_FSTR("Input profile '{}' loaded."), title)); ShowToast(std::string(), fmt::format(FSUI_FSTR("Controller preset '{}' loaded."), title));
CloseChoiceDialog(); CloseChoiceDialog();
}); });
} }
@ -3902,15 +3902,15 @@ void FullscreenUI::DoSaveInputProfile(const std::string& name)
SettingsInterface* ssi = GetEditingSettingsInterface(); SettingsInterface* ssi = GetEditingSettingsInterface();
InputManager::CopyConfiguration(&dsi, *ssi, true, true, true, IsEditingGameSettings(ssi)); InputManager::CopyConfiguration(&dsi, *ssi, true, true, true, IsEditingGameSettings(ssi));
if (dsi.Save()) if (dsi.Save())
ShowToast(std::string(), fmt::format(FSUI_FSTR("Input profile '{}' saved."), name)); ShowToast(std::string(), fmt::format(FSUI_FSTR("Controller preset '{}' saved."), name));
else else
ShowToast(std::string(), fmt::format(FSUI_FSTR("Failed to save input profile '{}'."), name)); ShowToast(std::string(), fmt::format(FSUI_FSTR("Failed to save controller preset '{}'."), name));
} }
void FullscreenUI::DoSaveNewInputProfile() void FullscreenUI::DoSaveNewInputProfile()
{ {
OpenInputStringDialog(FSUI_ICONSTR(ICON_FA_SAVE, "Save Profile"), OpenInputStringDialog(FSUI_ICONSTR(ICON_FA_SAVE, "Save Controller Preset"),
FSUI_STR("Enter the name of the input profile you wish to create."), std::string(), FSUI_STR("Enter the name of the controller preset you wish to create."), std::string(),
FSUI_ICONSTR(ICON_FA_FOLDER_PLUS, "Create"), [](std::string title) { FSUI_ICONSTR(ICON_FA_FOLDER_PLUS, "Create"), [](std::string title) {
if (!title.empty()) if (!title.empty())
DoSaveInputProfile(title); DoSaveInputProfile(title);
@ -3931,7 +3931,7 @@ void FullscreenUI::DoSaveInputProfile()
coptions.emplace_back(FSUI_STR("Create New..."), false); coptions.emplace_back(FSUI_STR("Create New..."), false);
for (std::string& name : profiles) for (std::string& name : profiles)
coptions.emplace_back(std::move(name), false); coptions.emplace_back(std::move(name), false);
OpenChoiceDialog(FSUI_ICONSTR(ICON_FA_SAVE, "Save Profile"), false, std::move(coptions), OpenChoiceDialog(FSUI_ICONSTR(ICON_FA_SAVE, "Save Preset"), false, std::move(coptions),
[](s32 index, const std::string& title, bool checked) { [](s32 index, const std::string& title, bool checked) {
if (index < 0) if (index < 0)
return; return;
@ -4004,13 +4004,13 @@ void FullscreenUI::DrawControllerSettingsPage()
} }
} }
if (MenuButton(FSUI_ICONSTR(ICON_FA_FOLDER_OPEN, "Load Profile"), if (MenuButton(FSUI_ICONSTR(ICON_FA_FOLDER_OPEN, "Load Preset"),
FSUI_CSTR("Replaces these settings with a previously saved input profile."))) FSUI_CSTR("Replaces these settings with a previously saved controller preset.")))
{ {
DoLoadInputProfile(); DoLoadInputProfile();
} }
if (MenuButton(FSUI_ICONSTR(ICON_FA_SAVE, "Save Profile"), if (MenuButton(FSUI_ICONSTR(ICON_FA_SAVE, "Save Preset"),
FSUI_CSTR("Stores the current settings to an input profile."))) FSUI_CSTR("Stores the current settings to a controller preset.")))
{ {
DoSaveInputProfile(); DoSaveInputProfile();
} }
@ -8214,6 +8214,8 @@ TRANSLATE_NOOP("FullscreenUI", "Controller Port {} Macros");
TRANSLATE_NOOP("FullscreenUI", "Controller Port {} Settings"); TRANSLATE_NOOP("FullscreenUI", "Controller Port {} Settings");
TRANSLATE_NOOP("FullscreenUI", "Controller Settings"); TRANSLATE_NOOP("FullscreenUI", "Controller Settings");
TRANSLATE_NOOP("FullscreenUI", "Controller Type"); TRANSLATE_NOOP("FullscreenUI", "Controller Type");
TRANSLATE_NOOP("FullscreenUI", "Controller preset '{}' loaded.");
TRANSLATE_NOOP("FullscreenUI", "Controller preset '{}' saved.");
TRANSLATE_NOOP("FullscreenUI", "Controller settings reset to default."); TRANSLATE_NOOP("FullscreenUI", "Controller settings reset to default.");
TRANSLATE_NOOP("FullscreenUI", "Controls"); TRANSLATE_NOOP("FullscreenUI", "Controls");
TRANSLATE_NOOP("FullscreenUI", "Controls the volume of the audio played on the host when fast forwarding."); TRANSLATE_NOOP("FullscreenUI", "Controls the volume of the audio played on the host when fast forwarding.");
@ -8327,7 +8329,7 @@ TRANSLATE_NOOP("FullscreenUI", "Enables the replacement of background textures i
TRANSLATE_NOOP("FullscreenUI", "Encore Mode"); TRANSLATE_NOOP("FullscreenUI", "Encore Mode");
TRANSLATE_NOOP("FullscreenUI", "Ensures every frame generated is displayed for optimal pacing. Enable for variable refresh displays, such as GSync/FreeSync. Disable if you are having speed or sound issues."); TRANSLATE_NOOP("FullscreenUI", "Ensures every frame generated is displayed for optimal pacing. Enable for variable refresh displays, such as GSync/FreeSync. Disable if you are having speed or sound issues.");
TRANSLATE_NOOP("FullscreenUI", "Enter Value"); TRANSLATE_NOOP("FullscreenUI", "Enter Value");
TRANSLATE_NOOP("FullscreenUI", "Enter the name of the input profile you wish to create."); TRANSLATE_NOOP("FullscreenUI", "Enter the name of the controller preset you wish to create.");
TRANSLATE_NOOP("FullscreenUI", "Error"); TRANSLATE_NOOP("FullscreenUI", "Error");
TRANSLATE_NOOP("FullscreenUI", "Execution Mode"); TRANSLATE_NOOP("FullscreenUI", "Execution Mode");
TRANSLATE_NOOP("FullscreenUI", "Exit"); TRANSLATE_NOOP("FullscreenUI", "Exit");
@ -8341,7 +8343,7 @@ TRANSLATE_NOOP("FullscreenUI", "Failed to delete save state.");
TRANSLATE_NOOP("FullscreenUI", "Failed to delete {}."); TRANSLATE_NOOP("FullscreenUI", "Failed to delete {}.");
TRANSLATE_NOOP("FullscreenUI", "Failed to load '{}'."); TRANSLATE_NOOP("FullscreenUI", "Failed to load '{}'.");
TRANSLATE_NOOP("FullscreenUI", "Failed to load shader {}. It may be invalid.\nError was:"); TRANSLATE_NOOP("FullscreenUI", "Failed to load shader {}. It may be invalid.\nError was:");
TRANSLATE_NOOP("FullscreenUI", "Failed to save input profile '{}'."); TRANSLATE_NOOP("FullscreenUI", "Failed to save controller preset '{}'.");
TRANSLATE_NOOP("FullscreenUI", "Fast Boot"); TRANSLATE_NOOP("FullscreenUI", "Fast Boot");
TRANSLATE_NOOP("FullscreenUI", "Fast Forward Boot"); TRANSLATE_NOOP("FullscreenUI", "Fast Forward Boot");
TRANSLATE_NOOP("FullscreenUI", "Fast Forward Speed"); TRANSLATE_NOOP("FullscreenUI", "Fast Forward Speed");
@ -8399,8 +8401,6 @@ TRANSLATE_NOOP("FullscreenUI", "Increases the field of view from 4:3 to the chos
TRANSLATE_NOOP("FullscreenUI", "Increases the precision of polygon culling, reducing the number of holes in geometry."); TRANSLATE_NOOP("FullscreenUI", "Increases the precision of polygon culling, reducing the number of holes in geometry.");
TRANSLATE_NOOP("FullscreenUI", "Inhibit Screensaver"); TRANSLATE_NOOP("FullscreenUI", "Inhibit Screensaver");
TRANSLATE_NOOP("FullscreenUI", "Input Sources"); TRANSLATE_NOOP("FullscreenUI", "Input Sources");
TRANSLATE_NOOP("FullscreenUI", "Input profile '{}' loaded.");
TRANSLATE_NOOP("FullscreenUI", "Input profile '{}' saved.");
TRANSLATE_NOOP("FullscreenUI", "Integration"); TRANSLATE_NOOP("FullscreenUI", "Integration");
TRANSLATE_NOOP("FullscreenUI", "Interface Settings"); TRANSLATE_NOOP("FullscreenUI", "Interface Settings");
TRANSLATE_NOOP("FullscreenUI", "Internal Resolution"); TRANSLATE_NOOP("FullscreenUI", "Internal Resolution");
@ -8420,7 +8420,7 @@ TRANSLATE_NOOP("FullscreenUI", "List Settings");
TRANSLATE_NOOP("FullscreenUI", "Load Database Cheats"); TRANSLATE_NOOP("FullscreenUI", "Load Database Cheats");
TRANSLATE_NOOP("FullscreenUI", "Load Devices From Save States"); TRANSLATE_NOOP("FullscreenUI", "Load Devices From Save States");
TRANSLATE_NOOP("FullscreenUI", "Load Global State"); TRANSLATE_NOOP("FullscreenUI", "Load Global State");
TRANSLATE_NOOP("FullscreenUI", "Load Profile"); TRANSLATE_NOOP("FullscreenUI", "Load Preset");
TRANSLATE_NOOP("FullscreenUI", "Load Resume State"); TRANSLATE_NOOP("FullscreenUI", "Load Resume State");
TRANSLATE_NOOP("FullscreenUI", "Load State"); TRANSLATE_NOOP("FullscreenUI", "Load State");
TRANSLATE_NOOP("FullscreenUI", "Loads all replacement texture to RAM, reducing stuttering at runtime."); TRANSLATE_NOOP("FullscreenUI", "Loads all replacement texture to RAM, reducing stuttering at runtime.");
@ -8546,7 +8546,7 @@ TRANSLATE_NOOP("FullscreenUI", "Removed stage {} ({}).");
TRANSLATE_NOOP("FullscreenUI", "Removes this shader from the chain."); TRANSLATE_NOOP("FullscreenUI", "Removes this shader from the chain.");
TRANSLATE_NOOP("FullscreenUI", "Renames existing save states when saving to a backup file."); TRANSLATE_NOOP("FullscreenUI", "Renames existing save states when saving to a backup file.");
TRANSLATE_NOOP("FullscreenUI", "Rendering"); TRANSLATE_NOOP("FullscreenUI", "Rendering");
TRANSLATE_NOOP("FullscreenUI", "Replaces these settings with a previously saved input profile."); TRANSLATE_NOOP("FullscreenUI", "Replaces these settings with a previously saved controller preset.");
TRANSLATE_NOOP("FullscreenUI", "Rescan All Games"); TRANSLATE_NOOP("FullscreenUI", "Rescan All Games");
TRANSLATE_NOOP("FullscreenUI", "Reset Memory Card Directory"); TRANSLATE_NOOP("FullscreenUI", "Reset Memory Card Directory");
TRANSLATE_NOOP("FullscreenUI", "Reset Play Time"); TRANSLATE_NOOP("FullscreenUI", "Reset Play Time");
@ -8577,7 +8577,8 @@ TRANSLATE_NOOP("FullscreenUI", "Runs the software renderer in parallel for VRAM
TRANSLATE_NOOP("FullscreenUI", "SDL DualSense Player LED"); TRANSLATE_NOOP("FullscreenUI", "SDL DualSense Player LED");
TRANSLATE_NOOP("FullscreenUI", "SDL DualShock 4 / DualSense Enhanced Mode"); TRANSLATE_NOOP("FullscreenUI", "SDL DualShock 4 / DualSense Enhanced Mode");
TRANSLATE_NOOP("FullscreenUI", "Safe Mode"); TRANSLATE_NOOP("FullscreenUI", "Safe Mode");
TRANSLATE_NOOP("FullscreenUI", "Save Profile"); TRANSLATE_NOOP("FullscreenUI", "Save Controller Preset");
TRANSLATE_NOOP("FullscreenUI", "Save Preset");
TRANSLATE_NOOP("FullscreenUI", "Save Screenshot"); TRANSLATE_NOOP("FullscreenUI", "Save Screenshot");
TRANSLATE_NOOP("FullscreenUI", "Save State"); TRANSLATE_NOOP("FullscreenUI", "Save State");
TRANSLATE_NOOP("FullscreenUI", "Save State Compression"); TRANSLATE_NOOP("FullscreenUI", "Save State Compression");
@ -8679,7 +8680,7 @@ TRANSLATE_NOOP("FullscreenUI", "Start Fullscreen");
TRANSLATE_NOOP("FullscreenUI", "Start Game"); TRANSLATE_NOOP("FullscreenUI", "Start Game");
TRANSLATE_NOOP("FullscreenUI", "Start a game from a disc in your PC's DVD drive."); TRANSLATE_NOOP("FullscreenUI", "Start a game from a disc in your PC's DVD drive.");
TRANSLATE_NOOP("FullscreenUI", "Start the console without any disc inserted."); TRANSLATE_NOOP("FullscreenUI", "Start the console without any disc inserted.");
TRANSLATE_NOOP("FullscreenUI", "Stores the current settings to an input profile."); TRANSLATE_NOOP("FullscreenUI", "Stores the current settings to a controller preset.");
TRANSLATE_NOOP("FullscreenUI", "Stretch Display Vertically"); TRANSLATE_NOOP("FullscreenUI", "Stretch Display Vertically");
TRANSLATE_NOOP("FullscreenUI", "Stretch Mode"); TRANSLATE_NOOP("FullscreenUI", "Stretch Mode");
TRANSLATE_NOOP("FullscreenUI", "Stretches the display to match the aspect ratio by multiplying vertically instead of horizontally."); TRANSLATE_NOOP("FullscreenUI", "Stretches the display to match the aspect ratio by multiplying vertically instead of horizontally.");

View File

@ -71,7 +71,7 @@ ControllerSettingsWindow::ControllerSettingsWindow(SettingsInterface* game_sif /
if (edit_profiles) if (edit_profiles)
{ {
setWindowTitle(tr("DuckStation Controller Profiles")); setWindowTitle(tr("DuckStation Controller Presets"));
refreshProfileList(); refreshProfileList();
connect(m_ui.currentProfile, &QComboBox::currentIndexChanged, this, connect(m_ui.currentProfile, &QComboBox::currentIndexChanged, this,
@ -172,7 +172,7 @@ void ControllerSettingsWindow::onCurrentProfileChanged(int index)
void ControllerSettingsWindow::onNewProfileClicked() void ControllerSettingsWindow::onNewProfileClicked()
{ {
const std::string profile_name = const std::string profile_name =
QInputDialog::getText(this, tr("Create Input Profile"), tr("Enter the name for the new input profile:")) QInputDialog::getText(this, tr("Create Controller Preset"), tr("Enter the name for the new controller preset:"))
.toStdString(); .toStdString();
if (profile_name.empty()) if (profile_name.empty())
return; return;
@ -181,13 +181,13 @@ void ControllerSettingsWindow::onNewProfileClicked()
if (FileSystem::FileExists(profile_path.c_str())) if (FileSystem::FileExists(profile_path.c_str()))
{ {
QMessageBox::critical(this, tr("Error"), QMessageBox::critical(this, tr("Error"),
tr("A profile with the name '%1' already exists.").arg(QString::fromStdString(profile_name))); tr("A preset with the name '%1' already exists.").arg(QString::fromStdString(profile_name)));
return; return;
} }
const int res = QMessageBox::question(this, tr("Create Input Profile"), const int res = QMessageBox::question(this, tr("Create Controller Preset"),
tr("Do you want to copy all bindings from the currently-selected profile to " tr("Do you want to copy all bindings from the currently-selected preset to "
"the new profile? Selecting No will create a completely empty profile."), "the new preset? Selecting No will create a completely empty preset."),
QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel); QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
if (res == QMessageBox::Cancel) if (res == QMessageBox::Cancel)
return; return;
@ -199,8 +199,8 @@ void ControllerSettingsWindow::onNewProfileClicked()
if (!m_editing_settings_interface) if (!m_editing_settings_interface)
{ {
const int hkres = QMessageBox::question( const int hkres = QMessageBox::question(
this, tr("Create Input Profile"), this, tr("Create Controller Preset"),
tr("Do you want to copy the current hotkey bindings from global settings to the new input profile?"), tr("Do you want to copy the current hotkey bindings from global settings to the new controller preset?"),
QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel); QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
if (hkres == QMessageBox::Cancel) if (hkres == QMessageBox::Cancel)
return; return;
@ -235,7 +235,7 @@ void ControllerSettingsWindow::onNewProfileClicked()
if (!temp_si.Save()) if (!temp_si.Save())
{ {
QMessageBox::critical(this, tr("Error"), QMessageBox::critical(this, tr("Error"),
tr("Failed to save the new profile to '%1'.").arg(QString::fromStdString(temp_si.GetPath()))); tr("Failed to save the new preset to '%1'.").arg(QString::fromStdString(temp_si.GetPath())));
return; return;
} }
@ -245,9 +245,9 @@ void ControllerSettingsWindow::onNewProfileClicked()
void ControllerSettingsWindow::onApplyProfileClicked() void ControllerSettingsWindow::onApplyProfileClicked()
{ {
if (QMessageBox::question(this, tr("Load Input Profile"), if (QMessageBox::question(this, tr("Load Controller Preset"),
tr("Are you sure you want to load the input profile named '%1'?\n\n" tr("Are you sure you want to apply the controller preset named '%1'?\n\n"
"All current global bindings will be removed, and the profile bindings loaded.\n\n" "All current global bindings will be removed, and the preset bindings loaded.\n\n"
"You cannot undo this action.") "You cannot undo this action.")
.arg(m_profile_name)) != QMessageBox::Yes) .arg(m_profile_name)) != QMessageBox::Yes)
{ {
@ -270,8 +270,8 @@ void ControllerSettingsWindow::onApplyProfileClicked()
void ControllerSettingsWindow::onDeleteProfileClicked() void ControllerSettingsWindow::onDeleteProfileClicked()
{ {
if (QMessageBox::question(this, tr("Delete Input Preset"), if (QMessageBox::question(this, tr("Delete Controller Preset"),
tr("Are you sure you want to delete the input preset named '%1'?\n\n" tr("Are you sure you want to delete the controller preset named '%1'?\n\n"
"You cannot undo this action.") "You cannot undo this action.")
.arg(m_profile_name)) != QMessageBox::Yes) .arg(m_profile_name)) != QMessageBox::Yes)
{ {
@ -323,7 +323,7 @@ void ControllerSettingsWindow::onCopyGlobalSettingsClicked()
QMessageBox::information(QtUtils::GetRootWidget(this), tr("DuckStation Controller Settings"), QMessageBox::information(QtUtils::GetRootWidget(this), tr("DuckStation Controller Settings"),
isEditingGameSettings() ? tr("Per-game controller configuration reset to global settings.") : isEditingGameSettings() ? tr("Per-game controller configuration reset to global settings.") :
tr("Controller profile reset to global settings.")); tr("Controller preset reset to global settings."));
} }
bool ControllerSettingsWindow::getBoolValue(const char* section, const char* key, bool default_value) const bool ControllerSettingsWindow::getBoolValue(const char* section, const char* key, bool default_value) const
@ -583,7 +583,7 @@ void ControllerSettingsWindow::switchProfile(const std::string_view name)
std::string path = System::GetInputProfilePath(name); std::string path = System::GetInputProfilePath(name);
if (!FileSystem::FileExists(path.c_str())) if (!FileSystem::FileExists(path.c_str()))
{ {
QMessageBox::critical(this, tr("Error"), tr("The input profile named '%1' cannot be found.").arg(name_qstr)); QMessageBox::critical(this, tr("Error"), tr("The controller preset named '%1' cannot be found.").arg(name_qstr));
return; return;
} }

View File

@ -72,7 +72,7 @@
<item> <item>
<widget class="QLabel" name="editProfileLabel"> <widget class="QLabel" name="editProfileLabel">
<property name="text"> <property name="text">
<string>Editing Profile:</string> <string>Editing Preset:</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -89,7 +89,7 @@
<item> <item>
<widget class="QPushButton" name="newProfile"> <widget class="QPushButton" name="newProfile">
<property name="text"> <property name="text">
<string>New Profile</string> <string>New Preset</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset theme="add-line"/> <iconset theme="add-line"/>
@ -99,7 +99,7 @@
<item> <item>
<widget class="QPushButton" name="applyProfile"> <widget class="QPushButton" name="applyProfile">
<property name="text"> <property name="text">
<string>Apply Profile</string> <string>Apply Preset</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset theme="folder-open-line"/> <iconset theme="folder-open-line"/>
@ -109,7 +109,7 @@
<item> <item>
<widget class="QPushButton" name="deleteProfile"> <widget class="QPushButton" name="deleteProfile">
<property name="text"> <property name="text">
<string>Delete Profile</string> <string>Delete Preset</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset theme="minus-line"/> <iconset theme="minus-line"/>

View File

@ -54,7 +54,7 @@
<item row="14" column="0"> <item row="14" column="0">
<widget class="QLabel" name="label_9"> <widget class="QLabel" name="label_9">
<property name="text"> <property name="text">
<string>Input Profile:</string> <string>Controller Preset:</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -991,7 +991,7 @@
<iconset theme="controllers-line"/> <iconset theme="controllers-line"/>
</property> </property>
<property name="text"> <property name="text">
<string>Controller Profiles</string> <string>Controller Presets</string>
</property> </property>
</action> </action>
</widget> </widget>