refactors i18n for polls

This commit is contained in:
Juanjo Bazán
2016-12-07 14:49:56 +01:00
parent 6aa96c4471
commit 1a20a3ce46
13 changed files with 71 additions and 43 deletions

View File

@@ -73,7 +73,7 @@
</li>
<li <%= 'class=active' if controller_name == 'booths' %>>
<%= link_to t('admin.menu.booths'), admin_booths_path %>
<%= link_to t('admin.menu.poll_booths'), admin_booths_path %>
</li>
</ul>
</li>

View File

@@ -1,11 +1,13 @@
<div class="row">
<div class="small-12 column">
<% if @poll.questions.empty? %>
<div class="callout primary text-center">
<%= t('admin.polls.show.no_questions') %>
</div>
<% else %>
<h2><%= t("admin.polls.show.questions_title") %></h2>
<table>
<% @poll.questions.each do |question| %>
<tr id="<%= dom_id(question) %>">

View File

@@ -2,7 +2,7 @@
<%= form_tag '', method: :get do %>
<%= select_tag "poll_id",
poll_select_options(true),
prompt: t("admin.booths.index.select_poll"),
prompt: t("admin.questions.index.select_poll"),
class: "js-location-changer" %>
<% end %>
</div>

View File

@@ -10,7 +10,7 @@
<div class="small-12 medium-6">
<%= f.select :poll_id,
options_for_select(Poll.pluck(:name, :id)),
prompt: t("admin.booths.index.select_poll") %>
prompt: t("admin.questions.index.select_poll") %>
</div>
<%= f.text_field :title, maxlength: Poll::Question.title_max_length %>