Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@ object AppLanguage {
const val SPANISH = "es"
const val FRENCH = "fr"
const val RUSSIAN = "ru"
const val CHINESE = "zh-CN"
const val INDONESIAN = "in"

val supportedLanguageTags: Set<String> = setOf(SYSTEM, ENGLISH, SPANISH, FRENCH, RUSSIAN)
val supportedLanguageTags: Set<String> = setOf(SYSTEM, ENGLISH, SPANISH, CHINESE, INDONESIAN, FRENCH, RUSSIAN)

fun getLanguageOptions(context: Context): Map<String, String> {
return mapOf(
SYSTEM to context.getString(R.string.setcat_language_system),
ENGLISH to context.getString(R.string.setcat_language_english),
SPANISH to context.getString(R.string.setcat_language_spanish),
FRENCH to context.getString(R.string.setcat_language_french),
RUSSIAN to context.getString(R.string.setcat_language_russian)
RUSSIAN to context.getString(R.string.setcat_language_russian),
CHINESE to context.getString(R.string.setcat_language_chinese),
INDONESIAN to context.getString(R.string.setcat_language_indonesian)
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ fun PlaylistContainer(
)
Spacer(Modifier.height(8.dp))
Text(
"No playlist has been created.",
stringResource(R.string.presentation_batch_e_no_playlist_created),
style = MaterialTheme.typography.titleMedium
)
Spacer(Modifier.height(6.dp))
Text(
"Touch the 'New Playlist' button to start.",
stringResource(R.string.presentation_batch_e_new_playlist_hint),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.Dp
Expand All @@ -29,8 +30,8 @@ import com.theveloper.pixelplay.ui.theme.GoogleSansRounded

private data class LibraryEmptySpec(
val iconRes: Int,
val title: String,
val subtitle: String
val titleRes: Int,
val subtitleRes: Int
)

private fun libraryEmptySpec(
Expand All @@ -41,85 +42,85 @@ private fun libraryEmptySpec(
LibraryTabId.SONGS -> when (storageFilter) {
StorageFilter.ALL -> LibraryEmptySpec(
iconRes = R.drawable.rounded_music_off_24,
title = "No songs yet",
subtitle = "Add music to your device or sync a cloud source to start listening."
titleRes = R.string.lib_empty_songs_all_title,
subtitleRes = R.string.lib_empty_songs_all_subtitle
)
StorageFilter.OFFLINE -> LibraryEmptySpec(
iconRes = R.drawable.rounded_music_off_24,
title = "No local songs found",
subtitle = "Try another source filter or rescan your device library."
titleRes = R.string.lib_empty_songs_offline_title,
subtitleRes = R.string.lib_empty_songs_offline_subtitle
)
StorageFilter.ONLINE -> LibraryEmptySpec(
iconRes = R.drawable.rounded_music_off_24,
title = "No cloud songs found",
subtitle = "Sync Telegram or Netease songs, or switch to local source."
titleRes = R.string.lib_empty_songs_online_title,
subtitleRes = R.string.lib_empty_songs_online_subtitle
)
}

LibraryTabId.ALBUMS -> when (storageFilter) {
StorageFilter.ALL -> LibraryEmptySpec(
iconRes = R.drawable.rounded_album_24,
title = "No albums available",
subtitle = "Albums will appear here as soon as your library has grouped tracks."
titleRes = R.string.lib_empty_albums_all_title,
subtitleRes = R.string.lib_empty_albums_all_subtitle
)
StorageFilter.OFFLINE -> LibraryEmptySpec(
iconRes = R.drawable.rounded_album_24,
title = "No local albums found",
subtitle = "Local songs are required to build local album groups."
titleRes = R.string.lib_empty_albums_offline_title,
subtitleRes = R.string.lib_empty_albums_offline_subtitle
)
StorageFilter.ONLINE -> LibraryEmptySpec(
iconRes = R.drawable.rounded_album_24,
title = "No cloud albums found",
subtitle = "Cloud songs with album data will appear here after sync."
titleRes = R.string.lib_empty_albums_online_title,
subtitleRes = R.string.lib_empty_albums_online_subtitle
)
}

LibraryTabId.ARTISTS -> when (storageFilter) {
StorageFilter.ALL -> LibraryEmptySpec(
iconRes = R.drawable.rounded_artist_24,
title = "No artists available",
subtitle = "Artists are shown after songs are indexed from any source."
titleRes = R.string.lib_empty_artists_all_title,
subtitleRes = R.string.lib_empty_artists_all_subtitle
)
StorageFilter.OFFLINE -> LibraryEmptySpec(
iconRes = R.drawable.rounded_artist_24,
title = "No local artists found",
subtitle = "No artist metadata is available for local songs right now."
titleRes = R.string.lib_empty_artists_offline_title,
subtitleRes = R.string.lib_empty_artists_offline_subtitle
)
StorageFilter.ONLINE -> LibraryEmptySpec(
iconRes = R.drawable.rounded_artist_24,
title = "No cloud artists found",
subtitle = "Cloud artist entries appear when remote songs are synced."
titleRes = R.string.lib_empty_artists_online_title,
subtitleRes = R.string.lib_empty_artists_online_subtitle
)
}

LibraryTabId.LIKED -> when (storageFilter) {
StorageFilter.ALL -> LibraryEmptySpec(
iconRes = R.drawable.rounded_favorite_24,
title = "No liked songs yet",
subtitle = "Tap the heart icon while playing a song to save it here."
titleRes = R.string.lib_empty_liked_all_title,
subtitleRes = R.string.lib_empty_liked_all_subtitle
)
StorageFilter.OFFLINE -> LibraryEmptySpec(
iconRes = R.drawable.rounded_favorite_24,
title = "No liked local songs",
subtitle = "Switch source filter or like songs from your device."
titleRes = R.string.lib_empty_liked_offline_title,
subtitleRes = R.string.lib_empty_liked_offline_subtitle
)
StorageFilter.ONLINE -> LibraryEmptySpec(
iconRes = R.drawable.rounded_favorite_24,
title = "No liked cloud songs",
subtitle = "Like Telegram or Netease tracks to see them in this view."
titleRes = R.string.lib_empty_liked_online_title,
subtitleRes = R.string.lib_empty_liked_online_subtitle
)
}

LibraryTabId.FOLDERS -> LibraryEmptySpec(
iconRes = R.drawable.ic_folder,
title = "No folders found",
subtitle = "Internal storage folders with music will appear here."
titleRes = R.string.lib_empty_folders_title,
subtitleRes = R.string.lib_empty_folders_subtitle
)

LibraryTabId.PLAYLISTS -> LibraryEmptySpec(
iconRes = R.drawable.rounded_playlist_play_24,
title = "No playlists yet",
subtitle = "Create your first playlist to organize your library."
titleRes = R.string.lib_empty_playlists_title,
subtitleRes = R.string.lib_empty_playlists_subtitle
)
}
}
Expand Down Expand Up @@ -171,14 +172,14 @@ internal fun LibraryExpressiveEmptyState(
verticalArrangement = Arrangement.spacedBy(6.dp)
) {
Text(
text = spec.title,
text = stringResource(spec.titleRes),
style = MaterialTheme.typography.titleLarge,
fontFamily = GoogleSansRounded,
fontWeight = FontWeight.SemiBold,
textAlign = TextAlign.Center
)
Text(
text = spec.subtitle,
text = stringResource(spec.subtitleRes),
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
textAlign = TextAlign.Center
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ fun SettingsCategoryScreen(
valueText = { value -> "${(value / 1000).toInt()}s" }
)
SliderSettingsItem(
label = "Minimum Tracks Per Album",
label = stringResource(R.string.setcat_min_tracks_per_album),
value = minTracksPerAlbumDraft,
valueRange = 1f..5f,
steps = 3, // 1, 2, 3, 4, 5
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<resources>
<resources>
<string name="app_name">PixelPlayer</string>
<string name="app_name_change_title">Cambio de nombre de la app</string>
<string name="app_name_change_message">Hemos cambiado el nombre de nuestra app de PixelPlay a PixelPlayer debido a un problema de marca registrada. ¡Sigue reproduciendo!</string>
Expand Down
30 changes: 30 additions & 0 deletions app/src/main/res/values-es/strings_presentation_batch_c.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,34 @@
<string name="ai_playlist_generating">Generando…</string>
<string name="ai_playlist_ready_to_play">Listo para reproducir</string>
<string name="ai_playlist_generate">Generar lista</string>

<!-- Library Empty State -->
<string name="lib_empty_songs_all_title">Aún no hay canciones</string>
<string name="lib_empty_songs_all_subtitle">Añade música a tu dispositivo o sincroniza una fuente en la nube para empezar a escuchar.</string>
<string name="lib_empty_songs_offline_title">No se encontraron canciones locales</string>
<string name="lib_empty_songs_offline_subtitle">Prueba con otro filtro de fuente o vuelve a escanear la biblioteca del dispositivo.</string>
<string name="lib_empty_songs_online_title">No se encontraron canciones en la nube</string>
<string name="lib_empty_songs_online_subtitle">Sincroniza canciones de Telegram o Netease, o cambia a la fuente local.</string>
<string name="lib_empty_albums_all_title">No hay álbumes disponibles</string>
<string name="lib_empty_albums_all_subtitle">Los álbumes aparecerán aquí en cuanto tu biblioteca tenga pistas agrupadas.</string>
<string name="lib_empty_albums_offline_title">No se encontraron álbumes locales</string>
<string name="lib_empty_albums_offline_subtitle">Se necesitan canciones locales para crear grupos de álbumes locales.</string>
<string name="lib_empty_albums_online_title">No se encontraron álbumes en la nube</string>
<string name="lib_empty_albums_online_subtitle">Las canciones en la nube con datos de álbum aparecerán aquí tras la sincronización.</string>
<string name="lib_empty_artists_all_title">No hay artistas disponibles</string>
<string name="lib_empty_artists_all_subtitle">Los artistas se muestran después de que las canciones se indexen desde cualquier fuente.</string>
<string name="lib_empty_artists_offline_title">No se encontraron artistas locales</string>
<string name="lib_empty_artists_offline_subtitle">No hay metadatos de artista disponibles para las canciones locales en este momento.</string>
<string name="lib_empty_artists_online_title">No se encontraron artistas en la nube</string>
<string name="lib_empty_artists_online_subtitle">Las entradas de artistas en la nube aparecerán cuando se sincronicen las canciones remotas.</string>
<string name="lib_empty_liked_all_title">Aún no hay canciones favoritas</string>
<string name="lib_empty_liked_all_subtitle">Toca el icono del corazón mientras escuchas una canción para guardarla aquí.</string>
<string name="lib_empty_liked_offline_title">No hay canciones favoritas locales</string>
<string name="lib_empty_liked_offline_subtitle">Cambia el filtro de fuente o marca canciones de tu dispositivo como favoritas.</string>
<string name="lib_empty_liked_online_title">No hay canciones favoritas en la nube</string>
<string name="lib_empty_liked_online_subtitle">Marca canciones de Telegram o Netease como favoritas para verlas aquí.</string>
<string name="lib_empty_folders_title">No se encontraron carpetas</string>
<string name="lib_empty_folders_subtitle">Las carpetas de almacenamiento interno con música aparecerán aquí.</string>
<string name="lib_empty_playlists_title">Aún no hay listas de reproducción</string>
<string name="lib_empty_playlists_subtitle">Crea tu primera lista de reproducción para organizar tu biblioteca.</string>
</resources>
4 changes: 4 additions & 0 deletions app/src/main/res/values-es/strings_presentation_batch_e.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
<item quantity="other">%d canciones seleccionadas</item>
</plurals>

<!-- PlaylistContainer -->
<string name="presentation_batch_e_no_playlist_created">No se ha creado ninguna lista de reproducción.</string>
<string name="presentation_batch_e_new_playlist_hint">Toca el botón \'Nueva lista\' para empezar.</string>

<!-- PlaylistCreationDialogs -->
<string name="presentation_batch_e_create_playlist_title">Crear lista</string>
<string name="presentation_batch_e_create_playlist_subtitle">Elige cómo quieres crearla.</string>
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/values-es/strings_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
<string name="setcat_artists_subtitle">Análisis de varios artistas y organización.</string>
<string name="setcat_filtering">Filtrado</string>
<string name="setcat_min_song_duration">Duración mínima de canción</string>
<string name="setcat_min_tracks_per_album">Número mínimo de pistas por álbum</string>
<string name="setcat_album_art_cache_limit">Límite de caché de carátulas de álbum</string>
<string name="setcat_album_art_cache_limit_desc">Tamaño máximo de caché antes de que las imágenes más antiguas se eliminen automáticamente</string>
<string name="setcat_sync_scanning">Sincronización y escaneo</string>
<string name="setcat_sync_full_rescan_label">Reescaneo completo en curso</string>
<string name="toast_library_sync_finished">Sincronización de la biblioteca terminada</string>
Expand All @@ -69,6 +72,8 @@
<string name="setcat_language_spanish">Español</string>
<string name="setcat_language_french">Francés</string>
<string name="setcat_language_russian">Ruso</string>
<string name="setcat_language_chinese">Chino (simplificado)</string>
<string name="setcat_language_indonesian">Indonesio</string>
<string name="setcat_app_theme_label">Tema de la app</string>
<string name="setcat_app_theme_desc">Cambia entre claro, oscuro o seguir el sistema.</string>
<string name="setcat_theme_light">Tema claro</string>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-fr/strings_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@
<string name="setcat_language_spanish">Espagnol</string>
<string name="setcat_language_french">Français</string>
<string name="setcat_language_russian">Russe</string>
<string name="setcat_language_chinese">Chinois (simplifié)</string>
<string name="setcat_language_indonesian">Indonésien</string>
</resources>
39 changes: 39 additions & 0 deletions app/src/main/res/values-in/plurals.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<plurals name="sharing_playlists_message">
<item quantity="one">Berbagi %d playlist</item>
<item quantity="other">Berbagi %d playlist</item>
</plurals>
<plurals name="exported_playlists_message">
<item quantity="one">Mengekspor %1$d playlist ke %2$s</item>
<item quantity="other">Mengekspor %1$d playlist ke %2$s</item>
</plurals>
<plurals name="n_songs_added_to_queue">
<item quantity="one">%d lagu ditambahkan ke antrean</item>
<item quantity="other">%d lagu ditambahkan ke antrean</item>
</plurals>
<plurals name="n_songs_will_play_next">
<item quantity="one">%d lagu akan diputar berikutnya</item>
<item quantity="other">%d lagu akan diputar berikutnya</item>
</plurals>
<plurals name="n_songs_added_to_favorites">
<item quantity="one">%d lagu ditambahkan ke favorit</item>
<item quantity="other">%d lagu ditambahkan ke favorit</item>
</plurals>
<plurals name="n_songs_removed_from_favorites">
<item quantity="one">%d lagu dihapus dari favorit</item>
<item quantity="other">%d lagu dihapus dari favorit</item>
</plurals>
<plurals name="n_files_deleted">
<item quantity="one">%d file dihapus</item>
<item quantity="other">%d file dihapus</item>
</plurals>
<plurals name="delete_songs_confirmation_title">
<item quantity="one">Hapus %d lagu?</item>
<item quantity="other">Hapus %d lagu?</item>
</plurals>
<plurals name="sleep_timer_play_count_times">
<item quantity="one">%d kali</item>
<item quantity="other">%d kali</item>
</plurals>
</resources>
Loading