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:
parent
826bbad49c
commit
1f3a861c47
7 changed files with 85 additions and 30 deletions
|
|
@ -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 }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue