Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix]: Fix add to playlist success message #473

Merged
merged 1 commit into from
Jan 27, 2024
Merged
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
2 changes: 1 addition & 1 deletion src/i18n/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@
"error_savePassword": "při ukládání hesla se vyskytla chyba"
},
"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)",
"input_skipDuplicates": "přeskočit duplicity",
"input_playlists": "$t(entity.playlist_other)"
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
"error_savePassword": "Beim Versuch, das Passwort zu speichern, ist ein Fehler aufgetreten"
},
"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",
"input_skipDuplicates": "Duplikate überspringen",
"input_playlists": "$t(entity.playlist_other)"
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
"addToPlaylist": {
"input_playlists": "$t(entity.playlist_other)",
"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)"
},
"createPlaylist": {
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@
"error_savePassword": "un error ocurrió cuando se intentó guardar la contraseña"
},
"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)",
"input_skipDuplicates": "saltar duplicados",
"input_playlists": "$t(entity.playlist_other)"
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@
"error_savePassword": "une erreur s’est produite lors de la tentative de sauvegarde du mot de passe"
},
"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)",
"input_skipDuplicates": "sauter les doublons",
"input_playlists": "$t(entity.playlist_other)"
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@
"error_savePassword": "si è verificato un errore quando si è provato a salvare la password"
},
"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)",
"input_skipDuplicates": "salta duplicati",
"input_playlists": "$t(entity.playlist_other)"
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@
"error_savePassword": "パスワードを保存する際にエラーが発生しました"
},
"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) に追加",
"input_skipDuplicates": "重複をスキップ",
"input_playlists": "$t(entity.playlist_other)"
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
"error_savePassword": "wystąpił błąd podczas próby zapisania hasła"
},
"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)",
"input_skipDuplicates": "pomiń duplikaty",
"input_playlists": "$t(entity.playlist_other)"
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@
"error_savePassword": "произошла ошибка во время попытки сохранения пароля"
},
"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)",
"input_skipDuplicates": "пропустить дубликаты",
"input_playlists": "$t(entity.playlist_other)"
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/sr.json
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@
"error_savePassword": "došlo je do greške prilikom pokušaja čuvanja lozinke"
},
"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)",
"input_skipDuplicates": "preskoči duplikate",
"input_playlists": "$t(entity.playlist_other)"
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
"error_savePassword": "ett fel uppstod när lösenordet skulle sparas"
},
"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)",
"input_skipDuplicates": "hoppa över dubbletter",
"input_playlists": "$t(entity.playlist_other)"
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/zh-Hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@
"input_url": "url"
},
"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)",
"input_skipDuplicates": "跳过重复",
"input_playlists": "$t(entity.playlist_other)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,12 @@ export const AddToPlaylistContextModal = ({
const addMessage =
values.skipDuplicates &&
allSongIds.length * values.playlistId.length !== totalUniquesAdded
? `${Math.floor(totalUniquesAdded / values.playlistId.length)}`
? Math.floor(totalUniquesAdded / values.playlistId.length)
: allSongIds.length;

setIsLoading(false);
toast.success({
message: t('form.addToPlaylist', {
message: t('form.addToPlaylist.success', {
message: addMessage,
numOfPlaylists: values.playlistId.length,
postProcess: 'sentenceCase',
Expand Down
Loading