Extract show page translations
This commit is contained in:
@@ -16,7 +16,7 @@ defmodule MusicLibraryWeb.RecordLive.Show do
|
|||||||
|
|
||||||
socket =
|
socket =
|
||||||
if static_changed?(socket) do
|
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
|
else
|
||||||
socket
|
socket
|
||||||
end
|
end
|
||||||
@@ -46,8 +46,8 @@ defmodule MusicLibraryWeb.RecordLive.Show do
|
|||||||
{:noreply, assign(socket, :record, record)}
|
{:noreply, assign(socket, :record, record)}
|
||||||
end
|
end
|
||||||
|
|
||||||
defp page_title(:show), do: "Show Record"
|
defp page_title(:show), do: gettext("Show")
|
||||||
defp page_title(:edit), do: "Edit"
|
defp page_title(:edit), do: gettext("Edit")
|
||||||
|
|
||||||
defp musicbrainz_url(record) do
|
defp musicbrainz_url(record) do
|
||||||
"https://musicbrainz.org/release-group/#{record.musicbrainz_id}"
|
"https://musicbrainz.org/release-group/#{record.musicbrainz_id}"
|
||||||
|
|||||||
@@ -11,10 +11,17 @@
|
|||||||
</:subtitle>
|
</:subtitle>
|
||||||
<:actions>
|
<:actions>
|
||||||
<.link patch={~p"/records/#{@record}/show/edit"} phx-click={JS.push_focus()}>
|
<.link patch={~p"/records/#{@record}/show/edit"} phx-click={JS.push_focus()}>
|
||||||
<.button>Edit</.button>
|
<.button>
|
||||||
|
<%= gettext("Edit") %>
|
||||||
|
</.button>
|
||||||
</.link>
|
</.link>
|
||||||
<.link phx-click={JS.push("delete", value: %{id: @record.id})} data-confirm="Are you sure?">
|
<.link
|
||||||
<.button class="!bg-red-900 hover:!bg-red-700">Delete</.button>
|
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") %>"
|
||||||
|
</.button>
|
||||||
</.link>
|
</.link>
|
||||||
</:actions>
|
</:actions>
|
||||||
</.header>
|
</.header>
|
||||||
@@ -32,20 +39,20 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<.list>
|
<.list>
|
||||||
<:item title="Type">
|
<:item title={gettext("Type")}>
|
||||||
<span class="inline-flex items-center mr-2 rounded-md bg-gray-50 px-2 py-1 text-xs font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10">
|
<span class="inline-flex items-center mr-2 rounded-md bg-gray-50 px-2 py-1 text-xs font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10">
|
||||||
<%= @record.type %>
|
<%= @record.type %>
|
||||||
</span>
|
</span>
|
||||||
</:item>
|
</:item>
|
||||||
<:item title="Musicbrainz ID">
|
<:item title={gettext("Musicbrainz ID")}>
|
||||||
<a href={musicbrainz_url(@record)}>
|
<a href={musicbrainz_url(@record)}>
|
||||||
<code><%= @record.musicbrainz_id %></code>
|
<code><%= @record.musicbrainz_id %></code>
|
||||||
</a>
|
</a>
|
||||||
</:item>
|
</:item>
|
||||||
<:item title="Release">
|
<:item title={gettext("Release")}>
|
||||||
<%= Records.Record.format_release(@record.release) %>
|
<%= Records.Record.format_release(@record.release) %>
|
||||||
</:item>
|
</:item>
|
||||||
<:item title="Genres">
|
<:item title={gettext("Genres")}>
|
||||||
<span
|
<span
|
||||||
:for={genre <- @record.genres}
|
:for={genre <- @record.genres}
|
||||||
class="inline-flex items-center mr-2 mb-2 rounded-md bg-gray-50 px-2 py-1 text-xs font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10"
|
class="inline-flex items-center mr-2 mb-2 rounded-md bg-gray-50 px-2 py-1 text-xs font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10"
|
||||||
@@ -53,14 +60,16 @@
|
|||||||
<%= genre %>
|
<%= genre %>
|
||||||
</span>
|
</span>
|
||||||
</:item>
|
</:item>
|
||||||
<:item title="Purchased at"><%= @record.purchased_at %></:item>
|
<:item title={gettext("Purchased at")}><%= @record.purchased_at %></:item>
|
||||||
<:item title="Inserted at"><%= @record.inserted_at %></:item>
|
<:item title={gettext("Inserted at")}><%= @record.inserted_at %></:item>
|
||||||
<:item title="Updated at"><%= @record.updated_at %></:item>
|
<:item title={gettext("Updated at")}><%= @record.updated_at %></:item>
|
||||||
</.list>
|
</.list>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-8">
|
<div class="mt-8">
|
||||||
<.back navigate={@back_url}>Back to records</.back>
|
<.back navigate={@back_url}>
|
||||||
|
<%= gettext("Back to records") %>
|
||||||
|
</.back>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<.modal
|
<.modal
|
||||||
|
|||||||
@@ -138,6 +138,7 @@ msgid "No cover selected"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/record_live/form_component.ex:46
|
#: 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
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Purchased at"
|
msgid "Purchased at"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -148,6 +149,7 @@ msgid "Record updated successfully"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/record_live/form_component.ex:45
|
#: 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
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Release"
|
msgid "Release"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -163,6 +165,7 @@ msgid "Saving..."
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/record_live/form_component.ex:33
|
#: 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
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Type"
|
msgid "Type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -188,17 +191,21 @@ msgid "All Records"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/record_live/index.html.heex:154
|
#: 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
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Are you sure?"
|
msgid "Are you sure?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/record_live/index.html.heex:156
|
#: 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
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Delete"
|
msgid "Delete"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/record_live/index.ex:54
|
#: 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/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
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Edit"
|
msgid "Edit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -234,6 +241,7 @@ msgid "Search"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/record_live/index.html.heex:125
|
#: 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
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Show"
|
msgid "Show"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -244,6 +252,7 @@ msgid "Showing <b>%{visible}</b> of <b>%{total}</b> records"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/record_live/index.ex:17
|
#: lib/music_library_web/live/record_live/index.ex:17
|
||||||
|
#: lib/music_library_web/live/record_live/show.ex:19
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "The application has been updated, please reload."
|
msgid "The application has been updated, please reload."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -252,3 +261,28 @@ msgstr ""
|
|||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "View on MusicBrainz"
|
msgid "View on MusicBrainz"
|
||||||
msgstr ""
|
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 ""
|
||||||
|
|||||||
Reference in New Issue
Block a user