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:
@@ -3,50 +3,46 @@
|
||||
<% cred = club.youtube_credential %>
|
||||
|
||||
<section class="card club-youtube" id="youtube">
|
||||
<h2>YouTube Live</h2>
|
||||
<h2><%= t("club.youtube.heading") %></h2>
|
||||
|
||||
<% if params[:youtube] == "connected" %>
|
||||
<p class="notice" style="color:#2e7d32;margin-bottom:12px">Canale YouTube della società collegato con successo.</p>
|
||||
<p class="notice" style="color:#2e7d32;margin-bottom:12px"><%= t("club.youtube.connected_notice") %></p>
|
||||
<% end %>
|
||||
|
||||
<% if entitlements.plan.youtube_mode == "matchlivetv_light" %>
|
||||
<p>
|
||||
Con il piano <strong>Premium Light</strong> le dirette YouTube di tutte le squadre vanno sul canale ufficiale
|
||||
<strong>Match Live TV</strong>. Non serve collegare un canale della società.
|
||||
<%= raw t("club.youtube.light_body_html") %>
|
||||
</p>
|
||||
<% if yt&.selectable? %>
|
||||
<p class="muted">Canale pronto · seleziona «YouTube Live» nell’app mobile.</p>
|
||||
<p class="muted"><%= t("club.youtube.light_ready") %></p>
|
||||
<% else %>
|
||||
<p class="muted">Canale Match Live TV in configurazione lato server. Contatta il supporto se YouTube non compare in app.</p>
|
||||
<p class="muted"><%= t("club.youtube.light_configuring") %></p>
|
||||
<% end %>
|
||||
<% elsif entitlements.premium_full? %>
|
||||
<% if cred %>
|
||||
<p>
|
||||
Canale collegato per <strong>tutta la società</strong>:
|
||||
<strong><%= cred.channel_title.presence || cred.channel_id || "YouTube" %></strong>
|
||||
<%= raw t("club.youtube.full_connected_html", channel: cred.channel_title.presence || cred.channel_id || "YouTube") %>
|
||||
</p>
|
||||
<p class="muted">Tutte le squadre possono trasmettere su questo canale quando scelgono il canale società in app.</p>
|
||||
<%= button_to "Scollega canale", public_club_youtube_disconnect_path(club),
|
||||
<p class="muted"><%= t("club.youtube.full_connected_hint") %></p>
|
||||
<%= button_to t("club.youtube.disconnect"), public_club_youtube_disconnect_path(club),
|
||||
method: :delete,
|
||||
class: "btn btn-secondary",
|
||||
form: { data: { turbo_confirm: "Scollegare il canale YouTube? Le dirette useranno il canale Match Live TV finché non ricolleghi il tuo." } } %>
|
||||
form: { data: { turbo_confirm: t("club.youtube.disconnect_confirm"), confirm_kind: "delete" } } %>
|
||||
<% else %>
|
||||
<p>
|
||||
Senza canale collegato, le dirette YouTube dall’app vanno sul canale ufficiale
|
||||
<strong>Match Live TV</strong>.
|
||||
Collega qui il canale YouTube della società (vale per tutte le squadre).
|
||||
<%= raw t("club.youtube.full_not_connected_html") %>
|
||||
</p>
|
||||
<% if yt&.selectable? %>
|
||||
<p class="muted">YouTube pronto in app (canale Match Live TV finché non colleghi il tuo).</p>
|
||||
<p class="muted"><%= t("club.youtube.ready_in_app") %></p>
|
||||
<% end %>
|
||||
<% if ENV["YOUTUBE_CLIENT_ID"].present? %>
|
||||
<%= link_to "Collega il canale YouTube della società", public_club_youtube_connect_path(club), class: "btn btn-primary" %>
|
||||
<%= link_to t("club.youtube.connect"), public_club_youtube_connect_path(club), class: "btn btn-primary" %>
|
||||
<% else %>
|
||||
<p class="muted">OAuth YouTube non ancora configurato sul server.</p>
|
||||
<p class="muted"><%= t("club.youtube.oauth_not_configured") %></p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<p class="muted">YouTube sul canale della società richiede il piano Premium Full.</p>
|
||||
<%= link_to "Vedi piani", public_prezzi_path, class: "btn btn-secondary" %>
|
||||
<p class="muted"><%= t("club.youtube.requires_full") %></p>
|
||||
<%= link_to t("club.youtube.see_plans"), public_prezzi_path, class: "btn btn-secondary" %>
|
||||
<% end %>
|
||||
</section>
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
<% content_for :title, "Abbonamento — #{@club.name}" %>
|
||||
<% content_for :title, t("club.billing.title", name: @club.name) %>
|
||||
<% content_for :robots, "noindex, nofollow" %>
|
||||
|
||||
<div class="wrap" style="padding-top:20px">
|
||||
<h1>Abbonamento</h1>
|
||||
<h1><%= t("billing.heading") %></h1>
|
||||
<%= render "shared/club_subscription_status", club: @club, entitlements: @entitlements, subscription: @subscription, on_billing_page: true %>
|
||||
|
||||
<% if @subscription&.admin_comped? %>
|
||||
<div class="card" style="margin-top:16px;border-color:#3d3520;background:#1a1810">
|
||||
<p style="margin:0;color:#ddd">
|
||||
<strong>Abbonamento omaggio Match Live TV</strong>
|
||||
— piano <strong><%= @subscription.plan.name %></strong>
|
||||
<strong><%= t("club.billing.comped.title") %></strong>
|
||||
<%= t("club.billing.comped.plan_prefix") %> <strong><%= @subscription.plan.name %></strong>
|
||||
<% if @subscription.admin_comped_reason.present? %>
|
||||
(<%= @subscription.admin_comped_reason %>)
|
||||
<% end %>.
|
||||
Non è richiesto alcun pagamento. Per modifiche o passaggio a un piano a pagamento, contatta
|
||||
<%= mail_to "info@matchlive.it", "info@matchlive.it" %>.
|
||||
<%= raw t("club.billing.comped.no_payment_html", email_link: mail_to("info@matchlive.it", "info@matchlive.it")) %>
|
||||
</p>
|
||||
</div>
|
||||
<% else %>
|
||||
@@ -28,5 +27,5 @@
|
||||
|
||||
<%= render "shared/billing_documents", club: @club, payments: @payments %>
|
||||
|
||||
<p style="margin-top:24px"><%= link_to "← Società", public_club_path(@club) %></p>
|
||||
<p style="margin-top:24px"><%= link_to t("club.back_to_club"), public_club_path(@club) %></p>
|
||||
</div>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<% content_for :title, "Modifica società — #{@club.name}" %>
|
||||
<% content_for :title, t("club.edit.title", name: @club.name) %>
|
||||
<% content_for :robots, "noindex, nofollow" %>
|
||||
|
||||
<div class="wrap" style="padding-top:20px;max-width:560px">
|
||||
<h1>Modifica società</h1>
|
||||
<h1><%= t("club.edit.heading") %></h1>
|
||||
<div class="card">
|
||||
<%= form_with url: public_club_path(@club), method: :patch, multipart: true do %>
|
||||
<%= label_tag "club[name]", "Nome società" %>
|
||||
<%= label_tag "club[name]", t("club.edit.name_label") %>
|
||||
<%= text_field_tag "club[name]", @club.name, required: true %>
|
||||
<%= label_tag "club[sport]", "Sport principale" %>
|
||||
<%= label_tag "club[sport]", t("club.sport_label") %>
|
||||
<%= select_tag "club[sport]", sport_catalog_options(@club.sport) %>
|
||||
<%= render "shared/branding_fields", record: @club, legend: "Logo e colori societari" %>
|
||||
<%= render "shared/branding_fields", record: @club, legend: t("club.branding_legend") %>
|
||||
<%= render "shared/billing_profile_fields", record: @club %>
|
||||
<%= submit_tag "Salva", class: "btn btn-primary" %>
|
||||
<%= submit_tag t("club.edit.save"), class: "btn btn-primary" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<p><%= link_to "← Società", public_club_path(@club) %></p>
|
||||
<p><%= link_to t("club.back_to_club"), public_club_path(@club) %></p>
|
||||
</div>
|
||||
|
||||
@@ -1,39 +1,39 @@
|
||||
<% content_for :title, "Registra società — Match Live TV" %>
|
||||
<% content_for :meta_description, "Crea la società sportiva e la prima squadra su Match Live TV." %>
|
||||
<% content_for :title, t("club.new.title") %>
|
||||
<% content_for :meta_description, t("club.new.meta_description") %>
|
||||
<% content_for :robots, "noindex, nofollow" %>
|
||||
|
||||
<section class="auth-page">
|
||||
<h1>La tua società</h1>
|
||||
<p class="auth-lead">Registra il club: potrai aggiungere più squadre (Under 13, Under 15, Serie C…).</p>
|
||||
<h1><%= t("club.new.heading") %></h1>
|
||||
<p class="auth-lead"><%= t("club.new.lead") %></p>
|
||||
<div class="card card-wide">
|
||||
<%= form_with url: public_clubs_path, multipart: true do %>
|
||||
<h2 class="form-section-title">Società</h2>
|
||||
<%= label_tag "club[name]", "Nome società / club" %>
|
||||
<%= text_field_tag "club[name]", params.dig(:club, :name), required: true, placeholder: "es. Crazy Volley Rozzano" %>
|
||||
<%= label_tag "club[sport]", "Sport principale" %>
|
||||
<h2 class="form-section-title"><%= t("club.new.section_club") %></h2>
|
||||
<%= label_tag "club[name]", t("club.new.name_label") %>
|
||||
<%= text_field_tag "club[name]", params.dig(:club, :name), required: true, placeholder: t("club.new.name_placeholder") %>
|
||||
<%= label_tag "club[sport]", t("club.sport_label") %>
|
||||
<%= select_tag "club[sport]", sport_catalog_options(params.dig(:club, :sport) || "pallavolo") %>
|
||||
<%= render "shared/branding_fields", record: Club.new(primary_color: "#e53935", secondary_color: "#ffffff"), legend: "Logo e colori societari" %>
|
||||
<%= render "shared/branding_fields", record: Club.new(primary_color: "#e53935", secondary_color: "#ffffff"), legend: t("club.branding_legend") %>
|
||||
<%= render "shared/billing_profile_fields", record: Club.new(billing_country: "IT") %>
|
||||
|
||||
<h2 class="form-section-title" style="margin-top:24px">Prima squadra</h2>
|
||||
<%= label_tag "first_team[name]", "Nome squadra" %>
|
||||
<%= text_field_tag "first_team[name]", params.dig(:first_team, :name), required: true, placeholder: "es. Under 15" %>
|
||||
<h2 class="form-section-title" style="margin-top:24px"><%= t("club.new.section_first_team") %></h2>
|
||||
<%= label_tag "first_team[name]", t("club.new.first_team_name_label") %>
|
||||
<%= text_field_tag "first_team[name]", params.dig(:first_team, :name), required: true, placeholder: t("club.new.first_team_name_placeholder") %>
|
||||
|
||||
<%= label_tag :plan, "Piano iniziale (per tutta la società)" %>
|
||||
<%= label_tag :plan, t("club.new.plan_label") %>
|
||||
<%= select_tag :plan, options_for_select([
|
||||
["Free — 1 responsabile trasmissione per squadra, 1 live", "free"],
|
||||
["Premium Light", "premium_light"],
|
||||
["Premium Full", "premium_full"]
|
||||
[t("club.new.plan_free"), "free"],
|
||||
[t("club.new.plan_light"), "premium_light"],
|
||||
[t("club.new.plan_full"), "premium_full"]
|
||||
], params[:plan] || "free"), id: "club_plan_select" %>
|
||||
<div id="club_plan_interval" style="margin-top:10px">
|
||||
<%= label_tag :interval, "Fatturazione premium" %>
|
||||
<%= label_tag :interval, t("club.new.interval_label") %>
|
||||
<%= select_tag :interval, options_for_select([
|
||||
["Annuale — €40/anno (Light) o €200/anno (Full)", "yearly"],
|
||||
["Mensile — €5/mese (Light) o €20/mese (Full)", "monthly"]
|
||||
[t("club.new.interval_yearly"), "yearly"],
|
||||
[t("club.new.interval_monthly"), "monthly"]
|
||||
], params[:interval] || "yearly") %>
|
||||
</div>
|
||||
<%= render "shared/stripe_secure_payment", compact: true %>
|
||||
<%= submit_tag "Crea società", class: "btn btn-primary" %>
|
||||
<%= submit_tag t("club.new.submit"), class: "btn btn-primary" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% content_for :title, "#{@club.name} — Società" %>
|
||||
<% content_for :title, t("club.dashboard.title", name: @club.name) %>
|
||||
<% content_for :robots, "noindex, nofollow" %>
|
||||
|
||||
<div class="wrap club-dashboard" style="padding-top:20px">
|
||||
@@ -10,20 +10,20 @@
|
||||
<h1><%= @club.name %></h1>
|
||||
<% if @entitlements %>
|
||||
<p class="club-meta">
|
||||
Piano: <strong><%= @entitlements.plan.name %></strong>
|
||||
· Squadre: <strong><%= @teams.size %></strong>
|
||||
<%= t("club.dashboard.plan_label") %> <strong><%= @entitlements.plan.name %></strong>
|
||||
· <%= t("club.dashboard.teams_count_label") %> <strong><%= @teams.size %></strong>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div style="display:flex;gap:12px;flex-wrap:wrap;margin:20px 0">
|
||||
<%= link_to "Modifica società", public_edit_club_path(@club), class: "btn btn-secondary" %>
|
||||
<%= link_to "Abbonamento", public_club_billing_path(@club), class: "btn btn-primary" %>
|
||||
<%= link_to "Nuova squadra", public_new_club_team_path(@club), class: "btn btn-secondary" %>
|
||||
<%= link_to "Dirette live", public_live_index_path(club_id: @club.id), class: "btn btn-secondary" %>
|
||||
<%= link_to t("club.dashboard.edit_club"), public_edit_club_path(@club), class: "btn btn-secondary" %>
|
||||
<%= link_to t("club.dashboard.subscription"), public_club_billing_path(@club), class: "btn btn-primary" %>
|
||||
<%= link_to t("club.dashboard.new_team"), public_new_club_team_path(@club), class: "btn btn-secondary" %>
|
||||
<%= link_to t("club.dashboard.live_streams"), public_live_index_path(club_id: @club.id), class: "btn btn-secondary" %>
|
||||
<% if @entitlements&.can_access_recordings? %>
|
||||
<%= link_to "Archivio Replay", public_club_recordings_path(@club), class: "btn btn-secondary" %>
|
||||
<%= link_to t("club.dashboard.replay_archive"), public_club_recordings_path(@club), class: "btn btn-secondary" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -33,32 +33,32 @@
|
||||
entitlements_team: @entitlements_team %>
|
||||
|
||||
<% if @replay_stats %>
|
||||
<h2>Replay</h2>
|
||||
<h2><%= t("club.dashboard.replay_heading") %></h2>
|
||||
<div class="card" style="display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:16px;padding:16px;margin-bottom:24px">
|
||||
<div>
|
||||
<div style="font-size:1.6rem;font-weight:700"><%= @replay_stats[:available_count] %></div>
|
||||
<div class="muted">disponibili</div>
|
||||
<div class="muted"><%= t("club.dashboard.available") %></div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-size:1.6rem;font-weight:700"><%= @replay_stats[:expiring_soon_count] %></div>
|
||||
<div class="muted">in scadenza (7 gg)</div>
|
||||
<div class="muted"><%= t("club.dashboard.expiring_soon") %></div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-size:1.6rem;font-weight:700"><%= number_to_human_size(@replay_stats[:total_bytes]) %></div>
|
||||
<div class="muted">spazio occupato</div>
|
||||
<div class="muted"><%= t("club.dashboard.space_used") %></div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-size:1.6rem;font-weight:700"><%= @replay_stats[:total_views] %></div>
|
||||
<div class="muted">visualizzazioni</div>
|
||||
<div class="muted"><%= t("club.dashboard.views") %></div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<h2>Squadre</h2>
|
||||
<h2><%= t("club.dashboard.teams_heading") %></h2>
|
||||
<div class="card">
|
||||
<% if @teams.any? %>
|
||||
<table class="data">
|
||||
<thead><tr><th>Squadra</th><th>Branding</th><th></th></tr></thead>
|
||||
<thead><tr><th><%= t("club.dashboard.team_col") %></th><th><%= t("club.dashboard.branding_col") %></th><th></th></tr></thead>
|
||||
<tbody>
|
||||
<% @teams.each do |team| %>
|
||||
<tr>
|
||||
@@ -68,28 +68,28 @@
|
||||
</td>
|
||||
<td style="color:#888;font-size:0.88rem">
|
||||
<% if team.logo_url.present? || team.logo_file.attached? || team.primary_color.present? %>
|
||||
Personalizzato
|
||||
<%= t("club.dashboard.branding_custom") %>
|
||||
<% else %>
|
||||
Eredita dalla società
|
||||
<%= t("club.dashboard.branding_inherited") %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td style="white-space:nowrap">
|
||||
<%= link_to "Pagina pubblica", public_team_page_path(team.slug), target: "_blank", rel: "noopener" %>
|
||||
<%= link_to t("club.dashboard.public_page"), public_team_page_path(team.slug), target: "_blank", rel: "noopener" %>
|
||||
·
|
||||
<%= link_to "Dettagli", public_team_details_path(team) %>
|
||||
<%= link_to t("club.dashboard.details"), public_team_details_path(team) %>
|
||||
·
|
||||
<%= link_to "Partite", public_team_matches_path(team) %>
|
||||
<%= link_to t("club.dashboard.matches"), public_team_matches_path(team) %>
|
||||
·
|
||||
<%= link_to "Modifica", public_edit_team_path(team) %>
|
||||
<%= link_to t("club.dashboard.edit"), public_edit_team_path(team) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
<p style="color:#888">Nessuna squadra. <%= link_to "Aggiungi la prima", public_new_club_team_path(@club) %>.</p>
|
||||
<p style="color:#888"><%= raw t("club.dashboard.no_teams_html", link: link_to(t("club.dashboard.add_first_team"), public_new_club_team_path(@club))) %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<p style="color:#888;margin-top:24px">Ogni squadra ha i propri responsabili trasmissione. Il punteggio da un altro telefono usa il link regia (senza account). L’abbonamento vale per tutta la società.</p>
|
||||
<p style="color:#888;margin-top:24px"><%= t("club.dashboard.footer_note") %></p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user