Localized formatting for season and episode display (#1884)

## Description
Added localized formatting for season/episode numbers across the UI
because it was in English-only in every UI language.

### Related issues
None

### Testing
Tested on a physical Google TV Streamer 4K device. Checked manually
relevant screens while browsing and during playback.

## Screenshots
No frontend changes are visible in English and new translations will be
contributed through Weblate for other languages later, as usual.

## AI or LLM usage
Generated initial code with AI, then manually passed over it while
cleaning and refactoring where needed.

---------

Co-authored-by: Damontecres <damontecres@gmail.com>
This commit is contained in:
Tal Sarid 2026-09-04 19:47:06 +03:00 • committed by GitHub
parent 826bbad49c
commit 1f3a861c47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 85 additions and 30 deletions

View file

@ -14,6 +14,7 @@ import com.github.damontecres.wholphin.ui.detail.series.SeasonEpisodeIds
import com.github.damontecres.wholphin.ui.dot
import com.github.damontecres.wholphin.ui.formatDateTime
import com.github.damontecres.wholphin.ui.formatDuration
import com.github.damontecres.wholphin.ui.formatEpisodeNumber
import com.github.damontecres.wholphin.ui.getDateFormatter
import com.github.damontecres.wholphin.ui.joinNotBlank
import com.github.damontecres.wholphin.ui.nav.Destination
@ -111,7 +112,7 @@ data class BaseItem(
val ui =
BaseItemUi(
episodeCornerText =
data.indexNumber?.let { "E$it" }
data.indexNumber?.let { formatEpisodeNumber(it) }
?: data.premiereDate?.let(::formatDateTime),
episodeUnplayedCornerText =
if (type == BaseItemKind.SERIES ||
@ -119,7 +120,7 @@ data class BaseItem(
type == BaseItemKind.EPISODE ||
type == BaseItemKind.BOX_SET
) {
data.indexNumber?.let { "E$it" }
data.indexNumber?.let { formatEpisodeNumber(it) }
?: data.userData
?.unplayedItemCount
?.takeIf { it > 0 }