mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 05:38:49 +00:00
"Common Config" in keyboard/pad settings is translated now (#3448)
This commit is contained in:
@@ -178,7 +178,7 @@ void ControlSettings::SaveControllerConfig(bool CloseOnSave) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string config_id;
|
std::string config_id;
|
||||||
config_id = (ui->ProfileComboBox->currentText() == "Common Config")
|
config_id = (ui->ProfileComboBox->currentText() == tr("Common Config"))
|
||||||
? "default"
|
? "default"
|
||||||
: ui->ProfileComboBox->currentText().toStdString();
|
: ui->ProfileComboBox->currentText().toStdString();
|
||||||
const auto config_file = Config::GetFoolproofKbmConfigFile(config_id);
|
const auto config_file = Config::GetFoolproofKbmConfigFile(config_id);
|
||||||
@@ -397,17 +397,17 @@ void ControlSettings::SetDefault() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ControlSettings::AddBoxItems() {
|
void ControlSettings::AddBoxItems() {
|
||||||
ui->ProfileComboBox->addItem("Common Config");
|
ui->ProfileComboBox->addItem(tr("Common Config"));
|
||||||
for (int i = 0; i < m_game_info->m_games.size(); i++) {
|
for (int i = 0; i < m_game_info->m_games.size(); i++) {
|
||||||
ui->ProfileComboBox->addItem(QString::fromStdString(m_game_info->m_games[i].serial));
|
ui->ProfileComboBox->addItem(QString::fromStdString(m_game_info->m_games[i].serial));
|
||||||
}
|
}
|
||||||
ui->ProfileComboBox->setCurrentText("Common Config");
|
ui->ProfileComboBox->setCurrentText(tr("Common Config"));
|
||||||
ui->TitleLabel->setText("Common Config");
|
ui->TitleLabel->setText(tr("Common Config"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ControlSettings::SetUIValuestoMappings() {
|
void ControlSettings::SetUIValuestoMappings() {
|
||||||
std::string config_id;
|
std::string config_id;
|
||||||
config_id = (ui->ProfileComboBox->currentText() == "Common Config")
|
config_id = (ui->ProfileComboBox->currentText() == tr("Common Config"))
|
||||||
? "default"
|
? "default"
|
||||||
: ui->ProfileComboBox->currentText().toStdString();
|
: ui->ProfileComboBox->currentText().toStdString();
|
||||||
|
|
||||||
@@ -641,8 +641,8 @@ void ControlSettings::SetUIValuestoMappings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ControlSettings::GetGameTitle() {
|
void ControlSettings::GetGameTitle() {
|
||||||
if (ui->ProfileComboBox->currentText() == "Common Config") {
|
if (ui->ProfileComboBox->currentText() == tr("Common Config")) {
|
||||||
ui->TitleLabel->setText("Common Config");
|
ui->TitleLabel->setText(tr("Common Config"));
|
||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < m_game_info->m_games.size(); i++) {
|
for (int i = 0; i < m_game_info->m_games.size(); i++) {
|
||||||
if (m_game_info->m_games[i].serial ==
|
if (m_game_info->m_games[i].serial ==
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ KBMSettings::KBMSettings(std::shared_ptr<GameInfoClass> game_info_get, bool isGa
|
|||||||
ui->MouseJoystickBox->addItem("right");
|
ui->MouseJoystickBox->addItem("right");
|
||||||
ui->MouseJoystickBox->addItem("left");
|
ui->MouseJoystickBox->addItem("left");
|
||||||
|
|
||||||
ui->ProfileComboBox->addItem("Common Config");
|
ui->ProfileComboBox->addItem(tr("Common Config"));
|
||||||
for (int i = 0; i < m_game_info->m_games.size(); i++) {
|
for (int i = 0; i < m_game_info->m_games.size(); i++) {
|
||||||
ui->ProfileComboBox->addItem(QString::fromStdString(m_game_info->m_games[i].serial));
|
ui->ProfileComboBox->addItem(QString::fromStdString(m_game_info->m_games[i].serial));
|
||||||
}
|
}
|
||||||
@@ -69,8 +69,8 @@ KBMSettings::KBMSettings(std::shared_ptr<GameInfoClass> game_info_get, bool isGa
|
|||||||
SetUIValuestoMappings("default");
|
SetUIValuestoMappings("default");
|
||||||
installEventFilter(this);
|
installEventFilter(this);
|
||||||
|
|
||||||
ui->ProfileComboBox->setCurrentText("Common Config");
|
ui->ProfileComboBox->setCurrentText(tr("Common Config"));
|
||||||
ui->TitleLabel->setText("Common Config");
|
ui->TitleLabel->setText(tr("Common Config"));
|
||||||
config_id = "default";
|
config_id = "default";
|
||||||
|
|
||||||
connect(ui->buttonBox, &QDialogButtonBox::clicked, this, [this](QAbstractButton* button) {
|
connect(ui->buttonBox, &QDialogButtonBox::clicked, this, [this](QAbstractButton* button) {
|
||||||
@@ -113,7 +113,7 @@ KBMSettings::KBMSettings(std::shared_ptr<GameInfoClass> game_info_get, bool isGa
|
|||||||
});
|
});
|
||||||
|
|
||||||
connect(ui->CopyCommonButton, &QPushButton::clicked, this, [this] {
|
connect(ui->CopyCommonButton, &QPushButton::clicked, this, [this] {
|
||||||
if (ui->ProfileComboBox->currentText() == "Common Config") {
|
if (ui->ProfileComboBox->currentText() == tr("Common Config")) {
|
||||||
QMessageBox::information(this, tr("Common Config Selected"),
|
QMessageBox::information(this, tr("Common Config Selected"),
|
||||||
// clang-format off
|
// clang-format off
|
||||||
tr("This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config."));
|
tr("This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config."));
|
||||||
@@ -513,8 +513,8 @@ void KBMSettings::SetUIValuestoMappings(std::string config_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void KBMSettings::GetGameTitle() {
|
void KBMSettings::GetGameTitle() {
|
||||||
if (ui->ProfileComboBox->currentText() == "Common Config") {
|
if (ui->ProfileComboBox->currentText() == tr("Common Config")) {
|
||||||
ui->TitleLabel->setText("Common Config");
|
ui->TitleLabel->setText(tr("Common Config"));
|
||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < m_game_info->m_games.size(); i++) {
|
for (int i = 0; i < m_game_info->m_games.size(); i++) {
|
||||||
if (m_game_info->m_games[i].serial ==
|
if (m_game_info->m_games[i].serial ==
|
||||||
@@ -523,7 +523,7 @@ void KBMSettings::GetGameTitle() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
config_id = (ui->ProfileComboBox->currentText() == "Common Config")
|
config_id = (ui->ProfileComboBox->currentText() == tr("Common Config"))
|
||||||
? "default"
|
? "default"
|
||||||
: ui->ProfileComboBox->currentText().toStdString();
|
: ui->ProfileComboBox->currentText().toStdString();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user