Update wishlisting flash messages
This commit is contained in:
@@ -23,7 +23,7 @@ defmodule MusicLibraryWeb.ArtistLive.Show do
|
|||||||
{:ok, _record} ->
|
{:ok, _record} ->
|
||||||
{:noreply,
|
{:noreply,
|
||||||
socket
|
socket
|
||||||
|> put_flash(:info, gettext("Record imported successfully"))
|
|> put_flash(:info, gettext("Record wishlisted successfully"))
|
||||||
|> push_navigate(to: ~p"/artists/#{socket.assigns.artist.musicbrainz_id}")}
|
|> push_navigate(to: ~p"/artists/#{socket.assigns.artist.musicbrainz_id}")}
|
||||||
|
|
||||||
{:error, %Ecto.Changeset{} = changeset} ->
|
{:error, %Ecto.Changeset{} = changeset} ->
|
||||||
@@ -31,14 +31,14 @@ defmodule MusicLibraryWeb.ArtistLive.Show do
|
|||||||
socket
|
socket
|
||||||
|> put_flash(
|
|> put_flash(
|
||||||
:error,
|
:error,
|
||||||
gettext("Error importing record") <> "," <> inspect(changeset.errors)
|
gettext("Error wishlisting record") <> "," <> inspect(changeset.errors)
|
||||||
)
|
)
|
||||||
|> push_patch(to: ~p"/artists/#{socket.assigns.artist.musicbrainz_id}")}
|
|> push_patch(to: ~p"/artists/#{socket.assigns.artist.musicbrainz_id}")}
|
||||||
|
|
||||||
{:error, reason} ->
|
{:error, reason} ->
|
||||||
{:noreply,
|
{:noreply,
|
||||||
socket
|
socket
|
||||||
|> put_flash(:error, gettext("Error importing record") <> "," <> inspect(reason))
|
|> put_flash(:error, gettext("Error wishlisting record") <> "," <> inspect(reason))
|
||||||
|> push_patch(to: ~p"/artists/#{socket.assigns.artist.musicbrainz_id}")}
|
|> push_patch(to: ~p"/artists/#{socket.assigns.artist.musicbrainz_id}")}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ defmodule MusicLibraryWeb.StatsLive.Index do
|
|||||||
{:ok, record} ->
|
{:ok, record} ->
|
||||||
{:noreply,
|
{:noreply,
|
||||||
socket
|
socket
|
||||||
|> put_flash(:info, gettext("Record imported successfully"))
|
|> put_flash(:info, gettext("Record wishlisted successfully"))
|
||||||
|> push_navigate(to: ~p"/wishlist/#{record.id}")}
|
|> push_navigate(to: ~p"/wishlist/#{record.id}")}
|
||||||
|
|
||||||
{:error, %Ecto.Changeset{} = changeset} ->
|
{:error, %Ecto.Changeset{} = changeset} ->
|
||||||
@@ -58,13 +58,13 @@ defmodule MusicLibraryWeb.StatsLive.Index do
|
|||||||
socket
|
socket
|
||||||
|> put_flash(
|
|> put_flash(
|
||||||
:error,
|
:error,
|
||||||
gettext("Error importing record") <> "," <> inspect(changeset.errors)
|
gettext("Error wishlisting record") <> "," <> inspect(changeset.errors)
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{:error, reason} ->
|
{:error, reason} ->
|
||||||
{:noreply,
|
{:noreply,
|
||||||
socket
|
socket
|
||||||
|> put_flash(:error, gettext("Error importing record") <> "," <> inspect(reason))}
|
|> put_flash(:error, gettext("Error wishlisting record") <> "," <> inspect(reason))}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ defmodule MusicLibraryWeb.WishlistLive.Index do
|
|||||||
{:ok, record} ->
|
{:ok, record} ->
|
||||||
{:noreply,
|
{:noreply,
|
||||||
socket
|
socket
|
||||||
|> put_flash(:info, gettext("Record imported successfully"))
|
|> put_flash(:info, gettext("Record wishlisted successfully"))
|
||||||
|> push_navigate(to: ~p"/wishlist/#{record.id}")}
|
|> push_navigate(to: ~p"/wishlist/#{record.id}")}
|
||||||
|
|
||||||
{:error, %Ecto.Changeset{} = changeset} ->
|
{:error, %Ecto.Changeset{} = changeset} ->
|
||||||
@@ -117,14 +117,14 @@ defmodule MusicLibraryWeb.WishlistLive.Index do
|
|||||||
socket
|
socket
|
||||||
|> put_flash(
|
|> put_flash(
|
||||||
:error,
|
:error,
|
||||||
gettext("Error importing record") <> "," <> inspect(changeset.errors)
|
gettext("Error wishlisting record") <> "," <> inspect(changeset.errors)
|
||||||
)
|
)
|
||||||
|> push_patch(to: ~p"/wishlist")}
|
|> push_patch(to: ~p"/wishlist")}
|
||||||
|
|
||||||
{:error, reason} ->
|
{:error, reason} ->
|
||||||
{:noreply,
|
{:noreply,
|
||||||
socket
|
socket
|
||||||
|> put_flash(:error, gettext("Error importing record") <> "," <> inspect(reason))
|
|> put_flash(:error, gettext("Error wishlisting record") <> "," <> inspect(reason))
|
||||||
|> push_patch(to: ~p"/wishlist")}
|
|> push_patch(to: ~p"/wishlist")}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -57,10 +57,7 @@ msgstr ""
|
|||||||
msgid "Edit"
|
msgid "Edit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/artist_live/show.ex
|
|
||||||
#: lib/music_library_web/live/collection_live/index.ex
|
#: lib/music_library_web/live/collection_live/index.ex
|
||||||
#: lib/music_library_web/live/stats_live/index.ex
|
|
||||||
#: lib/music_library_web/live/wishlist_live/index.ex
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Error importing record"
|
msgid "Error importing record"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -168,10 +165,7 @@ msgstr ""
|
|||||||
msgid "Purchased on"
|
msgid "Purchased on"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/artist_live/show.ex
|
|
||||||
#: lib/music_library_web/live/collection_live/index.ex
|
#: lib/music_library_web/live/collection_live/index.ex
|
||||||
#: lib/music_library_web/live/stats_live/index.ex
|
|
||||||
#: lib/music_library_web/live/wishlist_live/index.ex
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Record imported successfully"
|
msgid "Record imported successfully"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -714,3 +708,17 @@ msgstr ""
|
|||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Add more · Artist"
|
msgid "Add more · Artist"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: lib/music_library_web/live/artist_live/show.ex
|
||||||
|
#: lib/music_library_web/live/stats_live/index.ex
|
||||||
|
#: lib/music_library_web/live/wishlist_live/index.ex
|
||||||
|
#, elixir-autogen, elixir-format
|
||||||
|
msgid "Error wishlisting record"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lib/music_library_web/live/artist_live/show.ex
|
||||||
|
#: lib/music_library_web/live/stats_live/index.ex
|
||||||
|
#: lib/music_library_web/live/wishlist_live/index.ex
|
||||||
|
#, elixir-autogen, elixir-format
|
||||||
|
msgid "Record wishlisted successfully"
|
||||||
|
msgstr ""
|
||||||
|
|||||||
Reference in New Issue
Block a user