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
+18 -18
View File
@@ -1,11 +1,11 @@
<% content_for :title, "Replay — Match Live TV" %>
<% content_for :meta_description, "Archivio replay delle dirette sportive su Match Live TV. Cerca per società, squadra o avversario." %>
<% content_for :title, t("replay.index.meta_title") %>
<% content_for :meta_description, t("replay.index.meta_description") %>
<div class="wrap replay-index">
<%= link_to "← Dirette live", public_live_index_path, class: "back-link" %>
<%= link_to t("replay.index.back_to_live"), public_live_index_path, class: "back-link" %>
<h1>Live passate</h1>
<p class="results-hint">Replay pubblici delle società sportive — riguarda le partite già trasmesse.</p>
<h1><%= t("replay.index.title") %></h1>
<p class="results-hint"><%= t("replay.index.hint") %></p>
<%= form_with url: public_replay_index_path, method: :get, local: true, class: "search-form" do %>
<% if params[:club_id].present? %>
@@ -15,13 +15,13 @@
type="search"
name="q"
value="<%= @query %>"
placeholder="Es. Tigers Volley, avversario, società, luogo…"
aria-label="Cerca replay"
placeholder="<%= t("replay.index.search_placeholder") %>"
aria-label="<%= t("replay.index.search_aria_label") %>"
autocomplete="off"
/>
<button type="submit" class="btn btn-primary">Cerca</button>
<button type="submit" class="btn btn-primary"><%= t("replay.index.search_button") %></button>
<% if @query.present? || params[:club_id].present? %>
<%= link_to "Azzera", public_replay_index_path, class: "btn btn-secondary" %>
<%= link_to t("replay.index.reset_link"), public_replay_index_path, class: "btn btn-secondary" %>
<% end %>
<% end %>
@@ -30,9 +30,9 @@
<% if @query.present? %>
<%= hidden_field_tag :q, @query %>
<% end %>
<label for="club_id" class="muted">Società</label>
<label for="club_id" class="muted"><%= t("replay.index.club_filter_label") %></label>
<select name="club_id" id="club_id" class="input" onchange="this.form.submit()">
<option value="">Tutte le società</option>
<option value=""><%= t("replay.index.club_filter_all") %></option>
<% @clubs.each do |club| %>
<option value="<%= club.id %>"<%= " selected" if params[:club_id].to_s == club.id.to_s %>><%= club.name %></option>
<% end %>
@@ -41,9 +41,9 @@
<% end %>
<% if @query.present? %>
<% club_suffix = @filter_club ? t("replay.index.results_hint_club_suffix", name: @filter_club.name) : "" %>
<p class="results-hint">
Risultati per «<%= h @query %>»<% if @filter_club %> · <%= @filter_club.name %><% end %>:
<%= @recordings.size %> replay
<%= t("replay.index.results_hint", query: @query, club_suffix: club_suffix, count: @recordings.size) %>
</p>
<% end %>
@@ -81,12 +81,12 @@
<% else %>
<div class="empty-state">
<% if @query.present? || params[:club_id].present? %>
<p><strong>Nessun replay trovato</strong> con i filtri selezionati.</p>
<p><%= link_to "Mostra tutti i replay pubblici", public_replay_index_path, class: "btn btn-secondary" %></p>
<p><strong><%= t("replay.index.empty_filtered_title") %></strong><%= t("replay.index.empty_filtered_suffix") %></p>
<p><%= link_to t("replay.index.empty_filtered_show_all"), public_replay_index_path, class: "btn btn-secondary" %></p>
<% else %>
<p><strong>Nessun replay pubblico al momento.</strong></p>
<p>Quando una società rende pubblica una registrazione, comparirà qui.</p>
<%= link_to "Vai alle dirette live", public_live_index_path, class: "btn btn-secondary", style: "margin-top:12px;display:inline-block" %>
<p><strong><%= t("replay.index.empty_default_title") %></strong></p>
<p><%= t("replay.index.empty_default_body") %></p>
<%= link_to t("replay.index.empty_default_live_link"), public_live_index_path, class: "btn btn-secondary", style: "margin-top:12px;display:inline-block" %>
<% end %>
</div>
<% end %>
+21 -21
View File
@@ -1,18 +1,18 @@
<% club_name = @match.team.club&.name %>
<% content_for :title, "Replay#{@recording.title_or_default}" %>
<% content_for :meta_description, "Replay #{@recording.title_or_default} su Match Live TV." %>
<% content_for :title, t("replay.show.title", title: @recording.title_or_default) %>
<% content_for :meta_description, t("replay.show.meta_description", title: @recording.title_or_default) %>
<% content_for :robots, @recording.publicly_listed? ? "index, follow" : "noindex, nofollow" %>
<div class="wrap">
<%= link_to "← Live passate", public_replay_index_path, class: "back-link" %>
<%= link_to t("replay.show.back_to_replays"), public_replay_index_path, class: "back-link" %>
<%= live_match_page_heading(@match) %>
<% if @recording.status == "processing" %>
<div class="stream-ended" role="status">
<div class="stream-ended-icon" aria-hidden="true"></div>
<h2>Replay in elaborazione</h2>
<p>La registrazione viene preparata. Riceverai unemail quando sarà pronta.</p>
<h2><%= t("replay.show.processing_title") %></h2>
<p><%= t("replay.show.processing_body") %></p>
</div>
<% elsif @recording.ready? && @recording.storage_key.present? %>
<div class="live-player-wrap">
@@ -25,18 +25,18 @@
session: @session,
stream_closed: true,
on_air: false,
badge_label: "REPLAY",
badge_label: t("replay.show.badge_label"),
badge_class: "badge-ended" %>
</div>
<p class="replay-show__meta-line">
<%= l_local(@recording.recorded_at_or_fallback) %>
· Durata <%= @recording.duration_label %>
· <%= t("replay.show.meta_line_duration", value: @recording.duration_label) %>
· <%= @recording.views_label %>
<% if @recording.expires_at %>
· Fino al <%= l_local(@recording.expires_at) %>
· <%= t("replay.show.meta_line_until", date: l_local(@recording.expires_at)) %>
<% end %>
· <%= @recording.publicly_listed? ? "Pubblico" : "Privato (link)" %>
· <%= @recording.publicly_listed? ? t("replay.show.meta_line_public") : t("replay.show.meta_line_private") %>
<% if @recording.source_platform_label != "—" %>
· <%= @recording.source_platform_label %>
<% end %>
@@ -46,10 +46,10 @@
<% if (ent.phone_download_enabled? && (logged_in? || @recording.unlisted?)) || @recording.youtube_watch_url %>
<div class="replay-show__actions">
<% if ent.phone_download_enabled? && (logged_in? || @recording.unlisted?) %>
<%= link_to "Scarica MP4", public_replay_download_path(@session), class: "btn btn-primary" %>
<%= link_to t("replay.show.download_link"), public_replay_download_path(@session), class: "btn btn-primary" %>
<% end %>
<% if @recording.youtube_watch_url %>
<%= link_to "Apri su YouTube", @recording.youtube_watch_url, class: "btn btn-secondary", target: "_blank", rel: "noopener" %>
<%= link_to t("replay.show.youtube_link"), @recording.youtube_watch_url, class: "btn btn-secondary", target: "_blank", rel: "noopener" %>
<% end %>
</div>
<% end %>
@@ -65,28 +65,28 @@
session: @session,
stream_closed: true,
on_air: false,
badge_label: "REPLAY",
badge_label: t("replay.show.badge_label"),
badge_class: "badge-ended" %>
</div>
<p class="replay-show__meta-line">
Replay su YouTube (copia server non presente).
<%= link_to "Apri su YouTube", @recording.youtube_watch_url, target: "_blank", rel: "noopener" %>
<%= t("replay.show.youtube_only_body") %>
<%= link_to t("replay.show.youtube_link"), @recording.youtube_watch_url, target: "_blank", rel: "noopener" %>
</p>
<% elsif @recording.ready? %>
<div class="stream-ended" role="status">
<h2>File non disponibile</h2>
<p>Il video non è più sul server (archivio rimosso o in migrazione).</p>
<p class="stream-ended-meta">Durata registrata: <%= @recording.duration_label %> · <%= @recording.byte_size_label %></p>
<h2><%= t("replay.show.file_missing_title") %></h2>
<p><%= t("replay.show.file_missing_body") %></p>
<p class="stream-ended-meta"><%= t("replay.show.file_missing_meta", duration: @recording.duration_label, size: @recording.byte_size_label) %></p>
</div>
<% elsif @recording.status == "failed" %>
<div class="stream-ended" role="status">
<h2>Replay non disponibile</h2>
<p><%= @recording.error_message.presence || "Errore di elaborazione della registrazione." %></p>
<h2><%= t("replay.show.failed_title") %></h2>
<p><%= @recording.error_message.presence || t("replay.show.failed_default_body") %></p>
</div>
<% else %>
<div class="stream-ended" role="status">
<h2>Replay non disponibile</h2>
<p>Questa registrazione non è più accessibile.</p>
<h2><%= t("replay.show.unavailable_title") %></h2>
<p><%= t("replay.show.unavailable_body") %></p>
</div>
<% end %>
</div>