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
+17 -18
View File
@@ -1,52 +1,51 @@
<% content_for :title, "Modifica squadra — #{@team.name}" %>
<% content_for :title, t("team.edit.title", name: @team.name) %>
<% content_for :robots, "noindex, nofollow" %>
<div class="wrap" style="padding-top:20px;max-width:560px">
<h1><%= @team.name %></h1>
<p style="color:#888">Società: <%= link_to @club.name, public_club_path(@club) %></p>
<p style="color:#888"><%= t("team.edit.club_label") %> <%= link_to @club.name, public_club_path(@club) %></p>
<div class="card">
<%= form_with url: public_team_path(@team), method: :patch, multipart: true do %>
<%= label_tag "team[name]", "Nome squadra" %>
<%= label_tag "team[name]", t("team.edit.name_label") %>
<%= text_field_tag "team[name]", @team.name, required: true %>
<%= label_tag "team[sport]", "Sport" %>
<%= label_tag "team[sport]", t("team.sport_label") %>
<%= select_tag "team[sport]", sport_catalog_options(@team.sport_key) %>
<%= label_tag "team[description]", "Descrizione squadra" %>
<%= text_area_tag "team[description]", @team.description, rows: 5, placeholder: "Presentazione della squadra, palmarès, obiettivi della stagione…" %>
<%= label_tag "team[description]", t("team.edit.description_label") %>
<%= text_area_tag "team[description]", @team.description, rows: 5, placeholder: t("team.edit.description_placeholder") %>
<div class="branding-logo-block">
<%= label_tag "team[photo_file]", "Foto di squadra (gruppo o stemma)" %>
<%= label_tag "team[photo_file]", t("team.edit.photo_label") %>
<% if @team.team_photo_url.present? %>
<div class="branding-logo-preview">
<%= image_tag @team.team_photo_url, alt: "Foto squadra", class: "team-profile-photo-preview", width: 200 %>
<%= image_tag @team.team_photo_url, alt: t("team.edit.photo_alt"), class: "team-profile-photo-preview", width: 200 %>
</div>
<% end %>
<%= file_field_tag "team[photo_file]", accept: "image/png,image/jpeg,image/webp", class: "branding-file-input" %>
</div>
<%= render "shared/branding_fields", record: @team, show_inherit_hint: true, legend: "Branding squadra (override)" %>
<%= render "shared/branding_fields", record: @team, show_inherit_hint: true, legend: t("team.edit.branding_legend") %>
<%= label_tag "team[slug]", "Indirizzo pagina pubblica" %>
<%= label_tag "team[slug]", t("team.edit.slug_label") %>
<p class="branding-hint" style="margin-top:0">
Genitori e tifosi trovano la squadra su
<strong><%= MatchLiveTv.app_public_url.chomp("/") %>/squadre/<span id="team-slug-preview"><%= @team.slug %></span></strong>
<%= raw t("team.edit.slug_hint_html", base_url: MatchLiveTv.app_public_url.chomp("/"), slug: "<span id=\"team-slug-preview\">#{@team.slug}</span>") %>
</p>
<%= text_field_tag "team[slug]", @team.slug, pattern: "[a-z0-9]+(-[a-z0-9]+)*", title: "Solo lettere minuscole, numeri e trattini" %>
<%= text_field_tag "team[slug]", @team.slug, pattern: "[a-z0-9]+(-[a-z0-9]+)*", title: t("team.edit.slug_title") %>
<%= label_tag "team[roster_public]", class: "checkbox-label", style: "display:flex;align-items:center;gap:8px;margin-top:16px" do %>
<%= hidden_field_tag "team[roster_public]", "0" %>
<%= check_box_tag "team[roster_public]", "1", @team.roster_public?, id: "team_roster_public" %>
Mostra l'organico sulla pagina pubblica
<%= t("team.edit.roster_public_label") %>
<% end %>
<p class="branding-hint">Se attivo, giocatori e staff sono visibili a chiunque abbia il link. Puoi lasciarlo disattivato per privacy.</p>
<p class="branding-hint"><%= t("team.edit.roster_public_hint") %></p>
<p class="branding-hint">
Colori società:
<%= t("team.edit.club_colors_label") %>
<span class="color-swatch" style="background:<%= @club.effective_primary_color %>"></span>
<span class="color-swatch" style="background:<%= @club.effective_secondary_color %>"></span>
</p>
<%= submit_tag "Salva squadra", class: "btn btn-primary" %>
<%= submit_tag t("team.edit.submit"), class: "btn btn-primary" %>
<% end %>
</div>
<p><%= link_to "← Dettagli squadra", public_team_details_path(@team) %></p>
<p><%= link_to t("team.back_to_details"), public_team_details_path(@team) %></p>
</div>