Translations.

This commit is contained in:
codevictory
2021-04-25 00:55:26 +03:00
parent f8858deefb
commit b987f2c49e
11 changed files with 44 additions and 43 deletions

View File

@@ -23,7 +23,7 @@ defmodule RunosaariWeb.PerformanceController do
case Schedule.create_performance(performance_params) do
{:ok, performance} ->
conn
|> put_flash(:info, "Performance created successfully.")
|> put_flash(:info, "Näytös luotu.")
|> redirect(to: Routes.performance_path(conn, :show, performance))
{:error, %Ecto.Changeset{} = changeset} ->
@@ -48,7 +48,7 @@ defmodule RunosaariWeb.PerformanceController do
case Schedule.update_performance(performance, performance_params) do
{:ok, performance} ->
conn
|> put_flash(:info, "Performance updated successfully.")
|> put_flash(:info, "Näytös päivitetty.")
|> redirect(to: Routes.performance_path(conn, :show, performance))
{:error, %Ecto.Changeset{} = changeset} ->
@@ -61,7 +61,7 @@ defmodule RunosaariWeb.PerformanceController do
{:ok, _performance} = Schedule.delete_performance(performance)
conn
|> put_flash(:info, "Performance deleted successfully.")
|> put_flash(:info, "Näytös poistettu.")
|> redirect(to: Routes.admin_performance_path(conn, :admin))
end
end

View File

@@ -23,8 +23,11 @@ defmodule RunosaariWeb.PerformerController do
case Registration.create_performer(performer_params) do
{:ok, performer} ->
conn
|> put_flash(:info, "Performer created successfully.")
|> redirect(to: Routes.performer_path(conn, :show, performer))
|> put_flash(
:info,
"Kiitokset ilmoittautumisestasi! Osallistumisesi tulee julkiseksi kun tapahtuman järjestäjät vahvistavat sen."
)
|> redirect(to: Routes.performer_path(conn, :index))
{:error, %Ecto.Changeset{} = changeset} ->
render(conn, "new.html", changeset: changeset)
@@ -48,7 +51,7 @@ defmodule RunosaariWeb.PerformerController do
case Registration.update_performer(performer, performer_params) do
{:ok, performer} ->
conn
|> put_flash(:info, "Performer updated successfully.")
|> put_flash(:info, "Esiintyjän tiedot päivitetty.")
|> redirect(to: Routes.performer_path(conn, :show, performer))
{:error, %Ecto.Changeset{} = changeset} ->
@@ -61,7 +64,7 @@ defmodule RunosaariWeb.PerformerController do
{:ok, _performer} = Registration.delete_performer(performer)
conn
|> put_flash(:info, "Performer deleted successfully.")
|> put_flash(:info, "Esiintyjä poistettu.")
|> redirect(to: Routes.admin_performer_path(conn, :admin))
end
end

View File

@@ -1,4 +1,4 @@
<h1>Ohjelma - HALLINTA</h1>
<h1>HALLINTA</h1>
<table>
<thead>
@@ -16,13 +16,13 @@
<td><%= performance.desc %></td>
<td>
<span><%= link "Show", to: Routes.performance_path(@conn, :show, performance) %></span>
<span><%= link "Edit", to: Routes.admin_performance_path(@conn, :edit, performance) %></span>
<span><%= link "Delete", to: Routes.admin_performance_path(@conn, :delete, performance), method: :delete, data: [confirm: "Are you sure?"] %></span>
<span><%= link "Lisätietoja", to: Routes.performance_path(@conn, :show, performance) %></span>
<span><%= link "Muokkaa", to: Routes.admin_performance_path(@conn, :edit, performance) %></span>
<span><%= link "Poista", to: Routes.admin_performance_path(@conn, :delete, performance), method: :delete, data: [confirm: "Haluatko poistaa näytöksen #{performance.name}?"] %></span>
</td>
</tr>
<% end %>
</tbody>
</table>
<span><%= link "New Performance", to: Routes.admin_performance_path(@conn, :new) %></span>
<span><%= link "Uusi näytös", to: Routes.admin_performance_path(@conn, :new) %></span>

View File

@@ -1,5 +1,5 @@
<h1>Edit Performance</h1>
<h1>Muokkaa näytöksen tietoja</h1>
<%= render "form.html", Map.put(assigns, :action, Routes.admin_performance_path(@conn, :update, @performance)) %>
<span><%= link "Back", to: Routes.performance_path(@conn, :index) %></span>
<span><%= link "Takaisin", to: Routes.performance_path(@conn, :index) %></span>

View File

@@ -1,19 +1,19 @@
<%= form_for @changeset, @action, fn f -> %>
<%= if @changeset.action do %>
<div class="alert alert-danger">
<p>Oops, something went wrong! Please check the errors below.</p>
<p>Jokin kentistä on tyhjä.</p>
</div>
<% end %>
<%= label f, :name %>
<%= label f, :name, "Nimi" %>
<%= text_input f, :name %>
<%= error_tag f, :name %>
<%= label f, :desc %>
<%= text_input f, :desc %>
<%= label f, :desc, "Seloste" %>
<%= textarea f, :desc %>
<%= error_tag f, :desc %>
<div>
<%= submit "Save" %>
<%= submit "Tallenna" %>
</div>
<% end %>

