Merge pull request #473 from kgarner7/fix-playlist-add-message
[bugfix]: Fix add to playlist success message
This commit is contained in:
commit
8e7356fa7b
13 changed files with 14 additions and 14 deletions
|
@ -559,7 +559,7 @@
|
||||||
"error_savePassword": "při ukládání hesla se vyskytla chyba"
|
"error_savePassword": "při ukládání hesla se vyskytla chyba"
|
||||||
},
|
},
|
||||||
"addToPlaylist": {
|
"addToPlaylist": {
|
||||||
"success": "přidáno {{message}} $t(entity.song_other) do {{numOfPlaylists}} $t(entity.playlist_other)",
|
"success": "přidáno {{message}} $t(entity.track_other) do {{numOfPlaylists}} $t(entity.playlist_other)",
|
||||||
"title": "přidat do $t(entity.playlist_one)",
|
"title": "přidat do $t(entity.playlist_one)",
|
||||||
"input_skipDuplicates": "přeskočit duplicity",
|
"input_skipDuplicates": "přeskočit duplicity",
|
||||||
"input_playlists": "$t(entity.playlist_other)"
|
"input_playlists": "$t(entity.playlist_other)"
|
||||||
|
|
|
@ -191,7 +191,7 @@
|
||||||
"error_savePassword": "Beim Versuch, das Passwort zu speichern, ist ein Fehler aufgetreten"
|
"error_savePassword": "Beim Versuch, das Passwort zu speichern, ist ein Fehler aufgetreten"
|
||||||
},
|
},
|
||||||
"addToPlaylist": {
|
"addToPlaylist": {
|
||||||
"success": "{{message}} $t(entity.song_other) zu {{numOfPlaylists}} $t(entity.playlist_other) hinzugefügt",
|
"success": "{{message}} $t(entity.track_other) zu {{numOfPlaylists}} $t(entity.playlist_other) hinzugefügt",
|
||||||
"title": "Zu $t(entity.playlist_one) hinzufügen",
|
"title": "Zu $t(entity.playlist_one) hinzufügen",
|
||||||
"input_skipDuplicates": "Duplikate überspringen",
|
"input_skipDuplicates": "Duplikate überspringen",
|
||||||
"input_playlists": "$t(entity.playlist_other)"
|
"input_playlists": "$t(entity.playlist_other)"
|
||||||
|
|
|
@ -216,7 +216,7 @@
|
||||||
"addToPlaylist": {
|
"addToPlaylist": {
|
||||||
"input_playlists": "$t(entity.playlist_other)",
|
"input_playlists": "$t(entity.playlist_other)",
|
||||||
"input_skipDuplicates": "skip duplicates",
|
"input_skipDuplicates": "skip duplicates",
|
||||||
"success": "added {{message}} $t(entity.song_other) to {{numOfPlaylists}} $t(entity.playlist_other)",
|
"success": "added $t(entity.trackWithCount, {\"count\": {{message}} }) to $t(entity.playlistWithCount, {\"count\": {{numOfPlaylists}} })",
|
||||||
"title": "add to $t(entity.playlist_one)"
|
"title": "add to $t(entity.playlist_one)"
|
||||||
},
|
},
|
||||||
"createPlaylist": {
|
"createPlaylist": {
|
||||||
|
|
|
@ -491,7 +491,7 @@
|
||||||
"error_savePassword": "un error ocurrió cuando se intentó guardar la contraseña"
|
"error_savePassword": "un error ocurrió cuando se intentó guardar la contraseña"
|
||||||
},
|
},
|
||||||
"addToPlaylist": {
|
"addToPlaylist": {
|
||||||
"success": "añadido {{message}} $t(entity.song_other) a {{numOfPlaylists}} $t(entity.playlist_other)",
|
"success": "añadido {{message}} $t(entity.track_other) a {{numOfPlaylists}} $t(entity.playlist_other)",
|
||||||
"title": "añadir a $t(entity.playlist_one)",
|
"title": "añadir a $t(entity.playlist_one)",
|
||||||
"input_skipDuplicates": "saltar duplicados",
|
"input_skipDuplicates": "saltar duplicados",
|
||||||
"input_playlists": "$t(entity.playlist_other)"
|
"input_playlists": "$t(entity.playlist_other)"
|
||||||
|
|
|
@ -483,7 +483,7 @@
|
||||||
"error_savePassword": "une erreur s’est produite lors de la tentative de sauvegarde du mot de passe"
|
"error_savePassword": "une erreur s’est produite lors de la tentative de sauvegarde du mot de passe"
|
||||||
},
|
},
|
||||||
"addToPlaylist": {
|
"addToPlaylist": {
|
||||||
"success": "{{message}} $t(entity.song_other) ajouté à {{numOfPlaylists}} $t(entity.playlist_other)",
|
"success": "{{message}} $t(entity.track_other) ajouté à {{numOfPlaylists}} $t(entity.playlist_other)",
|
||||||
"title": "ajouter à $t(entity.playlist_one)",
|
"title": "ajouter à $t(entity.playlist_one)",
|
||||||
"input_skipDuplicates": "sauter les doublons",
|
"input_skipDuplicates": "sauter les doublons",
|
||||||
"input_playlists": "$t(entity.playlist_other)"
|
"input_playlists": "$t(entity.playlist_other)"
|
||||||
|
|
|
@ -487,7 +487,7 @@
|
||||||
"error_savePassword": "si è verificato un errore quando si è provato a salvare la password"
|
"error_savePassword": "si è verificato un errore quando si è provato a salvare la password"
|
||||||
},
|
},
|
||||||
"addToPlaylist": {
|
"addToPlaylist": {
|
||||||
"success": "aggiunto {{message}} $t(entity.song_other) a {{numOfPlaylists}} $t(entity.playlist_other)",
|
"success": "aggiunto {{message}} $t(entity.track_other) a {{numOfPlaylists}} $t(entity.playlist_other)",
|
||||||
"title": "aggiungi a $t(entity.playlist_one)",
|
"title": "aggiungi a $t(entity.playlist_one)",
|
||||||
"input_skipDuplicates": "salta duplicati",
|
"input_skipDuplicates": "salta duplicati",
|
||||||
"input_playlists": "$t(entity.playlist_other)"
|
"input_playlists": "$t(entity.playlist_other)"
|
||||||
|
|
|
@ -553,7 +553,7 @@
|
||||||
"error_savePassword": "パスワードを保存する際にエラーが発生しました"
|
"error_savePassword": "パスワードを保存する際にエラーが発生しました"
|
||||||
},
|
},
|
||||||
"addToPlaylist": {
|
"addToPlaylist": {
|
||||||
"success": "{{message}} $t(entity.song_other) を {{numOfPlaylists}} $t(entity.playlist_other) に追加しました",
|
"success": "{{message}} $t(entity.track_other) を {{numOfPlaylists}} $t(entity.playlist_other) に追加しました",
|
||||||
"title": "$t(entity.playlist_one) に追加",
|
"title": "$t(entity.playlist_one) に追加",
|
||||||
"input_skipDuplicates": "重複をスキップ",
|
"input_skipDuplicates": "重複をスキップ",
|
||||||
"input_playlists": "$t(entity.playlist_other)"
|
"input_playlists": "$t(entity.playlist_other)"
|
||||||
|
|
|
@ -242,7 +242,7 @@
|
||||||
"error_savePassword": "wystąpił błąd podczas próby zapisania hasła"
|
"error_savePassword": "wystąpił błąd podczas próby zapisania hasła"
|
||||||
},
|
},
|
||||||
"addToPlaylist": {
|
"addToPlaylist": {
|
||||||
"success": "dodano {{message}} $t(entity.song_other) do {{numOfPlaylists}} $t(entity.playlist_other)",
|
"success": "dodano {{message}} $t(entity.track_other) do {{numOfPlaylists}} $t(entity.playlist_other)",
|
||||||
"title": "dodano do $t(entity.playlist_one)",
|
"title": "dodano do $t(entity.playlist_one)",
|
||||||
"input_skipDuplicates": "pomiń duplikaty",
|
"input_skipDuplicates": "pomiń duplikaty",
|
||||||
"input_playlists": "$t(entity.playlist_other)"
|
"input_playlists": "$t(entity.playlist_other)"
|
||||||
|
|
|
@ -434,7 +434,7 @@
|
||||||
"error_savePassword": "произошла ошибка во время попытки сохранения пароля"
|
"error_savePassword": "произошла ошибка во время попытки сохранения пароля"
|
||||||
},
|
},
|
||||||
"addToPlaylist": {
|
"addToPlaylist": {
|
||||||
"success": "добавлено(а) {{message}} $t(entity.song_other) в {{numOfPlaylists}} $t(entity.playlist_other)",
|
"success": "добавлено(а) {{message}} $t(entity.track_other) в {{numOfPlaylists}} $t(entity.playlist_other)",
|
||||||
"title": "добавить в $t(entity.playlist_one)",
|
"title": "добавить в $t(entity.playlist_one)",
|
||||||
"input_skipDuplicates": "пропустить дубликаты",
|
"input_skipDuplicates": "пропустить дубликаты",
|
||||||
"input_playlists": "$t(entity.playlist_other)"
|
"input_playlists": "$t(entity.playlist_other)"
|
||||||
|
|
|
@ -559,7 +559,7 @@
|
||||||
"error_savePassword": "došlo je do greške prilikom pokušaja čuvanja lozinke"
|
"error_savePassword": "došlo je do greške prilikom pokušaja čuvanja lozinke"
|
||||||
},
|
},
|
||||||
"addToPlaylist": {
|
"addToPlaylist": {
|
||||||
"success": "dodato {{message}} $t(entity.song_other) u {{numOfPlaylists}} $t(entity.playlist_other)",
|
"success": "dodato {{message}} $t(entity.track_other) u {{numOfPlaylists}} $t(entity.playlist_other)",
|
||||||
"title": "dodaj u $t(entity.playlist_one)",
|
"title": "dodaj u $t(entity.playlist_one)",
|
||||||
"input_skipDuplicates": "preskoči duplikate",
|
"input_skipDuplicates": "preskoči duplikate",
|
||||||
"input_playlists": "$t(entity.playlist_other)"
|
"input_playlists": "$t(entity.playlist_other)"
|
||||||
|
|
|
@ -190,7 +190,7 @@
|
||||||
"error_savePassword": "ett fel uppstod när lösenordet skulle sparas"
|
"error_savePassword": "ett fel uppstod när lösenordet skulle sparas"
|
||||||
},
|
},
|
||||||
"addToPlaylist": {
|
"addToPlaylist": {
|
||||||
"success": "tillade {{message}} $t(entity.song_other) til {{numOfPlaylists}} $t(entity.playlist_other)",
|
"success": "tillade {{message}} $t(entity.track_other) til {{numOfPlaylists}} $t(entity.playlist_other)",
|
||||||
"title": "lägg till i $t(entity.playlist_one)",
|
"title": "lägg till i $t(entity.playlist_one)",
|
||||||
"input_skipDuplicates": "hoppa över dubbletter",
|
"input_skipDuplicates": "hoppa över dubbletter",
|
||||||
"input_playlists": "$t(entity.playlist_other)"
|
"input_playlists": "$t(entity.playlist_other)"
|
||||||
|
|
|
@ -495,7 +495,7 @@
|
||||||
"input_url": "url"
|
"input_url": "url"
|
||||||
},
|
},
|
||||||
"addToPlaylist": {
|
"addToPlaylist": {
|
||||||
"success": "添加 {{message}} $t(entity.song_other) 到 {{numOfPlaylists}} $t(entity.playlist_other)",
|
"success": "添加 {{message}} $t(entity.track_other) 到 {{numOfPlaylists}} $t(entity.playlist_other)",
|
||||||
"title": "添加到$t(entity.playlist_one)",
|
"title": "添加到$t(entity.playlist_one)",
|
||||||
"input_skipDuplicates": "跳过重复",
|
"input_skipDuplicates": "跳过重复",
|
||||||
"input_playlists": "$t(entity.playlist_other)"
|
"input_playlists": "$t(entity.playlist_other)"
|
||||||
|
|
|
@ -191,12 +191,12 @@ export const AddToPlaylistContextModal = ({
|
||||||
const addMessage =
|
const addMessage =
|
||||||
values.skipDuplicates &&
|
values.skipDuplicates &&
|
||||||
allSongIds.length * values.playlistId.length !== totalUniquesAdded
|
allSongIds.length * values.playlistId.length !== totalUniquesAdded
|
||||||
? `${Math.floor(totalUniquesAdded / values.playlistId.length)}`
|
? Math.floor(totalUniquesAdded / values.playlistId.length)
|
||||||
: allSongIds.length;
|
: allSongIds.length;
|
||||||
|
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
toast.success({
|
toast.success({
|
||||||
message: t('form.addToPlaylist', {
|
message: t('form.addToPlaylist.success', {
|
||||||
message: addMessage,
|
message: addMessage,
|
||||||
numOfPlaylists: values.playlistId.length,
|
numOfPlaylists: values.playlistId.length,
|
||||||
postProcess: 'sentenceCase',
|
postProcess: 'sentenceCase',
|
||||||
|
|
Reference in a new issue