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 %>