Added more translations.
This commit is contained in:
parent
a695d6847e
commit
2708745780
8 changed files with 75 additions and 22 deletions
|
@ -19,6 +19,7 @@ import androidx.compose.runtime.getValue
|
|||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import it.vfsfitvnm.compose.persist.persist
|
||||
import it.vfsfitvnm.vimusic.Database
|
||||
import it.vfsfitvnm.vimusic.LocalPlayerAwareWindowInsets
|
||||
|
@ -81,7 +82,7 @@ fun ArtistLocalSongs(
|
|||
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
headerContent {
|
||||
SecondaryTextButton(
|
||||
text = "Enqueue",
|
||||
text = stringResource(R.string.Enqueue),
|
||||
enabled = !songs.isNullOrEmpty(),
|
||||
onClick = {
|
||||
binder?.player?.enqueue(songs!!.map(Song::asMediaItem))
|
||||
|
|
|
@ -24,6 +24,7 @@ import androidx.compose.foundation.verticalScroll
|
|||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import it.vfsfitvnm.innertube.Innertube
|
||||
|
@ -103,7 +104,7 @@ fun ArtistOverview(
|
|||
headerContent {
|
||||
youtubeArtistPage?.shuffleEndpoint?.let { endpoint ->
|
||||
SecondaryTextButton(
|
||||
text = "Shuffle",
|
||||
text = stringResource(R.string.Shuffle),
|
||||
onClick = {
|
||||
binder?.stopRadio()
|
||||
binder?.playRadio(endpoint)
|
||||
|
@ -125,14 +126,14 @@ fun ArtistOverview(
|
|||
.padding(endPaddingValues)
|
||||
) {
|
||||
BasicText(
|
||||
text = "Songs",
|
||||
text = stringResource(R.string.Songs),
|
||||
style = typography.m.semiBold,
|
||||
modifier = sectionTextModifier
|
||||
)
|
||||
|
||||
youtubeArtistPage.songsEndpoint?.let {
|
||||
BasicText(
|
||||
text = "View all",
|
||||
text = stringResource(R.string.ViewAll),
|
||||
style = typography.xs.secondary,
|
||||
modifier = sectionTextModifier
|
||||
.clickable(onClick = onViewAllSongsClick),
|
||||
|
@ -178,14 +179,14 @@ fun ArtistOverview(
|
|||
.padding(endPaddingValues)
|
||||
) {
|
||||
BasicText(
|
||||
text = "Albums",
|
||||
text = stringResource(R.string.Albums),
|
||||
style = typography.m.semiBold,
|
||||
modifier = sectionTextModifier
|
||||
)
|
||||
|
||||
youtubeArtistPage.albumsEndpoint?.let {
|
||||
BasicText(
|
||||
text = "View all",
|
||||
text = stringResource(R.string.ViewAll),
|
||||
style = typography.xs.secondary,
|
||||
modifier = sectionTextModifier
|
||||
.clickable(onClick = onViewAllAlbumsClick),
|
||||
|
@ -223,14 +224,14 @@ fun ArtistOverview(
|
|||
.padding(endPaddingValues)
|
||||
) {
|
||||
BasicText(
|
||||
text = "Singles",
|
||||
text = stringResource(R.string.Singles),
|
||||
style = typography.m.semiBold,
|
||||
modifier = sectionTextModifier
|
||||
)
|
||||
|
||||
youtubeArtistPage.singlesEndpoint?.let {
|
||||
BasicText(
|
||||
text = "View all",
|
||||
text = stringResource(R.string.ViewAll),
|
||||
style = typography.xs.secondary,
|
||||
modifier = sectionTextModifier
|
||||
.clickable(onClick = onViewAllSinglesClick),
|
||||
|
@ -299,7 +300,7 @@ fun ArtistOverview(
|
|||
|
||||
if (attributionsIndex != -1) {
|
||||
BasicText(
|
||||
text = "From Wikipedia under Creative Commons Attribution CC-BY-SA 3.0",
|
||||
text = stringResource(R.string.FromWikipediaAttribution),
|
||||
style = typography.xxs.color(colorPalette.textDisabled).align(TextAlign.End),
|
||||
modifier = Modifier
|
||||
.padding(horizontal = 16.dp)
|
||||
|
|
|
@ -15,6 +15,7 @@ import androidx.compose.runtime.setValue
|
|||
import androidx.compose.runtime.snapshotFlow
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.valentinilk.shimmer.shimmer
|
||||
import it.vfsfitvnm.compose.persist.PersistMapCleanup
|
||||
|
@ -123,7 +124,7 @@ fun ArtistScreen(browseId: String) {
|
|||
val (colorPalette) = LocalAppearance.current
|
||||
val context = LocalContext.current
|
||||
|
||||
Header(title = artist?.name ?: "Unknown") {
|
||||
Header(title = artist?.name ?: stringResource(R.string.HeaderUnknown)) {
|
||||
textButton?.invoke()
|
||||
|
||||
Spacer(
|
||||
|
@ -176,11 +177,11 @@ fun ArtistScreen(browseId: String) {
|
|||
tabIndex = tabIndex,
|
||||
onTabChanged = { tabIndex = it },
|
||||
tabColumnContent = { Item ->
|
||||
Item(0, "Overview", R.drawable.sparkles)
|
||||
Item(1, "Songs", R.drawable.musical_notes)
|
||||
Item(2, "Albums", R.drawable.disc)
|
||||
Item(3, "Singles", R.drawable.disc)
|
||||
Item(4, "Library", R.drawable.library)
|
||||
Item(0, stringResource(R.string.ScaffoldOverview), R.drawable.sparkles)
|
||||
Item(1, stringResource(R.string.Songs), R.drawable.musical_notes)
|
||||
Item(2, stringResource(R.string.Albums), R.drawable.disc)
|
||||
Item(3, stringResource(R.string.ScaffoldSingles), R.drawable.disc)
|
||||
Item(4, stringResource(R.string.ScaffoldLibrary), R.drawable.library)
|
||||
},
|
||||
) { currentTabIndex ->
|
||||
saveableStateHolder.SaveableStateProvider(key = currentTabIndex) {
|
||||
|
@ -267,7 +268,7 @@ fun ArtistScreen(browseId: String) {
|
|||
ItemsPage(
|
||||
tag = "artist/$browseId/albums",
|
||||
headerContent = headerContent,
|
||||
emptyItemsText = "This artist didn't release any album",
|
||||
emptyItemsText = stringResource(R.string.EmptyReleases),
|
||||
itemsPageProvider = artistPage?.let {
|
||||
({ continuation ->
|
||||
continuation?.let {
|
||||
|
@ -317,7 +318,7 @@ fun ArtistScreen(browseId: String) {
|
|||
ItemsPage(
|
||||
tag = "artist/$browseId/singles",
|
||||
headerContent = headerContent,
|
||||
emptyItemsText = "This artist didn't release any single",
|
||||
emptyItemsText = stringResource(R.string.EmptyReleases),
|
||||
itemsPageProvider = artistPage?.let {
|
||||
({ continuation ->
|
||||
continuation?.let {
|
||||
|
|
|
@ -6,6 +6,7 @@ import androidx.compose.runtime.Composable
|
|||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.saveable.rememberSaveable
|
||||
import androidx.compose.runtime.saveable.rememberSaveableStateHolder
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import it.vfsfitvnm.compose.persist.PersistMapCleanup
|
||||
import it.vfsfitvnm.compose.routing.RouteHandler
|
||||
import it.vfsfitvnm.vimusic.R
|
||||
|
@ -38,8 +39,8 @@ fun BuiltInPlaylistScreen(builtInPlaylist: BuiltInPlaylist) {
|
|||
tabIndex = tabIndex,
|
||||
onTabChanged = onTabIndexChanged,
|
||||
tabColumnContent = { Item ->
|
||||
Item(0, "Favorites", R.drawable.heart)
|
||||
Item(1, "Offline", R.drawable.airplane)
|
||||
Item(0, stringResource(R.string.ScaffoldFavorites), R.drawable.heart)
|
||||
Item(1, stringResource(R.string.ScaffoldOffline), R.drawable.airplane)
|
||||
}
|
||||
) { currentTabIndex ->
|
||||
saveableStateHolder.SaveableStateProvider(key = currentTabIndex) {
|
||||
|
|
|
@ -19,6 +19,7 @@ import androidx.compose.runtime.LaunchedEffect
|
|||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import it.vfsfitvnm.compose.persist.persistList
|
||||
import it.vfsfitvnm.vimusic.Database
|
||||
|
@ -94,14 +95,14 @@ fun BuiltInPlaylistSongs(builtInPlaylist: BuiltInPlaylist) {
|
|||
) {
|
||||
Header(
|
||||
title = when (builtInPlaylist) {
|
||||
BuiltInPlaylist.Favorites -> "Favorites"
|
||||
BuiltInPlaylist.Offline -> "Offline"
|
||||
BuiltInPlaylist.Favorites -> stringResource(R.string.BuiltInPlaylistFavorites)
|
||||
BuiltInPlaylist.Offline -> stringResource(R.string.BuiltInPlaylistOffline)
|
||||
},
|
||||
modifier = Modifier
|
||||
.padding(bottom = 8.dp)
|
||||
) {
|
||||
SecondaryTextButton(
|
||||
text = "Enqueue",
|
||||
text = stringResource(R.string.Enqueue),
|
||||
enabled = songs.isNotEmpty(),
|
||||
onClick = {
|
||||
binder?.player?.enqueue(songs.map(Song::asMediaItem))
|
||||
|
|
|
@ -19,4 +19,20 @@
|
|||
<string name="SimilarArtists">Similar artists</string>
|
||||
<string name="PlaylistsMightLike">Playlists you might like</string>
|
||||
<string name="OcurredError">An error has occurred</string>
|
||||
<string name="BuiltInPlaylistFavorites">Favorites</string>
|
||||
<string name="BuiltInPlaylistOffline">Offline</string>
|
||||
<string name="Enqueue">Enqueue</string>
|
||||
<string name="ScaffoldFavorites">Favorites</string>
|
||||
<string name="ScaffoldOffline">Offline</string>
|
||||
<string name="Shuffle">Shuffle</string>
|
||||
<string name="Songs">Songs</string>
|
||||
<string name="ViewAll">View all</string>
|
||||
<string name="Albums">Albums</string>
|
||||
<string name="Singles">Singles</string>
|
||||
<string name="FromWikipediaAttribution">From Wikipedia under Creative Commons Attribution CC-BY-SA 3.0</string>
|
||||
<string name="HeaderUnknown">Unknown</string>
|
||||
<string name="ScaffoldOverview">Overview</string>
|
||||
<string name="ScaffoldSingles">Singles</string>
|
||||
<string name="ScaffoldLibrary">Library</string>
|
||||
<string name="EmptyReleases">This artist didn\'t release any album</string>
|
||||
</resources>
|
|
@ -19,4 +19,20 @@
|
|||
<string name="SimilarArtists">Artistas similares</string>
|
||||
<string name="PlaylistsMightLike">Listas que te podrían gustar</string>
|
||||
<string name="OcurredError">Ha ocurrido un error</string>
|
||||
<string name="BuiltInPlaylistFavorites">Favoritos</string>
|
||||
<string name="BuiltInPlaylistOffline">Sin conexión</string>
|
||||
<string name="Enqueue">Añadir a cola</string>
|
||||
<string name="ScaffoldFavorites">Favoritos</string>
|
||||
<string name="ScaffoldOffline">Sin conexión</string>
|
||||
<string name="Shuffle">Mezclar</string>
|
||||
<string name="Songs">Canciones</string>
|
||||
<string name="ViewAll">Ver todo</string>
|
||||
<string name="Albums">Álbumes</string>
|
||||
<string name="Singles">Sencillos</string>
|
||||
<string name="FromWikipediaAttribution">De Wikipedia bajo Creative Commons Attribution CC-BY-SA 3.0</string>
|
||||
<string name="HeaderUnknown">Desconocido</string>
|
||||
<string name="ScaffoldOverview">Vista general</string>
|
||||
<string name="ScaffoldSingles">Sencillos</string>
|
||||
<string name="ScaffoldLibrary">Biblioteca</string>
|
||||
<string name="EmptyReleases">El artista no ha lanzado ningún álbum</string>
|
||||
</resources>
|
|
@ -19,4 +19,20 @@
|
|||
<string name="SimilarArtists">Similar artists</string>
|
||||
<string name="PlaylistsMightLike">Playlists you might like</string>
|
||||
<string name="OcurredError">An error has occurred</string>
|
||||
<string name="BuiltInPlaylistFavorites">Favorites</string>
|
||||
<string name="BuiltInPlaylistOffline">Offline</string>
|
||||
<string name="Enqueue">Enqueue</string>
|
||||
<string name="ScaffoldFavorites">Favorites</string>
|
||||
<string name="ScaffoldOffline">Offline</string>
|
||||
<string name="Shuffle">Shuffle</string>
|
||||
<string name="Songs">Songs</string>
|
||||
<string name="ViewAll">View all</string>
|
||||
<string name="Albums">Albums</string>
|
||||
<string name="Singles">Singles</string>
|
||||
<string name="FromWikipediaAttribution">From Wikipedia under Creative Commons Attribution CC-BY-SA 3.0</string>
|
||||
<string name="HeaderUnknown">Unknown</string>
|
||||
<string name="ScaffoldOverview">Overview</string>
|
||||
<string name="ScaffoldSingles">Singles</string>
|
||||
<string name="ScaffoldLibrary">Library</string>
|
||||
<string name="EmptyReleases">This artist didn\'t release any album</string>
|
||||
</resources>
|
Loading…
Reference in a new issue