Refactor type/format labels to enable translations
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
defmodule MusicLibraryWeb.CollectionLive.Show do
|
||||
use MusicLibraryWeb, :live_view
|
||||
|
||||
import MusicLibraryWeb.RecordComponents, only: [toggle_actions_menu: 1, close_actions_menu: 1]
|
||||
import MusicLibraryWeb.RecordComponents,
|
||||
only: [toggle_actions_menu: 1, close_actions_menu: 1, format_label: 1, type_label: 1]
|
||||
|
||||
alias Phoenix.LiveView.JS
|
||||
alias MusicLibrary.Records
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
{@record.title}
|
||||
</h2>
|
||||
<p class="mt-2 text-sm leading-5 text-zinc-500 dark:text-zinc-400">
|
||||
{Records.Record.format_release(@record.release)} · {Records.Record.format_long_label(
|
||||
@record.format
|
||||
)} · {Records.Record.type_long_label(@record.type)}
|
||||
{Records.Record.format_release(@record.release)} · {format_label(@record.format)} · {type_label(
|
||||
@record.type
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
<div class="relative flex-none">
|
||||
|
||||
Reference in New Issue
Block a user