Compare commits

..

5 commits

Author SHA1 Message Date
7f6743d13d Update Catalan translation 2026-01-21 09:37:31 -06:00
5d92c0e4f2 Fix typo 2026-01-21 09:37:19 -06:00
adecb66912 Add missing partial 2026-01-21 09:31:15 -06:00
23ada9377f Explain each round of tiebreaker with a full sentence 2026-01-21 09:17:38 -06:00
079ce2d2c1 Factorize rating badges 2026-01-21 08:58:40 -06:00
3 changed files with 79 additions and 36 deletions

View file

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-01-20 22:29-0600\n"
"POT-Creation-Date: 2026-01-21 09:32-0600\n"
"PO-Revision-Date: 2025-03-29 20:41-0600\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -114,7 +114,7 @@ msgid "No vote organized."
msgstr "Cap votació organitzada."
#: ../views/admin_users.erb:30 ../views/admin_votes.erb:38
#: ../views/votes_show_closed.erb:155
#: ../views/votes_show_closed.erb:165
msgid "Ratings"
msgstr "Valoracions"
@ -151,7 +151,7 @@ msgid "State: %{state}"
msgstr "Estat: %{state}"
#: ../views/admin_votes.erb:19 ../views/votes_edit.erb:90
#: ../views/votes_show_closed.erb:189 ../views/votes_show_draft.erb:29
#: ../views/votes_show_closed.erb:200 ../views/votes_show_draft.erb:29
#: ../views/votes_show_open.erb:88
msgid "Organizers"
msgstr "Organitzadores"
@ -211,7 +211,7 @@ msgstr "Reiniciar contrasenya"
#: ../views/login.erb:12 ../views/reset.erb:13 ../views/reset_change.erb:13
#: ../views/signup.erb:24 ../views/votes_edit.erb:102
#: ../views/votes_show_closed.erb:203 ../views/votes_show_open.erb:104
#: ../views/votes_show_closed.erb:214 ../views/votes_show_open.erb:104
#: ../views/votes_show_unauthenticated.erb:9
msgid "Email"
msgstr "Correu"
@ -320,7 +320,7 @@ msgid "Open vote to participants"
msgstr "Obrir la votació als votants"
#: ../views/votes_edit.erb:98 ../views/votes_edit.erb:105
#: ../views/votes_show_closed.erb:199 ../views/votes_show_closed.erb:206
#: ../views/votes_show_closed.erb:210 ../views/votes_show_closed.erb:217
#: ../views/votes_show_open.erb:100 ../views/votes_show_open.erb:107
msgid "Add organizer"
msgstr "Afegeix organitzadora"
@ -385,51 +385,82 @@ msgstr ""
"a href='https://en.wikipedia.org/wiki/Majority_judgment'><i>judici majoritari<"
"/i></a>."
#: ../views/votes_show_closed.erb:67
#: ../views/votes_show_closed.erb:66
msgid "See description"
msgstr "Veure descripció"
#: ../views/votes_show_closed.erb:71
#: ../views/votes_show_closed.erb:70
msgid "Analyze tiebreak"
msgstr "Analitzar desempat"
#: ../views/votes_show_closed.erb:81
#: ../views/votes_show_closed.erb:80
msgid "This candidate and the winning candidate have the same majority judgment."
msgstr "Aquesta opció i l'opció guanyadora tenen el mateix judici majoritari."
#: ../views/votes_show_closed.erb:83
#: ../views/votes_show_closed.erb:82
msgid ""
"To break the tie, we remove the vote that corresponds to the majority judgment"
" one-by-one until one candidate has a better majority judgment than the other."
msgstr ""
"Pel desempat, treiem el vot que correspon al judici majoritari un per un fins "
"Pel desempat, traiem el vot que correspon al judici majoritari un per un fins "
"que alguna opció tingui un millor judici majoritari que l'altre."
#: ../views/votes_show_closed.erb:85
#: ../views/votes_show_closed.erb:84
msgid "Votes for this candidate"
msgstr "Vots per aquesta opció"
#: ../views/votes_show_closed.erb:86
#: ../views/votes_show_closed.erb:85
msgid "Votes for the winning candidate"
msgstr "Vots per l'opció guanyadora"
#: ../views/votes_show_closed.erb:99
msgid "Without removing any vote."
msgstr "Sense treure cap vot."
msgid ""
"Without removing any vote, both candidates have the same majority judgement of"
" %{current}."
msgstr ""
"Sense treure cap vot, les dues opcions tenen el mateix judici majoritari de "
"%{current}."
#: ../views/votes_show_closed.erb:103
msgid "Removing a vote of rating: "
msgstr "Treient un vot de valoració: "
#: ../views/votes_show_closed.erb:104
msgid ""
"Removing a vote of rating %{previous}, both candidates still have the same maj"
"ority judgement of %{current}."
msgstr ""
"Traient un vot de valoració %{previous}, les dues opcions encara tenen el mate"
"ix judici majoritari de %{current}."
#: ../views/votes_show_closed.erb:108
msgid "Removing another vote of rating: "
msgstr "Treient un altre vot de valoració: "
msgid ""
"Removing a vote of rating %{previous}, this candidate has a majority judgement"
" of %{losing}, but the winning candidate has a majority judgement of %{winning"
"}."
msgstr ""
"Traient un vot de valoració %{previous}, aquesta opció te un judici majoritar"
"i de %{losing} però l'opció guanyadora te un judici majoritari de %{winning}."
#: ../views/votes_show_closed.erb:160
#: ../views/votes_show_closed.erb:114
msgid ""
"Removing another vote of rating %{previous}, both candidates still have the sa"
"me majority judgement of %{current}."
msgstr ""
"Traient un altre vot de valoració %{previous}, les dues opcions encara tenen e"
"l mateix judici majoritari de %{current}."
#: ../views/votes_show_closed.erb:118
msgid ""
"Removing another vote of rating %{previous}, this candidate has a majority jud"
"gement of %{losing}, but the winning candidate has a majority judgement of %{w"
"inning}."
msgstr ""
"Traient un altre vot de valoració %{previous}, aquesta opció te un judici maj"
"oritari de %{losing} però l'opció guanyadora te un judici majoritari de %{winn"
"ing}."
#: ../views/votes_show_closed.erb:170
msgid "Participant"
msgstr "Votant"
#: ../views/votes_show_closed.erb:184
#: ../views/votes_show_closed.erb:195
msgid "Reopen voting period"
msgstr "Reobrir el període de votació"

