diff --git a/po/ca/vedia.po b/po/ca/vedia.po index 8bccfdd..fe336e2 100644 --- a/po/ca/vedia.po +++ b/po/ca/vedia.po @@ -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 \n" "Language-Team: LANGUAGE \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'>judici majoritari<" "/i>." -#: ../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ó" diff --git a/views/rating_badge.erb b/views/rating_badge.erb new file mode 100644 index 0000000..c45a316 --- /dev/null +++ b/views/rating_badge.erb @@ -0,0 +1 @@ +<%= _(value[:label]) %> diff --git a/views/votes_show_closed.erb b/views/votes_show_closed.erb index 22df1b7..2116d63 100644 --- a/views/votes_show_closed.erb +++ b/views/votes_show_closed.erb @@ -44,8 +44,7 @@ <% end %>

<%= "##{r}" %> - <% value = settings.values.select { |e| e[:id] == c.mj.mj }.first %> - <%= _(value[:label]) %> + <%= erb :rating_badge, :locals => { :value => settings.values.select { |e| e[:id] == c.mj.mj }.first } %>

<%= c.name %>

@@ -87,7 +86,7 @@
<% n = 0 %> - <% previous = 0 %> + <% previous = nil %> <% max = @results.first.mj.n * 2 + 1 %> <% c.mj.break_tie(@results.first.mj).each do |a, b| %> @@ -96,19 +95,30 @@ @@ -167,10 +177,11 @@ <% @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 %> - - <% end %> + <% if rating = @vote.ratings.find { |rating| rating.user == user and rating.candidate == candidate } %> + + <% end %> <% end %> <% end %>
<% 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: ") %> - <%= _(value[:label]) %> + <% 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: ") %> - <%= _(value[:label]) %> + <% 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 } %>
<%= user.email %><%= _(value[:label]) %> + <%= erb :rating_badge, :locals => { :value => settings.values.select { |e| e[:id] == rating.value }.first } %> +