Qt: Make Auto (Game Native) aspect ratio string translatable

This commit is contained in:
Albert Liu 2020-12-26 23:35:48 -08:00
parent f181b45760
commit 2a1bf9925a
3 changed files with 5 additions and 5 deletions

View File

@ -655,9 +655,9 @@ const char* Settings::GetDisplayCropModeDisplayName(DisplayCropMode crop_mode)
return s_display_crop_mode_display_names[static_cast<int>(crop_mode)];
}
static std::array<const char*, 13> s_display_aspect_ratio_names = {{"Auto (Game Native)", "4:3", "16:9", "16:10",
"19:9", "21:9", "32:9", "8:7", "5:4", "3:2",
"2:1 (VRAM 1:1)", "1:1", "PAR 1:1"}};
static std::array<const char*, 13> s_display_aspect_ratio_names = {
{TRANSLATABLE("DisplayAspectRatio", "Auto (Game Native)"), "4:3", "16:9", "16:10", "19:9", "21:9", "32:9", "8:7",
"5:4", "3:2", "2:1 (VRAM 1:1)", "1:1", "PAR 1:1"}};
static constexpr std::array<float, 13> s_display_aspect_ratio_values = {
{-1.0f, 4.0f / 3.0f, 16.0f / 9.0f, 16.0f / 10.0f, 19.0f / 9.0f, 64.0f / 27.0f, 32.0f / 9.0f, 8.0f / 7.0f, 5.0f / 4.0f,
3.0f / 2.0f, 2.0f / 1.0f, 1.0f, -1.0f}};

View File

@ -131,7 +131,7 @@ void DisplaySettingsWidget::setupAdditionalUi()
for (u32 i = 0; i < static_cast<u32>(DisplayAspectRatio::Count); i++)
{
m_ui.displayAspectRatio->addItem(
QString::fromUtf8(Settings::GetDisplayAspectRatioName(static_cast<DisplayAspectRatio>(i))));
qApp->translate("DisplayAspectRatio", Settings::GetDisplayAspectRatioName(static_cast<DisplayAspectRatio>(i))));
}
for (u32 i = 0; i < static_cast<u32>(DisplayCropMode::Count); i++)

View File

@ -122,7 +122,7 @@ void GamePropertiesDialog::setupAdditionalUi()
for (u32 i = 0; i < static_cast<u32>(DisplayAspectRatio::Count); i++)
{
m_ui.userAspectRatio->addItem(
QString::fromUtf8(Settings::GetDisplayAspectRatioName(static_cast<DisplayAspectRatio>(i))));
qApp->translate("DisplayAspectRatio", Settings::GetDisplayAspectRatioName(static_cast<DisplayAspectRatio>(i))));
}
m_ui.userCropMode->addItem(tr("(unchanged)"));