View File

@@ -1,12 +1,10 @@
<h1>Listing Performances</h1>
<h1>Ohjelma</h1>
<table>
<thead>
<tr>
<th>Time</th>
<th>Description</th>
<th></th>
<th>Nimi</th>
<th>Seloste</th>
</tr>
</thead>
<tbody>

View File

@@ -1,5 +1,5 @@
<h1>New Performance</h1>
<h1>Luo näytös</h1>
<%= render "form.html", Map.put(assigns, :action, Routes.admin_performance_path(@conn, :create)) %>
<span><%= link "Back", to: Routes.performance_path(@conn, :index) %></span>
<span><%= link "Takaisin", to: Routes.performance_path(@conn, :index) %></span>

View File

@@ -1,18 +1,18 @@
<h1>Show Performance</h1>
<h1>Näytös</h1>
<ul>
<li>
<strong>Time:</strong>
<strong>Nimi:</strong>
<%= @performance.name %>
</li>
<li>
<strong>Description:</strong>
<strong>Seloste:</strong>
<%= @performance.desc %>
</li>
</ul>
<span><%= link "Edit", to: Routes.admin_performance_path(@conn, :edit, @performance) %></span>
<span><%= link "Back", to: Routes.performance_path(@conn, :index) %></span>
<span><%= link "Muokkaa", to: Routes.admin_performance_path(@conn, :edit, @performance) %></span>
<span><%= link "Takaisin", to: Routes.performance_path(@conn, :index) %></span>

View File

@@ -1,4 +1,4 @@
<h1>Esiintyjät - HALLINTA</h1>
<h1>HALLINTA</h1>
<table>
<thead>
@@ -24,9 +24,9 @@
<td><%= performer.desc %></td>
<td>
<span><%= link "Näytä", to: Routes.performer_path(@conn, :show, performer) %></span>
<span><%= link "Lisätietoja", to: Routes.performer_path(@conn, :show, performer) %></span>
<span><%= link "Muokkaa", to: Routes.admin_performer_path(@conn, :edit, performer) %></span>
<span><%= link "Poista", to: Routes.admin_performer_path(@conn, :delete, performer), method: :delete, data: [confirm: "Are you sure?"] %></span>
<span><%= link "Poista", to: Routes.admin_performer_path(@conn, :delete, performer), method: :delete, data: [confirm: "Haluatko poistaa esiintyjän #{performer.fname} #{performer.lname}?"] %></span>
</td>
</tr>
<% end %>

View File

@@ -2,4 +2,4 @@
<%= render "form.html", Map.put(assigns, :action, Routes.admin_performer_path(@conn, :update, @performer)) %>
<span><%= link "Back", to: Routes.performer_path(@conn, :index) %></span>
<span><%= link "Takaisin", to: Routes.performer_path(@conn, :index) %></span>

View File

@@ -1,15 +1,15 @@
<%= form_for @changeset, @action, fn form -> %>
<%= if @changeset.action do %>
<div class="alert alert-danger">
<p>Oops, something went wrong! Please check the errors below.</p>
<p>Jokin kentistä on tyhjä.</p>
</div>
<% end %>
<%= label form, :fname, "Etunimi" %>
<%= label form, :fname, "Etunimi (julkistetaan nettisivuilla kun ilmoittautumisesi on hyväksytty)" %>
<%= text_input form, :fname %>
<%= error_tag form, :fname %>
<%= label form, :lname, "Sukunimi" %>
<%= label form, :lname, "Sukunimi (julkistetaan nettisivuilla kun ilmoittautumisesi on hyväksytty)" %>
<%= text_input form, :lname %>
<%= error_tag form, :lname %>
@@ -21,7 +21,7 @@
<%= text_input form, :tel %>
<%= error_tag form, :tel %>
<%= label form, :desc, "Huomiot" %>
<%= label form, :desc, "Seloste (julkistetaan nettisivuilla kun ilmoittautumisesi on hyväksytty)" %>
<%= textarea form, :desc %>
<%= error_tag form, :desc %>
@@ -42,11 +42,11 @@
<%= checkbox form, :date3 %>
<%= error_tag form, :date3 %>
<%= label form, :bus, "olen kiinnostunut bussikuljetuksesta" %>
<%= label form, :bus, "Olen kiinnostunut bussikuljetuksesta" %>
<%= checkbox form, :bus %>
<%= error_tag form, :bus %>
<%= label form, :accom, "olen kiinnostunut majoituksesta" %>
<%= label form, :accom, "Olen kiinnostunut majoituksesta" %>
<%= checkbox form, :accom %>
<%= error_tag form, :accom %>