UI: Making some strings translatable

Solving the easy cases where strings can be made translatable. See https://github.com/PCSX2/pcsx2/issues/9062 for more information.
This commit is contained in:
IlDucci 2023-09-30 12:58:25 +02:00 committed by Connor McLaughlin
parent 210a936483
commit 5b0bf40508
10 changed files with 25 additions and 25 deletions

View File

@ -1533,7 +1533,7 @@
<item>
<widget class="QLabel" name="label_33">
<property name="text">
<string>Saturation</string>
<string>Saturation:</string>
</property>
</widget>
</item>

View File

@ -301,7 +301,7 @@ void MemoryCardConvertDialog::SetType_8()
void MemoryCardConvertDialog::SetType_16()
{
SetType(MemoryCardType::File, MemoryCardFileType::PS2_16MB, tr("2x larger as a standard Memory Card. May have some compatibility issues."));
SetType(MemoryCardType::File, MemoryCardFileType::PS2_16MB, tr("2x larger than a standard Memory Card. May have some compatibility issues."));
}
void MemoryCardConvertDialog::SetType_32()

View File

@ -319,7 +319,7 @@ void MemoryCardSettingsWidget::listContextMenuRequested(const QPoint& pos)
menu.addSeparator();
}
connect(menu.addAction("Create"), &QAction::triggered, this, &MemoryCardSettingsWidget::createCard);
connect(menu.addAction(tr("Create")), &QAction::triggered, this, &MemoryCardSettingsWidget::createCard);
menu.exec(m_ui.cardList->mapToGlobal(pos));
}

View File