1
views/rating_badge.erb Normal file
View file

@ -0,0 +1 @@
<span class="badge bg-<%= value[:id] %>"><%= _(value[:label]) %></span>

View file

@ -44,8 +44,7 @@
<% end %>
<p class="fs-5">
<%= "##{r}" %>
<% value = settings.values.select { |e| e[:id] == c.mj.mj }.first %>
<span class="badge bg-<%= value[:id] %>"><%= _(value[:label]) %></span>
<%= erb :rating_badge, :locals => { :value => settings.values.select { |e| e[:id] == c.mj.mj }.first } %>
</p>
<h3><%= c.name %></h3>
<table class="table table-borderless">
@ -87,7 +86,7 @@
</div>
<table class="table table-borderless tiebreak">
<% n = 0 %>
<% previous = 0 %>
<% previous = nil %>
<% max = @results.first.mj.n * 2 + 1 %>
<% c.mj.break_tie(@results.first.mj).each do |a, b| %>
<tr class="tiebreak-top">
@ -96,19 +95,30 @@
<tr class="tiebreak-round">
<td colspan="<%= max %>">
<% if n == 0 %>
<%= _("Without removing any vote.") %>
<% current = erb :rating_badge, :locals => { :value => settings.values.select { |e| e[:id] == a.mj }.first } %>
<%= _("Without removing any vote, both candidates have the same majority judgement of %{current}.") % { current: current } %>
<% end %>
<% if n == 1 %>
<% value = settings.values.select { |e| e[:id] == previous }.first %>
<%= _("Removing a vote of rating: ") %>
<span class="badge bg-<%= value[:id] %>"><%= _(value[:label]) %></span>
<% if a.mj == b.mj %>
<% current = erb :rating_badge, :locals => { :value => settings.values.select { |e| e[:id] == a.mj }.first } %>
<%= _("Removing a vote of rating %{previous}, both candidates still have the same majority judgement of %{current}.") % { previous: previous, current: current } %>
<% else %>
<% losing = erb :rating_badge, :locals => { :value => settings.values.select { |e| e[:id] == a.mj }.first } %>
<% winning = erb :rating_badge, :locals => { :value => settings.values.select { |e| e[:id] == b.mj }.first } %>
<%= _("Removing a vote of rating %{previous}, this candidate has a majority judgement of %{losing}, but the winning candidate has a majority judgement of %{winning}.") % { previous: previous, losing: losing, winning: winning } %>
<% end %>
<% end %>
<% if n > 1 %>
<% value = settings.values.select { |e| e[:id] == previous }.first %>
<%= _("Removing another vote of rating: ") %>
<span class="badge bg-<%= value[:id] %>"><%= _(value[:label]) %></span>
<% if a.mj == b.mj %>
<% current = erb :rating_badge, :locals => { :value => settings.values.select { |e| e[:id] == a.mj }.first } %>
<%= _("Removing another vote of rating %{previous}, both candidates still have the same majority judgement of %{current}.") % { previous: previous, current: current } %>
<% else %>
<% losing = erb :rating_badge, :locals => { :value => settings.values.select { |e| e[:id] == a.mj }.first } %>
<% winning = erb :rating_badge, :locals => { :value => settings.values.select { |e| e[:id] == b.mj }.first } %>
<%= _("Removing another vote of rating %{previous}, this candidate has a majority judgement of %{losing}, but the winning candidate has a majority judgement of %{winning}.") % { previous: previous, losing: losing, winning: winning } %>
<% end %>
<% end %>
<% previous = a.mj %>
<% previous = erb :rating_badge, :locals => { :value => settings.values.select { |e| e[:id] == a.mj }.first } %>
</td>
</tr>
<tr>
@ -167,10 +177,11 @@
<tr>
<td><%= user.email %></td>
<% @vote.candidates.each do |candidate| %>
<% if rating = @vote.ratings.find { |rating| rating.user == user and rating.candidate == candidate } %>
<% value = settings.values.select { |e| e[:id] == rating.value }.first %>
<td class="h5"><span class="badge bg-<%= value[:id] %>"><%= _(value[:label]) %></td>
<% end %>
<% if rating = @vote.ratings.find { |rating| rating.user == user and rating.candidate == candidate } %>
<td class="h5">
<%= erb :rating_badge, :locals => { :value => settings.values.select { |e| e[:id] == rating.value }.first } %>
</td>
<% end %>
<% end %>
</tr>
<% end %>