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

View File

@@ -23,8 +23,11 @@ defmodule RunosaariWeb.PerformerController do
case Registration.create_performer(performer_params) do case Registration.create_performer(performer_params) do
{:ok, performer} -> {:ok, performer} ->
conn conn
|> put_flash(:info, "Performer created successfully.") |> put_flash(
|> redirect(to: Routes.performer_path(conn, :show, performer)) :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} -> {:error, %Ecto.Changeset{} = changeset} ->
render(conn, "new.html", changeset: changeset) render(conn, "new.html", changeset: changeset)
@@ -48,7 +51,7 @@ defmodule RunosaariWeb.PerformerController do
case Registration.update_performer(performer, performer_params) do case Registration.update_performer(performer, performer_params) do
{:ok, performer} -> {:ok, performer} ->
conn conn
|> put_flash(:info, "Performer updated successfully.") |> put_flash(:info, "Esiintyjän tiedot päivitetty.")
|> redirect(to: Routes.performer_path(conn, :show, performer)) |> redirect(to: Routes.performer_path(conn, :show, performer))
{:error, %Ecto.Changeset{} = changeset} -> {:error, %Ecto.Changeset{} = changeset} ->
@@ -61,7 +64,7 @@ defmodule RunosaariWeb.PerformerController do
{:ok, _performer} = Registration.delete_performer(performer) {:ok, _performer} = Registration.delete_performer(performer)
conn conn
|> put_flash(:info, "Performer deleted successfully.") |> put_flash(:info, "Esiintyjä poistettu.")
|> redirect(to: Routes.admin_performer_path(conn, :admin)) |> redirect(to: Routes.admin_performer_path(conn, :admin))
end end
end end

View File

@@ -1,4 +1,4 @@
<h1>Ohjelma - HALLINTA</h1> <h1>HALLINTA</h1>
<table> <table>
<thead> <thead>
@@ -16,13 +16,13 @@
<td><%= performance.desc %></td> <td><%= performance.desc %></td>
<td> <td>
<span><%= link "Show", to: Routes.performance_path(@conn, :show, performance) %></span> <span><%= link "Lisätietoja", to: Routes.performance_path(@conn, :show, performance) %></span>
<span><%= link "Edit", to: Routes.admin_performance_path(@conn, :edit, performance) %></span> <span><%= link "Muokkaa", 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 "Poista", to: Routes.admin_performance_path(@conn, :delete, performance), method: :delete, data: [confirm: "Haluatko poistaa näytöksen #{performance.name}?"] %></span>
</td> </td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>
</table> </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)) %> <%= 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 -> %> <%= form_for @changeset, @action, fn f -> %>
<%= if @changeset.action do %> <%= if @changeset.action do %>
<div class="alert alert-danger"> <div class="alert alert-danger">
<p>Oops, something went wrong! Please check the errors below.</p> <p>Jokin kentistä on tyhjä.</p>
</div> </div>
<% end %> <% end %>
<%= label f, :name %> <%= label f, :name, "Nimi" %>
<%= text_input f, :name %> <%= text_input f, :name %>
<%= error_tag f, :name %> <%= error_tag f, :name %>
<%= label f, :desc %> <%= label f, :desc, "Seloste" %>
<%= text_input f, :desc %> <%= textarea f, :desc %>
<%= error_tag f, :desc %> <%= error_tag f, :desc %>
<div> <div>
<%= submit "Save" %> <%= submit "Tallenna" %>
</div> </div>
<% end %> <% end %>

View File

@@ -1,12 +1,10 @@
<h1>Listing Performances</h1> <h1>Ohjelma</h1>
<table> <table>
<thead> <thead>
<tr> <tr>
<th>Time</th> <th>Nimi</th>
<th>Description</th> <th>Seloste</th>
<th></th>
</tr> </tr>
</thead> </thead>
<tbody> <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)) %> <%= 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> <ul>
<li> <li>
<strong>Time:</strong> <strong>Nimi:</strong>
<%= @performance.name %> <%= @performance.name %>
</li> </li>
<li> <li>
<strong>Description:</strong> <strong>Seloste:</strong>
<%= @performance.desc %> <%= @performance.desc %>
</li> </li>
</ul> </ul>
<span><%= link "Edit", to: Routes.admin_performance_path(@conn, :edit, @performance) %></span> <span><%= link "Muokkaa", to: Routes.admin_performance_path(@conn, :edit, @performance) %></span>
<span><%= link "Back", to: Routes.performance_path(@conn, :index) %></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> <table>
<thead> <thead>
@@ -24,9 +24,9 @@
<td><%= performer.desc %></td> <td><%= performer.desc %></td>
<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 "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> </td>
</tr> </tr>
<% end %> <% end %>

View File

@@ -2,4 +2,4 @@
<%= render "form.html", Map.put(assigns, :action, Routes.admin_performer_path(@conn, :update, @performer)) %> <%= 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 -> %> <%= form_for @changeset, @action, fn form -> %>
<%= if @changeset.action do %> <%= if @changeset.action do %>
<div class="alert alert-danger"> <div class="alert alert-danger">
<p>Oops, something went wrong! Please check the errors below.</p> <p>Jokin kentistä on tyhjä.</p>
</div> </div>
<% end %> <% end %>
<%= label form, :fname, "Etunimi" %> <%= label form, :fname, "Etunimi (julkistetaan nettisivuilla kun ilmoittautumisesi on hyväksytty)" %>
<%= text_input form, :fname %> <%= text_input form, :fname %>
<%= error_tag 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 %> <%= text_input form, :lname %>
<%= error_tag form, :lname %> <%= error_tag form, :lname %>
@@ -21,7 +21,7 @@
<%= text_input form, :tel %> <%= text_input form, :tel %>
<%= error_tag form, :tel %> <%= error_tag form, :tel %>
<%= label form, :desc, "Huomiot" %> <%= label form, :desc, "Seloste (julkistetaan nettisivuilla kun ilmoittautumisesi on hyväksytty)" %>
<%= textarea form, :desc %> <%= textarea form, :desc %>
<%= error_tag form, :desc %> <%= error_tag form, :desc %>
@@ -42,11 +42,11 @@
<%= checkbox form, :date3 %> <%= checkbox form, :date3 %>
<%= error_tag form, :date3 %> <%= error_tag form, :date3 %>
<%= label form, :bus, "olen kiinnostunut bussikuljetuksesta" %> <%= label form, :bus, "Olen kiinnostunut bussikuljetuksesta" %>
<%= checkbox form, :bus %> <%= checkbox form, :bus %>
<%= error_tag form, :bus %> <%= error_tag form, :bus %>
<%= label form, :accom, "olen kiinnostunut majoituksesta" %> <%= label form, :accom, "Olen kiinnostunut majoituksesta" %>
<%= checkbox form, :accom %> <%= checkbox form, :accom %>
<%= error_tag form, :accom %> <%= error_tag form, :accom %>