diff --git a/launcher/ui/dialogs/ResourceDownloadDialog.cpp b/launcher/ui/dialogs/ResourceDownloadDialog.cpp index 2eb85928..fa3352b3 100644 --- a/launcher/ui/dialogs/ResourceDownloadDialog.cpp +++ b/launcher/ui/dialogs/ResourceDownloadDialog.cpp @@ -64,7 +64,6 @@ ResourceDownloadDialog::ResourceDownloadDialog(QWidget* parent, const std::share HelpButton->setAutoDefault(false); setWindowModality(Qt::WindowModal); - setWindowTitle(dialogTitle()); } void ResourceDownloadDialog::accept() @@ -206,6 +205,8 @@ void ResourceDownloadDialog::selectedPageChanged(BasePage* previous, BasePage* s ModDownloadDialog::ModDownloadDialog(QWidget* parent, const std::shared_ptr& mods, BaseInstance* instance) : ResourceDownloadDialog(parent, mods), m_instance(instance) { + setWindowTitle(dialogTitle()); + initializeContainer(); connectButtons(); diff --git a/launcher/ui/pages/modplatform/ModPage.h b/launcher/ui/pages/modplatform/ModPage.h index 2fda3b68..a3aab1de 100644 --- a/launcher/ui/pages/modplatform/ModPage.h +++ b/launcher/ui/pages/modplatform/ModPage.h @@ -39,6 +39,9 @@ class ModPage : public ResourcePage { ~ModPage() override = default; + //: The plural version of 'mod' + [[nodiscard]] inline QString resourcesString() const override { return tr("mods"); } + //: The singular version of 'mods' [[nodiscard]] inline QString resourceString() const override { return tr("mod"); } [[nodiscard]] QMap urlHandlers() const override; diff --git a/launcher/ui/pages/modplatform/ResourcePage.cpp b/launcher/ui/pages/modplatform/ResourcePage.cpp index 200943da..bfa7e33d 100644 --- a/launcher/ui/pages/modplatform/ResourcePage.cpp +++ b/launcher/ui/pages/modplatform/ResourcePage.cpp @@ -57,6 +57,10 @@ void ResourcePage::openedImpl() if (!supportsFiltering()) m_ui->resourceFilterButton->setVisible(false); + //: String in the search bar of the mod downloading dialog + m_ui->searchEdit->setPlaceholderText(tr("Search for %1...").arg(resourcesString())); + m_ui->resourceSelectionButton->setText(tr("Select %1 for download").arg(resourceString())); + updateSelectionButton(); triggerSearch(); } diff --git a/launcher/ui/pages/modplatform/ResourcePage.h b/launcher/ui/pages/modplatform/ResourcePage.h index 547c4056..71fc6593 100644 --- a/launcher/ui/pages/modplatform/ResourcePage.h +++ b/launcher/ui/pages/modplatform/ResourcePage.h @@ -36,6 +36,9 @@ class ResourcePage : public QWidget, public BasePage { [[nodiscard]] virtual auto metaEntryBase() const -> QString = 0; [[nodiscard]] virtual auto debugName() const -> QString = 0; + //: The plural version of 'resource' + [[nodiscard]] virtual inline QString resourcesString() const { return tr("resources"); } + //: The singular version of 'resources' [[nodiscard]] virtual inline QString resourceString() const { return tr("resource"); } /* Features this resource's page supports */ diff --git a/launcher/ui/pages/modplatform/ResourcePage.ui b/launcher/ui/pages/modplatform/ResourcePage.ui index 8fe1d613..73a9d3b1 100644 --- a/launcher/ui/pages/modplatform/ResourcePage.ui +++ b/launcher/ui/pages/modplatform/ResourcePage.ui @@ -49,11 +49,7 @@ - - - Search for resources... - - + @@ -74,11 +70,7 @@ - - - Select resource for download - - +