Completa i18n IT/EN/FR/DE/ES su sito pubblico, area autenticata e admin.

Tutte le view marketing, legali, viewer, dashboard e admin usano t(); mailer utente-facing e flash localizzati; admin con LocaleResolver e selettore lingua.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-24 00:38:50 +02:00
co-authored by Cursor
parent fb7068f86c
commit b88f44ab1c
158 changed files with 9444 additions and 1536 deletions
@@ -1,13 +1,13 @@
<%= label_tag "match[opponent_name]", "Avversario" %>
<%= text_field_tag "match[opponent_name]", match.opponent_name, required: true, placeholder: "es. Volley Milano" %>
<%= label_tag "match[opponent_name]", t("matches.opponent_label") %>
<%= text_field_tag "match[opponent_name]", match.opponent_name, required: true, placeholder: t("matches.opponent_placeholder") %>
<%= label_tag "match[location]", "Luogo (opzionale)" %>
<%= text_field_tag "match[location]", match.location, placeholder: "Palestra, città" %>
<%= label_tag "match[location]", t("matches.location_label") %>
<%= text_field_tag "match[location]", match.location, placeholder: t("matches.location_placeholder") %>
<%= label_tag "match[scheduled_at]", "Data e ora" %>
<%= label_tag "match[scheduled_at]", t("matches.datetime_label") %>
<% scheduled_value = match.scheduled_at&.in_time_zone&.strftime("%Y-%m-%dT%H:%M") %>
<%= datetime_local_field_tag "match[scheduled_at]", scheduled_value, required: true %>
<p style="color:#888;font-size:0.88rem;margin:12px 0 0">
La diretta non parte da sola: comparirà in app e sul sito. Avvierai lo streaming dal telefono quando sei in campo.
<%= t("matches.form_hint") %>
</p>
@@ -1,14 +1,14 @@
<% content_for :title, "Modifica partita — #{@team.name}" %>
<% content_for :title, t("matches.edit.title", name: @team.name) %>
<% content_for :robots, "noindex, nofollow" %>
<div class="wrap" style="padding-top:20px;max-width:560px">
<h1>Modifica partita</h1>
<h1><%= t("matches.edit.heading") %></h1>
<p style="color:#888"><%= @team.name %> vs <strong><%= @match.opponent_name %></strong></p>
<div class="card" style="margin-top:16px">
<%= render "form",
form_url: public_team_match_path(@team, @match),
form_method: :patch,
submit_label: "Salva modifiche" %>
submit_label: t("matches.edit.submit") %>
</div>
<p style="margin-top:16px"><%= link_to "← Elenco partite", public_team_matches_path(@team) %></p>
<p style="margin-top:16px"><%= link_to t("matches.back_to_list"), public_team_matches_path(@team) %></p>
</div>
+16 -18
View File
@@ -1,4 +1,4 @@
<% content_for :title, "Partite — #{@team.name}" %>
<% content_for :title, t("matches.index.title", name: @team.name) %>
<% content_for :robots, "noindex, nofollow" %>
<div class="wrap" style="padding-top:20px;max-width:720px">
@@ -7,17 +7,16 @@
</nav>
<header style="margin:16px 0 20px">
<h1>Partite — <%= @team.name %></h1>
<h1><%= t("matches.index.heading", name: @team.name) %></h1>
<p style="color:#888;margin-top:8px">
Programma qui da PC data, avversario e luogo. Quando sei in palestra apri lapp Match Live TV,
seleziona questa squadra e avvia la diretta sulla partita.
<%= t("matches.index.lead") %>
</p>
</header>
<div style="display:flex;gap:12px;flex-wrap:wrap;margin-bottom:20px">
<%= link_to "Programma partita", new_public_team_match_path(@team), class: "btn btn-primary" %>
<%= link_to "Dettagli squadra", public_team_details_path(@team), class: "btn btn-secondary" %>
<%= link_to "Dirette e programma", public_live_index_path(club_id: @club.id), class: "btn btn-secondary" %>
<%= link_to t("matches.index.schedule_match"), new_public_team_match_path(@team), class: "btn btn-primary" %>
<%= link_to t("matches.index.team_details"), public_team_details_path(@team), class: "btn btn-secondary" %>
<%= link_to t("matches.index.live_and_schedule"), public_live_index_path(club_id: @club.id), class: "btn btn-secondary" %>
</div>
<div class="card">
@@ -25,10 +24,10 @@
<table class="data">
<thead>
<tr>
<th>Avversario</th>
<th>Data e ora</th>
<th>Luogo</th>
<th>Stato</th>
<th><%= t("matches.index.col_opponent") %></th>
<th><%= t("matches.index.col_datetime") %></th>
<th><%= t("matches.index.col_location") %></th>
<th><%= t("matches.index.col_status") %></th>
<th></th>
</tr>
</thead>
@@ -40,25 +39,25 @@
<% if match.scheduled_at %>
<%= l_local(match.scheduled_at) %>
<% else %>
<span style="color:#888">Senza orario</span>
<span style="color:#888"><%= t("matches.index.no_time") %></span>
<% end %>
</td>
<td><%= match.location.presence || "—" %></td>
<td>
<% label = match.public_status_label %>
<% if label == "In corso / da riprendere" %>
<% if match.active_stream_session %>
<span style="color:#e53935;font-weight:600"><%= label %></span>
<% else %>
<%= label %>
<% end %>
</td>
<td style="white-space:nowrap">
<%= link_to "Modifica", edit_public_team_match_path(@team, match) %>
<%= link_to t("matches.index.edit"), edit_public_team_match_path(@team, match) %>
<% if match.deletable? %>
·
<%= button_to "Elimina", public_team_match_path(@team, match),
<%= button_to t("matches.index.delete"), public_team_match_path(@team, match),
method: :delete,
form: { data: { turbo_confirm: "Eliminare questa partita?" } },
form: { data: { turbo_confirm: t("matches.index.delete_confirm"), confirm_kind: "delete" } },
class: "btn btn-secondary",
style: "padding:4px 10px;font-size:0.8rem;display:inline" %>
<% end %>
@@ -69,8 +68,7 @@
</table>
<% else %>
<p style="color:#888;margin:0">
Nessuna partita in calendario.
<%= link_to "Programma la prima", new_public_team_match_path(@team) %>.
<%= raw t("matches.index.empty_html", link: link_to(t("matches.index.schedule_first"), new_public_team_match_path(@team))) %>
</p>
<% end %>
</div>
@@ -1,14 +1,14 @@
<% content_for :title, "Programma partita — #{@team.name}" %>
<% content_for :title, t("matches.new.title", name: @team.name) %>
<% content_for :robots, "noindex, nofollow" %>
<div class="wrap" style="padding-top:20px;max-width:560px">
<h1>Programma partita</h1>
<h1><%= t("matches.new.heading") %></h1>
<p style="color:#888"><%= @club.name %> · <strong><%= @team.name %></strong></p>
<div class="card" style="margin-top:16px">
<%= render "form",
form_url: public_team_matches_path(@team),
form_method: :post,
submit_label: "Salva in programma" %>
submit_label: t("matches.new.submit") %>
</div>
<p style="margin-top:16px"><%= link_to "← Elenco partite", public_team_matches_path(@team) %></p>
<p style="margin-top:16px"><%= link_to t("matches.back_to_list"), public_team_matches_path(@team) %></p>
</div>