diff --git a/app/src/main/java/com/github/damontecres/wholphin/MainActivity.kt b/app/src/main/java/com/github/damontecres/wholphin/MainActivity.kt
index 34bd871c..b7f4b1d3 100644
--- a/app/src/main/java/com/github/damontecres/wholphin/MainActivity.kt
+++ b/app/src/main/java/com/github/damontecres/wholphin/MainActivity.kt
@@ -123,6 +123,9 @@ class MainActivity : AppCompatActivity() {
@Inject
lateinit var suggestionsSchedulerService: SuggestionsSchedulerService
+ @Inject
+ lateinit var backdropService: BackdropService
+
// Note: unused but injected to ensure it is created
@Inject
lateinit var serverEventListener: ServerEventListener
@@ -247,6 +250,9 @@ class MainActivity : AppCompatActivity() {
}
is SetupDestination.AppContent -> {
+ LaunchedEffect(Unit) {
+ backdropService.clearBackdrop()
+ }
val current = key.current
ProvideLocalClock {
if (UpdateChecker.ACTIVE && appPreferences.autoCheckForUpdates) {
diff --git a/app/src/main/java/com/github/damontecres/wholphin/ui/Formatting.kt b/app/src/main/java/com/github/damontecres/wholphin/ui/Formatting.kt
index 1842620a..8f4066bb 100644
--- a/app/src/main/java/com/github/damontecres/wholphin/ui/Formatting.kt
+++ b/app/src/main/java/com/github/damontecres/wholphin/ui/Formatting.kt
@@ -5,6 +5,7 @@ import androidx.compose.foundation.text.appendInlineContent
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.buildAnnotatedString
import com.github.damontecres.wholphin.R
+import com.github.damontecres.wholphin.WholphinApplication
import org.jellyfin.sdk.model.api.BaseItemDto
import org.jellyfin.sdk.model.api.MediaSegmentType
import timber.log.Timber
@@ -76,7 +77,7 @@ val BaseItemDto.seriesProductionYears: String?
append(productionYear.toString())
if (status == "Continuing") {
append(" - ")
- append("Present")
+ append(WholphinApplication.instance.getString(R.string.series_continueing))
} else if (status == "Ended") {
endDate?.let {
if (it.year != productionYear) {
diff --git a/app/src/main/java/com/github/damontecres/wholphin/ui/components/CollectionFolderGrid.kt b/app/src/main/java/com/github/damontecres/wholphin/ui/components/CollectionFolderGrid.kt
index 4c672998..9110802d 100644
--- a/app/src/main/java/com/github/damontecres/wholphin/ui/components/CollectionFolderGrid.kt
+++ b/app/src/main/java/com/github/damontecres/wholphin/ui/components/CollectionFolderGrid.kt
@@ -857,7 +857,7 @@ fun CollectionFolderGridContent(
DataLoadingState.Loading,
-> {
// This shouldn't happen, so just show placeholder
- Text("Loading")
+ Text(stringResource(R.string.loading))
}
is DataLoadingState.Error -> {
diff --git a/app/src/main/java/com/github/damontecres/wholphin/ui/playback/DownloadSubtitlesDialog.kt b/app/src/main/java/com/github/damontecres/wholphin/ui/playback/DownloadSubtitlesDialog.kt
index b3813ed5..e1a291e1 100644
--- a/app/src/main/java/com/github/damontecres/wholphin/ui/playback/DownloadSubtitlesDialog.kt
+++ b/app/src/main/java/com/github/damontecres/wholphin/ui/playback/DownloadSubtitlesDialog.kt
@@ -102,7 +102,7 @@ fun DownloadSubtitlesContent(
.padding(PaddingValues(24.dp)),
) {
Text(
- text = "Search & download subtitles",
+ text = stringResource(R.string.search_and_download_subtitles),
style = MaterialTheme.typography.titleLarge,
color = MaterialTheme.colorScheme.onSurface,
)
@@ -113,7 +113,7 @@ fun DownloadSubtitlesContent(
verticalAlignment = Alignment.CenterVertically,
) {
Text(
- text = "Language",
+ text = stringResource(R.string.language),
style = MaterialTheme.typography.titleSmall,
color = MaterialTheme.colorScheme.onSurface,
)
@@ -137,7 +137,7 @@ fun DownloadSubtitlesContent(
}
if (dialogItems.isEmpty()) {
Text(
- text = "No remote subtitles were found",
+ text = stringResource(R.string.no_subtitles_found),
style = MaterialTheme.typography.titleLarge,
color = MaterialTheme.colorScheme.onSurface,
)
diff --git a/app/src/main/java/com/github/damontecres/wholphin/ui/playback/PlaybackConstants.kt b/app/src/main/java/com/github/damontecres/wholphin/ui/playback/PlaybackConstants.kt
index fa56bb84..474c7932 100644
--- a/app/src/main/java/com/github/damontecres/wholphin/ui/playback/PlaybackConstants.kt
+++ b/app/src/main/java/com/github/damontecres/wholphin/ui/playback/PlaybackConstants.kt
@@ -1,6 +1,7 @@
package com.github.damontecres.wholphin.ui.playback
import androidx.compose.ui.layout.ContentScale
+import com.github.damontecres.wholphin.R
import com.github.damontecres.wholphin.preferences.PrefContentScale
import org.jellyfin.sdk.model.api.BaseItemKind
import org.jellyfin.sdk.model.api.CollectionType
@@ -9,13 +10,13 @@ val playbackSpeedOptions = listOf(".25", ".5", ".75", "1.0", "1.25", "1.5", "1.7
val playbackScaleOptions =
mapOf(
- ContentScale.Fit to "Fit",
- ContentScale.None to "None",
- ContentScale.Crop to "Crop",
+ ContentScale.Fit to R.string.content_scale_fit,
+ ContentScale.None to R.string.none,
+ ContentScale.Crop to R.string.content_scale_crop,
// ContentScale.Inside to "Inside",
- ContentScale.FillBounds to "Fill",
- ContentScale.FillWidth to "Fill Width",
- ContentScale.FillHeight to "Fill Height",
+ ContentScale.FillBounds to R.string.content_scale_fill,
+ ContentScale.FillWidth to R.string.content_scale_fill_width,
+ ContentScale.FillHeight to R.string.content_scale_fill_height,
)
val PrefContentScale.scale: ContentScale
diff --git a/app/src/main/java/com/github/damontecres/wholphin/ui/playback/PlaybackDialog.kt b/app/src/main/java/com/github/damontecres/wholphin/ui/playback/PlaybackDialog.kt
index 04ff620a..c6d7b622 100644
--- a/app/src/main/java/com/github/damontecres/wholphin/ui/playback/PlaybackDialog.kt
+++ b/app/src/main/java/com/github/damontecres/wholphin/ui/playback/PlaybackDialog.kt
@@ -144,7 +144,9 @@ fun PlaybackDialog(
BottomDialogItem(
data = PlaybackDialogType.VIDEO_SCALE,
headline = stringResource(R.string.video_scale),
- supporting = playbackScaleOptions[settings.contentScale],
+ supporting =
+ playbackScaleOptions[settings.contentScale]
+ ?.let { stringResource(it) },
),
)
}
@@ -220,7 +222,7 @@ fun PlaybackDialog(
playbackScaleOptions.map { (scale, name) ->
BottomDialogItem(
data = scale,
- headline = name,
+ headline = stringResource(name),
supporting = null,
)
}
diff --git a/app/src/main/java/com/github/damontecres/wholphin/ui/setup/seerr/AddSeerrServer.kt b/app/src/main/java/com/github/damontecres/wholphin/ui/setup/seerr/AddSeerrServer.kt
index d2b48c35..81e06fb8 100644
--- a/app/src/main/java/com/github/damontecres/wholphin/ui/setup/seerr/AddSeerrServer.kt
+++ b/app/src/main/java/com/github/damontecres/wholphin/ui/setup/seerr/AddSeerrServer.kt
@@ -62,7 +62,7 @@ fun AddSeerrServerApiKey(
val passwordFocusRequester = remember { FocusRequester() }
LaunchedEffect(Unit) { focusRequester.tryRequestFocus() }
Text(
- text = "Enter URL & API Key",
+ text = stringResource(R.string.enter_url_api_key),
style = MaterialTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onSurface,
textAlign = TextAlign.Center,
@@ -73,7 +73,7 @@ fun AddSeerrServerApiKey(
modifier = Modifier.align(Alignment.CenterHorizontally),
) {
Text(
- text = "URL",
+ text = stringResource(R.string.url),
modifier = Modifier.padding(end = 8.dp),
)
EditTextBox(
@@ -104,7 +104,7 @@ fun AddSeerrServerApiKey(
modifier = Modifier.align(Alignment.CenterHorizontally),
) {
Text(
- text = "API Key",
+ text = stringResource(R.string.api_key),
modifier = Modifier.padding(end = 8.dp),
)
EditTextBox(
diff --git a/app/src/main/java/com/github/damontecres/wholphin/ui/setup/seerr/AddSeerrServerDialog.kt b/app/src/main/java/com/github/damontecres/wholphin/ui/setup/seerr/AddSeerrServerDialog.kt
index 3601fdd7..9566b88b 100644
--- a/app/src/main/java/com/github/damontecres/wholphin/ui/setup/seerr/AddSeerrServerDialog.kt
+++ b/app/src/main/java/com/github/damontecres/wholphin/ui/setup/seerr/AddSeerrServerDialog.kt
@@ -6,6 +6,8 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
+import androidx.compose.ui.res.stringResource
+import com.github.damontecres.wholphin.R
import com.github.damontecres.wholphin.data.model.SeerrAuthMethod
import com.github.damontecres.wholphin.ui.components.BasicDialog
import com.github.damontecres.wholphin.ui.components.DialogItem
@@ -71,27 +73,26 @@ fun ChooseSeerrLoginType(
onChoose: (SeerrAuthMethod) -> Unit,
) {
val params =
- remember {
- DialogParams(
- fromLongClick = false,
- title = "Login to Seerr server",
- items =
- listOf(
- DialogItem(
- text = "API Key",
- onClick = { onChoose.invoke(SeerrAuthMethod.API_KEY) },
- ),
- DialogItem(
- text = "Jellyfin user",
- onClick = { onChoose.invoke(SeerrAuthMethod.JELLYFIN) },
- ),
- DialogItem(
- text = "Local user",
- onClick = { onChoose.invoke(SeerrAuthMethod.LOCAL) },
- ),
+ DialogParams(
+ fromLongClick = false,
+ title = stringResource(R.string.seerr_login),
+ items =
+ listOf(
+ DialogItem(
+ text = stringResource(R.string.api_key),
+ onClick = { onChoose.invoke(SeerrAuthMethod.API_KEY) },
),
- )
- }
+ DialogItem(
+ text = stringResource(R.string.seerr_jellyfin_user),
+ onClick = { onChoose.invoke(SeerrAuthMethod.JELLYFIN) },
+ ),
+ DialogItem(
+ text = stringResource(R.string.seerr_local_user),
+ onClick = { onChoose.invoke(SeerrAuthMethod.LOCAL) },
+ ),
+ ),
+ )
+
DialogPopup(
params = params,
onDismissRequest = onDismissRequest,
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 3baee433..2967ada1 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -522,109 +522,161 @@
Display presets
Built-in presets to quickly style all rows
Choose rows and images on the home page
+ Fit
+ Crop
+ Fill
+ Fill width
+ Fill height
Wholphin Default
Wholphin Compact
Series Thumb images
Episode Thumbnail images
+ Lowest
+ Low
+ Medium
+ High
+ Full
- - Disabled
- - Lowest
- - Low
- - Medium
- - High
- - Full
+ - @string/disabled
+ - @string/volume_lowest
+ - @string/volume_low
+ - @string/volume_medium
+ - @string/volume_high
+ - @string/volume_full
+ Purple
+ Orange
+ Bold Blue
+ Black
- - Purple
- - Blue
- - Green
- - Orange
- - Bold Blue
- - Black
+ - @string/purple
+ - @string/blue
+ - @string/green
+ - @string/orange
+ - @string/bold_blue
+ - @string/black
+ Ignore
+ Skip automatically
+ Ask to skip
- - Ignore
- - Skip automatically
- - Ask to skip
+ - @string/skip_ignore
+ - @string/skip_automatically
+ - @string/skip_ask
- - Fit
- - None
- - Crop
- - Fill
- - Fill Width
- - Fill Height
+ - @string/content_scale_fit
+ - @string/none
+ - @string/content_scale_crop
+ - @string/content_scale_fill
+ - @string/content_scale_fill_width
+ - @string/content_scale_fill_height
+ Only use FFmpeg if no built-in decoder exists
+ Prefer to use FFmpeg over built-in decoders
+ Never use FFmpeg decoders
- - Only use FFmpeg if no built-in decoder exists
- - Prefer to use FFmpeg over built-in decoders
- - Never use FFmpeg decoders
+ - @string/ffmpeg_fallback
+ - @string/ffmpeg_prefer
+ - @string/ffmpeg_never
+ At the end of playback
+ During end credits/outro
- - At the end of playback
- - During end credits/outro
+ - @string/next_up_playback_end
+ - @string/next_up_outro
+ White
+ Light gray
+ Dark gray
+ Yellow
+ Cyan
+ Magenta
- - White
- - Black
- - Light Gray
- - Dark Gray
- - Red
- - Yellow
- - Green
- - Cyan
- - Blue
- - Magenta
+ - @string/white
+ - @string/black
+ - @string/light_gray
+ - @string/dark_gray
+ - @string/red
+ - @string/yellow
+ - @string/green
+ - @string/cyan
+ - @string/blue
+ - @string/magenta
+ Outline
+ Shadow
- - None
- - Outline
- - Shadow
+ - @string/none
+ - @string/subtitle_edge_outline
+ - @string/subtitle_edge_shadow
+ Wrap
+ Boxed
- - None
- - Wrap
- - Boxed
+ - @string/none
+ - @string/background_style_wrap
+ - @string/background_style_boxed
+ ExoPlayer
+ MPV
+ Prefer MPV
- - ExoPlayer
- - MPV
- - Prefer MPV
+ - @string/exoplayer
+ - @string/mpv
+ - @string/prefer_mpv
+ Use ExoPlayer for HDR playback
-
-
- - Use ExoPlayer for HDR playback
+
+
+ - @string/player_backend_options_subtitles_prefer_mpv
+ Poster (2:3)
+ 16:9
+ 4:3
+ Square (1:1)
- - Poster (2:3)
- - 16:9
- - 4:3
- - Square (1:1)
+ - @string/aspect_ratios_poster
+ - @string/aspect_ratios_16_9
+ - @string/aspect_ratios_4_3
+ - @string/aspect_ratios_square
+ Primary
+ Thumbary
- - Primary
- - Thumb
+ - @string/image_type_primary
+ - @string/image_type_thumb
+ Image with dynamic color
+ Image only
+
+ API Key
+ Login to Seerr server
+ Jellyfin user
+ Local user
+
+ No remote subtitles were found
+ Present
- - Image with dynamic color
- - Image only
- - None
+ - @string/backdrop_style_dynamic
+ - @string/backdrop_style_image
+ - @string/none