diff --git a/src/duckstation-qt/gamelistwidget.cpp b/src/duckstation-qt/gamelistwidget.cpp index a55de63a1..92571e102 100644 --- a/src/duckstation-qt/gamelistwidget.cpp +++ b/src/duckstation-qt/gamelistwidget.cpp @@ -75,13 +75,13 @@ static constexpr QSize ACHIEVEMENT_PIXMAP_SIZE(16, 16); static constexpr QSize COMPATIBILITY_PIXMAP_SIZE(96, 24); static const char* SUPPORTED_FORMATS_STRING = - QT_TRANSLATE_NOOP(GameListWidget, ".cue (Cue Sheets)\n" - ".iso (Single Track Image)\n" - ".ecm (Error Code Modeling Image)\n" - ".mds (Media Descriptor Sidecar)\n" - ".ccd (CloneCD Image)\n" - ".chd (Compressed Hunks of Data)\n" - ".pbp (PlayStation Portable, Only Decrypted)"); + QT_TRANSLATE_NOOP("GameListWidget", ".cue (Cue Sheets)\n" + ".iso (Single Track Image)\n" + ".ecm (Error Code Modeling Image)\n" + ".mds (Media Descriptor Sidecar)\n" + ".ccd (CloneCD Image)\n" + ".chd (Compressed Hunks of Data)\n" + ".pbp (PlayStation Portable, Only Decrypted)"); static constexpr std::array s_column_names = {{ QT_TRANSLATE_NOOP("GameListModel", "Icon"), @@ -1921,6 +1921,11 @@ GameListWidget::GameListWidget(QWidget* parent, QAction* action_view_list, QActi GameListWidget::~GameListWidget() = default; +QString GameListWidget::getSupportedFormatsString() +{ + return qApp->translate("GameListWidget", SUPPORTED_FORMATS_STRING); +} + bool GameListWidget::isShowingGameList() const { return (m_ui.stack->currentIndex() == VIEW_MODE_LIST); diff --git a/src/duckstation-qt/gamelistwidget.h b/src/duckstation-qt/gamelistwidget.h index d7cb69dd4..9c6e0d997 100644 --- a/src/duckstation-qt/gamelistwidget.h +++ b/src/duckstation-qt/gamelistwidget.h @@ -292,6 +292,9 @@ public: void setShowCoverTitles(bool enabled); void focusSearchWidget(); + // Returns translated supported formats string. Formats are separated by newlines. + static QString getSupportedFormatsString(); + Q_SIGNALS: void refreshProgress(const QString& status, int current, int total); void refreshComplete(); diff --git a/src/duckstation-qt/setupwizarddialog.cpp b/src/duckstation-qt/setupwizarddialog.cpp index f265533de..53d732bb0 100644 --- a/src/duckstation-qt/setupwizarddialog.cpp +++ b/src/duckstation-qt/setupwizarddialog.cpp @@ -177,7 +177,7 @@ void SetupWizardDialog::setupUi() setupLanguagePage(true); setupBIOSPage(); - setupGameListPage(); + setupGameListPage(true); setupControllerPage(true); setupGraphicsPage(true); setupAchievementsPage(true); @@ -210,6 +210,7 @@ void SetupWizardDialog::languageChanged() QtHost::UpdateApplicationLanguage(this); m_ui.retranslateUi(this); setupLanguagePage(false); + setupGameListPage(false); setupControllerPage(false); setupGraphicsPage(false); setupAchievementsPage(false); @@ -240,8 +241,13 @@ void SetupWizardDialog::refreshBiosList() BIOSSettingsWidget::setDropDownValue(m_ui.imagePAL, Core::GetBaseStringSettingValue("BIOS", "PathPAL"), false); } -void SetupWizardDialog::setupGameListPage() +void SetupWizardDialog::setupGameListPage(bool initial) { + m_ui.gameDirectoriesDescription->setText( + m_ui.gameDirectoriesDescription->text().arg(GameListWidget::getSupportedFormatsString().split('\n').join(", "))); + if (!initial) + return; + m_directory_model = new GameListSearchDirectoriesModel(this); m_ui.searchDirectoryList->setModel(m_directory_model); QtUtils::SetColumnWidthsForTreeView(m_ui.searchDirectoryList, {-1, 100}); diff --git a/src/duckstation-qt/setupwizarddialog.h b/src/duckstation-qt/setupwizarddialog.h index 868332fb8..6c4e7bf6c 100644 --- a/src/duckstation-qt/setupwizarddialog.h +++ b/src/duckstation-qt/setupwizarddialog.h @@ -40,7 +40,7 @@ private: void setupUi(); void setupLanguagePage(bool initial); void setupBIOSPage(); - void setupGameListPage(); + void setupGameListPage(bool initial); void setupControllerPage(bool initial); void setupGraphicsPage(bool initial); void updateResolutionScaleWarning(); diff --git a/src/duckstation-qt/setupwizarddialog.ui b/src/duckstation-qt/setupwizarddialog.ui index 6b74a9659..06c1c2f59 100644 --- a/src/duckstation-qt/setupwizarddialog.ui +++ b/src/duckstation-qt/setupwizarddialog.ui @@ -486,7 +486,7 @@ - <html><head/><body><p>DuckStation will automatically scan and identify games from the selected directories below, and populate the game list. These games should be dumped from discs you own. Utilities such as ImgBurn can be used to create images of game discs in .bin/.cue format.</p><p>Supported formats for dumps include: <span style=" font-weight:700;">.cue</span> (Cue Sheets), <span style=" font-weight:700;">.iso/.img</span> (Single Track Image), <span style=" font-weight:700;">.ecm</span> (Error Code Modeling Image), <span style=" font-weight:700;">.mds</span> (Media Descriptor Sidecar), <span style=" font-weight:700;">.chd</span> (Compressed Hunks of Data), <span style=" font-weight:700;">.pbp</span> (PlayStation Portable, Only Decrypted).</p></body></html> + <html><head/><body><p>DuckStation will automatically scan and identify games from the selected directories below, and populate the game list. These games should be dumped from discs you own. Utilities such as ImgBurn can be used to create images of game discs in .bin/.cue format.</p><p>Supported formats for dumps include: %1</p></body></html> Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop