Merge pull request #3630 from consul/fix_typos

Fix typos and remove unused code
This commit is contained in:
Javier Martín
2019-08-28 20:25:50 +02:00
committed by GitHub
20 changed files with 29 additions and 61 deletions

View File

@@ -2,10 +2,12 @@
linters:
FinalNewline:
enabled: true
SpaceAroundErbTag:
enabled: true
SelfClosingTag:
enabled: false
SpaceAroundErbTag:
enabled: true
SpaceInHtmlTag:
enabled: true
Rubocop:
enabled: true
only:

View File

@@ -16,7 +16,7 @@ module CommentableActions
@resources = @resources.page(params[:page]).send("sort_by_#{@current_order}")
index_customization if index_customization.present?
index_customization
@tag_cloud = tag_cloud
@banners = Banner.in_section(section(resource_model.name)).with_active

View File

@@ -1,7 +0,0 @@
module SettingsHelper
def setting_for_widget(widget)
Setting.where(key: "feature.user.recommendations").first
end
end

View File

@@ -13,10 +13,6 @@ class Geozone < ApplicationRecord
Geozone.pluck(:name)
end
def self.city
where(name: "city").first
end
def safe_to_destroy?
Geozone.reflect_on_all_associations(:has_many).all? do |association|
association.klass.where(geozone: self).empty?

View File

@@ -1,3 +1,3 @@
<h2><%= t("admin.settings.index.title") %></h2>
<h2><%= t("admin.settings.index.general") %></h2>
<%= render "settings_table", settings: @configuration_settings, setting_name: "setting", tab: "#tab-configuration" %>

View File

@@ -7,7 +7,7 @@
data-tabs>
<li class="tabs-title is-active">
<%= link_to "#tab-configuration" do %>
<%= t("admin.settings.index.title") %>
<%= t("admin.settings.index.general") %>
<% end %>
</li>

View File

@@ -1,4 +1,4 @@
<h1>Settings</h1>
<h1><%= t("admin.settings.index.title") %></h1>
<div class="tabs-content" data-tabs-content="settings-tabs">
<%= render "filter_subnav" %>

View File

@@ -1,11 +1,11 @@
<span class="button columns-selector hollow" id="js-columns-selector" data-cookie="<%= cookie %>" data-default="<%= default.join(",") %>">
<span class="icon-banner"> </span>
<strong>Columns</strong>
<strong><%= t("admin.budget_investments.index.columns") %></strong>
</span>
<div class="hidden columns-selector-wrapper" id="js-columns-selector-wrapper">
<div class="hidden column-selector-item" id="column_selector_item_template">
<input type="checkbox" name="column-selector[template]" id="column_selector_template" data-column="template">
<label for="column_selector_template">Template</label>
<label for="column_selector_template"></label>
</div>
</div>

View File

@@ -1,32 +0,0 @@
<%= form_for(tracker) do |f| %>
<% if tracker.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(tracker.errors.count, "error") %> prohibited this tracker from being saved:</h2>
<ul>
<% tracker.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :user_id %>
<%= f.text_field :user_id %>
</div>
<div class="field">
<%= f.label :description %>
<%= f.text_field :description %>
</div>
<div class="field">
<%= f.label :budget_investment_count %>
<%= f.number_field :budget_investment_count %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="es">
<head>
<title>Gobierno abierto</title>
<title><%= t("mailers.title") %></title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" id="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0,maximum-scale=10.0"/>
</head>

View File

@@ -7,6 +7,6 @@
placeholder: t("management.user_invites.new.info"),
aria: {describedby: "emails-help-text"} %>
<div class="small-12 medium-6 large-3">
<input type="submit" name="" value="<%= t("management.user_invites.new.submit") %>", class="button expanded">
<input type="submit" name="" value="<%= t("management.user_invites.new.submit") %>" class="button expanded">
</div>
<% end %>

View File

@@ -1,5 +1,6 @@
<%= form_tag(create_answer_question_path(question, token: token), method: :post, remote: true) do %>
<label> You can add your own answer</label>
<input type="text" class="medium-10" name="answer">
<input class="button success" type="submit" value="<%= t("poll_questions.show.add_answer") %>">
<% id = "your_answer_#{SecureRandom.hex}" %>
<%= label_tag :answer, t("poll_questions.show.your_answer"), for: id %>
<%= text_field_tag :answer, nil, class: "medium-10", id: id %>
<%= submit_tag t("poll_questions.show.add_answer"), class: "button success" %>
<% end %>

View File

@@ -4,7 +4,7 @@
<div class="row advanced-search-form">
<%= form_tag search_path, id: "advanced_search_form", method: :get do %>
<div id="js-advanced-search" data-advanced-search-terms=<%= @advanced_search_terms.present? %> style="display: none">
<div id="js-advanced-search" data-advanced-search-terms="<%= @advanced_search_terms.present? %>" style="display: none">
<div class="small-12 column">
<label for="search">

View File

@@ -224,6 +224,7 @@ en:
download_current_selection: "Download current selection"
no_budget_investments: "There are no investment projects."
title: Investment projects
columns: Columns
assigned_admin: Assigned administrator
no_admin_assigned: No admin assigned
no_valuators_assigned: No valuators assigned
@@ -1291,7 +1292,8 @@ en:
flash:
updated: Value updated
index:
title: Configuration settings
title: Settings
general: Configuration settings
update_setting: Update
participation_processes: "Participation processes"
images_and_documents: "Images and documents"

View File

@@ -701,6 +701,7 @@ en:
show:
vote_answer: "Vote %{answer}"
voted: "You have voted %{answer}"
your_answer: "You can add your own answer"
add_answer: "Add answer"
description:
multiple: "You can select a maximum of %{maximum} answers."

View File

@@ -1,5 +1,6 @@
en:
mailers:
title: "Open Government"
no_reply: "This message was sent from an email address that does not accept replies."
comment:
hi: Hi

View File

@@ -224,6 +224,7 @@ es:
download_current_selection: "Descargar selección actual"
no_budget_investments: "No hay proyectos de gasto."
title: Proyectos de gasto
columns: Columnas
assigned_admin: Administrador asignado
no_admin_assigned: Sin admin asignado
no_valuators_assigned: Sin evaluador
@@ -1293,6 +1294,7 @@ es:
updated: Valor actualizado
index:
title: Configuración global
general: Configuración global
update_setting: Actualizar
participation_processes: "Procesos de participación"
images_and_documents: "Imágenes y documentos"

View File

@@ -699,6 +699,7 @@ es:
show:
vote_answer: "Votar %{answer}"
voted: "Has votado %{answer}"
your_answer: "Puedes añadir tu propia respuesta"
add_answer: "Añadir respuesta"
description:
multiple: "Puedes seleccionar un máximo de %{maximum} respuestas."

View File

@@ -1,5 +1,6 @@
es:
mailers:
title: "Gobierno abierto"
no_reply: "Este mensaje se ha enviado desde una dirección de correo electrónico que no admite respuestas."
comment:
hi: Hola

View File

@@ -25,7 +25,7 @@ describe "Admin booths assignments" do
click_link "Manage assignments"
end
expect(page).to have_content "Assignments for poll "#{second_poll.name}""
expect(page).to have_content "Assignments for poll '#{second_poll.name}'"
expect(page).to have_content(booth.name)
expect(page).to have_content(second_booth.name)
@@ -46,7 +46,7 @@ describe "Admin booths assignments" do
visit manage_admin_poll_booth_assignments_path(poll)
expect(page).to have_content "Assignments for poll "#{poll.name}""
expect(page).to have_content "Assignments for poll '#{poll.name}'"
within("#poll_booth_#{booth.id}") do
expect(page).to have_content(booth.name)
@@ -85,7 +85,7 @@ describe "Admin booths assignments" do
visit manage_admin_poll_booth_assignments_path(poll)
expect(page).to have_content "Assignments for poll "#{poll.name}""
expect(page).to have_content "Assignments for poll '#{poll.name}'"
within("#poll_booth_#{booth.id}") do
expect(page).to have_content(booth.name)