Qt: Fix missing translation of default update channel

pull/3767/head
Stenzek 7 days ago
parent 3d544d4ed5
commit 7d4b97d199
No known key found for this signature in database

@ -257,11 +257,22 @@ std::vector<std::pair<QString, QString>> AutoUpdaterDialog::getChannelList()
return ret;
}
std::string AutoUpdaterDialog::getDefaultTag()
const char* AutoUpdaterDialog::getDefaultTag()
{
return UPDATER_RELEASE_CHANNEL;
}
QString AutoUpdaterDialog::getTagDisplayName(const std::string_view tag)
{
for (const auto& [name, desc] : s_update_channels)
{
if (tag == name)
return tr(desc);
}
return QString();
}
std::string AutoUpdaterDialog::getCurrentUpdateTag()
{
return Core::GetBaseStringSettingValue("AutoUpdater", "UpdateTag", UPDATER_RELEASE_CHANNEL);

@ -34,7 +34,8 @@ public:
// (channel name, channel display name)
static std::vector<std::pair<QString, QString>> getChannelList();
static std::string getDefaultTag();
static const char* getDefaultTag();
static QString getTagDisplayName(const std::string_view tag);
static std::string getCurrentUpdateTag();
static void cleanupAfterUpdate();
static void warnAboutUnofficialBuild();

@ -231,7 +231,7 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* dialog, QWidget
tr("Selects the theme for the application."));
dialog->registerWidgetHelp(m_ui.autoUpdateTag, tr("Update Channel"),
QString::fromStdString(AutoUpdaterDialog::getDefaultTag()),
AutoUpdaterDialog::getTagDisplayName(AutoUpdaterDialog::getDefaultTag()),
tr("Selects the channel that will be checked for updates to the application. The "
"<strong>preview</strong> channel contains the latest changes, and may be unstable. "
"The <strong>latest</strong> channel tracks the latest release."));

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save