@ -57,7 +57,7 @@ QTableWidgetItem* InputRecordingViewer::createRowItem(std::tuple<bool, u8> butto
void InputRecordingViewer::loadTable()
{
static const auto headers = QStringList({"Left Analog", "Right Analog", "Cross", "Square", "Triangle", "Circle", "L1", "R1", "L2", "R2", "⬇️", "➡️", "⬆️", "⬅️", "L3", "R3", "Select", "Start"});
static const auto headers = QStringList({tr("Left Analog"), tr("Right Analog"), tr("Cross"), tr("Square"), tr("Triangle"), tr("Circle"), tr("L1"), tr("R1"), tr("L2"), tr("R2"), tr("⬇️"), tr("➡️"), tr("⬆️"), tr("⬅️"), tr("L3"), tr("R3"), tr("Select"), tr("Start")});
m_ui.tableWidget->setColumnCount(headers.length());
m_ui.tableWidget->setHorizontalHeaderLabels(headers);

View File

@ -71,25 +71,25 @@ static const SettingInfo s_settings[] = {
{SettingInfo::Type::Float, "Deadzone", TRANSLATE_NOOP("Pad", "Analog Deadzone"),
TRANSLATE_NOOP(
"Pad", "Sets the analog stick deadzone, i.e. the fraction of the stick movement which will be ignored."),
"0.00", "0.00", "1.00", "0.01", "%.0f%%", nullptr, nullptr, 100.0f},
"0.00", "0.00", "1.00", "0.01", TRANSLATE_NOOP("Pad", "%.0f%%"), nullptr, nullptr, 100.0f},
{SettingInfo::Type::Float, "AxisScale", TRANSLATE_NOOP("Pad", "Analog Sensitivity"),
TRANSLATE_NOOP("Pad",
"Sets the analog stick axis scaling factor. A value between 1.30 and 1.40 is recommended when using recent "
"controllers, e.g. DualShock 4, Xbox One Controller."),
"1.33", "0.01", "2.00", "0.01", "%.0f%%", nullptr, nullptr, 100.0f},
"1.33", "0.01", "2.00", "0.01", TRANSLATE_NOOP("Pad", "%.0f%%"), nullptr, nullptr, 100.0f},
{SettingInfo::Type::Float, "LargeMotorScale", TRANSLATE_NOOP("Pad", "Large Motor Vibration Scale"),
TRANSLATE_NOOP("Pad", "Increases or decreases the intensity of low frequency vibration sent by the game."),
"1.00", "0.00", "2.00", "0.01", "%.0f%%", nullptr, nullptr, 100.0f},
"1.00", "0.00", "2.00", "0.01", TRANSLATE_NOOP("Pad", "%.0f%%"), nullptr, nullptr, 100.0f},
{SettingInfo::Type::Float, "SmallMotorScale", TRANSLATE_NOOP("Pad", "Small Motor Vibration Scale"),
TRANSLATE_NOOP("Pad", "Increases or decreases the intensity of high frequency vibration sent by the game."),
"1.00", "0.00", "2.00", "0.01", "%.0f%%", nullptr, nullptr, 100.0f},
"1.00", "0.00", "2.00", "0.01", TRANSLATE_NOOP("Pad", "%.0f%%"), nullptr, nullptr, 100.0f},
{SettingInfo::Type::Float, "ButtonDeadzone", TRANSLATE_NOOP("Pad", "Button/Trigger Deadzone"),
TRANSLATE_NOOP("Pad", "Sets the deadzone for activating buttons/triggers, i.e. the fraction of the trigger "
"which will be ignored."),
"0.00", "0.00", "1.00", "0.01", "%.0f%%", nullptr, nullptr, 100.0f},
"0.00", "0.00", "1.00", "0.01", TRANSLATE_NOOP("Pad", "%.0f%%"), nullptr, nullptr, 100.0f},
{SettingInfo::Type::Float, "PressureModifier", TRANSLATE_NOOP("Pad", "Modifier Pressure"),
TRANSLATE_NOOP("Pad", "Sets the pressure when the modifier button is held."), "0.50", "0.01", "1.00", "0.01",
"%.0f%%", nullptr, nullptr, 100.0f},
TRANSLATE_NOOP("Pad", "%.0f%%"), nullptr, nullptr, 100.0f},
};
const Pad::ControllerInfo PadDualshock2::ControllerInfo = {Pad::ControllerType::DualShock2, "DualShock2",

View File

@ -619,7 +619,7 @@ namespace usb_lightgun
"will disable the system cursor."),
""},
{SettingInfo::Type::Float, "cursor_scale", TRANSLATE_NOOP("USB", "Cursor Scale"),
TRANSLATE_NOOP("USB", "Scales the crosshair image set above."), "1", "0.01", "10", "0.01", "%.0f%%",
TRANSLATE_NOOP("USB", "Scales the crosshair image set above."), "1", "0.01", "10", "0.01", TRANSLATE_NOOP("USB", "%.0f%%"),
nullptr, nullptr, 100.0f},
{SettingInfo::Type::String, "cursor_color", TRANSLATE_NOOP("USB", "Cursor Color"),
TRANSLATE_NOOP("USB", "Applies a color to the chosen crosshair images, can be used for multiple "
@ -631,21 +631,21 @@ namespace usb_lightgun
"false"},
{SettingInfo::Type::Float, "scale_x", TRANSLATE_NOOP("USB", "X Scale (Sensitivity)"),
TRANSLATE_NOOP("USB", "Scales the position to simulate CRT curvature."), "100", "0", "200", "0.1",
"%.2f%%", nullptr, nullptr, 1.0f},
TRANSLATE_NOOP("USB", "%.2f%%"), nullptr, nullptr, 1.0f},
{SettingInfo::Type::Float, "scale_y", TRANSLATE_NOOP("USB", "Y Scale (Sensitivity)"),
TRANSLATE_NOOP("USB", "Scales the position to simulate CRT curvature."), "100", "0", "200", "0.1",
"%.2f%%", nullptr, nullptr, 1.0f},
TRANSLATE_NOOP("USB", "%.2f%%"), nullptr, nullptr, 1.0f},
{SettingInfo::Type::Float, "center_x", TRANSLATE_NOOP("USB", "Center X"),
TRANSLATE_NOOP("USB", "Sets the horizontal center position of the simulated screen."), "320", "0",
"1024", "1", "%.0fpx", nullptr, nullptr, 1.0f},
"1024", "1", TRANSLATE_NOOP("USB", "%.0fpx"), nullptr, nullptr, 1.0f},
{SettingInfo::Type::Float, "center_y", TRANSLATE_NOOP("USB", "Center Y"),
TRANSLATE_NOOP("USB", "Sets the vertical center position of the simulated screen."), "120", "0", "1024",
"1", "%.0fpx", nullptr, nullptr, 1.0f},
"1", TRANSLATE_NOOP("USB", "%.0fpx"), nullptr, nullptr, 1.0f},
{SettingInfo::Type::Integer, "screen_width", TRANSLATE_NOOP("USB", "Screen Width"),
TRANSLATE_NOOP("USB", "Sets the width of the simulated screen."), "640", "1", "1024", "1", "%dpx",
TRANSLATE_NOOP("USB", "Sets the width of the simulated screen."), "640", "1", "1024", "1", TRANSLATE_NOOP("USB", "%dpx"),
nullptr, nullptr, 1.0f},
{SettingInfo::Type::Integer, "screen_height", TRANSLATE_NOOP("USB", "Screen Height"),
TRANSLATE_NOOP("USB", "Sets the height of the simulated screen."), "240", "1", "1024", "1", "%dpx",
TRANSLATE_NOOP("USB", "Sets the height of the simulated screen."), "240", "1", "1024", "1", TRANSLATE_NOOP("USB", "%dpx"),
nullptr, nullptr, 1.0f},
};
return info;

View File

