diff --git a/lib/music_library_web/live/record_live/show.ex b/lib/music_library_web/live/record_live/show.ex index c8a77cd1..ce8fc7e2 100644 --- a/lib/music_library_web/live/record_live/show.ex +++ b/lib/music_library_web/live/record_live/show.ex @@ -16,7 +16,7 @@ defmodule MusicLibraryWeb.RecordLive.Show do socket = if static_changed?(socket) do - put_flash(socket, :warning, "The application has been updated, please reload.") + put_flash(socket, :warning, gettext("The application has been updated, please reload.")) else socket end @@ -46,8 +46,8 @@ defmodule MusicLibraryWeb.RecordLive.Show do {:noreply, assign(socket, :record, record)} end - defp page_title(:show), do: "Show Record" - defp page_title(:edit), do: "Edit" + defp page_title(:show), do: gettext("Show") + defp page_title(:edit), do: gettext("Edit") defp musicbrainz_url(record) do "https://musicbrainz.org/release-group/#{record.musicbrainz_id}" diff --git a/lib/music_library_web/live/record_live/show.html.heex b/lib/music_library_web/live/record_live/show.html.heex index b7dc8796..4092ec6d 100644 --- a/lib/music_library_web/live/record_live/show.html.heex +++ b/lib/music_library_web/live/record_live/show.html.heex @@ -11,10 +11,17 @@ <:actions> <.link patch={~p"/records/#{@record}/show/edit"} phx-click={JS.push_focus()}> - <.button>Edit + <.button> + <%= gettext("Edit") %> + - <.link phx-click={JS.push("delete", value: %{id: @record.id})} data-confirm="Are you sure?"> - <.button class="!bg-red-900 hover:!bg-red-700">Delete + <.link + phx-click={JS.push("delete", value: %{id: @record.id})} + data-confirm={gettext("Are you sure?")} + > + <.button class="!bg-red-900 hover:!bg-red-700"> + <%= gettext("Delete") %>" + @@ -32,20 +39,20 @@ <.list> - <:item title="Type"> + <:item title={gettext("Type")}> <%= @record.type %> - <:item title="Musicbrainz ID"> + <:item title={gettext("Musicbrainz ID")}> <%= @record.musicbrainz_id %> - <:item title="Release"> + <:item title={gettext("Release")}> <%= Records.Record.format_release(@record.release) %> - <:item title="Genres"> + <:item title={gettext("Genres")}> - <:item title="Purchased at"><%= @record.purchased_at %> - <:item title="Inserted at"><%= @record.inserted_at %> - <:item title="Updated at"><%= @record.updated_at %> + <:item title={gettext("Purchased at")}><%= @record.purchased_at %> + <:item title={gettext("Inserted at")}><%= @record.inserted_at %> + <:item title={gettext("Updated at")}><%= @record.updated_at %>
- <.back navigate={@back_url}>Back to records + <.back navigate={@back_url}> + <%= gettext("Back to records") %> +
<.modal diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index 4bad9798..9181c53d 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -138,6 +138,7 @@ msgid "No cover selected" msgstr "" #: lib/music_library_web/live/record_live/form_component.ex:46 +#: lib/music_library_web/live/record_live/show.html.heex:63 #, elixir-autogen, elixir-format msgid "Purchased at" msgstr "" @@ -148,6 +149,7 @@ msgid "Record updated successfully" msgstr "" #: lib/music_library_web/live/record_live/form_component.ex:45 +#: lib/music_library_web/live/record_live/show.html.heex:52 #, elixir-autogen, elixir-format msgid "Release" msgstr "" @@ -163,6 +165,7 @@ msgid "Saving..." msgstr "" #: lib/music_library_web/live/record_live/form_component.ex:33 +#: lib/music_library_web/live/record_live/show.html.heex:42 #, elixir-autogen, elixir-format msgid "Type" msgstr "" @@ -188,17 +191,21 @@ msgid "All Records" msgstr "" #: lib/music_library_web/live/record_live/index.html.heex:154 +#: lib/music_library_web/live/record_live/show.html.heex:20 #, elixir-autogen, elixir-format msgid "Are you sure?" msgstr "" #: lib/music_library_web/live/record_live/index.html.heex:156 +#: lib/music_library_web/live/record_live/show.html.heex:23 #, elixir-autogen, elixir-format msgid "Delete" msgstr "" #: lib/music_library_web/live/record_live/index.ex:54 #: lib/music_library_web/live/record_live/index.html.heex:145 +#: lib/music_library_web/live/record_live/show.ex:50 +#: lib/music_library_web/live/record_live/show.html.heex:15 #, elixir-autogen, elixir-format msgid "Edit" msgstr "" @@ -234,6 +241,7 @@ msgid "Search" msgstr "" #: lib/music_library_web/live/record_live/index.html.heex:125 +#: lib/music_library_web/live/record_live/show.ex:49 #, elixir-autogen, elixir-format msgid "Show" msgstr "" @@ -244,6 +252,7 @@ msgid "Showing %{visible} of %{total} records" msgstr "" #: lib/music_library_web/live/record_live/index.ex:17 +#: lib/music_library_web/live/record_live/show.ex:19 #, elixir-autogen, elixir-format msgid "The application has been updated, please reload." msgstr "" @@ -252,3 +261,28 @@ msgstr "" #, elixir-autogen, elixir-format msgid "View on MusicBrainz" msgstr "" + +#: lib/music_library_web/live/record_live/show.html.heex:71 +#, elixir-autogen, elixir-format +msgid "Back to records" +msgstr "" + +#: lib/music_library_web/live/record_live/show.html.heex:55 +#, elixir-autogen, elixir-format +msgid "Genres" +msgstr "" + +#: lib/music_library_web/live/record_live/show.html.heex:64 +#, elixir-autogen, elixir-format +msgid "Inserted at" +msgstr "" + +#: lib/music_library_web/live/record_live/show.html.heex:47 +#, elixir-autogen, elixir-format +msgid "Musicbrainz ID" +msgstr "" + +#: lib/music_library_web/live/record_live/show.html.heex:65 +#, elixir-autogen, elixir-format +msgid "Updated at" +msgstr ""