Use long labels for formats in stats page

This commit is contained in:
Claudio Ortolina
2024-10-07 10:04:31 +01:00
parent 409a8414d0
commit be9dc37ed5
3 changed files with 12 additions and 2 deletions
@@ -1,11 +1,13 @@
defmodule MusicLibraryWeb.StatsHTML do
use MusicLibraryWeb, :html
alias MusicLibrary.Records.Record
embed_templates "stats_html/*"
defp format_records_count(records_count_by_format) do
Enum.map(records_count_by_format, fn {format, count} ->
Integer.to_string(count) <> " " <> Atom.to_string(format)
Integer.to_string(count) <> " " <> Record.format_long_label(format)
end)
|> Enum.join(", ")
end