@ -1005,10 +1005,10 @@ namespace usb_mic
nullptr, &AudioDevice::GetOutputDeviceList},
{SettingInfo::Type::Integer, "input_latency", TRANSLATE_NOOP("USB", "Input Latency"),
TRANSLATE_NOOP("USB", "Specifies the latency to the host input device."),
AudioDevice::DEFAULT_LATENCY_STR, "1", "1000", "1", "%dms", nullptr, nullptr, 1.0f},
AudioDevice::DEFAULT_LATENCY_STR, "1", "1000", "1", TRANSLATE_NOOP("USB", "%dms"), nullptr, nullptr, 1.0f},
{SettingInfo::Type::Integer, "output_latency", TRANSLATE_NOOP("USB", "Output Latency"),
TRANSLATE_NOOP("USB", "Specifies the latency to the host output device."),
AudioDevice::DEFAULT_LATENCY_STR, "1", "1000", "1", "%dms", nullptr, nullptr, 1.0f},
AudioDevice::DEFAULT_LATENCY_STR, "1", "1000", "1", TRANSLATE_NOOP("USB", "%dms"), nullptr, nullptr, 1.0f},
};
return info;
}

View File

@ -859,7 +859,7 @@ namespace usb_mic
nullptr, nullptr, &AudioDevice::GetInputDeviceList},
{SettingInfo::Type::Integer, "input_latency", TRANSLATE_NOOP("USB", "Input Latency"),
TRANSLATE_NOOP("USB", "Specifies the latency to the host input device."),
AudioDevice::DEFAULT_LATENCY_STR, "1", "1000", "1", "%dms", nullptr, nullptr, 1.0f},
AudioDevice::DEFAULT_LATENCY_STR, "1", "1000", "1", TRANSLATE_NOOP("USB", "%dms"), nullptr, nullptr, 1.0f},
};
return info;
}
@ -882,7 +882,7 @@ namespace usb_mic
nullptr, &AudioDevice::GetInputDeviceList},
{SettingInfo::Type::Integer, "input_latency", TRANSLATE_NOOP("USB", "Input Latency"),
TRANSLATE_NOOP("USB", "Specifies the latency to the host input device."),
AudioDevice::DEFAULT_LATENCY_STR, "1", "1000", "1", "%dms", nullptr, nullptr, 1.0f},
AudioDevice::DEFAULT_LATENCY_STR, "1", "1000", "1", TRANSLATE_NOOP("USB", "%dms"), nullptr, nullptr, 1.0f},
};
return info;
}

View File

@ -170,14 +170,14 @@ namespace usb_pad
{
if (wt <= WT_GT_FORCE)
{
static constexpr const char* SteeringCurveExponentOptions[] = {"Off", "Low", "Medium", "High", nullptr};
static constexpr const char* SteeringCurveExponentOptions[] = {TRANSLATE_NOOP("USB", "Off"), TRANSLATE_NOOP("USB", "Low"), TRANSLATE_NOOP("USB", "Medium"), TRANSLATE_NOOP("USB", "High"), nullptr};
static constexpr const SettingInfo info[] = {
{SettingInfo::Type::Integer, "SteeringSmoothing", TRANSLATE_NOOP("USB", "Steering Smoothing"),
TRANSLATE_NOOP("USB", "Smooths out changes in steering to the specified percentage per poll. Needed for using keyboards."),
"0", "0", "100", "1", "%d%%", nullptr, nullptr, 1.0f},
"0", "0", "100", "1", TRANSLATE_NOOP("USB", "%d%%"), nullptr, nullptr, 1.0f},
{SettingInfo::Type::Integer, "SteeringDeadzone", TRANSLATE_NOOP("USB", "Steering Deadzone"),
TRANSLATE_NOOP("USB", "Steering axis deadzone for pads or non self centering wheels."),
"0", "0", "100", "1", "%d%%", nullptr, nullptr, 1.0f},
"0", "0", "100", "1", TRANSLATE_NOOP("USB", "%d%%"), nullptr, nullptr, 1.0f},
{SettingInfo::Type::StringList, "SteeringCurveExponent", TRANSLATE_NOOP("USB", "Steering Damping"),
TRANSLATE_NOOP("USB", "Applies power curve filter to steering axis values. Dampens small inputs."),
"Off", nullptr, nullptr, nullptr, nullptr, SteeringCurveExponentOptions}

View File

@ -393,7 +393,7 @@ namespace usb_pad
nullptr, &AudioDevice::GetInputDeviceList},
{SettingInfo::Type::Integer, "input_latency", TRANSLATE_NOOP("USB", "Input Latency"),
TRANSLATE_NOOP("USB", "Specifies the latency to the host input device."),
AudioDevice::DEFAULT_LATENCY_STR, "1", "1000", "1", "%dms", nullptr, nullptr, 1.0f},
AudioDevice::DEFAULT_LATENCY_STR, "1", "1000", "1", TRANSLATE_NOOP("USB", "%dms"), nullptr, nullptr, 1.0f},
};
return info;
}