From 58b32817bae53f39223d790f8e5daff3124934fd Mon Sep 17 00:00:00 2001 From: shibao Date: Sat, 3 Dec 2022 21:40:05 -0500 Subject: [PATCH] use shot group table component instead --- .../components/shot_group_table_component.ex | 117 ++++++++++++++++++ lib/cannery_web/live/range_live/index.ex | 70 ----------- .../live/range_live/index.html.heex | 35 +++++- priv/gettext/de/LC_MESSAGES/default.po | 10 +- priv/gettext/de/LC_MESSAGES/prompts.po | 2 +- priv/gettext/default.pot | 10 +- priv/gettext/en/LC_MESSAGES/default.po | 10 +- priv/gettext/en/LC_MESSAGES/prompts.po | 2 +- priv/gettext/es/LC_MESSAGES/default.po | 10 +- priv/gettext/es/LC_MESSAGES/prompts.po | 2 +- priv/gettext/fr/LC_MESSAGES/default.po | 10 +- priv/gettext/fr/LC_MESSAGES/prompts.po | 2 +- priv/gettext/ga/LC_MESSAGES/default.po | 10 +- priv/gettext/ga/LC_MESSAGES/prompts.po | 2 +- priv/gettext/prompts.pot | 2 +- 15 files changed, 182 insertions(+), 112 deletions(-) create mode 100644 lib/cannery_web/components/shot_group_table_component.ex diff --git a/lib/cannery_web/components/shot_group_table_component.ex b/lib/cannery_web/components/shot_group_table_component.ex new file mode 100644 index 00000000..08503c2c --- /dev/null +++ b/lib/cannery_web/components/shot_group_table_component.ex @@ -0,0 +1,117 @@ +defmodule CanneryWeb.Components.ShotGroupTableComponent do + @moduledoc """ + A component that displays a list of shot groups + """ + use CanneryWeb, :live_component + alias Cannery.{Accounts.User, ActivityLog.ShotGroup, Repo} + alias Ecto.UUID + alias Phoenix.LiveView.{Rendered, Socket} + + @impl true + @spec update( + %{ + required(:id) => UUID.t(), + required(:current_user) => User.t(), + optional(:shot_groups) => [ShotGroup.t()], + optional(:actions) => Rendered.t(), + optional(any()) => any() + }, + Socket.t() + ) :: {:ok, Socket.t()} + def update(%{id: _id, shot_groups: _shot_groups, current_user: _current_user} = assigns, socket) do + socket = + socket + |> assign(assigns) + |> assign_new(:actions, fn -> [] end) + |> display_shot_groups() + + {:ok, socket} + end + + defp display_shot_groups( + %{ + assigns: %{ + shot_groups: shot_groups, + current_user: current_user, + actions: actions + } + } = socket + ) do + columns = [ + %{label: gettext("Ammo"), key: :name}, + %{label: gettext("Rounds shot"), key: :count}, + %{label: gettext("Notes"), key: :notes}, + %{label: gettext("Date"), key: :date}, + %{label: nil, key: :actions, sortable: false} + ] + + extra_data = %{current_user: current_user, actions: actions} + + rows = + shot_groups + |> Enum.map(fn shot_group -> + shot_group |> get_row_data_for_shot_group(columns, extra_data) + end) + + socket + |> assign( + columns: columns, + rows: rows + ) + end + + @impl true + def render(assigns) do + ~H""" +
+ <.live_component + module={CanneryWeb.Components.TableComponent} + id={"table-#{@id}"} + columns={@columns} + rows={@rows} + initial_key={:date} + initial_sort_mode={:desc} + /> +
+ """ + end + + @spec get_row_data_for_shot_group(ShotGroup.t(), columns :: [map()], extra_data :: map()) :: + map() + defp get_row_data_for_shot_group(shot_group, columns, extra_data) do + shot_group = shot_group |> Repo.preload(ammo_group: :ammo_type) + + columns + |> Map.new(fn %{key: key} -> + {key, get_row_value(key, shot_group, extra_data)} + end) + end + + defp get_row_value( + :name, + %{ammo_group: %{ammo_type: %{name: ammo_type_name} = ammo_group}}, + _extra_data + ) do + assigns = %{ammo_group: ammo_group, ammo_type_name: ammo_type_name} + + name_block = ~H""" + <.link navigate={Routes.ammo_group_show_path(Endpoint, :show, @ammo_group)} class="link"> + <%= @ammo_type_name %> + + """ + + {ammo_type_name, name_block} + end + + defp get_row_value(:date, %{date: date}, _extra_data), do: date |> display_date() + + defp get_row_value(:actions, shot_group, %{actions: actions}) do + assigns = %{actions: actions, shot_group: shot_group} + + ~H""" + <%= render_slot(@actions, @shot_group) %> + """ + end + + defp get_row_value(key, shot_group, _extra_data), do: shot_group |> Map.get(key) +end diff --git a/lib/cannery_web/live/range_live/index.ex b/lib/cannery_web/live/range_live/index.ex index 58662dfb..ac843506 100644 --- a/lib/cannery_web/live/range_live/index.ex +++ b/lib/cannery_web/live/range_live/index.ex @@ -112,26 +112,11 @@ defmodule CanneryWeb.RangeLive.Index do |> Repo.preload(ammo_group: :ammo_type) ammo_groups = Ammo.list_staged_ammo_groups(current_user) - - columns = [ - %{label: gettext("Ammo"), key: :name}, - %{label: gettext("Rounds shot"), key: :count}, - %{label: gettext("Notes"), key: :notes}, - %{label: gettext("Date"), key: :date}, - %{label: nil, key: :actions, sortable: false} - ] - - rows = - shot_groups - |> Enum.map(fn shot_group -> shot_group |> get_row_data_for_shot_group(columns) end) - chart_data = shot_groups |> get_chart_data_for_shot_group() socket |> assign( ammo_groups: ammo_groups, - columns: columns, - rows: rows, chart_data: chart_data, shot_groups: shot_groups ) @@ -153,59 +138,4 @@ defmodule CanneryWeb.RangeLive.Index do end) |> Enum.sort_by(fn %{date: date} -> date end, Date) end - - @spec get_row_data_for_shot_group(ShotGroup.t(), [map()]) :: map() - defp get_row_data_for_shot_group(%{date: date} = shot_group, columns) do - shot_group = shot_group |> Repo.preload(ammo_group: :ammo_type) - assigns = %{shot_group: shot_group} - - columns - |> Map.new(fn %{key: key} -> - value = - case key do - :name -> - {shot_group.ammo_group.ammo_type.name, - ~H""" - <.link - navigate={Routes.ammo_group_show_path(Endpoint, :show, @shot_group.ammo_group)} - class="link" - > - <%= @shot_group.ammo_group.ammo_type.name %> - - """} - - :date -> - date |> display_date() - - :actions -> - ~H""" -
- <.link - patch={Routes.range_index_path(Endpoint, :edit, @shot_group)} - class="text-primary-600 link" - data-qa={"edit-#{@shot_group.id}"} - > - - - - <.link - href="#" - class="text-primary-600 link" - phx-click="delete" - phx-value-id={@shot_group.id} - data-confirm={dgettext("prompts", "Are you sure you want to delete this shot record?")} - data-qa={"delete-#{@shot_group.id}"} - > - - -
- """ - - key -> - shot_group |> Map.get(key) - end - - {key, value} - end) - end end diff --git a/lib/cannery_web/live/range_live/index.html.heex b/lib/cannery_web/live/range_live/index.html.heex index 166838f0..6196857b 100644 --- a/lib/cannery_web/live/range_live/index.html.heex +++ b/lib/cannery_web/live/range_live/index.html.heex @@ -92,13 +92,36 @@ <% else %> <.live_component - module={CanneryWeb.Components.TableComponent} + module={CanneryWeb.Components.ShotGroupTableComponent} id="shot_groups_index_table" - columns={@columns} - rows={@rows} - initial_key={:date} - initial_sort_mode={:desc} - /> + shot_groups={@shot_groups} + current_user={@current_user} + > + <:actions :let={shot_group}> +
+ <.link + patch={Routes.range_index_path(Endpoint, :edit, shot_group)} + class="text-primary-600 link" + data-qa={"edit-#{shot_group.id}"} + > + + + + <.link + href="#" + class="text-primary-600 link" + phx-click="delete" + phx-value-id={shot_group.id} + data-confirm={ + dgettext("prompts", "Are you sure you want to delete this shot record?") + } + data-qa={"delete-#{shot_group.id}"} + > + + +
+ + <% end %> <% end %> diff --git a/priv/gettext/de/LC_MESSAGES/default.po b/priv/gettext/de/LC_MESSAGES/default.po index f4813670..31e3afc1 100644 --- a/priv/gettext/de/LC_MESSAGES/default.po +++ b/priv/gettext/de/LC_MESSAGES/default.po @@ -45,11 +45,11 @@ msgstr "Admins" msgid "Admins:" msgstr "Admins:" +#: lib/cannery_web/components/shot_group_table_component.ex:41 #: lib/cannery_web/components/topbar.ex:73 #: lib/cannery_web/live/ammo_group_live/index.ex:70 #: lib/cannery_web/live/ammo_group_live/index.ex:79 #: lib/cannery_web/live/ammo_group_live/index.html.heex:3 -#: lib/cannery_web/live/range_live/index.ex:117 #, elixir-autogen, elixir-format msgid "Ammo" msgstr "Munition" @@ -313,10 +313,10 @@ msgstr "Keine Tags" #: lib/cannery_web/components/add_shot_group_component.html.heex:37 #: lib/cannery_web/components/ammo_group_table_component.ex:81 +#: lib/cannery_web/components/shot_group_table_component.ex:43 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:49 #: lib/cannery_web/live/ammo_group_live/show.ex:93 #: lib/cannery_web/live/range_live/form_component.html.heex:29 -#: lib/cannery_web/live/range_live/index.ex:119 #, elixir-autogen, elixir-format msgid "Notes" msgstr "Bemerkungen" @@ -478,9 +478,9 @@ msgid "Range day" msgstr "Range Day" #: lib/cannery_web/components/add_shot_group_component.html.heex:45 +#: lib/cannery_web/components/shot_group_table_component.ex:44 #: lib/cannery_web/live/ammo_group_live/show.ex:94 #: lib/cannery_web/live/range_live/form_component.html.heex:36 -#: lib/cannery_web/live/range_live/index.ex:120 #, elixir-autogen, elixir-format msgid "Date" msgstr "Datum" @@ -524,8 +524,8 @@ msgstr "Keine Schüsse dokumentiert" msgid "Rounds left" msgstr "Patronen verbleibend" +#: lib/cannery_web/components/shot_group_table_component.ex:42 #: lib/cannery_web/live/ammo_group_live/show.ex:92 -#: lib/cannery_web/live/range_live/index.ex:118 #: lib/cannery_web/live/range_live/index.html.heex:62 #, elixir-autogen, elixir-format msgid "Rounds shot" @@ -862,7 +862,7 @@ msgstr "" msgid "%{percentage}%" msgstr "" -#: lib/cannery_web/live/range_live/index.ex:151 +#: lib/cannery_web/live/range_live/index.ex:136 #, elixir-autogen, elixir-format, fuzzy msgid "Rounds shot: %{count}" msgstr "Patronen abgefeuert" diff --git a/priv/gettext/de/LC_MESSAGES/prompts.po b/priv/gettext/de/LC_MESSAGES/prompts.po index 8261e382..4eca3f86 100644 --- a/priv/gettext/de/LC_MESSAGES/prompts.po +++ b/priv/gettext/de/LC_MESSAGES/prompts.po @@ -209,7 +209,7 @@ msgid "Are you sure you want to unstage this ammo?" msgstr "Sind sie sicher, dass Sie diese Munition demarkieren möchten?" #: lib/cannery_web/live/ammo_group_live/show.ex:137 -#: lib/cannery_web/live/range_live/index.ex:196 +#: lib/cannery_web/live/range_live/index.html.heex:116 #, elixir-autogen, elixir-format msgid "Are you sure you want to delete this shot record?" msgstr "Sind sie sicher, dass sie die Schießkladde löschen möchten?" diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index 0bf0965e..37c5d0b6 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -30,11 +30,11 @@ msgstr "" msgid "Admins:" msgstr "" +#: lib/cannery_web/components/shot_group_table_component.ex:41 #: lib/cannery_web/components/topbar.ex:73 #: lib/cannery_web/live/ammo_group_live/index.ex:70 #: lib/cannery_web/live/ammo_group_live/index.ex:79 #: lib/cannery_web/live/ammo_group_live/index.html.heex:3 -#: lib/cannery_web/live/range_live/index.ex:117 #, elixir-autogen, elixir-format msgid "Ammo" msgstr "" @@ -298,10 +298,10 @@ msgstr "" #: lib/cannery_web/components/add_shot_group_component.html.heex:37 #: lib/cannery_web/components/ammo_group_table_component.ex:81 +#: lib/cannery_web/components/shot_group_table_component.ex:43 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:49 #: lib/cannery_web/live/ammo_group_live/show.ex:93 #: lib/cannery_web/live/range_live/form_component.html.heex:29 -#: lib/cannery_web/live/range_live/index.ex:119 #, elixir-autogen, elixir-format msgid "Notes" msgstr "" @@ -461,9 +461,9 @@ msgid "Range day" msgstr "" #: lib/cannery_web/components/add_shot_group_component.html.heex:45 +#: lib/cannery_web/components/shot_group_table_component.ex:44 #: lib/cannery_web/live/ammo_group_live/show.ex:94 #: lib/cannery_web/live/range_live/form_component.html.heex:36 -#: lib/cannery_web/live/range_live/index.ex:120 #, elixir-autogen, elixir-format msgid "Date" msgstr "" @@ -507,8 +507,8 @@ msgstr "" msgid "Rounds left" msgstr "" +#: lib/cannery_web/components/shot_group_table_component.ex:42 #: lib/cannery_web/live/ammo_group_live/show.ex:92 -#: lib/cannery_web/live/range_live/index.ex:118 #: lib/cannery_web/live/range_live/index.html.heex:62 #, elixir-autogen, elixir-format msgid "Rounds shot" @@ -845,7 +845,7 @@ msgstr "" msgid "%{percentage}%" msgstr "" -#: lib/cannery_web/live/range_live/index.ex:151 +#: lib/cannery_web/live/range_live/index.ex:136 #, elixir-autogen, elixir-format msgid "Rounds shot: %{count}" msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po index 5a7d017d..c77f7d96 100644 --- a/priv/gettext/en/LC_MESSAGES/default.po +++ b/priv/gettext/en/LC_MESSAGES/default.po @@ -31,11 +31,11 @@ msgstr "" msgid "Admins:" msgstr "" +#: lib/cannery_web/components/shot_group_table_component.ex:41 #: lib/cannery_web/components/topbar.ex:73 #: lib/cannery_web/live/ammo_group_live/index.ex:70 #: lib/cannery_web/live/ammo_group_live/index.ex:79 #: lib/cannery_web/live/ammo_group_live/index.html.heex:3 -#: lib/cannery_web/live/range_live/index.ex:117 #, elixir-autogen, elixir-format msgid "Ammo" msgstr "" @@ -299,10 +299,10 @@ msgstr "" #: lib/cannery_web/components/add_shot_group_component.html.heex:37 #: lib/cannery_web/components/ammo_group_table_component.ex:81 +#: lib/cannery_web/components/shot_group_table_component.ex:43 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:49 #: lib/cannery_web/live/ammo_group_live/show.ex:93 #: lib/cannery_web/live/range_live/form_component.html.heex:29 -#: lib/cannery_web/live/range_live/index.ex:119 #, elixir-autogen, elixir-format msgid "Notes" msgstr "" @@ -462,9 +462,9 @@ msgid "Range day" msgstr "" #: lib/cannery_web/components/add_shot_group_component.html.heex:45 +#: lib/cannery_web/components/shot_group_table_component.ex:44 #: lib/cannery_web/live/ammo_group_live/show.ex:94 #: lib/cannery_web/live/range_live/form_component.html.heex:36 -#: lib/cannery_web/live/range_live/index.ex:120 #, elixir-autogen, elixir-format msgid "Date" msgstr "" @@ -508,8 +508,8 @@ msgstr "" msgid "Rounds left" msgstr "" +#: lib/cannery_web/components/shot_group_table_component.ex:42 #: lib/cannery_web/live/ammo_group_live/show.ex:92 -#: lib/cannery_web/live/range_live/index.ex:118 #: lib/cannery_web/live/range_live/index.html.heex:62 #, elixir-autogen, elixir-format msgid "Rounds shot" @@ -846,7 +846,7 @@ msgstr "" msgid "%{percentage}%" msgstr "" -#: lib/cannery_web/live/range_live/index.ex:151 +#: lib/cannery_web/live/range_live/index.ex:136 #, elixir-autogen, elixir-format, fuzzy msgid "Rounds shot: %{count}" msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/prompts.po b/priv/gettext/en/LC_MESSAGES/prompts.po index 7b8dff56..6c67f546 100644 --- a/priv/gettext/en/LC_MESSAGES/prompts.po +++ b/priv/gettext/en/LC_MESSAGES/prompts.po @@ -189,7 +189,7 @@ msgid "Are you sure you want to unstage this ammo?" msgstr "" #: lib/cannery_web/live/ammo_group_live/show.ex:137 -#: lib/cannery_web/live/range_live/index.ex:196 +#: lib/cannery_web/live/range_live/index.html.heex:116 #, elixir-autogen, elixir-format msgid "Are you sure you want to delete this shot record?" msgstr "" diff --git a/priv/gettext/es/LC_MESSAGES/default.po b/priv/gettext/es/LC_MESSAGES/default.po index d78464ab..b9ea4155 100644 --- a/priv/gettext/es/LC_MESSAGES/default.po +++ b/priv/gettext/es/LC_MESSAGES/default.po @@ -45,11 +45,11 @@ msgstr "" msgid "Admins:" msgstr "" +#: lib/cannery_web/components/shot_group_table_component.ex:41 #: lib/cannery_web/components/topbar.ex:73 #: lib/cannery_web/live/ammo_group_live/index.ex:70 #: lib/cannery_web/live/ammo_group_live/index.ex:79 #: lib/cannery_web/live/ammo_group_live/index.html.heex:3 -#: lib/cannery_web/live/range_live/index.ex:117 #, elixir-autogen, elixir-format msgid "Ammo" msgstr "" @@ -313,10 +313,10 @@ msgstr "" #: lib/cannery_web/components/add_shot_group_component.html.heex:37 #: lib/cannery_web/components/ammo_group_table_component.ex:81 +#: lib/cannery_web/components/shot_group_table_component.ex:43 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:49 #: lib/cannery_web/live/ammo_group_live/show.ex:93 #: lib/cannery_web/live/range_live/form_component.html.heex:29 -#: lib/cannery_web/live/range_live/index.ex:119 #, elixir-autogen, elixir-format msgid "Notes" msgstr "" @@ -476,9 +476,9 @@ msgid "Range day" msgstr "" #: lib/cannery_web/components/add_shot_group_component.html.heex:45 +#: lib/cannery_web/components/shot_group_table_component.ex:44 #: lib/cannery_web/live/ammo_group_live/show.ex:94 #: lib/cannery_web/live/range_live/form_component.html.heex:36 -#: lib/cannery_web/live/range_live/index.ex:120 #, elixir-autogen, elixir-format msgid "Date" msgstr "" @@ -522,8 +522,8 @@ msgstr "" msgid "Rounds left" msgstr "" +#: lib/cannery_web/components/shot_group_table_component.ex:42 #: lib/cannery_web/live/ammo_group_live/show.ex:92 -#: lib/cannery_web/live/range_live/index.ex:118 #: lib/cannery_web/live/range_live/index.html.heex:62 #, elixir-autogen, elixir-format msgid "Rounds shot" @@ -860,7 +860,7 @@ msgstr "" msgid "%{percentage}%" msgstr "" -#: lib/cannery_web/live/range_live/index.ex:151 +#: lib/cannery_web/live/range_live/index.ex:136 #, elixir-autogen, elixir-format, fuzzy msgid "Rounds shot: %{count}" msgstr "" diff --git a/priv/gettext/es/LC_MESSAGES/prompts.po b/priv/gettext/es/LC_MESSAGES/prompts.po index 9f47ab46..866e8b1f 100644 --- a/priv/gettext/es/LC_MESSAGES/prompts.po +++ b/priv/gettext/es/LC_MESSAGES/prompts.po @@ -208,7 +208,7 @@ msgid "Are you sure you want to unstage this ammo?" msgstr "Está seguro que desea desmontar esta munición?" #: lib/cannery_web/live/ammo_group_live/show.ex:137 -#: lib/cannery_web/live/range_live/index.ex:196 +#: lib/cannery_web/live/range_live/index.html.heex:116 #, elixir-autogen, elixir-format msgid "Are you sure you want to delete this shot record?" msgstr "" diff --git a/priv/gettext/fr/LC_MESSAGES/default.po b/priv/gettext/fr/LC_MESSAGES/default.po index 8e9a1297..5a78871b 100644 --- a/priv/gettext/fr/LC_MESSAGES/default.po +++ b/priv/gettext/fr/LC_MESSAGES/default.po @@ -45,11 +45,11 @@ msgstr "Administrateur·ices" msgid "Admins:" msgstr "Administrateur·ices :" +#: lib/cannery_web/components/shot_group_table_component.ex:41 #: lib/cannery_web/components/topbar.ex:73 #: lib/cannery_web/live/ammo_group_live/index.ex:70 #: lib/cannery_web/live/ammo_group_live/index.ex:79 #: lib/cannery_web/live/ammo_group_live/index.html.heex:3 -#: lib/cannery_web/live/range_live/index.ex:117 #, elixir-autogen, elixir-format msgid "Ammo" msgstr "Munition" @@ -313,10 +313,10 @@ msgstr "Aucun tag" #: lib/cannery_web/components/add_shot_group_component.html.heex:37 #: lib/cannery_web/components/ammo_group_table_component.ex:81 +#: lib/cannery_web/components/shot_group_table_component.ex:43 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:49 #: lib/cannery_web/live/ammo_group_live/show.ex:93 #: lib/cannery_web/live/range_live/form_component.html.heex:29 -#: lib/cannery_web/live/range_live/index.ex:119 #, elixir-autogen, elixir-format msgid "Notes" msgstr "Notes" @@ -480,9 +480,9 @@ msgid "Range day" msgstr "Journée de stand" #: lib/cannery_web/components/add_shot_group_component.html.heex:45 +#: lib/cannery_web/components/shot_group_table_component.ex:44 #: lib/cannery_web/live/ammo_group_live/show.ex:94 #: lib/cannery_web/live/range_live/form_component.html.heex:36 -#: lib/cannery_web/live/range_live/index.ex:120 #, elixir-autogen, elixir-format msgid "Date" msgstr "Date" @@ -526,8 +526,8 @@ msgstr "Aucun tir enregistré" msgid "Rounds left" msgstr "Cartouches restantes" +#: lib/cannery_web/components/shot_group_table_component.ex:42 #: lib/cannery_web/live/ammo_group_live/show.ex:92 -#: lib/cannery_web/live/range_live/index.ex:118 #: lib/cannery_web/live/range_live/index.html.heex:62 #, elixir-autogen, elixir-format msgid "Rounds shot" @@ -865,7 +865,7 @@ msgstr "" msgid "%{percentage}%" msgstr "" -#: lib/cannery_web/live/range_live/index.ex:151 +#: lib/cannery_web/live/range_live/index.ex:136 #, elixir-autogen, elixir-format, fuzzy msgid "Rounds shot: %{count}" msgstr "Cartouches tirées" diff --git a/priv/gettext/fr/LC_MESSAGES/prompts.po b/priv/gettext/fr/LC_MESSAGES/prompts.po index 50380816..b2272480 100644 --- a/priv/gettext/fr/LC_MESSAGES/prompts.po +++ b/priv/gettext/fr/LC_MESSAGES/prompts.po @@ -210,7 +210,7 @@ msgid "Are you sure you want to unstage this ammo?" msgstr "Êtes-vous certain·e de vouloir désélectionner cette munition ?" #: lib/cannery_web/live/ammo_group_live/show.ex:137 -#: lib/cannery_web/live/range_live/index.ex:196 +#: lib/cannery_web/live/range_live/index.html.heex:116 #, elixir-autogen, elixir-format msgid "Are you sure you want to delete this shot record?" msgstr "Êtes-vous certain·e de vouloir supprimer cet enregistrement de tir ?" diff --git a/priv/gettext/ga/LC_MESSAGES/default.po b/priv/gettext/ga/LC_MESSAGES/default.po index 5ce5df1e..833d6b5c 100644 --- a/priv/gettext/ga/LC_MESSAGES/default.po +++ b/priv/gettext/ga/LC_MESSAGES/default.po @@ -41,11 +41,11 @@ msgstr "" msgid "Admins:" msgstr "" +#: lib/cannery_web/components/shot_group_table_component.ex:41 #: lib/cannery_web/components/topbar.ex:73 #: lib/cannery_web/live/ammo_group_live/index.ex:70 #: lib/cannery_web/live/ammo_group_live/index.ex:79 #: lib/cannery_web/live/ammo_group_live/index.html.heex:3 -#: lib/cannery_web/live/range_live/index.ex:117 #, elixir-autogen, elixir-format msgid "Ammo" msgstr "" @@ -309,10 +309,10 @@ msgstr "" #: lib/cannery_web/components/add_shot_group_component.html.heex:37 #: lib/cannery_web/components/ammo_group_table_component.ex:81 +#: lib/cannery_web/components/shot_group_table_component.ex:43 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:49 #: lib/cannery_web/live/ammo_group_live/show.ex:93 #: lib/cannery_web/live/range_live/form_component.html.heex:29 -#: lib/cannery_web/live/range_live/index.ex:119 #, elixir-autogen, elixir-format msgid "Notes" msgstr "" @@ -472,9 +472,9 @@ msgid "Range day" msgstr "" #: lib/cannery_web/components/add_shot_group_component.html.heex:45 +#: lib/cannery_web/components/shot_group_table_component.ex:44 #: lib/cannery_web/live/ammo_group_live/show.ex:94 #: lib/cannery_web/live/range_live/form_component.html.heex:36 -#: lib/cannery_web/live/range_live/index.ex:120 #, elixir-autogen, elixir-format msgid "Date" msgstr "" @@ -518,8 +518,8 @@ msgstr "" msgid "Rounds left" msgstr "" +#: lib/cannery_web/components/shot_group_table_component.ex:42 #: lib/cannery_web/live/ammo_group_live/show.ex:92 -#: lib/cannery_web/live/range_live/index.ex:118 #: lib/cannery_web/live/range_live/index.html.heex:62 #, elixir-autogen, elixir-format msgid "Rounds shot" @@ -856,7 +856,7 @@ msgstr "" msgid "%{percentage}%" msgstr "" -#: lib/cannery_web/live/range_live/index.ex:151 +#: lib/cannery_web/live/range_live/index.ex:136 #, elixir-autogen, elixir-format, fuzzy msgid "Rounds shot: %{count}" msgstr "" diff --git a/priv/gettext/ga/LC_MESSAGES/prompts.po b/priv/gettext/ga/LC_MESSAGES/prompts.po index d9e8fa0d..5697cf70 100644 --- a/priv/gettext/ga/LC_MESSAGES/prompts.po +++ b/priv/gettext/ga/LC_MESSAGES/prompts.po @@ -199,7 +199,7 @@ msgid "Are you sure you want to unstage this ammo?" msgstr "" #: lib/cannery_web/live/ammo_group_live/show.ex:137 -#: lib/cannery_web/live/range_live/index.ex:196 +#: lib/cannery_web/live/range_live/index.html.heex:116 #, elixir-autogen, elixir-format msgid "Are you sure you want to delete this shot record?" msgstr "" diff --git a/priv/gettext/prompts.pot b/priv/gettext/prompts.pot index 327d92ff..a0d90485 100644 --- a/priv/gettext/prompts.pot +++ b/priv/gettext/prompts.pot @@ -188,7 +188,7 @@ msgid "Are you sure you want to unstage this ammo?" msgstr "" #: lib/cannery_web/live/ammo_group_live/show.ex:137 -#: lib/cannery_web/live/range_live/index.ex:196 +#: lib/cannery_web/live/range_live/index.html.heex:116 #, elixir-autogen, elixir-format msgid "Are you sure you want to delete this shot record?" msgstr ""