From e0e7b25bc42e658059e0bc0a72f4e35ef9205cc9 Mon Sep 17 00:00:00 2001 From: shibao Date: Thu, 30 Mar 2023 21:38:56 -0400 Subject: [PATCH] add more text replacements --- README.md | 4 ++-- .../components/add_shot_record_component.html.heex | 6 +++--- .../live/pack_live/form_component.html.heex | 2 +- lib/cannery_web/live/pack_live/index.html.heex | 2 +- lib/cannery_web/live/pack_live/show.ex | 2 +- .../live/range_live/form_component.html.heex | 4 ++-- lib/cannery_web/live/range_live/index.ex | 2 +- priv/gettext/de/LC_MESSAGES/default.po | 12 ++++++------ priv/gettext/default.pot | 12 ++++++------ priv/gettext/en/LC_MESSAGES/default.po | 12 ++++++------ priv/gettext/es/LC_MESSAGES/default.po | 12 ++++++------ priv/gettext/fr/LC_MESSAGES/default.po | 12 ++++++------ priv/gettext/ga/LC_MESSAGES/default.po | 12 ++++++------ test/cannery_web/live/pack_live_test.exs | 14 +++++++------- test/cannery_web/live/range_live_test.exs | 10 +++++----- 15 files changed, 59 insertions(+), 59 deletions(-) diff --git a/README.md b/README.md index e9f47b9..7e64943 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ The self-hosted firearm tracker website. # Features - Create containers to store your ammunition, and tag them with custom tags -- Add ammunition types to Cannery, and then ammunition groups to your containers -- Stage groups of ammo for range day and record your ammo usage +- Add ammunition types to Cannery, and then ammo packs to your containers +- Stage ammo packs for range day and track your usage with shot records - Invitations via invite tokens or public registration # Installation diff --git a/lib/cannery_web/components/add_shot_record_component.html.heex b/lib/cannery_web/components/add_shot_record_component.html.heex index f255507..7c27dc6 100644 --- a/lib/cannery_web/components/add_shot_record_component.html.heex +++ b/lib/cannery_web/components/add_shot_record_component.html.heex @@ -6,7 +6,7 @@ <.form :let={f} for={@changeset} - id="shot-group-form" + id="shot-record-form" class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" phx-target={@myself} phx-change="validate" @@ -29,7 +29,7 @@ @@ -37,7 +37,7 @@ <%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %> <%= textarea(f, :notes, - id: "add-shot-group-form-notes", + id: "add-shot-record-form-notes", class: "input input-primary col-span-2", maxlength: 255, placeholder: gettext("Really great weather"), diff --git a/lib/cannery_web/live/pack_live/form_component.html.heex b/lib/cannery_web/live/pack_live/form_component.html.heex index d0b11fb..4e8149f 100644 --- a/lib/cannery_web/live/pack_live/form_component.html.heex +++ b/lib/cannery_web/live/pack_live/form_component.html.heex @@ -49,7 +49,7 @@ <%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %> <%= textarea(f, :notes, - id: "ammo-group-form-notes", + id: "pack-form-notes", class: "text-center col-span-2 input input-primary", phx_hook: "MaintainAttrs", phx_update: "ignore" diff --git a/lib/cannery_web/live/pack_live/index.html.heex b/lib/cannery_web/live/pack_live/index.html.heex index c7cc839..88d2db4 100644 --- a/lib/cannery_web/live/pack_live/index.html.heex +++ b/lib/cannery_web/live/pack_live/index.html.heex @@ -97,7 +97,7 @@ <% else %> <.live_component module={CanneryWeb.Components.PackTableComponent} - id="ammo-group-index-table" + id="pack-index-table" packs={@packs} current_user={@current_user} show_used={@show_used} diff --git a/lib/cannery_web/live/pack_live/show.ex b/lib/cannery_web/live/pack_live/show.ex index c1ce884..a41bdb8 100644 --- a/lib/cannery_web/live/pack_live/show.ex +++ b/lib/cannery_web/live/pack_live/show.ex @@ -39,7 +39,7 @@ defmodule CanneryWeb.PackLive.Show do end defp page_title(:add_shot_record), do: gettext("Record Shots") - defp page_title(:edit_shot_record), do: gettext("Edit Shot Records") + defp page_title(:edit_shot_record), do: gettext("Edit Shot Record") defp page_title(:move), do: gettext("Move Ammo") defp page_title(:show), do: gettext("Show Ammo") defp page_title(:edit), do: gettext("Edit Ammo") diff --git a/lib/cannery_web/live/range_live/form_component.html.heex b/lib/cannery_web/live/range_live/form_component.html.heex index fd0276b..d51154e 100644 --- a/lib/cannery_web/live/range_live/form_component.html.heex +++ b/lib/cannery_web/live/range_live/form_component.html.heex @@ -6,7 +6,7 @@ <.form :let={f} for={@changeset} - id="shot-group-form" + id="shot-record-form" class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" phx-target={@myself} phx-change="validate" @@ -29,7 +29,7 @@ <%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %> <%= textarea(f, :notes, - id: "shot-group-form-notes", + id: "shot-record-form-notes", class: "input input-primary col-span-2", maxlength: 255, placeholder: gettext("Really great weather"), diff --git a/lib/cannery_web/live/range_live/index.ex b/lib/cannery_web/live/range_live/index.ex index 7e20d44..893ca3e 100644 --- a/lib/cannery_web/live/range_live/index.ex +++ b/lib/cannery_web/live/range_live/index.ex @@ -37,7 +37,7 @@ defmodule CanneryWeb.RangeLive.Index do defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do socket |> assign( - page_title: gettext("Edit Shot Records"), + page_title: gettext("Edit Shot Record"), shot_record: ActivityLog.get_shot_record!(id, current_user) ) end diff --git a/priv/gettext/de/LC_MESSAGES/default.po b/priv/gettext/de/LC_MESSAGES/default.po index 3935e83..e5d0807 100644 --- a/priv/gettext/de/LC_MESSAGES/default.po +++ b/priv/gettext/de/LC_MESSAGES/default.po @@ -469,12 +469,6 @@ msgstr "Keine Munition selektiert" msgid "Record shots" msgstr "Schüsse dokumentieren" -#: lib/cannery_web/live/pack_live/show.ex:42 -#: lib/cannery_web/live/range_live/index.ex:40 -#, elixir-autogen, elixir-format -msgid "Edit Shot Records" -msgstr "Schießkladde editieren" - #: lib/cannery_web/live/range_live/index.ex:48 #, elixir-autogen, elixir-format msgid "New Shot Records" @@ -1465,3 +1459,9 @@ msgstr "Patronen:" #, elixir-autogen, elixir-format msgid "Used up!" msgstr "" + +#: lib/cannery_web/live/pack_live/show.ex:42 +#: lib/cannery_web/live/range_live/index.ex:40 +#, elixir-autogen, elixir-format, fuzzy +msgid "Edit Shot Record" +msgstr "Schießkladde editieren" diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index 57a2aaf..4759334 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -463,12 +463,6 @@ msgstr "" msgid "Record shots" msgstr "" -#: lib/cannery_web/live/pack_live/show.ex:42 -#: lib/cannery_web/live/range_live/index.ex:40 -#, elixir-autogen, elixir-format -msgid "Edit Shot Records" -msgstr "" - #: lib/cannery_web/live/range_live/index.ex:48 #, elixir-autogen, elixir-format msgid "New Shot Records" @@ -1448,3 +1442,9 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Used up!" msgstr "" + +#: lib/cannery_web/live/pack_live/show.ex:42 +#: lib/cannery_web/live/range_live/index.ex:40 +#, elixir-autogen, elixir-format +msgid "Edit Shot Record" +msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po index 8311057..ca02471 100644 --- a/priv/gettext/en/LC_MESSAGES/default.po +++ b/priv/gettext/en/LC_MESSAGES/default.po @@ -463,12 +463,6 @@ msgstr "" msgid "Record shots" msgstr "" -#: lib/cannery_web/live/pack_live/show.ex:42 -#: lib/cannery_web/live/range_live/index.ex:40 -#, elixir-autogen, elixir-format -msgid "Edit Shot Records" -msgstr "" - #: lib/cannery_web/live/range_live/index.ex:48 #, elixir-autogen, elixir-format msgid "New Shot Records" @@ -1448,3 +1442,9 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Used up!" msgstr "" + +#: lib/cannery_web/live/pack_live/show.ex:42 +#: lib/cannery_web/live/range_live/index.ex:40 +#, elixir-autogen, elixir-format, fuzzy +msgid "Edit Shot Record" +msgstr "" diff --git a/priv/gettext/es/LC_MESSAGES/default.po b/priv/gettext/es/LC_MESSAGES/default.po index de19a1d..71891e2 100644 --- a/priv/gettext/es/LC_MESSAGES/default.po +++ b/priv/gettext/es/LC_MESSAGES/default.po @@ -470,12 +470,6 @@ msgstr "No hay munición preparada" msgid "Record shots" msgstr "Tiros récord" -#: lib/cannery_web/live/pack_live/show.ex:42 -#: lib/cannery_web/live/range_live/index.ex:40 -#, elixir-autogen, elixir-format -msgid "Edit Shot Records" -msgstr "Editar Tiros Récord" - #: lib/cannery_web/live/range_live/index.ex:48 #, elixir-autogen, elixir-format msgid "New Shot Records" @@ -1467,3 +1461,9 @@ msgstr "Balas" #, elixir-autogen, elixir-format msgid "Used up!" msgstr "" + +#: lib/cannery_web/live/pack_live/show.ex:42 +#: lib/cannery_web/live/range_live/index.ex:40 +#, elixir-autogen, elixir-format, fuzzy +msgid "Edit Shot Record" +msgstr "Editar Tiros Récord" diff --git a/priv/gettext/fr/LC_MESSAGES/default.po b/priv/gettext/fr/LC_MESSAGES/default.po index 2fc7f40..b4d98a6 100644 --- a/priv/gettext/fr/LC_MESSAGES/default.po +++ b/priv/gettext/fr/LC_MESSAGES/default.po @@ -471,12 +471,6 @@ msgstr "Aucune munition sélectionnée" msgid "Record shots" msgstr "Tirs enregistrés" -#: lib/cannery_web/live/pack_live/show.ex:42 -#: lib/cannery_web/live/range_live/index.ex:40 -#, elixir-autogen, elixir-format -msgid "Edit Shot Records" -msgstr "Modifier les enregistrements de tir" - #: lib/cannery_web/live/range_live/index.ex:48 #, elixir-autogen, elixir-format msgid "New Shot Records" @@ -1468,3 +1462,9 @@ msgstr "Cartouches :" #, elixir-autogen, elixir-format msgid "Used up!" msgstr "" + +#: lib/cannery_web/live/pack_live/show.ex:42 +#: lib/cannery_web/live/range_live/index.ex:40 +#, elixir-autogen, elixir-format, fuzzy +msgid "Edit Shot Record" +msgstr "Modifier les enregistrements de tir" diff --git a/priv/gettext/ga/LC_MESSAGES/default.po b/priv/gettext/ga/LC_MESSAGES/default.po index 96a3eed..7e98ffc 100644 --- a/priv/gettext/ga/LC_MESSAGES/default.po +++ b/priv/gettext/ga/LC_MESSAGES/default.po @@ -465,12 +465,6 @@ msgstr "" msgid "Record shots" msgstr "" -#: lib/cannery_web/live/pack_live/show.ex:42 -#: lib/cannery_web/live/range_live/index.ex:40 -#, elixir-autogen, elixir-format -msgid "Edit Shot Records" -msgstr "" - #: lib/cannery_web/live/range_live/index.ex:48 #, elixir-autogen, elixir-format msgid "New Shot Records" @@ -1459,3 +1453,9 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Used up!" msgstr "" + +#: lib/cannery_web/live/pack_live/show.ex:42 +#: lib/cannery_web/live/range_live/index.ex:40 +#, elixir-autogen, elixir-format, fuzzy +msgid "Edit Shot Record" +msgstr "" diff --git a/test/cannery_web/live/pack_live_test.exs b/test/cannery_web/live/pack_live_test.exs index 42898bd..43e5f06 100644 --- a/test/cannery_web/live/pack_live_test.exs +++ b/test/cannery_web/live/pack_live_test.exs @@ -318,12 +318,12 @@ defmodule CanneryWeb.PackLiveTest do assert_patch(index_live, Routes.pack_index_path(conn, :add_shot_record, pack)) assert index_live - |> form("#shot-group-form") + |> form("#shot-record-form") |> render_change(shot_record: @shot_record_invalid_attrs) =~ "can't be blank" {:ok, _view, html} = index_live - |> form("#shot-group-form") + |> form("#shot-record-form") |> render_submit(shot_record: @shot_record_create_attrs) |> follow_redirect(conn, Routes.pack_index_path(conn, :index)) @@ -401,12 +401,12 @@ defmodule CanneryWeb.PackLiveTest do assert_patch(index_live, Routes.pack_show_path(conn, :add_shot_record, pack)) assert index_live - |> form("#shot-group-form") + |> form("#shot-record-form") |> render_change(shot_record: @shot_record_invalid_attrs) =~ "can't be blank" {:ok, _view, html} = index_live - |> form("#shot-group-form") + |> form("#shot-record-form") |> render_submit(shot_record: @shot_record_create_attrs) |> follow_redirect(conn, Routes.pack_show_path(conn, :show, pack)) @@ -423,7 +423,7 @@ defmodule CanneryWeb.PackLiveTest do assert index_live |> element(~s/a[aria-label="Edit shot recordd of #{shot_record.count} shots"]/) - |> render_click() =~ "Edit Shot Records" + |> render_click() =~ "Edit Shot Record" assert_patch( index_live, @@ -431,12 +431,12 @@ defmodule CanneryWeb.PackLiveTest do ) assert index_live - |> form("#shot-group-form") + |> form("#shot-record-form") |> render_change(shot_record: @shot_record_invalid_attrs) =~ "can't be blank" {:ok, _view, html} = index_live - |> form("#shot-group-form") + |> form("#shot-record-form") |> render_submit(shot_record: @shot_record_update_attrs) |> follow_redirect(conn, Routes.pack_show_path(conn, :show, pack)) diff --git a/test/cannery_web/live/range_live_test.exs b/test/cannery_web/live/range_live_test.exs index 52016cc..b7e8385 100644 --- a/test/cannery_web/live/range_live_test.exs +++ b/test/cannery_web/live/range_live_test.exs @@ -133,12 +133,12 @@ defmodule CanneryWeb.RangeLiveTest do assert_patch(index_live, Routes.range_index_path(conn, :add_shot_record, pack)) assert index_live - |> form("#shot-group-form") + |> form("#shot-record-form") |> render_change(shot_record: @invalid_attrs) =~ "can't be blank" {:ok, _view, html} = index_live - |> form("#shot-group-form") + |> form("#shot-record-form") |> render_submit(shot_record: @create_attrs) |> follow_redirect(conn, Routes.range_index_path(conn, :index)) @@ -151,17 +151,17 @@ defmodule CanneryWeb.RangeLiveTest do assert index_live |> element(~s/a[aria-label="Edit shot record of #{shot_record.count} shots"]/) - |> render_click() =~ "Edit Shot Records" + |> render_click() =~ "Edit Shot Record" assert_patch(index_live, Routes.range_index_path(conn, :edit, shot_record)) assert index_live - |> form("#shot-group-form") + |> form("#shot-record-form") |> render_change(shot_record: @invalid_attrs) =~ "can't be blank" {:ok, _view, html} = index_live - |> form("#shot-group-form", shot_record: @update_attrs) + |> form("#shot-record-form", shot_record: @update_attrs) |> render_submit() |> follow_redirect(conn, Routes.range_index_path(conn, :index))