From 7319f8d7354f595358a1accccbc575b65953c817 Mon Sep 17 00:00:00 2001 From: pixel-daemon-bot <333018583+pixel-daemon-bot@users.noreply.github.com> Date: Mon, 28 Sep 2026 12:59:14 +0300 Subject: [PATCH] fix: localize player accessibility labels --- .../components/UnifiedPlayerSheetShared.kt | 10 ++++++---- .../components/player/AnimatedPlaybackControls.kt | 8 +++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/theveloper/pixelplay/presentation/components/UnifiedPlayerSheetShared.kt b/app/src/main/java/com/theveloper/pixelplay/presentation/components/UnifiedPlayerSheetShared.kt index 59ae7c316d..ed05eda75e 100644 --- a/app/src/main/java/com/theveloper/pixelplay/presentation/components/UnifiedPlayerSheetShared.kt +++ b/app/src/main/java/com/theveloper/pixelplay/presentation/components/UnifiedPlayerSheetShared.kt @@ -40,11 +40,13 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.hapticfeedback.HapticFeedbackType import androidx.compose.ui.platform.LocalHapticFeedback +import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import coil.size.Size +import com.theveloper.pixelplay.R import com.theveloper.pixelplay.data.model.Song import com.theveloper.pixelplay.ui.theme.GoogleSansRounded @@ -92,7 +94,7 @@ internal fun MiniPlayerContentInternal( key(song.id) { SmartImage( model = albumArtModel, - contentDescription = "CarĂ¡tula de ${song.title}", + contentDescription = stringResource(R.string.common_album_art_for_title, song.title), shape = CircleShape, targetSize = Size(150, 150), modifier = Modifier.size(44.dp), @@ -166,7 +168,7 @@ internal fun MiniPlayerContentInternal( ) { Icon( imageVector = Icons.Rounded.SkipPrevious, - contentDescription = "Anterior", + contentDescription = stringResource(R.string.common_previous_track), tint = LocalMaterialTheme.current.primary, modifier = Modifier.size(22.dp) ) @@ -191,7 +193,7 @@ internal fun MiniPlayerContentInternal( ) { Icon( imageVector = if (isPlaying) Icons.Rounded.Pause else Icons.Rounded.PlayArrow, - contentDescription = if (isPlaying) "Pausar" else "Reproducir", + contentDescription = if (isPlaying) stringResource(R.string.common_pause) else stringResource(R.string.common_play), tint = LocalMaterialTheme.current.onPrimary, modifier = Modifier.size(22.dp) ) @@ -213,7 +215,7 @@ internal fun MiniPlayerContentInternal( ) { Icon( imageVector = Icons.Rounded.SkipNext, - contentDescription = "Siguiente", + contentDescription = stringResource(R.string.common_next_track), tint = LocalMaterialTheme.current.primary, modifier = Modifier.size(22.dp) ) diff --git a/app/src/main/java/com/theveloper/pixelplay/presentation/components/player/AnimatedPlaybackControls.kt b/app/src/main/java/com/theveloper/pixelplay/presentation/components/player/AnimatedPlaybackControls.kt index 75b5287987..1bdc3d3040 100644 --- a/app/src/main/java/com/theveloper/pixelplay/presentation/components/player/AnimatedPlaybackControls.kt +++ b/app/src/main/java/com/theveloper/pixelplay/presentation/components/player/AnimatedPlaybackControls.kt @@ -41,8 +41,10 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.graphicsLayer import androidx.compose.ui.hapticfeedback.HapticFeedbackType import androidx.compose.ui.platform.LocalHapticFeedback +import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp +import com.theveloper.pixelplay.R import com.theveloper.pixelplay.presentation.components.LocalMaterialTheme import kotlinx.coroutines.delay import racra.compose.smooth_corner_rect_library.AbsoluteSmoothCornerShape @@ -165,7 +167,7 @@ fun AnimatedPlaybackControls( ) { Icon( imageVector = Icons.Rounded.SkipPrevious, - contentDescription = "Anterior", + contentDescription = stringResource(R.string.common_previous_track), tint = tintPreviousIcon, modifier = Modifier.size(iconSize) ) @@ -238,7 +240,7 @@ fun AnimatedPlaybackControls( ) { Icon( imageVector = Icons.Rounded.SkipNext, - contentDescription = "Siguiente", + contentDescription = stringResource(R.string.common_next_track), tint = tintNextIcon, modifier = Modifier.size(iconSize) ) @@ -261,7 +263,7 @@ private fun MorphingPlayPauseIcon( ) { playing -> Icon( imageVector = if (playing) Icons.Rounded.Pause else Icons.Rounded.PlayArrow, - contentDescription = if (playing) "Pausar" else "Reproducir", + contentDescription = if (playing) stringResource(R.string.common_pause) else stringResource(R.string.common_play), tint = tint, modifier = Modifier.size(size) )