Translate to Catalan
This commit is contained in:
parent
3fa8c69a49
commit
e826d79240
12 changed files with 502 additions and 110 deletions
|
|
@ -1,25 +1,23 @@
|
|||
<h1>Home</h1>
|
||||
<h1><%= _("Home") %></h1>
|
||||
|
||||
<p>Hello, <%= current_user.email %>.</p>
|
||||
|
||||
<h2>Votes</h2>
|
||||
<h2><%= _("Votes") %></h2>
|
||||
|
||||
<ul>
|
||||
<% @votes.reverse.each do |vote| %>
|
||||
<li>
|
||||
<a href="/votes/<%= vote.secure_id %>"><%= vote.title %></a>
|
||||
<% case vote.state
|
||||
when "draft" %>
|
||||
<% if vote.users.exists?(current_user.id) %>(Draft, organized by you)
|
||||
<% else %>(Draft)
|
||||
when 'draft' %>
|
||||
<% if vote.users.exists?(current_user.id) %><%= _("(Draft, organized by you)") %>
|
||||
<% else %><%= _("(Draft)") %>
|
||||
<% end %>
|
||||
<% when "open" %>
|
||||
<% if vote.users.exists?(current_user.id) %>(Open, organized by you)
|
||||
<% else %>(Open)
|
||||
<% when 'open' %>
|
||||
<% if vote.users.exists?(current_user.id) %><%= _("(Open, organized by you)") %>
|
||||
<% else %><%= _("(Open)") %>
|
||||
<% end %>
|
||||
<% when "closed" %>
|
||||
<% if vote.users.exists?(current_user.id) %>(Closed, organized by you)
|
||||
<% else %>(Closed)
|
||||
<% when 'closed' %>
|
||||
<% if vote.users.exists?(current_user.id) %><%= _("(Closed, organized by you)") %>
|
||||
<% else %><%= _("(Closed)") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
|
@ -27,5 +25,5 @@
|
|||
</ul>
|
||||
|
||||
<form action="/votes/new" method="get">
|
||||
<button type="submit">Create new vote</button>
|
||||
<button type="submit"><%= _("Create new vote") %></button>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Title</title>
|
||||
<title><%= _("Vote") %></title>
|
||||
</head>
|
||||
<body>
|
||||
<% if current_user %>
|
||||
<p>Logged in as <%= current_user.email %>. <a href="/logout">Logout</a></p>
|
||||
<p><a href="/">Home</a></p>
|
||||
<p><%= _("Logged in as %{email}.") % { email: current_user.email } %> <a href="/logout"><%= _("Logout") %></a></p>
|
||||
<p><a href="/"><%= _("Home") %></a></p>
|
||||
<% else %>
|
||||
<p><a href="/login">Login</a></p>
|
||||
<p><a href="/login"><%= _("Login") %></a></p>
|
||||
<% end %>
|
||||
<%= yield %>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,6 @@
|
|||
<label for="password"><%= _("Password") %></label>
|
||||
<input type="password" name="password">
|
||||
</p>
|
||||
<button type="submit">Log in</button>
|
||||
<button type="submit"><%= _("Login") %></button>
|
||||
</form>
|
||||
<a href="/signup">Create account</a>
|
||||
<a href="/signup"><%= _("Create account") %></a>
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<h1>Create account</h1>
|
||||
<h1><%= _("Create account") %></h1>
|
||||
|
||||
<form action="/signup" method="post">
|
||||
<p>
|
||||
<label for="email">Email</label>
|
||||
<label for="email"><%= _("Email") %></label>
|
||||
<input type="text" name="email">
|
||||
</p>
|
||||
<p>
|
||||
<label for="password">Password</label>
|
||||
<label for="password"><%= _("Password") %></label>
|
||||
<input type="password" name="password">
|
||||
</p>
|
||||
<button type="submit">Create account</button>
|
||||
<button type="submit"><%= _("Create account") %></button>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -1,42 +1,42 @@
|
|||
<h1>Edit draft vote</h1>
|
||||
<h1><%= _("Edit draft vote") %></h1>
|
||||
|
||||
<form action="/votes/<%= @vote.secure_id %>/edit" method="post">
|
||||
<p>
|
||||
<label for="title">Title</label>
|
||||
<label for="title"><%= _("Title") %></label>
|
||||
<input type="text" name="title" value="<%= @vote.title %>">
|
||||
</p>
|
||||
<p>
|
||||
<label for="description">Description</label>
|
||||
<label for="description"><%= _("Description") %></label>
|
||||
<input type="text" name="description" value="<%= @vote.description %>">
|
||||
</p>
|
||||
<button type="submit">Update vote description</button>
|
||||
<button type="submit"><%= _("Save") %></button>
|
||||
</form>
|
||||
|
||||
<h2>Candidates</h2>
|
||||
<h2><%= _("Candidates") %></h2>
|
||||
|
||||
<% @vote.candidates.each do |candidate| %>
|
||||
<h3><%= candidate.name %></h3>
|
||||
<p><%= candidate.description %></p>
|
||||
<form action="/votes/<%= @vote.secure_id %>/candidates/<%= candidate.id %>/delete" method="post">
|
||||
<button type="submit">Delete candidate</button>
|
||||
<button type="submit"><%= _("Delete") %></button>
|
||||
</form>
|
||||
<% end %>
|
||||
|
||||
<h3>Add candidate</h3>
|
||||
<h3><%= _("Add candidate") %></h3>
|
||||
|
||||
<form action="/votes/<%= @vote.secure_id %>/candidates" method="post">
|
||||
<p>
|
||||
<label for="name">Name</label>
|
||||
<label for="name"><%= _("Name") %></label>
|
||||
<input type="text" name="name">
|
||||
</p>
|
||||
<p>
|
||||
<label for="description">Description</label>
|
||||
<label for="description"><%= _("Description") %></label>
|
||||
<input type="text" name="description">
|
||||
</p>
|
||||
<button type="submit">Add new candidate</button>
|
||||
<button type="submit"><%= _("Add") %></button>
|
||||
</form>
|
||||
|
||||
<h2>Organizers</h2>
|
||||
<h2><%= _("Organizers") %></h2>
|
||||
|
||||
<ul>
|
||||
<% @vote.organizers.each do |organizer| %>
|
||||
|
|
@ -44,21 +44,21 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
|
||||
<h3>Add organizer</h3>
|
||||
<h3><%= _("Add organizer") %></h3>
|
||||
|
||||
<form action="/votes/<%= @vote.secure_id %>/organizers" method="post">
|
||||
<p>
|
||||
<label for="email">Email</label>
|
||||
<label for="email"><%= _("Email") %></label>
|
||||
<input type="text" name="email">
|
||||
</p>
|
||||
<button type="submit">Add new organizer</button>
|
||||
<button type="submit"><%= _("Add") %></button>
|
||||
</form>
|
||||
|
||||
<h3>Actions for organizers</h2>
|
||||
<h3><%= _("Actions for organizers") %></h2>
|
||||
|
||||
<form action="/votes/<%= @vote.secure_id %>/open" method="post">
|
||||
<button type="submit">Open vote to participants</button>
|
||||
<button type="submit"><%= _("Open vote to participants") %></button>
|
||||
</form>
|
||||
<form action="/votes/<%= @vote.secure_id %>/delete" method="post">
|
||||
<button type="submit">Delete vote</button>
|
||||
<button type="submit"><%= _("Delete vote") %></button>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<h1>New vote</h1>
|
||||
<h1><%= _("New vote") %></h1>
|
||||
|
||||
<form action="/votes" method="post">
|
||||
<p>
|
||||
<label for="title">Title</label>
|
||||
<label for="title"><%= _("Title") %></label>
|
||||
<input type="text" name="title">
|
||||
</p>
|
||||
<p>
|
||||
<label for="description">Description</label>
|
||||
<label for="description"><%= _("Description") %></label>
|
||||
<input type="text" name="description">
|
||||
</p>
|
||||
<button type="submit">Create new vote</button>
|
||||
<button type="submit"><%= _("Create new vote") %></button>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
<p><%= @vote.description %></p>
|
||||
|
||||
<h2>All ratings</h2>
|
||||
<h2><%= _("All ratings") %></h2>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Participant</th>
|
||||
<th><%= _("Participant") %></th>
|
||||
<% @vote.candidates.each do |candidate| %>
|
||||
<th><%= candidate.name %></th>
|
||||
<% end %>
|
||||
|
|
@ -23,15 +23,15 @@
|
|||
<% end %>
|
||||
</table>
|
||||
|
||||
<h2>Results</h2>
|
||||
<h2><%= _("Results") %></h2>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>Rank</td>
|
||||
<td>Candidate</td>
|
||||
<td>Majority Judgment</td>
|
||||
<td>Proponents</td>
|
||||
<td>Opponents</td>
|
||||
<td><%= _("Rank") %></td>
|
||||
<td><%= _("Candidate") %></td>
|
||||
<td><%= _("Majority Judgment") %></td>
|
||||
<td><%= _("Proponents") %></td>
|
||||
<td><%= _("Opponents") %></td>
|
||||
</tr>
|
||||
<% i = 0 %>
|
||||
<% @vote.candidates.sort { |a, b| a.mj <=> b.mj }.reverse.each do |candidate| %>
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
<% end %>
|
||||
</table>
|
||||
|
||||
<h2>Organizers</h2>
|
||||
<h2><%= _("Organizers") %></h2>
|
||||
|
||||
<ul>
|
||||
<% @vote.organizers.each do |organizer| %>
|
||||
|
|
@ -56,20 +56,20 @@
|
|||
|
||||
<% if @vote.users.exists?(current_user.id) %>
|
||||
|
||||
<h3>Actions for organizers</h3>
|
||||
<h3><%= _("Actions for organizers") %></h3>
|
||||
|
||||
<form action="/votes/<%= @vote.secure_id %>/reopen" method="post">
|
||||
<button type="submit">Reopen voting period</button>
|
||||
<button type="submit"><%= _("Reopen voting period") %></button>
|
||||
</form>
|
||||
|
||||
<h3>Add organizer</h3>
|
||||
<h3><%= _("Add") %></h3>
|
||||
|
||||
<form action="/votes/<%= @vote.secure_id %>/organizers" method="post">
|
||||
<p>
|
||||
<label for="email">Email</label>
|
||||
<label for="email"><%= _("Email") %></label>
|
||||
<input type="text" name="email">
|
||||
</p>
|
||||
<button type="submit">Add new organizer</button>
|
||||
<button type="submit"><%= _("Add") %></button>
|
||||
</form>
|
||||
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<h1><%= @vote.title %> (Draft)</h1>
|
||||
<h1><%= @vote.title %> <%= _("(Draft)") %></h1>
|
||||
|
||||
<p><%= @vote.description %></p>
|
||||
|
||||
<h2>Organizers</h2>
|
||||
<h2><%= _("Organizers") %></h2>
|
||||
|
||||
<ul>
|
||||
<% @vote.organizers.each do |organizer| %>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
|
||||
<h2>Candidates</h2>
|
||||
<h2><%= _("Candidates") %></h2>
|
||||
|
||||
<% @vote.candidates.each do |candidate| %>
|
||||
<h3><%= candidate.name %></h3>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
<p><%= @vote.description %></p>
|
||||
|
||||
<h2>Your ratings</h2>
|
||||
|
||||
<p>Hello, <%= current_user.email %>.</p>
|
||||
<h2><%= _("Your ratings") %></h2>
|
||||
|
||||
<form action="/votes/<%= @vote.secure_id %>/ratings" method="post">
|
||||
<ul>
|
||||
|
|
@ -22,10 +20,10 @@
|
|||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<button type="submit">Save ratings</button>
|
||||
<button type="submit"><%= _("Save") %></button>
|
||||
</form>
|
||||
|
||||
<h2>Participants</h2>
|
||||
<h2><%= _("Participants") %></h2>
|
||||
|
||||
<ul>
|
||||
<% @vote.ratings.collect { |rating| rating.user }.uniq.each do |user| %>
|
||||
|
|
@ -33,7 +31,7 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
|
||||
<h2>Organizers</h2>
|
||||
<h2><%= _("Organizers") %></h2>
|
||||
|
||||
<ul>
|
||||
<% @vote.organizers.each do |organizer| %>
|
||||
|
|
@ -43,24 +41,24 @@
|
|||
|
||||
<% if @vote.users.exists?(current_user.id) %>
|
||||
|
||||
<h3>Actions for organizers</h3>
|
||||
<h3><%= _("Actions for organizers") %></h3>
|
||||
|
||||
<form action="/votes/<%= @vote.secure_id %>/draft" method="post">
|
||||
<button type="submit">Change back to draft vote</button>
|
||||
<button type="submit"><%= _("Change back to draft vote") %></button>
|
||||
</form>
|
||||
|
||||
<form action="/votes/<%= @vote.secure_id %>/close" method="post">
|
||||
<button type="submit">Close votes and show results</button>
|
||||
<button type="submit"><%= _("Close votes and show results") %></button>
|
||||
</form>
|
||||
|
||||
<h3>Add organizer</h3>
|
||||
<h3><%= _("Add organizer") %></h3>
|
||||
|
||||
<form action="/votes/<%= @vote.secure_id %>/organizers" method="post">
|
||||
<p>
|
||||
<label for="email">Email</label>
|
||||
<label for="email"><%= _("Email") %></label>
|
||||
<input type="text" name="email">
|
||||
</p>
|
||||
<button type="submit">Add new organizer</button>
|
||||
<button type="submit"><%= _("Add") %></button>
|
||||
</form>
|
||||
|
||||
<% end %>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue