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
@@ -10,38 +10,37 @@
<% if can_manage %>
<% if owner_membership&.staff_kind.blank? %>
<div class="card team-streaming-staff__self">
<h2>Il tuo account (<%= current_user.email %>)</h2>
<h2><%= t("team.streaming_staff.self_account_heading", email: current_user.email) %></h2>
<p class="muted">
Puoi gestire la trasmissione dallapp. Per il punteggio da un altro telefono, condividi il
<strong>link regia</strong> durante la diretta (non serve un secondo account).
<%= raw t("team.streaming_staff.self_account_hint") %>
</p>
<div class="team-details-actions">
<%= button_to "Sono io — responsabile trasmissione", public_team_assign_self_staff_path(team), method: :post, params: { staff_kind: "transmission" }, class: "btn btn-primary" %>
<%= button_to t("team.streaming_staff.self_assign_submit"), public_team_assign_self_staff_path(team), method: :post, params: { staff_kind: "transmission" }, class: "btn btn-primary" %>
</div>
</div>
<% end %>
<% end %>
<h2>Responsabili trasmissione (app)</h2>
<h2><%= t("team.streaming_staff.staff_heading") %></h2>
<div class="card">
<% if staff_memberships.any? %>
<table class="data">
<thead><tr><th>Nome</th><th>Email</th><th>Ruolo</th><% if can_manage %><th></th><% end %></tr></thead>
<thead><tr><th><%= t("team.streaming_staff.col_name") %></th><th><%= t("team.streaming_staff.col_email") %></th><th><%= t("team.streaming_staff.col_role") %></th><% if can_manage %><th></th><% end %></tr></thead>
<tbody>
<% staff_memberships.each do |ut| %>
<tr>
<td>
<%= ut.user.name %>
<% if ut.user_id == current_user.id %><span class="muted"> (tu)</span><% end %>
<% if ut.user_id == current_user.id %><span class="muted"> <%= t("team.streaming_staff.you_suffix") %></span><% end %>
</td>
<td><%= ut.user.email %></td>
<td>Trasmissione</td>
<td><%= t("team.streaming_staff.role_transmission") %></td>
<% if can_manage %>
<td>
<% if ut.user_id == current_user.id && team.club.owned_by?(current_user) %>
<%= button_to "Rimuovi ruolo staff", public_team_clear_self_staff_path(team), method: :delete, class: "btn btn-secondary", style: "padding:4px 10px;font-size:0.8rem", form: { data: { turbo_confirm: "Rimuovere il ruolo staff dal tuo account?" } } %>
<%= button_to t("team.streaming_staff.clear_self_staff"), public_team_clear_self_staff_path(team), method: :delete, class: "btn btn-secondary", style: "padding:4px 10px;font-size:0.8rem", form: { data: { turbo_confirm: t("team.streaming_staff.clear_self_staff_confirm"), confirm_kind: "delete" } } %>
<% elsif ut.role == "member" %>
<%= button_to "Revoca", public_team_remove_member_path(team, ut.user), method: :delete, class: "btn btn-secondary", style: "padding:4px 10px;font-size:0.8rem", form: { data: { turbo_confirm: "Revocare l'accesso a #{ut.user.name}?" } } %>
<%= button_to t("team.streaming_staff.revoke"), public_team_remove_member_path(team, ut.user), method: :delete, class: "btn btn-secondary", style: "padding:4px 10px;font-size:0.8rem", form: { data: { turbo_confirm: t("team.streaming_staff.revoke_confirm", name: ut.user.name), confirm_kind: "delete" } } %>
<% end %>
</td>
<% end %>
@@ -51,42 +50,42 @@
</table>
<% else %>
<p class="muted">
Nessun responsabile trasmissione.
<% if can_manage %><%= link_to "Invita qualcuno", public_team_invite_path(team) %>.<% end %>
<%= t("team.streaming_staff.no_staff") %>
<% if can_manage %><%= link_to t("team.streaming_staff.invite_someone"), public_team_invite_path(team) %>.<% end %>
</p>
<% end %>
</div>
<% if can_manage %>
<h2>Inviti in attesa</h2>
<h2><%= t("team.streaming_staff.pending_invitations_heading") %></h2>
<div class="card">
<% if pending_invitations.any? %>
<table class="data">
<thead><tr><th>Email</th><th>Scade</th><th></th></tr></thead>
<thead><tr><th><%= t("team.streaming_staff.col_email_short") %></th><th><%= t("team.streaming_staff.col_expires") %></th><th></th></tr></thead>
<tbody>
<% pending_invitations.each do |inv| %>
<tr>
<td><%= inv.email %></td>
<td><%= l inv.expires_at, format: :short %></td>
<td>
<%= button_to "Annulla", public_team_destroy_invitation_path(team, inv), method: :delete, class: "btn btn-secondary", style: "padding:4px 10px;font-size:0.8rem" %>
<%= button_to t("team.streaming_staff.cancel_invitation"), public_team_destroy_invitation_path(team, inv), method: :delete, class: "btn btn-secondary", style: "padding:4px 10px;font-size:0.8rem", form: { data: { confirm_kind: "delete" } } %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p class="muted">Nessuna richiesta in sospeso.</p>
<p class="muted"><%= t("team.streaming_staff.no_pending") %></p>
<% end %>
</div>
<% end %>
<% if entitlements.can_access_recordings? %>
<h2>Archivio replay</h2>
<h2><%= t("team.streaming_staff.archive_heading") %></h2>
<div class="card">
<% if recordings.any? %>
<table class="data">
<thead><tr><th>Partita</th><th>Data</th><th>Durata</th><th>Scadenza</th><th>Stato</th><th></th></tr></thead>
<thead><tr><th><%= t("team.streaming_staff.col_match") %></th><th><%= t("team.streaming_staff.col_date") %></th><th><%= t("team.streaming_staff.col_duration") %></th><th><%= t("team.streaming_staff.col_expiry") %></th><th><%= t("team.streaming_staff.col_status") %></th><th></th></tr></thead>
<tbody>
<% recordings.each do |rec| %>
<tr>
@@ -97,7 +96,7 @@
<td><%= rec.status_label %></td>
<td>
<% if rec.replay_url %>
<%= link_to "Guarda", rec.replay_url, target: "_blank", rel: "noopener" %>
<%= link_to t("team.streaming_staff.watch"), rec.replay_url, target: "_blank", rel: "noopener" %>
<% else %>
<% end %>
@@ -107,10 +106,10 @@
</tbody>
</table>
<p style="margin-top:12px">
<%= link_to "Gestisci tutti i replay", public_club_recordings_path(team.club) %>
<%= link_to t("team.streaming_staff.manage_all_replays"), public_club_recordings_path(team.club) %>
</p>
<% else %>
<p class="muted">Nessun replay ancora. Al termine delle dirette Premium le registrazioni compaiono qui.</p>
<p class="muted"><%= t("team.streaming_staff.no_recordings") %></p>
<% end %>
</div>
<% end %>