From fd0bac3bbf2c8bc09ad0e7acb9fef3431147708d Mon Sep 17 00:00:00 2001 From: shibao Date: Sun, 19 Mar 2023 11:19:55 -0400 Subject: [PATCH] fix tables unable to sort on nil dates --- CHANGELOG.md | 1 + lib/cannery/comparable_date.ex | 12 +++++++ lib/cannery/comparable_datetime.ex | 15 ++++++++ .../components/ammo_group_table_component.ex | 7 ++-- .../components/shot_group_table_component.ex | 4 +-- lib/cannery_web/live/ammo_group_live/show.ex | 4 +-- priv/gettext/de/LC_MESSAGES/default.po | 34 +++++++++---------- priv/gettext/default.pot | 34 +++++++++---------- priv/gettext/en/LC_MESSAGES/default.po | 34 +++++++++---------- priv/gettext/es/LC_MESSAGES/default.po | 34 +++++++++---------- priv/gettext/fr/LC_MESSAGES/default.po | 34 +++++++++---------- priv/gettext/ga/LC_MESSAGES/default.po | 34 +++++++++---------- 12 files changed, 138 insertions(+), 109 deletions(-) create mode 100644 lib/cannery/comparable_date.ex create mode 100644 lib/cannery/comparable_datetime.ex diff --git a/CHANGELOG.md b/CHANGELOG.md index 24d5cbc..218fc78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # v0.8.5 - Add link in readme to github mirror +- Fix tables unable to sort on empty dates # v0.8.4 - Improve accessibility diff --git a/lib/cannery/comparable_date.ex b/lib/cannery/comparable_date.ex new file mode 100644 index 0000000..f92cfd5 --- /dev/null +++ b/lib/cannery/comparable_date.ex @@ -0,0 +1,12 @@ +defmodule Cannery.ComparableDate do + @moduledoc """ + A custom `Date` module that provides a `compare/2` function that is comparable + with nil values + """ + + @spec compare(Date.t() | any(), Date.t() | any()) :: :lt | :gt | :eq + def compare(%Date{} = date_1, %Date{} = date_2), do: Date.compare(date_1, date_2) + def compare(%Date{}, _date_2), do: :lt + def compare(_date_1, %Date{}), do: :gt + def compare(_date_1, _date_2), do: :eq +end diff --git a/lib/cannery/comparable_datetime.ex b/lib/cannery/comparable_datetime.ex new file mode 100644 index 0000000..33385a9 --- /dev/null +++ b/lib/cannery/comparable_datetime.ex @@ -0,0 +1,15 @@ +defmodule Cannery.ComparableDateTime do + @moduledoc """ + A custom `DateTime` module that provides a `compare/2` function that is + comparable with nil values + """ + + @spec compare(DateTime.t() | any(), DateTime.t() | any()) :: :lt | :gt | :eq + def compare(%DateTime{} = datetime_1, %DateTime{} = datetime_2) do + DateTime.compare(datetime_1, datetime_2) + end + + def compare(%DateTime{}, _datetime_2), do: :lt + def compare(_datetime_1, %DateTime{}), do: :gt + def compare(_datetime_1, _datetime_2), do: :eq +end diff --git a/lib/cannery_web/components/ammo_group_table_component.ex b/lib/cannery_web/components/ammo_group_table_component.ex index 4c16509..fb5459a 100644 --- a/lib/cannery_web/components/ammo_group_table_component.ex +++ b/lib/cannery_web/components/ammo_group_table_component.ex @@ -3,7 +3,8 @@ defmodule CanneryWeb.Components.AmmoGroupTableComponent do A component that displays a list of ammo groups """ use CanneryWeb, :live_component - alias Cannery.{Accounts.User, ActivityLog, Ammo, Ammo.AmmoGroup, Containers} + alias Cannery.{Accounts.User, Ammo.AmmoGroup, ComparableDate} + alias Cannery.{ActivityLog, Ammo, Containers} alias Ecto.UUID alias Phoenix.LiveView.{Rendered, Socket} @@ -54,8 +55,8 @@ defmodule CanneryWeb.Components.AmmoGroupTableComponent do end columns = [ - %{label: gettext("Purchased on"), key: :purchased_on, type: Date}, - %{label: gettext("Last used on"), key: :used_up_on, type: Date} | columns + %{label: gettext("Purchased on"), key: :purchased_on, type: ComparableDate}, + %{label: gettext("Last used on"), key: :used_up_on, type: ComparableDate} | columns ] columns = diff --git a/lib/cannery_web/components/shot_group_table_component.ex b/lib/cannery_web/components/shot_group_table_component.ex index c58bf6a..fa5d81f 100644 --- a/lib/cannery_web/components/shot_group_table_component.ex +++ b/lib/cannery_web/components/shot_group_table_component.ex @@ -3,7 +3,7 @@ defmodule CanneryWeb.Components.ShotGroupTableComponent do A component that displays a list of shot groups """ use CanneryWeb, :live_component - alias Cannery.{Accounts.User, ActivityLog.ShotGroup, Ammo} + alias Cannery.{Accounts.User, ActivityLog.ShotGroup, Ammo, ComparableDate} alias Ecto.UUID alias Phoenix.LiveView.{Rendered, Socket} @@ -41,7 +41,7 @@ defmodule CanneryWeb.Components.ShotGroupTableComponent do %{label: gettext("Ammo"), key: :name}, %{label: gettext("Rounds shot"), key: :count}, %{label: gettext("Notes"), key: :notes}, - %{label: gettext("Date"), key: :date, type: Date}, + %{label: gettext("Date"), key: :date, type: ComparableDate}, %{label: nil, key: :actions, sortable: false} ] diff --git a/lib/cannery_web/live/ammo_group_live/show.ex b/lib/cannery_web/live/ammo_group_live/show.ex index 4ce0fde..c091983 100644 --- a/lib/cannery_web/live/ammo_group_live/show.ex +++ b/lib/cannery_web/live/ammo_group_live/show.ex @@ -6,7 +6,7 @@ defmodule CanneryWeb.AmmoGroupLive.Show do use CanneryWeb, :live_view alias Cannery.{ActivityLog, ActivityLog.ShotGroup} alias Cannery.{Ammo, Ammo.AmmoGroup} - alias Cannery.Containers + alias Cannery.{ComparableDate, Containers} alias CanneryWeb.Endpoint alias Phoenix.LiveView.Socket @@ -90,7 +90,7 @@ defmodule CanneryWeb.AmmoGroupLive.Show do columns = [ %{label: gettext("Rounds shot"), key: :count}, %{label: gettext("Notes"), key: :notes}, - %{label: gettext("Date"), key: :date, type: Date}, + %{label: gettext("Date"), key: :date, type: ComparableDate}, %{label: nil, key: :actions, sortable: false} ] diff --git a/priv/gettext/de/LC_MESSAGES/default.po b/priv/gettext/de/LC_MESSAGES/default.po index 89ad2f3..fef076b 100644 --- a/priv/gettext/de/LC_MESSAGES/default.po +++ b/priv/gettext/de/LC_MESSAGES/default.po @@ -38,7 +38,7 @@ msgstr "Admins:" msgid "Ammo" msgstr "Munition" -#: lib/cannery_web/components/ammo_group_table_component.ex:89 +#: lib/cannery_web/components/ammo_group_table_component.ex:90 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:22 #, elixir-autogen, elixir-format msgid "Ammo type" @@ -90,7 +90,7 @@ msgstr "Patrone" msgid "Case material" msgstr "Gehäusematerial" -#: lib/cannery_web/components/ammo_group_table_component.ex:65 +#: lib/cannery_web/components/ammo_group_table_component.ex:66 #: lib/cannery_web/components/move_ammo_group_component.ex:67 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:59 #, elixir-autogen, elixir-format @@ -111,7 +111,7 @@ msgstr "Behälter" msgid "Corrosive" msgstr "Korrosiv" -#: lib/cannery_web/components/ammo_group_table_component.ex:76 +#: lib/cannery_web/components/ammo_group_table_component.ex:77 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:28 #, elixir-autogen, elixir-format msgid "Count" @@ -296,7 +296,7 @@ msgid "No tags" msgstr "Keine Tags" #: lib/cannery_web/components/add_shot_group_component.html.heex:38 -#: lib/cannery_web/components/ammo_group_table_component.ex:81 +#: lib/cannery_web/components/ammo_group_table_component.ex:82 #: lib/cannery_web/components/shot_group_table_component.ex:43 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:50 #: lib/cannery_web/live/ammo_group_live/show.ex:92 @@ -322,7 +322,7 @@ msgstr "Auf dem Bücherregal" msgid "Pressure" msgstr "Druck" -#: lib/cannery_web/components/ammo_group_table_component.ex:78 +#: lib/cannery_web/components/ammo_group_table_component.ex:79 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:35 #, elixir-autogen, elixir-format msgid "Price paid" @@ -440,7 +440,7 @@ msgstr "Ihre Daten bleiben bei Ihnen, Punkt" msgid "No tags for this container" msgstr "Keine Tags für diesen Behälter" -#: lib/cannery_web/components/ammo_group_table_component.ex:72 +#: lib/cannery_web/components/ammo_group_table_component.ex:73 #: lib/cannery_web/components/core_components/topbar.html.heex:66 #, elixir-autogen, elixir-format msgid "Range" @@ -526,8 +526,8 @@ msgstr "Kein weiterer Behälter" msgid "Shot log" msgstr "Schießkladde" -#: lib/cannery_web/components/ammo_group_table_component.ex:153 -#: lib/cannery_web/components/ammo_group_table_component.ex:229 +#: lib/cannery_web/components/ammo_group_table_component.ex:154 +#: lib/cannery_web/components/ammo_group_table_component.ex:230 #: lib/cannery_web/components/ammo_type_table_component.ex:224 #: lib/cannery_web/components/core_components/ammo_group_card.html.heex:42 #: lib/cannery_web/components/core_components/ammo_group_card.html.heex:47 @@ -621,14 +621,14 @@ msgstr "Editiere %{name} Tags" msgid "Rounds:" msgstr "Patronen:" -#: lib/cannery_web/components/ammo_group_table_component.ex:226 +#: lib/cannery_web/components/ammo_group_table_component.ex:227 #: lib/cannery_web/components/ammo_type_table_component.ex:223 #: lib/cannery_web/live/ammo_type_live/show.html.heex:143 #, elixir-autogen, elixir-format msgid "No cost information" msgstr "Keine Preisinformationen" -#: lib/cannery_web/components/ammo_group_table_component.ex:80 +#: lib/cannery_web/components/ammo_group_table_component.ex:81 #, elixir-autogen, elixir-format msgid "% left" msgstr "% verbleibend" @@ -809,7 +809,7 @@ msgstr "Behälter" msgid "Show used" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:187 +#: lib/cannery_web/components/ammo_group_table_component.ex:188 #: lib/cannery_web/live/ammo_group_live/show.html.heex:19 #, elixir-autogen, elixir-format msgid "%{percentage}%" @@ -996,13 +996,13 @@ msgstr "" msgid "Edit %{ammo_type_name}" msgstr "%{name} bearbeiten" -#: lib/cannery_web/components/ammo_group_table_component.ex:233 +#: lib/cannery_web/components/ammo_group_table_component.ex:234 #: lib/cannery_web/components/core_components/ammo_group_card.html.heex:17 #, elixir-autogen, elixir-format msgid "Empty" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:79 +#: lib/cannery_web/components/ammo_group_table_component.ex:80 #, elixir-autogen, elixir-format msgid "CPR" msgstr "" @@ -1012,7 +1012,7 @@ msgstr "" msgid "CPR:" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:77 +#: lib/cannery_web/components/ammo_group_table_component.ex:78 #, elixir-autogen, elixir-format, fuzzy msgid "Original Count" msgstr "Ursprüngliche Anzahl:" @@ -1032,7 +1032,7 @@ msgstr "" msgid "Total packs:" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:58 +#: lib/cannery_web/components/ammo_group_table_component.ex:59 #, elixir-autogen, elixir-format msgid "Last used on" msgstr "" @@ -1042,12 +1042,12 @@ msgstr "" msgid "Last used on:" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:171 +#: lib/cannery_web/components/ammo_group_table_component.ex:172 #, elixir-autogen, elixir-format msgid "Never used" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:57 +#: lib/cannery_web/components/ammo_group_table_component.ex:58 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:42 #, elixir-autogen, elixir-format msgid "Purchased on" diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index 467f1dc..724d1ea 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -34,7 +34,7 @@ msgstr "" msgid "Ammo" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:89 +#: lib/cannery_web/components/ammo_group_table_component.ex:90 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:22 #, elixir-autogen, elixir-format msgid "Ammo type" @@ -86,7 +86,7 @@ msgstr "" msgid "Case material" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:65 +#: lib/cannery_web/components/ammo_group_table_component.ex:66 #: lib/cannery_web/components/move_ammo_group_component.ex:67 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:59 #, elixir-autogen, elixir-format @@ -107,7 +107,7 @@ msgstr "" msgid "Corrosive" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:76 +#: lib/cannery_web/components/ammo_group_table_component.ex:77 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:28 #, elixir-autogen, elixir-format msgid "Count" @@ -292,7 +292,7 @@ msgid "No tags" msgstr "" #: lib/cannery_web/components/add_shot_group_component.html.heex:38 -#: lib/cannery_web/components/ammo_group_table_component.ex:81 +#: lib/cannery_web/components/ammo_group_table_component.ex:82 #: lib/cannery_web/components/shot_group_table_component.ex:43 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:50 #: lib/cannery_web/live/ammo_group_live/show.ex:92 @@ -318,7 +318,7 @@ msgstr "" msgid "Pressure" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:78 +#: lib/cannery_web/components/ammo_group_table_component.ex:79 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:35 #, elixir-autogen, elixir-format msgid "Price paid" @@ -434,7 +434,7 @@ msgstr "" msgid "No tags for this container" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:72 +#: lib/cannery_web/components/ammo_group_table_component.ex:73 #: lib/cannery_web/components/core_components/topbar.html.heex:66 #, elixir-autogen, elixir-format msgid "Range" @@ -520,8 +520,8 @@ msgstr "" msgid "Shot log" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:153 -#: lib/cannery_web/components/ammo_group_table_component.ex:229 +#: lib/cannery_web/components/ammo_group_table_component.ex:154 +#: lib/cannery_web/components/ammo_group_table_component.ex:230 #: lib/cannery_web/components/ammo_type_table_component.ex:224 #: lib/cannery_web/components/core_components/ammo_group_card.html.heex:42 #: lib/cannery_web/components/core_components/ammo_group_card.html.heex:47 @@ -615,14 +615,14 @@ msgstr "" msgid "Rounds:" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:226 +#: lib/cannery_web/components/ammo_group_table_component.ex:227 #: lib/cannery_web/components/ammo_type_table_component.ex:223 #: lib/cannery_web/live/ammo_type_live/show.html.heex:143 #, elixir-autogen, elixir-format msgid "No cost information" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:80 +#: lib/cannery_web/components/ammo_group_table_component.ex:81 #, elixir-autogen, elixir-format msgid "% left" msgstr "" @@ -803,7 +803,7 @@ msgstr "" msgid "Show used" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:187 +#: lib/cannery_web/components/ammo_group_table_component.ex:188 #: lib/cannery_web/live/ammo_group_live/show.html.heex:19 #, elixir-autogen, elixir-format msgid "%{percentage}%" @@ -990,13 +990,13 @@ msgstr "" msgid "Edit %{ammo_type_name}" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:233 +#: lib/cannery_web/components/ammo_group_table_component.ex:234 #: lib/cannery_web/components/core_components/ammo_group_card.html.heex:17 #, elixir-autogen, elixir-format msgid "Empty" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:79 +#: lib/cannery_web/components/ammo_group_table_component.ex:80 #, elixir-autogen, elixir-format msgid "CPR" msgstr "" @@ -1006,7 +1006,7 @@ msgstr "" msgid "CPR:" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:77 +#: lib/cannery_web/components/ammo_group_table_component.ex:78 #, elixir-autogen, elixir-format msgid "Original Count" msgstr "" @@ -1026,7 +1026,7 @@ msgstr "" msgid "Total packs:" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:58 +#: lib/cannery_web/components/ammo_group_table_component.ex:59 #, elixir-autogen, elixir-format msgid "Last used on" msgstr "" @@ -1036,12 +1036,12 @@ msgstr "" msgid "Last used on:" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:171 +#: lib/cannery_web/components/ammo_group_table_component.ex:172 #, elixir-autogen, elixir-format msgid "Never used" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:57 +#: lib/cannery_web/components/ammo_group_table_component.ex:58 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:42 #, elixir-autogen, elixir-format msgid "Purchased on" diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po index c590a5c..d8a9a11 100644 --- a/priv/gettext/en/LC_MESSAGES/default.po +++ b/priv/gettext/en/LC_MESSAGES/default.po @@ -34,7 +34,7 @@ msgstr "" msgid "Ammo" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:89 +#: lib/cannery_web/components/ammo_group_table_component.ex:90 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:22 #, elixir-autogen, elixir-format msgid "Ammo type" @@ -86,7 +86,7 @@ msgstr "" msgid "Case material" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:65 +#: lib/cannery_web/components/ammo_group_table_component.ex:66 #: lib/cannery_web/components/move_ammo_group_component.ex:67 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:59 #, elixir-autogen, elixir-format @@ -107,7 +107,7 @@ msgstr "" msgid "Corrosive" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:76 +#: lib/cannery_web/components/ammo_group_table_component.ex:77 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:28 #, elixir-autogen, elixir-format msgid "Count" @@ -292,7 +292,7 @@ msgid "No tags" msgstr "" #: lib/cannery_web/components/add_shot_group_component.html.heex:38 -#: lib/cannery_web/components/ammo_group_table_component.ex:81 +#: lib/cannery_web/components/ammo_group_table_component.ex:82 #: lib/cannery_web/components/shot_group_table_component.ex:43 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:50 #: lib/cannery_web/live/ammo_group_live/show.ex:92 @@ -318,7 +318,7 @@ msgstr "" msgid "Pressure" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:78 +#: lib/cannery_web/components/ammo_group_table_component.ex:79 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:35 #, elixir-autogen, elixir-format msgid "Price paid" @@ -434,7 +434,7 @@ msgstr "" msgid "No tags for this container" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:72 +#: lib/cannery_web/components/ammo_group_table_component.ex:73 #: lib/cannery_web/components/core_components/topbar.html.heex:66 #, elixir-autogen, elixir-format msgid "Range" @@ -520,8 +520,8 @@ msgstr "" msgid "Shot log" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:153 -#: lib/cannery_web/components/ammo_group_table_component.ex:229 +#: lib/cannery_web/components/ammo_group_table_component.ex:154 +#: lib/cannery_web/components/ammo_group_table_component.ex:230 #: lib/cannery_web/components/ammo_type_table_component.ex:224 #: lib/cannery_web/components/core_components/ammo_group_card.html.heex:42 #: lib/cannery_web/components/core_components/ammo_group_card.html.heex:47 @@ -615,14 +615,14 @@ msgstr "" msgid "Rounds:" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:226 +#: lib/cannery_web/components/ammo_group_table_component.ex:227 #: lib/cannery_web/components/ammo_type_table_component.ex:223 #: lib/cannery_web/live/ammo_type_live/show.html.heex:143 #, elixir-autogen, elixir-format msgid "No cost information" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:80 +#: lib/cannery_web/components/ammo_group_table_component.ex:81 #, elixir-autogen, elixir-format msgid "% left" msgstr "" @@ -803,7 +803,7 @@ msgstr "" msgid "Show used" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:187 +#: lib/cannery_web/components/ammo_group_table_component.ex:188 #: lib/cannery_web/live/ammo_group_live/show.html.heex:19 #, elixir-autogen, elixir-format msgid "%{percentage}%" @@ -990,13 +990,13 @@ msgstr "" msgid "Edit %{ammo_type_name}" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:233 +#: lib/cannery_web/components/ammo_group_table_component.ex:234 #: lib/cannery_web/components/core_components/ammo_group_card.html.heex:17 #, elixir-autogen, elixir-format msgid "Empty" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:79 +#: lib/cannery_web/components/ammo_group_table_component.ex:80 #, elixir-autogen, elixir-format msgid "CPR" msgstr "" @@ -1006,7 +1006,7 @@ msgstr "" msgid "CPR:" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:77 +#: lib/cannery_web/components/ammo_group_table_component.ex:78 #, elixir-autogen, elixir-format, fuzzy msgid "Original Count" msgstr "" @@ -1026,7 +1026,7 @@ msgstr "" msgid "Total packs:" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:58 +#: lib/cannery_web/components/ammo_group_table_component.ex:59 #, elixir-autogen, elixir-format msgid "Last used on" msgstr "" @@ -1036,12 +1036,12 @@ msgstr "" msgid "Last used on:" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:171 +#: lib/cannery_web/components/ammo_group_table_component.ex:172 #, elixir-autogen, elixir-format msgid "Never used" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:57 +#: lib/cannery_web/components/ammo_group_table_component.ex:58 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:42 #, elixir-autogen, elixir-format msgid "Purchased on" diff --git a/priv/gettext/es/LC_MESSAGES/default.po b/priv/gettext/es/LC_MESSAGES/default.po index 135a03a..1fe02f1 100644 --- a/priv/gettext/es/LC_MESSAGES/default.po +++ b/priv/gettext/es/LC_MESSAGES/default.po @@ -38,7 +38,7 @@ msgstr "Aministradores:" msgid "Ammo" msgstr "Munición" -#: lib/cannery_web/components/ammo_group_table_component.ex:89 +#: lib/cannery_web/components/ammo_group_table_component.ex:90 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:22 #, elixir-autogen, elixir-format msgid "Ammo type" @@ -90,7 +90,7 @@ msgstr "Cartucho" msgid "Case material" msgstr "Material del casquillo" -#: lib/cannery_web/components/ammo_group_table_component.ex:65 +#: lib/cannery_web/components/ammo_group_table_component.ex:66 #: lib/cannery_web/components/move_ammo_group_component.ex:67 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:59 #, elixir-autogen, elixir-format @@ -111,7 +111,7 @@ msgstr "Contenedores" msgid "Corrosive" msgstr "Corrosiva" -#: lib/cannery_web/components/ammo_group_table_component.ex:76 +#: lib/cannery_web/components/ammo_group_table_component.ex:77 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:28 #, elixir-autogen, elixir-format msgid "Count" @@ -296,7 +296,7 @@ msgid "No tags" msgstr "Sin etiquetas" #: lib/cannery_web/components/add_shot_group_component.html.heex:38 -#: lib/cannery_web/components/ammo_group_table_component.ex:81 +#: lib/cannery_web/components/ammo_group_table_component.ex:82 #: lib/cannery_web/components/shot_group_table_component.ex:43 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:50 #: lib/cannery_web/live/ammo_group_live/show.ex:92 @@ -322,7 +322,7 @@ msgstr "En la estantería" msgid "Pressure" msgstr "Presión" -#: lib/cannery_web/components/ammo_group_table_component.ex:78 +#: lib/cannery_web/components/ammo_group_table_component.ex:79 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:35 #, elixir-autogen, elixir-format msgid "Price paid" @@ -441,7 +441,7 @@ msgstr "Tus datos se quedan contigo, sin excepciones" msgid "No tags for this container" msgstr "Contenedor sin etiquetas" -#: lib/cannery_web/components/ammo_group_table_component.ex:72 +#: lib/cannery_web/components/ammo_group_table_component.ex:73 #: lib/cannery_web/components/core_components/topbar.html.heex:66 #, elixir-autogen, elixir-format msgid "Range" @@ -527,8 +527,8 @@ msgstr "No hay otros contenedores" msgid "Shot log" msgstr "Registro de tiros" -#: lib/cannery_web/components/ammo_group_table_component.ex:153 -#: lib/cannery_web/components/ammo_group_table_component.ex:229 +#: lib/cannery_web/components/ammo_group_table_component.ex:154 +#: lib/cannery_web/components/ammo_group_table_component.ex:230 #: lib/cannery_web/components/ammo_type_table_component.ex:224 #: lib/cannery_web/components/core_components/ammo_group_card.html.heex:42 #: lib/cannery_web/components/core_components/ammo_group_card.html.heex:47 @@ -622,14 +622,14 @@ msgstr "Editar etiquetas de %{name}" msgid "Rounds:" msgstr "Balas:" -#: lib/cannery_web/components/ammo_group_table_component.ex:226 +#: lib/cannery_web/components/ammo_group_table_component.ex:227 #: lib/cannery_web/components/ammo_type_table_component.ex:223 #: lib/cannery_web/live/ammo_type_live/show.html.heex:143 #, elixir-autogen, elixir-format msgid "No cost information" msgstr "No hay información de coste" -#: lib/cannery_web/components/ammo_group_table_component.ex:80 +#: lib/cannery_web/components/ammo_group_table_component.ex:81 #, elixir-autogen, elixir-format msgid "% left" msgstr "% restantes" @@ -811,7 +811,7 @@ msgstr "Contenedor:" msgid "Show used" msgstr "Mostrar usadas" -#: lib/cannery_web/components/ammo_group_table_component.ex:187 +#: lib/cannery_web/components/ammo_group_table_component.ex:188 #: lib/cannery_web/live/ammo_group_live/show.html.heex:19 #, elixir-autogen, elixir-format msgid "%{percentage}%" @@ -998,13 +998,13 @@ msgstr "" msgid "Edit %{ammo_type_name}" msgstr "Editar %{ammo_type_name}" -#: lib/cannery_web/components/ammo_group_table_component.ex:233 +#: lib/cannery_web/components/ammo_group_table_component.ex:234 #: lib/cannery_web/components/core_components/ammo_group_card.html.heex:17 #, elixir-autogen, elixir-format msgid "Empty" msgstr "Vacio" -#: lib/cannery_web/components/ammo_group_table_component.ex:79 +#: lib/cannery_web/components/ammo_group_table_component.ex:80 #, elixir-autogen, elixir-format msgid "CPR" msgstr "" @@ -1014,7 +1014,7 @@ msgstr "" msgid "CPR:" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:77 +#: lib/cannery_web/components/ammo_group_table_component.ex:78 #, elixir-autogen, elixir-format msgid "Original Count" msgstr "Cantidad Original" @@ -1034,7 +1034,7 @@ msgstr "Menu principal" msgid "Total packs:" msgstr "Paquetes totales:" -#: lib/cannery_web/components/ammo_group_table_component.ex:58 +#: lib/cannery_web/components/ammo_group_table_component.ex:59 #, elixir-autogen, elixir-format msgid "Last used on" msgstr "Usada por última vez en" @@ -1044,12 +1044,12 @@ msgstr "Usada por última vez en" msgid "Last used on:" msgstr "Usada por última vez en:" -#: lib/cannery_web/components/ammo_group_table_component.ex:171 +#: lib/cannery_web/components/ammo_group_table_component.ex:172 #, elixir-autogen, elixir-format msgid "Never used" msgstr "Nunca usada" -#: lib/cannery_web/components/ammo_group_table_component.ex:57 +#: lib/cannery_web/components/ammo_group_table_component.ex:58 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:42 #, elixir-autogen, elixir-format msgid "Purchased on" diff --git a/priv/gettext/fr/LC_MESSAGES/default.po b/priv/gettext/fr/LC_MESSAGES/default.po index 9745434..399b650 100644 --- a/priv/gettext/fr/LC_MESSAGES/default.po +++ b/priv/gettext/fr/LC_MESSAGES/default.po @@ -38,7 +38,7 @@ msgstr "Administrateur·ices :" msgid "Ammo" msgstr "Munition" -#: lib/cannery_web/components/ammo_group_table_component.ex:89 +#: lib/cannery_web/components/ammo_group_table_component.ex:90 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:22 #, elixir-autogen, elixir-format msgid "Ammo type" @@ -90,7 +90,7 @@ msgstr "Cartouche" msgid "Case material" msgstr "Matériau de la caisse" -#: lib/cannery_web/components/ammo_group_table_component.ex:65 +#: lib/cannery_web/components/ammo_group_table_component.ex:66 #: lib/cannery_web/components/move_ammo_group_component.ex:67 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:59 #, elixir-autogen, elixir-format @@ -111,7 +111,7 @@ msgstr "Conteneurs" msgid "Corrosive" msgstr "Corrosive" -#: lib/cannery_web/components/ammo_group_table_component.ex:76 +#: lib/cannery_web/components/ammo_group_table_component.ex:77 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:28 #, elixir-autogen, elixir-format msgid "Count" @@ -296,7 +296,7 @@ msgid "No tags" msgstr "Aucun tag" #: lib/cannery_web/components/add_shot_group_component.html.heex:38 -#: lib/cannery_web/components/ammo_group_table_component.ex:81 +#: lib/cannery_web/components/ammo_group_table_component.ex:82 #: lib/cannery_web/components/shot_group_table_component.ex:43 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:50 #: lib/cannery_web/live/ammo_group_live/show.ex:92 @@ -322,7 +322,7 @@ msgstr "Sur l’étagère" msgid "Pressure" msgstr "Pression" -#: lib/cannery_web/components/ammo_group_table_component.ex:78 +#: lib/cannery_web/components/ammo_group_table_component.ex:79 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:35 #, elixir-autogen, elixir-format msgid "Price paid" @@ -442,7 +442,7 @@ msgstr "Vos données restent avec vous, point final" msgid "No tags for this container" msgstr "Aucun tag pour ce conteneur" -#: lib/cannery_web/components/ammo_group_table_component.ex:72 +#: lib/cannery_web/components/ammo_group_table_component.ex:73 #: lib/cannery_web/components/core_components/topbar.html.heex:66 #, elixir-autogen, elixir-format msgid "Range" @@ -528,8 +528,8 @@ msgstr "Aucun autre conteneur" msgid "Shot log" msgstr "Évènements de tir" -#: lib/cannery_web/components/ammo_group_table_component.ex:153 -#: lib/cannery_web/components/ammo_group_table_component.ex:229 +#: lib/cannery_web/components/ammo_group_table_component.ex:154 +#: lib/cannery_web/components/ammo_group_table_component.ex:230 #: lib/cannery_web/components/ammo_type_table_component.ex:224 #: lib/cannery_web/components/core_components/ammo_group_card.html.heex:42 #: lib/cannery_web/components/core_components/ammo_group_card.html.heex:47 @@ -623,14 +623,14 @@ msgstr "Éditer les tags de %{name}" msgid "Rounds:" msgstr "Cartouches :" -#: lib/cannery_web/components/ammo_group_table_component.ex:226 +#: lib/cannery_web/components/ammo_group_table_component.ex:227 #: lib/cannery_web/components/ammo_type_table_component.ex:223 #: lib/cannery_web/live/ammo_type_live/show.html.heex:143 #, elixir-autogen, elixir-format msgid "No cost information" msgstr "Aucune information de prix" -#: lib/cannery_web/components/ammo_group_table_component.ex:80 +#: lib/cannery_web/components/ammo_group_table_component.ex:81 #, elixir-autogen, elixir-format msgid "% left" msgstr "% restante" @@ -812,7 +812,7 @@ msgstr "Conteneur" msgid "Show used" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:187 +#: lib/cannery_web/components/ammo_group_table_component.ex:188 #: lib/cannery_web/live/ammo_group_live/show.html.heex:19 #, elixir-autogen, elixir-format msgid "%{percentage}%" @@ -999,13 +999,13 @@ msgstr "" msgid "Edit %{ammo_type_name}" msgstr "Éditer %{name}" -#: lib/cannery_web/components/ammo_group_table_component.ex:233 +#: lib/cannery_web/components/ammo_group_table_component.ex:234 #: lib/cannery_web/components/core_components/ammo_group_card.html.heex:17 #, elixir-autogen, elixir-format msgid "Empty" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:79 +#: lib/cannery_web/components/ammo_group_table_component.ex:80 #, elixir-autogen, elixir-format msgid "CPR" msgstr "" @@ -1015,7 +1015,7 @@ msgstr "" msgid "CPR:" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:77 +#: lib/cannery_web/components/ammo_group_table_component.ex:78 #, elixir-autogen, elixir-format, fuzzy msgid "Original Count" msgstr "Nombre original :" @@ -1035,7 +1035,7 @@ msgstr "" msgid "Total packs:" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:58 +#: lib/cannery_web/components/ammo_group_table_component.ex:59 #, elixir-autogen, elixir-format msgid "Last used on" msgstr "" @@ -1045,12 +1045,12 @@ msgstr "" msgid "Last used on:" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:171 +#: lib/cannery_web/components/ammo_group_table_component.ex:172 #, elixir-autogen, elixir-format msgid "Never used" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:57 +#: lib/cannery_web/components/ammo_group_table_component.ex:58 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:42 #, elixir-autogen, elixir-format msgid "Purchased on" diff --git a/priv/gettext/ga/LC_MESSAGES/default.po b/priv/gettext/ga/LC_MESSAGES/default.po index 1d6b1d5..63ff486 100644 --- a/priv/gettext/ga/LC_MESSAGES/default.po +++ b/priv/gettext/ga/LC_MESSAGES/default.po @@ -36,7 +36,7 @@ msgstr "" msgid "Ammo" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:89 +#: lib/cannery_web/components/ammo_group_table_component.ex:90 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:22 #, elixir-autogen, elixir-format msgid "Ammo type" @@ -88,7 +88,7 @@ msgstr "" msgid "Case material" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:65 +#: lib/cannery_web/components/ammo_group_table_component.ex:66 #: lib/cannery_web/components/move_ammo_group_component.ex:67 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:59 #, elixir-autogen, elixir-format @@ -109,7 +109,7 @@ msgstr "" msgid "Corrosive" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:76 +#: lib/cannery_web/components/ammo_group_table_component.ex:77 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:28 #, elixir-autogen, elixir-format msgid "Count" @@ -294,7 +294,7 @@ msgid "No tags" msgstr "" #: lib/cannery_web/components/add_shot_group_component.html.heex:38 -#: lib/cannery_web/components/ammo_group_table_component.ex:81 +#: lib/cannery_web/components/ammo_group_table_component.ex:82 #: lib/cannery_web/components/shot_group_table_component.ex:43 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:50 #: lib/cannery_web/live/ammo_group_live/show.ex:92 @@ -320,7 +320,7 @@ msgstr "" msgid "Pressure" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:78 +#: lib/cannery_web/components/ammo_group_table_component.ex:79 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:35 #, elixir-autogen, elixir-format msgid "Price paid" @@ -436,7 +436,7 @@ msgstr "" msgid "No tags for this container" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:72 +#: lib/cannery_web/components/ammo_group_table_component.ex:73 #: lib/cannery_web/components/core_components/topbar.html.heex:66 #, elixir-autogen, elixir-format msgid "Range" @@ -522,8 +522,8 @@ msgstr "" msgid "Shot log" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:153 -#: lib/cannery_web/components/ammo_group_table_component.ex:229 +#: lib/cannery_web/components/ammo_group_table_component.ex:154 +#: lib/cannery_web/components/ammo_group_table_component.ex:230 #: lib/cannery_web/components/ammo_type_table_component.ex:224 #: lib/cannery_web/components/core_components/ammo_group_card.html.heex:42 #: lib/cannery_web/components/core_components/ammo_group_card.html.heex:47 @@ -617,14 +617,14 @@ msgstr "" msgid "Rounds:" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:226 +#: lib/cannery_web/components/ammo_group_table_component.ex:227 #: lib/cannery_web/components/ammo_type_table_component.ex:223 #: lib/cannery_web/live/ammo_type_live/show.html.heex:143 #, elixir-autogen, elixir-format msgid "No cost information" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:80 +#: lib/cannery_web/components/ammo_group_table_component.ex:81 #, elixir-autogen, elixir-format msgid "% left" msgstr "" @@ -805,7 +805,7 @@ msgstr "" msgid "Show used" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:187 +#: lib/cannery_web/components/ammo_group_table_component.ex:188 #: lib/cannery_web/live/ammo_group_live/show.html.heex:19 #, elixir-autogen, elixir-format msgid "%{percentage}%" @@ -992,13 +992,13 @@ msgstr "" msgid "Edit %{ammo_type_name}" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:233 +#: lib/cannery_web/components/ammo_group_table_component.ex:234 #: lib/cannery_web/components/core_components/ammo_group_card.html.heex:17 #, elixir-autogen, elixir-format msgid "Empty" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:79 +#: lib/cannery_web/components/ammo_group_table_component.ex:80 #, elixir-autogen, elixir-format msgid "CPR" msgstr "" @@ -1008,7 +1008,7 @@ msgstr "" msgid "CPR:" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:77 +#: lib/cannery_web/components/ammo_group_table_component.ex:78 #, elixir-autogen, elixir-format, fuzzy msgid "Original Count" msgstr "" @@ -1028,7 +1028,7 @@ msgstr "" msgid "Total packs:" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:58 +#: lib/cannery_web/components/ammo_group_table_component.ex:59 #, elixir-autogen, elixir-format msgid "Last used on" msgstr "" @@ -1038,12 +1038,12 @@ msgstr "" msgid "Last used on:" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:171 +#: lib/cannery_web/components/ammo_group_table_component.ex:172 #, elixir-autogen, elixir-format msgid "Never used" msgstr "" -#: lib/cannery_web/components/ammo_group_table_component.ex:57 +#: lib/cannery_web/components/ammo_group_table_component.ex:58 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:42 #, elixir-autogen, elixir-format msgid "Purchased on"