aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-12-30 16:59:35 -0300
committerflow <flowlnlnln@gmail.com>2023-01-13 16:23:08 -0300
commitb3330cb0da39db6e8add3bbe35cd6d417374146a (patch)
treeaf12118e0606dd57698330a360240fa6eda9fc03 /launcher/ui/pages
parent7d128c79a3cceb5e88157ead72009642ee0e4a07 (diff)
downloadPrismLauncher-b3330cb0da39db6e8add3bbe35cd6d417374146a.tar.gz
PrismLauncher-b3330cb0da39db6e8add3bbe35cd6d417374146a.tar.bz2
PrismLauncher-b3330cb0da39db6e8add3bbe35cd6d417374146a.zip
fix(RD): correctly set the strings for the specific resource names
Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/ui/pages')
-rw-r--r--launcher/ui/pages/modplatform/ModPage.h3
-rw-r--r--launcher/ui/pages/modplatform/ResourcePage.cpp4
-rw-r--r--launcher/ui/pages/modplatform/ResourcePage.h3
-rw-r--r--launcher/ui/pages/modplatform/ResourcePage.ui12
4 files changed, 12 insertions, 10 deletions
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<QString, QString> 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 @@
</widget>
</item>
<item row="0" column="0">
- <widget class="QLineEdit" name="searchEdit">
- <property name="placeholderText">
- <string>Search for resources...</string>
- </property>
- </widget>
+ <widget class="QLineEdit" name="searchEdit"/>
</item>
<item row="2" column="0" colspan="4">
<layout class="QGridLayout" name="gridLayout_4" columnstretch="0,0,0">
@@ -74,11 +70,7 @@
<widget class="QComboBox" name="sortByBox"/>
</item>
<item row="1" column="2">
- <widget class="QPushButton" name="resourceSelectionButton">
- <property name="text">
- <string>Select resource for download</string>
- </property>
- </widget>
+ <widget class="QPushButton" name="resourceSelectionButton"/>
</item>
</layout>
</item>