From 7b518d7e6a825c06afce102cb51303e5d3063cb9 Mon Sep 17 00:00:00 2001
From: FX1922 <120828496+FX192@users.noreply.github.com>
Date: Sat, 24 Oct 2026 20:39:57 +0300
Subject: [PATCH] itch.io: platform and tag filters (#1497)
---
.../launcher/stores/itch/ItchBrowse.kt | 2 +-
.../droiddeck/launcher/ui/BootMovieSection.kt | 5 +--
.../droiddeck/launcher/ui/ItchBrowseBar.kt | 33 +++++++++++++++++++
app/src/main/res/values-ar/strings.xml | 4 +++
app/src/main/res/values-b+es+419/strings.xml | 4 +++
app/src/main/res/values-bg/strings.xml | 4 +++
app/src/main/res/values-cs/strings.xml | 4 +++
app/src/main/res/values-da/strings.xml | 4 +++
app/src/main/res/values-de/strings.xml | 4 +++
app/src/main/res/values-el/strings.xml | 4 +++
app/src/main/res/values-es/strings.xml | 4 +++
app/src/main/res/values-fi/strings.xml | 4 +++
app/src/main/res/values-fr/strings.xml | 4 +++
app/src/main/res/values-hi/strings.xml | 4 +++
app/src/main/res/values-hu/strings.xml | 4 +++
app/src/main/res/values-in/strings.xml | 4 +++
app/src/main/res/values-it/strings.xml | 4 +++
app/src/main/res/values-ja/strings.xml | 4 +++
app/src/main/res/values-ko/strings.xml | 4 +++
app/src/main/res/values-ms/strings.xml | 4 +++
app/src/main/res/values-nb/strings.xml | 4 +++
app/src/main/res/values-nl/strings.xml | 4 +++
app/src/main/res/values-pl/strings.xml | 4 +++
app/src/main/res/values-pt-rPT/strings.xml | 4 +++
app/src/main/res/values-pt/strings.xml | 4 +++
app/src/main/res/values-ro/strings.xml | 4 +++
app/src/main/res/values-ru/strings.xml | 4 +++
app/src/main/res/values-sv/strings.xml | 4 +++
app/src/main/res/values-th/strings.xml | 4 +++
app/src/main/res/values-tr/strings.xml | 4 +++
app/src/main/res/values-uk/strings.xml | 4 +++
app/src/main/res/values-vi/strings.xml | 4 +++
app/src/main/res/values-zh-rCN/strings.xml | 4 +++
app/src/main/res/values-zh-rHK/strings.xml | 4 +++
app/src/main/res/values-zh-rTW/strings.xml | 4 +++
app/src/main/res/values/strings.xml | 10 ++++++
.../launcher/stores/itch/ItchBrowseTest.kt | 19 +++++++++++
docs/development/itch-browse.md | 4 +++
38 files changed, 198 insertions(+), 3 deletions(-)
diff --git a/app/src/main/java/com/droiddeck/launcher/stores/itch/ItchBrowse.kt b/app/src/main/java/com/droiddeck/launcher/stores/itch/ItchBrowse.kt
index f820be6d23..d430d11434 100644
--- a/app/src/main/java/com/droiddeck/launcher/stores/itch/ItchBrowse.kt
+++ b/app/src/main/java/com/droiddeck/launcher/stores/itch/ItchBrowse.kt
@@ -54,7 +54,7 @@ internal object ItchBrowse {
fun path(query: BrowseQuery): String {
val segments = listOfNotNull(sortSegment(query.sort), priceSegment(query.price)) +
- query.platforms.sorted().map { "platform-$it" } +
+ platformNames.filter { it in query.platforms }.map { "platform-$it" } +
query.tags.map { "tag-" + tagSlug(it) }
return if (segments.isEmpty()) BASE else BASE + "/" + segments.joinToString("/")
}
diff --git a/app/src/main/java/com/droiddeck/launcher/ui/BootMovieSection.kt b/app/src/main/java/com/droiddeck/launcher/ui/BootMovieSection.kt
index a4227d4c28..c4d8053d98 100644
--- a/app/src/main/java/com/droiddeck/launcher/ui/BootMovieSection.kt
+++ b/app/src/main/java/com/droiddeck/launcher/ui/BootMovieSection.kt
@@ -676,14 +676,15 @@ private fun MoviePreview(url: String, modifier: Modifier = Modifier) {
/** A dialog with one text box, for a search term or a page number; the Android keyboard comes up with it. */
@Composable
-private fun TextEntryDialog(
+internal fun TextEntryDialog(
title: String, initial: String, number: Boolean, confirm: String, onSubmit: (String) -> Unit, onDismiss: () -> Unit,
+ id: String = "boot-movie-entry",
) {
val shown = rememberShown(onDismiss)
val close = { shown.targetState = false }
var text by remember { mutableStateOf(initial) }
val submit = { onSubmit(text.trim()); close() }
- AppDialog(shown, close, "boot-movie-entry", wide = false, maxWidth = 460.dp) {
+ AppDialog(shown, close, id, wide = false, maxWidth = 460.dp) {
DialogTitleRow(title, close)
AdbTextField(
value = text, onValueChange = { text = it }, label = "", keyboardType = if (number) KeyboardType.Number else KeyboardType.Text,
diff --git a/app/src/main/java/com/droiddeck/launcher/ui/ItchBrowseBar.kt b/app/src/main/java/com/droiddeck/launcher/ui/ItchBrowseBar.kt
index e1e170fdeb..276d131fee 100644
--- a/app/src/main/java/com/droiddeck/launcher/ui/ItchBrowseBar.kt
+++ b/app/src/main/java/com/droiddeck/launcher/ui/ItchBrowseBar.kt
@@ -20,7 +20,10 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
+import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
@@ -38,6 +41,7 @@ import com.droiddeck.launcher.stores.itch.ItchBrowseState
internal fun ItchBrowseBar() {
val ctx = LocalContext.current
val query = ItchBrowseState.query
+ var picking by remember { mutableStateOf(false) }
Column(Modifier.fillMaxWidth().padding(top = 6.dp, bottom = 8.dp), verticalArrangement = Arrangement.spacedBy(6.dp)) {
ChipRow {
for (sort in ItchBrowse.sorts) BrowseChip(sortLabel(sort), query.sort == sort) { ItchBrowseState.choose(ctx, query.copy(sort = sort)) }
@@ -45,7 +49,23 @@ internal fun ItchBrowseBar() {
ChipRow {
for (price in ItchBrowse.prices) BrowseChip(priceLabel(price), query.price == price) { ItchBrowseState.choose(ctx, query.copy(price = price)) }
}
+ ChipRow {
+ BrowseChip(stringResource(R.string.stores_itch_platform_any), query.platforms.isEmpty()) { ItchBrowseState.choose(ctx, query.copy(platforms = emptySet())) }
+ for (platform in ItchBrowse.platformNames) {
+ val on = platform in query.platforms
+ BrowseChip(platformLabel(platform), on) { ItchBrowseState.choose(ctx, query.copy(platforms = if (on) query.platforms - platform else query.platforms + platform)) }
+ }
+ }
+ ChipRow {
+ for (tag in query.tags) BrowseChip("$tag ✕", true) { ItchBrowseState.choose(ctx, query.copy(tags = query.tags - tag)) }
+ BrowseChip(stringResource(R.string.stores_itch_tag_add), false) { picking = true }
+ }
}
+ if (picking) TextEntryDialog(
+ stringResource(R.string.stores_itch_tag_title), "", number = false, confirm = stringResource(R.string.common_ok),
+ onSubmit = { value -> ItchBrowse.tagSlug(value).takeIf { it.isNotEmpty() }?.let { ItchBrowseState.choose(ctx, query.copy(tags = (query.tags + it).distinct())) } },
+ onDismiss = { picking = false }, id = "itch-tag",
+ )
}
@Composable
@@ -99,6 +119,19 @@ private fun sortLabel(sort: String): String = stringResource(
},
)
+@Composable
+private fun platformLabel(platform: String): String = stringResource(
+ when (platform) {
+ "windows" -> R.string.stores_itch_platform_windows
+ "osx" -> R.string.stores_itch_platform_macos
+ "linux" -> R.string.stores_itch_platform_linux
+ "android" -> R.string.stores_itch_platform_android
+ "ios" -> R.string.stores_itch_platform_ios
+ "web" -> R.string.stores_itch_platform_web
+ else -> R.string.stores_itch_platform_mobile_web
+ },
+)
+
@Composable
private fun priceLabel(price: String): String = stringResource(
when (price) {
diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml
index 041c6d4478..fd412f88b9 100644
--- a/app/src/main/res/values-ar/strings.xml
+++ b/app/src/main/res/values-ar/strings.xml
@@ -2100,6 +2100,10 @@
مجاني
مخفّض
تحميل المزيد
+ أي منصة
+ ويب الجوال
+ إضافة وسم
+ التصفية حسب الوسم
تعذّر تحميل الألعاب من itch.io
أرشيفات %1$s غير مدعومة
استجاب itch.io بـ HTTP %1$d
diff --git a/app/src/main/res/values-b+es+419/strings.xml b/app/src/main/res/values-b+es+419/strings.xml
index 9ee23bd93f..168dd76127 100644
--- a/app/src/main/res/values-b+es+419/strings.xml
+++ b/app/src/main/res/values-b+es+419/strings.xml
@@ -2784,6 +2784,10 @@
Gratis
En oferta
Cargar más
+ Cualquier plataforma
+ Web móvil
+ Agregar una etiqueta
+ Filtrar por etiqueta
No se pudieron cargar los juegos de itch.io
Los archivos %1$s no son compatibles
itch.io respondió HTTP %1$d
diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml
index 01342132f4..be27b7ec1f 100644
--- a/app/src/main/res/values-bg/strings.xml
+++ b/app/src/main/res/values-bg/strings.xml
@@ -2016,6 +2016,10 @@
Безплатни
С намаление
Зареди още
+ Всяка платформа
+ Мобилен уеб
+ Добавяне на таг
+ Филтриране по таг
Игрите от itch.io не можаха да се заредят
Архивите %1$s не се поддържат
itch.io отговори HTTP %1$d
diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml
index bf11dbf1b5..9ad560cc46 100644
--- a/app/src/main/res/values-cs/strings.xml
+++ b/app/src/main/res/values-cs/strings.xml
@@ -2058,6 +2058,10 @@
Zdarma
Ve slevě
Načíst další
+ Libovolná platforma
+ Mobilní web
+ Přidat štítek
+ Filtrovat podle štítku
Hry z itch.io se nepodařilo načíst
Archivy %1$s nejsou podporovány
itch.io odpovědělo HTTP %1$d
diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml
index b13bcafa57..6fa7070bbf 100644
--- a/app/src/main/res/values-da/strings.xml
+++ b/app/src/main/res/values-da/strings.xml
@@ -2016,6 +2016,10 @@
Gratis
På tilbud
Indlæs flere
+ Alle platforme
+ Mobilweb
+ Tilføj et tag
+ Filtrer efter tag
Kunne ikke hente spil fra itch.io
%1$s-arkiver understøttes ikke
itch.io svarede HTTP %1$d
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 92f3b563b4..3a78db29a9 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -2008,6 +2008,10 @@
Kostenlos
Im Angebot
Mehr laden
+ Beliebige Plattform
+ Mobiles Web
+ Tag hinzufügen
+ Nach Tag filtern
Spiele von itch.io konnten nicht geladen werden
%1$s-Archive werden nicht unterstützt
itch.io antwortete mit HTTP %1$d
diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml
index 7142c525c6..71fbfc6f05 100644
--- a/app/src/main/res/values-el/strings.xml
+++ b/app/src/main/res/values-el/strings.xml
@@ -2016,6 +2016,10 @@
Δωρεάν
Σε προσφορά
Φόρτωση περισσότερων
+ Οποιαδήποτε πλατφόρμα
+ Mobile web
+ Προσθήκη ετικέτας
+ Φιλτράρισμα ανά ετικέτα
Δεν ήταν δυνατή η φόρτωση παιχνιδιών από το itch.io
Τα αρχεία %1$s δεν υποστηρίζονται
Το itch.io απάντησε HTTP %1$d
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index 2ffff046d5..a22c9a850f 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -2039,6 +2039,10 @@
Gratis
En oferta
Cargar más
+ Cualquier plataforma
+ Web móvil
+ Añadir una etiqueta
+ Filtrar por etiqueta
No se pudieron cargar los juegos de itch.io
Los archivos %1$s no son compatibles
itch.io respondió HTTP %1$d
diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml
index f6fdd4f3c2..61ca193899 100644
--- a/app/src/main/res/values-fi/strings.xml
+++ b/app/src/main/res/values-fi/strings.xml
@@ -2016,6 +2016,10 @@
Ilmaiset
Alennuksessa
Lataa lisää
+ Mikä tahansa alusta
+ Mobiiliweb
+ Lisää tunniste
+ Suodata tunnisteella
Pelien lataaminen itch.io:sta epäonnistui
%1$s-arkistot eivät ole tuettuja
itch.io vastasi HTTP %1$d
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 9e7e2318dc..e13940f8df 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -2039,6 +2039,10 @@
Gratuits
En promotion
Charger plus
+ Toute plateforme
+ Web mobile
+ Ajouter un tag
+ Filtrer par tag
Impossible de charger les jeux d\'itch.io
Les archives %1$s ne sont pas prises en charge
itch.io a répondu HTTP %1$d
diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml
index a1b084b658..971ebd34c6 100644
--- a/app/src/main/res/values-hi/strings.xml
+++ b/app/src/main/res/values-hi/strings.xml
@@ -2016,6 +2016,10 @@
मुफ़्त
सेल में
और लोड करें
+ कोई भी प्लेटफ़ॉर्म
+ मोबाइल वेब
+ टैग जोड़ें
+ टैग के अनुसार फ़िल्टर करें
itch.io से गेम लोड नहीं हो सके
%1$s आर्काइव समर्थित नहीं हैं
itch.io ने HTTP %1$d लौटाया
diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml
index 12f7aa12e9..5463a8a5c6 100644
--- a/app/src/main/res/values-hu/strings.xml
+++ b/app/src/main/res/values-hu/strings.xml
@@ -2016,6 +2016,10 @@
Ingyenes
Akciós
Továbbiak betöltése
+ Bármely platform
+ Mobilweb
+ Címke hozzáadása
+ Szűrés címke szerint
Nem sikerült betölteni a játékokat az itch.io-ról
A(z) %1$s archívumok nem támogatottak
Az itch.io HTTP %1$d választ adott
diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml
index 9d13ed5fd1..c04243615b 100644
--- a/app/src/main/res/values-in/strings.xml
+++ b/app/src/main/res/values-in/strings.xml
@@ -1995,6 +1995,10 @@
Gratis
Diskon
Muat lebih banyak
+ Platform apa saja
+ Web seluler
+ Tambah tag
+ Filter berdasarkan tag
Tidak dapat memuat game dari itch.io
Arsip %1$s tidak didukung
itch.io menjawab HTTP %1$d
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index edb694b919..db15c513c2 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -2029,6 +2029,10 @@
Gratis
In offerta
Carica altri
+ Qualsiasi piattaforma
+ Web mobile
+ Aggiungi un tag
+ Filtra per tag
Impossibile caricare i giochi da itch.io
Gli archivi %1$s non sono supportati
itch.io ha risposto HTTP %1$d
diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml
index 11eb16b146..e8f495fcb5 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -1997,6 +1997,10 @@
無料
セール中
さらに読み込む
+ すべてのプラットフォーム
+ モバイルWeb
+ タグを追加
+ タグで絞り込む
itch.io のゲームを読み込めませんでした
%1$s 形式のアーカイブには対応していません
itch.io が HTTP %1$d を返しました
diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml
index 0793360879..f38feeb162 100644
--- a/app/src/main/res/values-ko/strings.xml
+++ b/app/src/main/res/values-ko/strings.xml
@@ -1997,6 +1997,10 @@
무료
할인 중
더 불러오기
+ 모든 플랫폼
+ 모바일 웹
+ 태그 추가
+ 태그로 필터링
itch.io에서 게임을 불러오지 못했습니다
%1$s 압축 파일은 지원하지 않습니다
itch.io가 HTTP %1$d을(를) 반환했습니다
diff --git a/app/src/main/res/values-ms/strings.xml b/app/src/main/res/values-ms/strings.xml
index 7efc8402e6..80b7d10fb1 100644
--- a/app/src/main/res/values-ms/strings.xml
+++ b/app/src/main/res/values-ms/strings.xml
@@ -1995,6 +1995,10 @@
Percuma
Diskaun
Muat lagi
+ Mana-mana platform
+ Web mudah alih
+ Tambah tag
+ Tapis mengikut tag
Tidak dapat memuatkan permainan daripada itch.io
Arkib %1$s tidak disokong
itch.io menjawab HTTP %1$d
diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml
index 374f329233..210c71f330 100644
--- a/app/src/main/res/values-nb/strings.xml
+++ b/app/src/main/res/values-nb/strings.xml
@@ -2016,6 +2016,10 @@
Gratis
På salg
Last inn flere
+ Alle plattformer
+ Web på mobil
+ Legg til en tagg
+ Filtrer etter tagg
Kunne ikke laste spill fra itch.io
%1$s-arkiver støttes ikke
itch.io svarte HTTP %1$d
diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml
index f10021f5fb..52f5fc5276 100644
--- a/app/src/main/res/values-nl/strings.xml
+++ b/app/src/main/res/values-nl/strings.xml
@@ -2016,6 +2016,10 @@
Gratis
In de aanbieding
Meer laden
+ Elk platform
+ Mobiel web
+ Tag toevoegen
+ Filteren op tag
Games van itch.io konden niet worden geladen
%1$s-archieven worden niet ondersteund
itch.io antwoordde HTTP %1$d
diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml
index d98a637875..5d539ce78e 100644
--- a/app/src/main/res/values-pl/strings.xml
+++ b/app/src/main/res/values-pl/strings.xml
@@ -2058,6 +2058,10 @@
Za darmo
Na wyprzedaży
Wczytaj więcej
+ Dowolna platforma
+ Web mobilny
+ Dodaj tag
+ Filtruj według tagu
Nie udało się wczytać gier z itch.io
Archiwa %1$s nie są obsługiwane
itch.io odpowiedziało HTTP %1$d
diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml
index 22150da672..af19c47e03 100644
--- a/app/src/main/res/values-pt-rPT/strings.xml
+++ b/app/src/main/res/values-pt-rPT/strings.xml
@@ -2029,6 +2029,10 @@
Grátis
Em promoção
Carregar mais
+ Qualquer plataforma
+ Web móvel
+ Adicionar uma etiqueta
+ Filtrar por etiqueta
Não foi possível carregar os jogos do itch.io
Ficheiros %1$s não são suportados
O itch.io respondeu HTTP %1$d
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index 6530e82613..810cb1ab12 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -2029,6 +2029,10 @@
Grátis
Em promoção
Carregar mais
+ Qualquer plataforma
+ Web mobile
+ Adicionar uma tag
+ Filtrar por tag
Não foi possível carregar os jogos do itch.io
Arquivos %1$s não são suportados
O itch.io respondeu HTTP %1$d
diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml
index a94daa065f..bded086b4f 100644
--- a/app/src/main/res/values-ro/strings.xml
+++ b/app/src/main/res/values-ro/strings.xml
@@ -2037,6 +2037,10 @@
Gratuite
La reducere
Încarcă mai multe
+ Orice platformă
+ Web mobil
+ Adaugă o etichetă
+ Filtrează după etichetă
Nu s-au putut încărca jocurile de pe itch.io
Arhivele %1$s nu sunt acceptate
itch.io a răspuns HTTP %1$d
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index 1fac9fca31..863ae944ec 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -2060,6 +2060,10 @@
Бесплатные
Со скидкой
Загрузить ещё
+ Любая платформа
+ Мобильный веб
+ Добавить тег
+ Фильтр по тегу
Не удалось загрузить игры с itch.io
Архивы %1$s не поддерживаются
itch.io ответил HTTP %1$d
diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml
index 87708ceb83..970c2f790f 100644
--- a/app/src/main/res/values-sv/strings.xml
+++ b/app/src/main/res/values-sv/strings.xml
@@ -2016,6 +2016,10 @@
Gratis
På rea
Ladda fler
+ Alla plattformar
+ Mobilwebb
+ Lägg till en tagg
+ Filtrera efter tagg
Det gick inte att läsa in spel från itch.io
%1$s-arkiv stöds inte
itch.io svarade HTTP %1$d
diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml
index e8174559ba..c222677191 100644
--- a/app/src/main/res/values-th/strings.xml
+++ b/app/src/main/res/values-th/strings.xml
@@ -1995,6 +1995,10 @@
ฟรี
ลดราคา
โหลดเพิ่มเติม
+ ทุกแพลตฟอร์ม
+ เว็บมือถือ
+ เพิ่มแท็ก
+ กรองตามแท็ก
โหลดเกมจาก itch.io ไม่ได้
ไม่รองรับไฟล์ %1$s
itch.io ตอบกลับ HTTP %1$d
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index a07f0e3c28..e992ce67df 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -2010,6 +2010,10 @@
Ücretsiz
İndirimde
Daha fazla yükle
+ Herhangi bir platform
+ Mobil web
+ Etiket ekle
+ Etikete göre filtrele
itch.io oyunları yüklenemedi
%1$s arşivleri desteklenmiyor
itch.io HTTP %1$d yanıtı verdi
diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml
index 9eca24517b..d2de6b7869 100644
--- a/app/src/main/res/values-uk/strings.xml
+++ b/app/src/main/res/values-uk/strings.xml
@@ -2058,6 +2058,10 @@
Безкоштовні
Зі знижкою
Завантажити ще
+ Будь-яка платформа
+ Мобільний веб
+ Додати тег
+ Фільтр за тегом
Не вдалося завантажити ігри з itch.io
Архіви %1$s не підтримуються
itch.io відповів HTTP %1$d
diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml
index 89009d0495..57cca067a6 100644
--- a/app/src/main/res/values-vi/strings.xml
+++ b/app/src/main/res/values-vi/strings.xml
@@ -1995,6 +1995,10 @@
Miễn phí
Đang giảm giá
Tải thêm
+ Mọi nền tảng
+ Web di động
+ Thêm thẻ
+ Lọc theo thẻ
Không tải được game từ itch.io
Không hỗ trợ tệp %1$s
itch.io trả về HTTP %1$d
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 43693ef692..8e188f2bc9 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -2074,6 +2074,10 @@
免费
特价
加载更多
+ 任意平台
+ 移动网页
+ 添加标签
+ 按标签筛选
无法从 itch.io 加载游戏
不支持 %1$s 压缩包
itch.io 返回 HTTP %1$d
diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml
index 029e860ed6..e271577a21 100644
--- a/app/src/main/res/values-zh-rHK/strings.xml
+++ b/app/src/main/res/values-zh-rHK/strings.xml
@@ -1998,6 +1998,10 @@
免費
特價
載入更多
+ 任何平台
+ 行動網頁
+ 新增標籤
+ 按標籤篩選
無法從 itch.io 載入遊戲
不支援 %1$s 壓縮檔
itch.io 回應 HTTP %1$d
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index ae9617e457..f9f7cd52e8 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -1998,6 +1998,10 @@
免費
特價
載入更多
+ 任何平台
+ 行動網頁
+ 新增標籤
+ 依標籤篩選
無法從 itch.io 載入遊戲
不支援 %1$s 壓縮檔
itch.io 回應 HTTP %1$d
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 36d2e0dba0..f42580fff6 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -2093,6 +2093,16 @@
Free
On sale
Load more
+ Any platform
+ Mobile web
+ Add a tag
+ Filter by tag
+ Windows
+ macOS
+ Linux
+ Android
+ iOS
+ Web
Could not load games from itch.io
%1$s archives are not supported
itch.io answered HTTP %1$d
diff --git a/app/src/test/java/com/droiddeck/launcher/stores/itch/ItchBrowseTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/itch/ItchBrowseTest.kt
index 6b73153345..d3ebf12e5c 100644
--- a/app/src/test/java/com/droiddeck/launcher/stores/itch/ItchBrowseTest.kt
+++ b/app/src/test/java/com/droiddeck/launcher/stores/itch/ItchBrowseTest.kt
@@ -52,6 +52,25 @@ class ItchBrowseTest {
assertEquals("pixel-art", ItchBrowse.tagSlug(" Pixel Art "))
}
+ @Test fun aSortAPricePlatformAndTagCombineInThatOrder() {
+ assertEquals(
+ "https://itch.io/games/top-rated/free/platform-windows/tag-pixel-art.xml",
+ ItchBrowse.url(BrowseQuery(ItchBrowse.SORT_TOP_RATED, ItchBrowse.PRICE_FREE, setOf("windows"), listOf("pixel-art")), 1),
+ )
+ }
+
+ @Test fun severalPlatformsAndTagsAreAllInTheAddress() {
+ assertEquals(
+ "https://itch.io/games/platform-windows/platform-linux/tag-pixel-art/tag-2d",
+ path(platforms = setOf("linux", "windows"), tags = listOf("pixel-art", "2d")),
+ )
+ }
+
+ @Test fun aTypedTagBecomesItsSlug() {
+ assertEquals("visual-novel", ItchBrowse.tagSlug("Visual Novel!"))
+ assertEquals("", ItchBrowse.tagSlug(" !! "))
+ }
+
@Test fun theSamePlatformsInAnyOrderGiveTheSameAddress() {
assertEquals(path(platforms = setOf("web", "linux")), path(platforms = setOf("linux", "web")))
}
diff --git a/docs/development/itch-browse.md b/docs/development/itch-browse.md
index 241b508537..aa1f26a6b4 100644
--- a/docs/development/itch-browse.md
+++ b/docs/development/itch-browse.md
@@ -34,3 +34,7 @@ looks browse results up through `StoresState.detailItem`.
## When a page fails
A fetch that throws or answers with a non-2xx status marks the list as failed but leaves it open. The end of the list then shows a Retry button that asks for the same page again. Scrolling does not retry on its own, so a failing page cannot loop. Only a successful page with no new games ends the list.
+
+## Platform and tag
+
+The platform and tag rows take several choices, and the address lists them as itch does (`platform-windows/platform-linux/tag-pixel-art/tag-2d`, platforms in the order of the chip row). A typed tag becomes its slug (`Pixel Art` is `pixel-art`) and the address gets `tag-`.