Worlds: improve messages, and x4->x3 to finals
Some checks are pending
CI / scan_ruby (push) Waiting to run
CI / scan_js (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run

This commit is contained in:
sto
2026-09-11 18:03:03 +02:00
parent dafd4cf4ce
commit 0b025c828b
6 changed files with 30 additions and 22 deletions

View File

@@ -35,7 +35,7 @@ class WorldParticipant < ApplicationRecord
before_save :compute_score before_save :compute_score
def compute_score def compute_score
self.score = WorldBet.points(qualifier_result) + WorldBet.points(semifinal_result) * 2 + WorldBet.points(final_result) * 4 self.score = WorldBet.points(qualifier_result) + WorldBet.points(semifinal_result) * 2 + WorldBet.points(final_result) * 3
end end
def self.add_participants(str) def self.add_participants(str)

View File

@@ -1,14 +1,15 @@
= render "worlds_nav" = render "worlds_nav"
.alert.alert-warning role="alert" .alert.alert-primary role="alert"
= t("worlds.about.one_bet_message") = t("worlds.about.core_message")
.alert.alert-primary role="alert" .alert.alert-primary role="alert"
= t("worlds.about.details_message") = t("worlds.about.details_message")
.mt-3 .mt-3
= t("worlds.about.two_rankings_message") = t("worlds.about.two_rankings_message")
.mt-3 .mt-3
= t("worlds.about.collaborative_filling_message") = t("worlds.about.collaborative_filling_message")
.alert.alert-warning role="alert"
= t("worlds.about.deadline_message")
.row.mt-4 .row.mt-4
.col .col
@@ -25,59 +26,59 @@
td #{i} td #{i}
td #{WorldBet.points(i)} td #{WorldBet.points(i)}
td #{WorldBet.points(i) * 2} td #{WorldBet.points(i) * 2}
td #{WorldBet.points(i) * 4} td #{WorldBet.points(i) * 3}
tr tr
td 11-20 td 11-20
td #{WorldBet.points(20)} td #{WorldBet.points(20)}
td #{WorldBet.points(20) * 2} td #{WorldBet.points(20) * 2}
td #{WorldBet.points(20) * 4} td #{WorldBet.points(20) * 3}
tr tr
td 21-30 td 21-30
td #{WorldBet.points(30)} td #{WorldBet.points(30)}
td #{WorldBet.points(30) * 2} td #{WorldBet.points(30) * 2}
td #{WorldBet.points(30) * 4} td #{WorldBet.points(30) * 3}
tr tr
td 31-40 td 31-40
td #{WorldBet.points(40)} td #{WorldBet.points(40)}
td #{WorldBet.points(40) * 2} td #{WorldBet.points(40) * 2}
td #{WorldBet.points(40) * 4} td #{WorldBet.points(40) * 3}
tr tr
td 41-50 td 41-50
td #{WorldBet.points(50)} td #{WorldBet.points(50)}
td #{WorldBet.points(50) * 2} td #{WorldBet.points(50) * 2}
td #{WorldBet.points(50) * 4} td #{WorldBet.points(50) * 3}
tr tr
td 51-60 td 51-60
td #{WorldBet.points(60)} td #{WorldBet.points(60)}
td #{WorldBet.points(60) * 2} td #{WorldBet.points(60) * 2}
td #{WorldBet.points(60) * 4} td #{WorldBet.points(60) * 3}
tr tr
td 61-70 td 61-70
td #{WorldBet.points(70)} td #{WorldBet.points(70)}
td #{WorldBet.points(70) * 2} td #{WorldBet.points(70) * 2}
td #{WorldBet.points(70) * 4} td #{WorldBet.points(70) * 3}
tr tr
td 71-80 td 71-80
td #{WorldBet.points(80)} td #{WorldBet.points(80)}
td #{WorldBet.points(80) * 2} td #{WorldBet.points(80) * 2}
td #{WorldBet.points(80) * 4} td #{WorldBet.points(80) * 3}
tr tr
td 81-90 td 81-90
td #{WorldBet.points(90)} td #{WorldBet.points(90)}
td #{WorldBet.points(90) * 2} td #{WorldBet.points(90) * 2}
td #{WorldBet.points(90) * 4} td #{WorldBet.points(90) * 3}
tr tr
td 91-100 td 91-100
td #{WorldBet.points(100)} td #{WorldBet.points(100)}
td #{WorldBet.points(100) * 2} td #{WorldBet.points(100) * 2}
td #{WorldBet.points(100) * 4} td #{WorldBet.points(100) * 3}
tr tr
td 101-150 td 101-150
td #{WorldBet.points(150)} td #{WorldBet.points(150)}
td #{WorldBet.points(150) * 2} td #{WorldBet.points(150) * 2}
td #{WorldBet.points(150) * 4} td #{WorldBet.points(150) * 3}
tr tr
td 151+ td 151+
td #{WorldBet.points(151)} td #{WorldBet.points(151)}
td #{WorldBet.points(151) * 2} td #{WorldBet.points(151) * 2}
td #{WorldBet.points(151) * 4} td #{WorldBet.points(151) * 3}

View File

@@ -1,5 +1,8 @@
= render "worlds_nav" = render "worlds_nav"
.alert.alert-warning role="alert"
= t("worlds.about.one_bet_message")
= form_with model: @world_bet, url: "/wjpc_bets/#{@lang}/new", method: :post do |form| = form_with model: @world_bet, url: "/wjpc_bets/#{@lang}/new", method: :post do |form|
.alert.alert-primary role="alert" .alert.alert-primary role="alert"
= t("worlds.new.message") = t("worlds.new.message")

View File

@@ -22,7 +22,7 @@ h4.mt-3 = t("worlds.view.subtitle", name: @world_bet.name).html_safe
= "x#{WorldBet.multiplier(i)}" = "x#{WorldBet.multiplier(i)}"
td = "<span style='color: orange'>#{p.qualifier_result || "?"}</span> > <span style='color: green'>#{WorldBet.points(p.qualifier_result)}p</span>".html_safe td = "<span style='color: orange'>#{p.qualifier_result || "?"}</span> > <span style='color: green'>#{WorldBet.points(p.qualifier_result)}p</span>".html_safe
td = "<span style='color: orange'>#{p.semifinal_result || "?"}</span> > <span style='color: green'>#{WorldBet.points(p.semifinal_result) * 2}p</span>".html_safe td = "<span style='color: orange'>#{p.semifinal_result || "?"}</span> > <span style='color: green'>#{WorldBet.points(p.semifinal_result) * 2}p</span>".html_safe
td = "<span style='color: orange'>#{p.final_result || "?"}</span> > <span style='color: green'>#{WorldBet.points(p.final_result) * 4}p</span>".html_safe td = "<span style='color: orange'>#{p.final_result || "?"}</span> > <span style='color: green'>#{WorldBet.points(p.final_result) * 3}p</span>".html_safe
td = "<span style='color: green'>#{p.score || 0}</span> x <span style='color: cadetblue'>#{WorldBet.multiplier(i)}</span> = <span style='color: green'>#{(p.score || 0) * WorldBet.multiplier(i)}p</span>".html_safe td = "<span style='color: green'>#{p.score || 0}</span> x <span style='color: cadetblue'>#{WorldBet.multiplier(i)}</span> = <span style='color: green'>#{(p.score || 0) * WorldBet.multiplier(i)}p</span>".html_safe
.row.mt-3 .row.mt-3
@@ -45,5 +45,5 @@ h4.mt-3 = t("worlds.view.subtitle", name: @world_bet.name).html_safe
= "x#{WorldBet.multiplier(i)}" = "x#{WorldBet.multiplier(i)}"
td = "<span style='color: orange'>#{p.qualifier_result || "?"}</span> > <span style='color: green'>#{WorldBet.points(p.qualifier_result)}p</span>".html_safe td = "<span style='color: orange'>#{p.qualifier_result || "?"}</span> > <span style='color: green'>#{WorldBet.points(p.qualifier_result)}p</span>".html_safe
td = "<span style='color: orange'>#{p.semifinal_result || "?"}</span> > <span style='color: green'>#{WorldBet.points(p.semifinal_result) * 2}p</span>".html_safe td = "<span style='color: orange'>#{p.semifinal_result || "?"}</span> > <span style='color: green'>#{WorldBet.points(p.semifinal_result) * 2}p</span>".html_safe
td = "<span style='color: orange'>#{p.final_result || "?"}</span> > <span style='color: green'>#{WorldBet.points(p.final_result) * 4}p</span>".html_safe td = "<span style='color: orange'>#{p.final_result || "?"}</span> > <span style='color: green'>#{WorldBet.points(p.final_result) * 3}p</span>".html_safe
td = "<span style='color: green'>#{p.score || 0}</span> x <span style='color: cadetblue'>#{WorldBet.multiplier(i)}</span> = <span style='color: green'>#{(p.score || 0) * WorldBet.multiplier(i)}p</span>".html_safe td = "<span style='color: green'>#{p.score || 0}</span> x <span style='color: cadetblue'>#{WorldBet.multiplier(i)}</span> = <span style='color: green'>#{(p.score || 0) * WorldBet.multiplier(i)}p</span>".html_safe

View File

@@ -432,7 +432,9 @@ en:
worlds: worlds:
about: about:
collaborative_filling_message: The ranking is updated collaboratively, see the dedicated tab for more details. collaborative_filling_message: The ranking is updated collaboratively, see the dedicated tab for more details.
details_message: To make a bet you'll have to select some contestants (see the dedicated tab for more details on that, and multipliers). You'll score points when they do well in the competition, the table below gives the amount of points you get depending on their ranking on each round, from qualifiers to the finals. This however only accounts for the solo category. core_message: "This is a betting game about the WJPC. No prices, just for fun :)"
deadline_message: "The bets are open until Wednesday end of day (timezone: CEST)"
details_message: To make a bet, you will select a few of the WJPC participants. You'll then score points everytime they have a ranking throughout the competition (solo category only). The table below gives the number of points you get for each participant you selected given their ranking on a given round.
final_round: Finals final_round: Finals
one_bet_message: Only one bet is allowed per person, please do not overflow the system with bets. one_bet_message: Only one bet is allowed per person, please do not overflow the system with bets.
points: Points points: Points

View File

@@ -403,8 +403,10 @@ fr:
title: "Nouveau.elle utilisateur.ice" title: "Nouveau.elle utilisateur.ice"
worlds: worlds:
about: about:
collaborative_filling_message: Les résultats des participant.e.s sont mis à jour de manière collaborative, plus d'infos dans l'onglet dédié. collaborative_filling_message: Pour que ce système soit au courant des résultats des participant.e.s pendant la compétition, je mets à disposition un onglet "Remplissage collaboratif", pour que vous puissiez toutes et tous participer à tenir cela à jour.
details_message: Pour faire un pari, tu devras choisir plusieurs participant.e.s (plus d'infos sur comment ça marche et sur les facteurs multiplicatifs dans l'onglet dédié). Tu marqueras des points en fonction de comment iels se classent dans chaque round, depuis les qualifs jusqu'à la finale (catégorie solo uniquement). La table ci-dessous donne la répartition des points en fonction des classements. core_message: "Ceci est un jeu de paris pour les WJPC. Il n'y a rien à gagner, c'est 100% pour s'amuser ! :)"
deadline_message: "Les paris sont ouverts jusqu'à mercredi soir à minuit (heure française)"
details_message: L'idée c'est de parier sur une liste de participant.e.s, et tu marqueras des points pour chaque classement obtenu par les personnes de ta liste tout au long de la compétition (catégorie solo uniquement). La table ci-dessous donne le nombre de points que vous obtiendrez pour un.e participant.e de votre liste en fonction de son classement lors d'un round.
final_round: Finale final_round: Finale
one_bet_message: Un seul pari par personne, ne surchargez pas le système svp. one_bet_message: Un seul pari par personne, ne surchargez pas le système svp.
points: Points points: Points
@@ -421,7 +423,7 @@ fr:
notice: "Le rang de cet.te participant.e a été mis à jour" notice: "Le rang de cet.te participant.e a été mis à jour"
rank_message: Il s'agit ici d'indiquer les *classements* obtenus par les participant.e.s lors des différents rounds. Les points seront ensuite calculés automatiquement. rank_message: Il s'agit ici d'indiquer les *classements* obtenus par les participant.e.s lors des différents rounds. Les points seront ensuite calculés automatiquement.
semifinal: Semifinal semifinal: Semifinal
tab: Remplisage collaboratif tab: Remplissage collaboratif
main: main:
french_participants: Sur les participant.e.s français.e.s french_participants: Sur les participant.e.s français.e.s
name: Nom name: Nom