Started to translate user facing strings into German.

This commit is contained in:
2026-02-14 12:41:27 +01:00
parent 1c02f28d25
commit d6f2d8c1f6
2 changed files with 22 additions and 13 deletions

View File

@ -10,16 +10,15 @@ defmodule BeetRoundServerWeb.BiddingLive.Form do
<Layouts.app flash={@flash} current_scope={@current_scope}>
<.header>
{@page_title}
<:subtitle>Use this form to manage bidding records in your database.</:subtitle>
<:subtitle>Bitte gib hier den Betrag ein, den Du monatlich bezahlen willst.</:subtitle>
</.header>
<.form for={@form} id="bidding-form" phx-change="validate" phx-submit="save">
<.input field={@form[:bidding_round]} type="number" label="Bidding round" />
<.input field={@form[:amount]} type="number" label="Amount" />
<.input field={@form[:depot_wish_one]} type="text" label="Depot wish one" />
<.input field={@form[:depot_wish_two]} type="text" label="Depot wish two" />
<footer>
<.button phx-disable-with="Saving..." variant="primary">Save Bidding</.button>
<.button phx-disable-with="Bearbeitung..." variant="primary">Gebot abgeben</.button>
<.button navigate={return_path(@current_scope, @return_to, @bidding)}>Cancel</.button>
</footer>
</.form>
@ -42,7 +41,7 @@ defmodule BeetRoundServerWeb.BiddingLive.Form do
bidding = Biddings.get_bidding!(socket.assigns.current_scope, id)
socket
|> assign(:page_title, "Edit Bidding")
|> assign(:page_title, "Gebot bearbeiten")
|> assign(:bidding, bidding)
|> assign(:form, to_form(Biddings.change_bidding(socket.assigns.current_scope, bidding)))
end
@ -51,14 +50,20 @@ defmodule BeetRoundServerWeb.BiddingLive.Form do
bidding = %Bidding{user_id: socket.assigns.current_scope.user.id}
socket
|> assign(:page_title, "New Bidding")
|> assign(:page_title, "Neues Gebot")
|> assign(:bidding, bidding)
|> assign(:form, to_form(Biddings.change_bidding(socket.assigns.current_scope, bidding)))
end
@impl true
def handle_event("validate", %{"bidding" => bidding_params}, socket) do
changeset = Biddings.change_bidding(socket.assigns.current_scope, socket.assigns.bidding, bidding_params)
changeset =
Biddings.change_bidding(
socket.assigns.current_scope,
socket.assigns.bidding,
bidding_params
)
{:noreply, assign(socket, form: to_form(changeset, action: :validate))}
end
@ -67,11 +72,15 @@ defmodule BeetRoundServerWeb.BiddingLive.Form do
end
defp save_bidding(socket, :edit, bidding_params) do
case Biddings.update_bidding(socket.assigns.current_scope, socket.assigns.bidding, bidding_params) do
case Biddings.update_bidding(
socket.assigns.current_scope,
socket.assigns.bidding,
bidding_params
) do
{:ok, bidding} ->
{:noreply,
socket
|> put_flash(:info, "Bidding updated successfully")
|> put_flash(:info, "Gebot erfolgreich bearbeitet")
|> push_navigate(
to: return_path(socket.assigns.current_scope, socket.assigns.return_to, bidding)
)}
@ -86,7 +95,7 @@ defmodule BeetRoundServerWeb.BiddingLive.Form do
{:ok, bidding} ->
{:noreply,
socket
|> put_flash(:info, "Bidding created successfully")
|> put_flash(:info, "Gebot erfolgreich abgegeben")
|> push_navigate(
to: return_path(socket.assigns.current_scope, socket.assigns.return_to, bidding)
)}

View File

@ -9,10 +9,10 @@ defmodule BeetRoundServerWeb.BiddingLive.Index do
~H"""
<Layouts.app flash={@flash} current_scope={@current_scope}>
<.header>
Listing Biddings
{@page_title}
<:actions>
<.button variant="primary" navigate={~p"/biddings/new"}>
<.icon name="hero-plus" /> New Bidding
<.icon name="hero-plus" /> Neues Gebot
</.button>
</:actions>
</.header>
@ -41,7 +41,7 @@ defmodule BeetRoundServerWeb.BiddingLive.Index do
<:action :let={{id, bidding}}>
<.link
phx-click={JS.push("delete", value: %{id: bidding.id}) |> hide("##{id}")}
data-confirm="Are you sure?"
data-confirm="Gebot wirklich löschen?"
>
Delete
</.link>
@ -61,7 +61,7 @@ defmodule BeetRoundServerWeb.BiddingLive.Index do
{:ok,
socket
|> assign(:page_title, "Listing Biddings")
|> assign(:page_title, "Aktuelles Gebot")
|> assign(bidding_round: current_round)
|> stream(:biddings, list_biddings(socket.assigns.current_scope))}
end