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