fix(i18n): replace hardcoded strings in PlaylistModal

Replace 5 hardcoded validation messages ('Please enter a playlist
name', 'Please select a playlist') with i18n keys playlist.enterName
and playlist.selectPlaylist across all 4 locales.
This commit is contained in:
vicrodh committed 2026-02-09 17:23:12 -06:00
1 parent f85d04fa68
commit 8cc0a8a6ae
5 files changed
+13 -5

No files matched your search

+5 -5
View File
@@ -231,7 +231,7 @@
async function handleCreate() {
if (!name.trim()) {
error = 'Please enter a playlist name';
error = $t('playlist.enterName');
return;
}
@@ -284,7 +284,7 @@
async function handleUpdate() {
if (!playlist) return;
if (!name.trim()) {
error = 'Please enter a playlist name';
error = $t('playlist.enterName');
return;
}
@@ -342,7 +342,7 @@
async function handleAddToPlaylist() {
if (!selectedPlaylistId || trackIds.length === 0) {
error = 'Please select a playlist';
error = $t('playlist.selectPlaylist');
return;
}
@@ -384,7 +384,7 @@
async function handleDirectAddToPlaylist() {
if (!selectedPlaylistId || trackIds.length === 0) {
error = 'Please select a playlist';
error = $t('playlist.selectPlaylist');
return;
}
@@ -486,7 +486,7 @@
async function handleCreateAndAdd() {
if (!name.trim()) {
error = 'Please enter a playlist name';
error = $t('playlist.enterName');
return;
}
+2
View File
@@ -272,6 +272,8 @@
"newPlaylist": "Neue Playlist",
"editPlaylist": "Playlist bearbeiten",
"addToPlaylist": "Zur Playlist hinzufügen",
"enterName": "Bitte gib einen Playlist-Namen ein",
"selectPlaylist": "Bitte wähle eine Playlist",
"duplicates": {
"title": "Einige dieser Titel wurden bereits hinzugefügt",
"description": "Diese Playlist enthält bereits {duplicateCount} der {totalCount} Titel, die du hinzufügst. Füge nur die neuen hinzu oder füge alle einschließlich Duplikate hinzu.",
+2
View File
@@ -274,6 +274,8 @@
"createAndAdd": "Create & Add",
"playlistWithTracks": "{name} ({count} tracks)",
"copyToLibrary": "Copy to library",
"enterName": "Please enter a playlist name",
"selectPlaylist": "Please select a playlist",
"duplicates": {
"title": "Some of these tracks were already added",
"description": "This playlist already contains {duplicateCount} of the {totalCount} tracks you're adding. Add only the new ones, or add everything including duplicates.",
+2
View File
@@ -274,6 +274,8 @@
"createAndAdd": "Crear y Agregar",
"playlistWithTracks": "{name} ({count} pistas)",
"copyToLibrary": "Copiar a mi biblioteca",
"enterName": "Ingresa un nombre para la lista",
"selectPlaylist": "Selecciona una lista",
"duplicates": {
"title": "Algunas de estas pistas ya fueron agregadas",
"description": "Esta lista ya contiene {duplicateCount} de las {totalCount} pistas que estás agregando. Agrega solo las nuevas o agrega todas incluyendo duplicadas.",
+2
View File
@@ -272,6 +272,8 @@
"newPlaylist": "Nouvelle playlist",
"editPlaylist": "Modifier la playlist",
"addToPlaylist": "Ajouter à la playlist",
"enterName": "Veuillez entrer un nom de playlist",
"selectPlaylist": "Veuillez sélectionner une playlist",
"duplicates": {
"title": "Certaines de ces pistes ont déjà été ajoutées",
"description": "Cette playlist contient déjà {duplicateCount} des {totalCount} pistes que vous ajoutez. Ajoutez uniquement les nouvelles ou ajoutez tout y compris les doublons.",