fix gettext for percentages

This commit is contained in:
2022-11-08 21:34:36 -05:00
parent ffd1029e78
commit 13bf8ab2b1
8 changed files with 38 additions and 2 deletions

View File

@ -194,7 +194,7 @@ defmodule CanneryWeb.AmmoGroupLive.Index do
end
defp get_value_for_key(:remaining, ammo_group),
do: "#{ammo_group |> Ammo.get_percentage_remaining()}%"
do: gettext("%{percentage}%", percentage: ammo_group |> Ammo.get_percentage_remaining())
defp get_value_for_key(:actions, ammo_group) do
assigns = %{ammo_group: ammo_group}

View File

@ -16,7 +16,7 @@
<span class="rounded-lg title text-lg">
<%= gettext("Percentage left:") %>
<%= "#{@ammo_group |> Ammo.get_percentage_remaining()}%" %>
<%= gettext("%{percentage}%", percentage: @ammo_group |> Ammo.get_percentage_remaining()) %>
</span>
<%= if @ammo_group.notes do %>