gettext monetary amounts

This commit is contained in:
shibao 2022-02-15 22:01:38 -05:00
parent 69eebc82cc
commit f30acd7fe2
4 changed files with 4 additions and 4 deletions

View File

@ -38,7 +38,7 @@ defmodule CanneryWeb.Components.AmmoGroupCard do
<%= if @ammo_group.price_paid do %>
<span class="rounded-lg title text-lg">
<%= gettext("Price paid:") %> $ <%= @ammo_group.price_paid |> :erlang.float_to_binary(decimals: 2) %>
<%= gettext("Price paid:") %> <%= gettext("$%{amount}", amount: @ammo_group.price_paid |> :erlang.float_to_binary(decimals: 2)) %>
</span>
<% end %>
</div>

View File

@ -60,7 +60,7 @@
<td class="p-2">
<%= if ammo_group.price_paid do %>
$ <%= ammo_group.price_paid |> :erlang.float_to_binary(decimals: 2) %>
<%= gettext("$%{amount}", amount: ammo_group.price_paid |> :erlang.float_to_binary(decimals: 2)) %>
<% end %>
</td>

View File

@ -18,7 +18,7 @@
<%= if @ammo_group.price_paid do %>
<span class="rounded-lg title text-lg">
<%= gettext("Price paid:") %> $ <%= @ammo_group.price_paid |> :erlang.float_to_binary(decimals: 2) %>
<%= gettext("Price paid:") %> <%= gettext("$%{amount}", amount: @ammo_group.price_paid |> :erlang.float_to_binary(decimals: 2)) %>
</span>
<% end %>
</div>

View File

@ -87,7 +87,7 @@
</h3>
<span class="mb-4 sm:mb-2 text-primary-600">
<%= @avg_cost_per_round |> :erlang.float_to_binary(decimals: 2) %>
<%= gettext("$%{amount}", amount: @avg_cost_per_round |> :erlang.float_to_binary(decimals: 2)) %>
</span>
<% end %>
</div>