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:
@@ -1,6 +1,12 @@
|
||||
<% club_name = @match.team.club&.name %>
|
||||
<% content_for :title do %><%= club_name %> · <%= @match.team.name %> vs <%= @match.opponent_name %> — Diretta live<% end %>
|
||||
<% content_for :meta_description do %>Segui in diretta live <%= club_name %> — <%= @match.team.name %> vs <%= @match.opponent_name %><% if @match.location.present? %> — <%= @match.location %><% end %>. Guarda dal browser senza installare app.<% end %>
|
||||
<% content_for :title do %><%= t("live.show.title", club_name: club_name, team_name: @match.team.name, opponent_name: @match.opponent_name) %><% end %>
|
||||
<% content_for :meta_description do %><%= t(
|
||||
"live.show.meta_description",
|
||||
club_name: club_name,
|
||||
team_name: @match.team.name,
|
||||
opponent_name: @match.opponent_name,
|
||||
location: @match.location.present? ? t("live.show.meta_description_location", location: @match.location) : ""
|
||||
) %><% end %>
|
||||
<% content_for :robots, @session.publicly_listed? ? "index, follow" : "noindex, nofollow" %>
|
||||
|
||||
<% content_for :head do %>
|
||||
@@ -10,45 +16,45 @@
|
||||
<% end %>
|
||||
|
||||
<div class="wrap">
|
||||
<%= link_to "← Tutte le dirette", public_live_index_path, class: "back-link" %>
|
||||
<%= link_to t("live.show.back_to_all"), public_live_index_path, class: "back-link" %>
|
||||
|
||||
<%= live_match_page_heading(@match) %>
|
||||
|
||||
<% if @stream_closed %>
|
||||
<div id="stream-ended" class="stream-ended" role="status" aria-live="polite">
|
||||
<div class="stream-ended-icon" aria-hidden="true">📡</div>
|
||||
<h2>Diretta terminata</h2>
|
||||
<p>Lo streaming di questa partita è stato chiuso.</p>
|
||||
<h2><%= t("live.show.stream_ended_title") %></h2>
|
||||
<p><%= t("live.show.stream_ended_body") %></p>
|
||||
<% if @session.ended_at %>
|
||||
<p class="stream-ended-meta">Chiusa il <%= l_local(@session.ended_at) %></p>
|
||||
<p class="stream-ended-meta"><%= t("live.show.stream_ended_closed_at", date: l_local(@session.ended_at)) %></p>
|
||||
<% end %>
|
||||
<p class="stream-ended-hint">Il punteggio è visibile nel video se la diretta era ancora in corso.</p>
|
||||
<%= link_to "Tutte le dirette", public_live_index_path, class: "btn btn-secondary stream-ended-btn" %>
|
||||
<p class="stream-ended-hint"><%= t("live.show.stream_ended_hint") %></p>
|
||||
<%= link_to t("live.show.all_live_link"), public_live_index_path, class: "btn btn-secondary stream-ended-btn" %>
|
||||
</div>
|
||||
<% elsif @session.platform == "youtube" %>
|
||||
<div class="stream-ended youtube-live-cta" role="status" aria-live="polite">
|
||||
<div class="stream-ended-icon" aria-hidden="true">▶</div>
|
||||
<h2>Diretta su YouTube</h2>
|
||||
<h2><%= t("live.show.youtube_title") %></h2>
|
||||
<% if @session.youtube_watch_url.present? %>
|
||||
<p>Questa partita è trasmessa sul canale YouTube Match Live TV, non sul player del sito.</p>
|
||||
<%= link_to "Guarda su YouTube", @session.youtube_watch_url, class: "btn stream-ended-btn", target: "_blank", rel: "noopener" %>
|
||||
<p><%= t("live.show.youtube_available_body") %></p>
|
||||
<%= link_to t("live.show.youtube_watch_link"), @session.youtube_watch_url, class: "btn stream-ended-btn", target: "_blank", rel: "noopener" %>
|
||||
<% else %>
|
||||
<p>Stiamo preparando la diretta sul canale YouTube. Aggiorna tra qualche secondo.</p>
|
||||
<p><%= t("live.show.youtube_preparing_body") %></p>
|
||||
<meta http-equiv="refresh" content="8">
|
||||
<% end %>
|
||||
<p class="stream-ended-hint">Condividi solo il link YouTube con tifosi e società.</p>
|
||||
<p class="stream-ended-hint"><%= t("live.show.youtube_hint") %></p>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="live-player-wrap">
|
||||
<video id="player" controls playsinline muted autoplay poster="/images/copertina-canale.png"></video>
|
||||
<%= render "public/live/player_overlays", match: @match, session: @session %>
|
||||
<button type="button" id="play-hint" class="live-play-hint" hidden>
|
||||
▶ Avvia la diretta
|
||||
<%= t("live.show.play_hint") %>
|
||||
</button>
|
||||
</div>
|
||||
<p id="offline-msg" class="live-status-msg" hidden>La diretta non è ancora disponibile. Si aggiorna automaticamente quando torna in onda.</p>
|
||||
<p id="awaiting-msg" class="live-status-msg" hidden>In attesa del segnale dal telefono — apri la camera nell'app e verifica che la diretta sia avviata (non in pausa).</p>
|
||||
<p id="paused-msg" class="live-status-msg" hidden>Trasmissione in pausa — il flusso continua (copertina server).</p>
|
||||
<p id="offline-msg" class="live-status-msg" hidden><%= t("live.show.offline_msg") %></p>
|
||||
<p id="awaiting-msg" class="live-status-msg" hidden><%= t("live.show.awaiting_msg") %></p>
|
||||
<p id="paused-msg" class="live-status-msg" hidden><%= t("live.show.paused_msg") %></p>
|
||||
|
||||
<script>
|
||||
const sessionId = "<%= @session.id %>";
|
||||
@@ -63,19 +69,19 @@
|
||||
function syncStreamBadge(data) {
|
||||
if (!streamBadge) return;
|
||||
if (data.stream_closed) {
|
||||
streamBadge.textContent = "Terminata";
|
||||
streamBadge.textContent = "<%= j t("live.overlays.badge_ended") %>";
|
||||
streamBadge.className = "live-ovl-badge live-ovl-badge--right badge-ended";
|
||||
return;
|
||||
}
|
||||
const paused = !!(data.paused || data.status === "paused");
|
||||
if (paused) {
|
||||
streamBadge.textContent = "In pausa";
|
||||
streamBadge.textContent = "<%= j t("live.index.badge_paused") %>";
|
||||
streamBadge.className = "live-ovl-badge live-ovl-badge--right badge-wait";
|
||||
} else if (data.on_air) {
|
||||
streamBadge.textContent = "LIVE";
|
||||
streamBadge.textContent = "<%= j t("live.index.badge_live") %>";
|
||||
streamBadge.className = "live-ovl-badge live-ovl-badge--right badge-live";
|
||||
} else {
|
||||
streamBadge.textContent = "In attesa";
|
||||
streamBadge.textContent = "<%= j t("live.overlays.badge_waiting") %>";
|
||||
streamBadge.className = "live-ovl-badge live-ovl-badge--right badge-wait";
|
||||
}
|
||||
}
|
||||
@@ -158,10 +164,10 @@
|
||||
panel.setAttribute("role", "status");
|
||||
panel.innerHTML = `
|
||||
<div class="stream-ended-icon" aria-hidden="true">📡</div>
|
||||
<h2>Diretta terminata</h2>
|
||||
<p>Lo streaming di questa partita è stato chiuso.</p>
|
||||
<p class="stream-ended-hint">Ricarica la pagina per l’ultimo stato registrato.</p>
|
||||
<a href="<%= public_live_index_path %>" class="btn btn-secondary stream-ended-btn">Tutte le dirette</a>
|
||||
<h2><%= j t("live.show.stream_ended_title") %></h2>
|
||||
<p><%= j t("live.show.stream_ended_body") %></p>
|
||||
<p class="stream-ended-hint"><%= j t("live.show.stream_ended_reload_hint") %></p>
|
||||
<a href="<%= public_live_index_path %>" class="btn btn-secondary stream-ended-btn"><%= j t("live.show.all_live_link") %></a>
|
||||
`;
|
||||
video.parentNode.insertBefore(panel, video.nextSibling);
|
||||
}
|
||||
@@ -277,7 +283,7 @@
|
||||
offlineMsg.hidden = true;
|
||||
if (!publisherOnline && showingCover && !paused) {
|
||||
awaitingMsg.hidden = false;
|
||||
awaitingMsg.textContent = "In riconnessione - in attesa del video dall'evento";
|
||||
awaitingMsg.textContent = "<%= j t("live.show.js_reconnecting_awaiting") %>";
|
||||
} else {
|
||||
awaitingMsg.hidden = !awaitingSignal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user