Localize sorting options for resource and shader packs
Signed-off-by: LocalSpook <56512186+LocalSpook@users.noreply.github.com>
This commit is contained in:
parent
736246e6c8
commit
54305397e4
@ -208,8 +208,10 @@ Task::Ptr FlameAPI::getFile(const QString& addonId, const QString& fileId, std::
|
|||||||
return netJob;
|
return netJob;
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://docs.curseforge.com/?python#tocS_ModsSearchSortField
|
QList<ResourceAPI::SortingMethod> FlameAPI::getSortingMethods() const
|
||||||
static QList<ResourceAPI::SortingMethod> s_sorts = { { 1, "Featured", QObject::tr("Sort by Featured") },
|
{
|
||||||
|
// https://docs.curseforge.com/?python#tocS_ModsSearchSortField
|
||||||
|
return { { 1, "Featured", QObject::tr("Sort by Featured") },
|
||||||
{ 2, "Popularity", QObject::tr("Sort by Popularity") },
|
{ 2, "Popularity", QObject::tr("Sort by Popularity") },
|
||||||
{ 3, "LastUpdated", QObject::tr("Sort by Last Updated") },
|
{ 3, "LastUpdated", QObject::tr("Sort by Last Updated") },
|
||||||
{ 4, "Name", QObject::tr("Sort by Name") },
|
{ 4, "Name", QObject::tr("Sort by Name") },
|
||||||
@ -217,8 +219,4 @@ static QList<ResourceAPI::SortingMethod> s_sorts = { { 1, "Featured", QObject::t
|
|||||||
{ 6, "TotalDownloads", QObject::tr("Sort by Downloads") },
|
{ 6, "TotalDownloads", QObject::tr("Sort by Downloads") },
|
||||||
{ 7, "Category", QObject::tr("Sort by Category") },
|
{ 7, "Category", QObject::tr("Sort by Category") },
|
||||||
{ 8, "GameVersion", QObject::tr("Sort by Game Version") } };
|
{ 8, "GameVersion", QObject::tr("Sort by Game Version") } };
|
||||||
|
|
||||||
QList<ResourceAPI::SortingMethod> FlameAPI::getSortingMethods() const
|
|
||||||
{
|
|
||||||
return s_sorts;
|
|
||||||
}
|
}
|
||||||
|
@ -111,14 +111,12 @@ Task::Ptr ModrinthAPI::getProjects(QStringList addonIds, std::shared_ptr<QByteAr
|
|||||||
return netJob;
|
return netJob;
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://docs.modrinth.com/api-spec/#tag/projects/operation/searchProjects
|
QList<ResourceAPI::SortingMethod> ModrinthAPI::getSortingMethods() const
|
||||||
static QList<ResourceAPI::SortingMethod> s_sorts = { { 1, "relevance", QObject::tr("Sort by Relevance") },
|
{
|
||||||
|
// https://docs.modrinth.com/api-spec/#tag/projects/operation/searchProjects
|
||||||
|
return { { 1, "relevance", QObject::tr("Sort by Relevance") },
|
||||||
{ 2, "downloads", QObject::tr("Sort by Downloads") },
|
{ 2, "downloads", QObject::tr("Sort by Downloads") },
|
||||||
{ 3, "follows", QObject::tr("Sort by Follows") },
|
{ 3, "follows", QObject::tr("Sort by Follows") },
|
||||||
{ 4, "newest", QObject::tr("Sort by Last Updated") },
|
{ 4, "newest", QObject::tr("Sort by Last Updated") },
|
||||||
{ 5, "updated", QObject::tr("Sort by Newest") } };
|
{ 5, "updated", QObject::tr("Sort by Newest") } };
|
||||||
|
|
||||||
QList<ResourceAPI::SortingMethod> ModrinthAPI::getSortingMethods() const
|
|
||||||
{
|
|
||||||
return s_sorts;
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user