merges master and fixes conflicts
This commit is contained in:
@@ -32,5 +32,6 @@ module Participacion
|
||||
|
||||
# Add lib to the autoload path
|
||||
config.autoload_paths << Rails.root.join('lib')
|
||||
config.time_zone = 'Madrid'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -10,6 +10,9 @@ development:
|
||||
<<: *default
|
||||
database: participacion_development
|
||||
|
||||
staging:
|
||||
<<: *default
|
||||
|
||||
test:
|
||||
<<: *default
|
||||
database: participacion_test
|
||||
@@ -3,6 +3,8 @@ staging:
|
||||
ssh_port: 21
|
||||
server: staging.participacion.madrid.es
|
||||
user: xxxxx
|
||||
server_name: staging.participacion.madrid.es
|
||||
db_server: postgre.participacion.madrid.es
|
||||
|
||||
preproduction:
|
||||
deploy_to: "/var/www/participacion"
|
||||
|
||||
@@ -8,14 +8,20 @@ end
|
||||
|
||||
set :rails_env, fetch(:stage)
|
||||
set :rvm_ruby_version, '2.2.2'
|
||||
set :rvm_type, :user
|
||||
|
||||
set :application, 'participacion'
|
||||
set :repo_url, 'git@github.com:AyuntamientoMadrid/participacion.git'
|
||||
set :server_name, deploysecret(:server_name)
|
||||
#set :repo_url, 'git@github.com:AyuntamientoMadrid/participacion.git'
|
||||
# If ssh access is restricted, probably you need to use https access
|
||||
set :repo_url, 'https://github.com/AyuntamientoMadrid/participacion.git'
|
||||
|
||||
set :scm, :git
|
||||
set :revision, `git rev-parse --short #{fetch(:branch)}`.strip
|
||||
|
||||
set :log_level, :info
|
||||
set :pty, true
|
||||
set :use_sudo, false
|
||||
|
||||
set :linked_files, %w{config/database.yml config/secrets.yml}
|
||||
set :linked_dirs, %w{log tmp public/system public/assets}
|
||||
@@ -24,15 +30,27 @@ set :keep_releases, 5
|
||||
|
||||
set :local_user, ENV['USER']
|
||||
|
||||
# Run test before deploy
|
||||
set :tests, ["spec"]
|
||||
|
||||
# Config files should be copied by deploy:setup_config
|
||||
set(:config_files, %w(
|
||||
log_rotation
|
||||
database.yml
|
||||
secrets.yml
|
||||
unicorn.rb
|
||||
sidekiq.yml
|
||||
))
|
||||
|
||||
|
||||
namespace :deploy do
|
||||
|
||||
after :restart, :clear_cache do
|
||||
on roles(:web), in: :groups, limit: 3, wait: 10 do
|
||||
# Here we can do anything such as:
|
||||
# within release_path do
|
||||
# execute :rake, 'cache:clear'
|
||||
# end
|
||||
end
|
||||
end
|
||||
|
||||
# Check right version of deploy branch
|
||||
before :deploy, "deploy:check_revision"
|
||||
# Run test aund continue only if passed
|
||||
before :deploy, "deploy:run_tests"
|
||||
# Compile assets locally and then rsync
|
||||
after 'deploy:symlink:shared', 'deploy:compile_assets_locally'
|
||||
after :finishing, 'deploy:cleanup'
|
||||
# Restart unicorn
|
||||
after 'deploy:publishing', 'deploy:restart'
|
||||
end
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
set :deploy_to, deploysecret(:deploy_to)
|
||||
set :branch, :production
|
||||
set :server_name, deploysecret(:server_name)
|
||||
set :db_server, deploysecret(:db_server)
|
||||
set :branch, :master
|
||||
set :ssh_options, port: deploysecret(:ssh_port)
|
||||
set :stage, :production
|
||||
set :rails_env, :production
|
||||
|
||||
server deploysecret(:server), user: deploysecret(:user), roles: %w(web app db importer)
|
||||
server deploysecret(:server), user: deploysecret(:user), roles: %w(web app db importer)
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
set :deploy_to, deploysecret(:deploy_to)
|
||||
set :branch, :production
|
||||
set :server_name, deploysecret(:server_name)
|
||||
set :db_server, deploysecret(:db_server)
|
||||
set :branch, :master
|
||||
set :ssh_options, port: deploysecret(:ssh_port)
|
||||
set :stage, :production
|
||||
set :rails_env, :production
|
||||
|
||||
server deploysecret(:server), user: deploysecret(:user), roles: %w(web app db importer)
|
||||
server deploysecret(:server), user: deploysecret(:user), roles: %w(web app db importer)
|
||||
|
||||
19
config/deploy/sample_config_files/apache_passenger.conf
Normal file
19
config/deploy/sample_config_files/apache_passenger.conf
Normal file
@@ -0,0 +1,19 @@
|
||||
<VirtualHost *:80>
|
||||
|
||||
ServerName yourdomain.com
|
||||
ServerAlias www.yourdomain.com
|
||||
ServerAdmin webmaster@localhost
|
||||
|
||||
DocumentRoot /path/to/deploy_to/current/public
|
||||
|
||||
# RailsEnv production
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/yourdomain.error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/yourdomain.access.log combined
|
||||
|
||||
<Directory "/path/to/deploy_to/current/public">
|
||||
Options FollowSymLinks
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
</VirtualHost>
|
||||
31
config/deploy/sample_config_files/apache_unicorn.conf
Normal file
31
config/deploy/sample_config_files/apache_unicorn.conf
Normal file
@@ -0,0 +1,31 @@
|
||||
<VirtualHost *:80>
|
||||
|
||||
ServerAdmin admin@yourdomain.com
|
||||
ServerName yourdomain.com
|
||||
ServerAlias www.yourdomain.com
|
||||
|
||||
DocumentRoot /path/to/deploy_to/current/public
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
<Proxy balancer://unicornservers>
|
||||
BalancerMember http://127.0.0.1:5000
|
||||
</Proxy>
|
||||
|
||||
# Redirect all non-static requests to thin
|
||||
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^/(.*)$ balancer://unicornservers%{REQUEST_URI} [P,QSA,L]
|
||||
|
||||
ProxyPass / balancer://unicornservers/
|
||||
ProxyPassReverse / balancer://unicornservers/
|
||||
ProxyPreserveHost on
|
||||
|
||||
<Proxy *>
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</Proxy>
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/yourdomain.error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/yourdomain.access.log combined
|
||||
|
||||
</VirtualHost>
|
||||
96
config/deploy/sample_config_files/unicorn_init.sh
Normal file
96
config/deploy/sample_config_files/unicorn_init.sh
Normal file
@@ -0,0 +1,96 @@
|
||||
#!/bin/sh
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: unicorn
|
||||
# Required-Start: $local_fs $remote_fs $network $syslog
|
||||
# Required-Stop: $local_fs $remote_fs $network $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: starts the unicorn web server
|
||||
# Description: starts unicorn
|
||||
### END INIT INFO
|
||||
|
||||
set -e
|
||||
|
||||
TIMEOUT=${TIMEOUT-60}
|
||||
APP_ROOT=<%= current_path %>
|
||||
PID_DIR=$APP_ROOT/tmp/pids
|
||||
PID=$PID_DIR/unicorn.pid
|
||||
CMD="cd $APP_ROOT; bundle exec unicorn -D -c /path/to/shared/config/unicorn.rb -E production"
|
||||
AS_USER=deploy
|
||||
set -u
|
||||
|
||||
OLD_PIN="$PID.oldbin"
|
||||
|
||||
sig () {
|
||||
test -s "$PID" && kill -$1 `cat $PID`
|
||||
}
|
||||
|
||||
oldsig () {
|
||||
test -s $OLD_PIN && kill -$1 `cat $OLD_PIN`
|
||||
}
|
||||
|
||||
workersig () {
|
||||
workerpid="$APP_ROOT/tmp/pids/unicorn.$2.pid"
|
||||
|
||||
test -s "$workerpid" && kill -$1 `cat $workerpid`
|
||||
}
|
||||
|
||||
run () {
|
||||
if [ "$(id -un)" = "$AS_USER" ]; then
|
||||
eval $1
|
||||
else
|
||||
su -c "$1" - $AS_USER
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
sig 0 && echo >&2 "Already running" && exit 0
|
||||
run "$CMD"
|
||||
;;
|
||||
stop)
|
||||
sig QUIT && exit 0
|
||||
echo >&2 "Not running"
|
||||
;;
|
||||
force-stop)
|
||||
sig TERM && exit 0
|
||||
echo >&2 "Not running"
|
||||
;;
|
||||
kill_worker)
|
||||
workersig QUIT $2 && exit 0
|
||||
echo >&2 "Worker not running"
|
||||
;;
|
||||
restart|reload)
|
||||
sig USR2 && echo reloaded OK && exit 0
|
||||
echo >&2 "Couldn't reload, starting '$CMD' instead"
|
||||
run "$CMD"
|
||||
;;
|
||||
upgrade)
|
||||
if sig USR2 && sleep 2 && sig 0 && oldsig QUIT
|
||||
then
|
||||
n=$TIMEOUT
|
||||
while test -s $OLD_PIN && test $n -ge 0
|
||||
do
|
||||
printf '.' && sleep 1 && n=$(( $n - 1 ))
|
||||
done
|
||||
echo
|
||||
|
||||
if test $n -lt 0 && test -s $OLD_PIN
|
||||
then
|
||||
echo >&2 "$OLD_PIN still exists after $TIMEOUT seconds"
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
echo >&2 "Couldn't upgrade, starting '$CMD' instead"
|
||||
run "$CMD"
|
||||
;;
|
||||
reopen-logs)
|
||||
sig USR1
|
||||
;;
|
||||
*)
|
||||
echo >&2 "Usage: $0 <start|stop|restart|upgrade|force-stop|reopen-logs>"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
10
config/deploy/shared/database.yml.erb
Normal file
10
config/deploy/shared/database.yml.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
<%= fetch(:rails_env) %>:
|
||||
adapter: postgresql
|
||||
timeout: 5000
|
||||
encoding: unicode
|
||||
reconnect: false
|
||||
database: <%= "#{fetch(:application)}" %>
|
||||
pool: 5
|
||||
username:
|
||||
password:
|
||||
host: <%= fetch(:db_server) %>
|
||||
11
config/deploy/shared/log_rotation.erb
Executable file
11
config/deploy/shared/log_rotation.erb
Executable file
@@ -0,0 +1,11 @@
|
||||
<%= fetch(:deploy_to) %>/shared/log/*.log {
|
||||
daily
|
||||
missingok
|
||||
rotate 52
|
||||
compress
|
||||
delaycompress
|
||||
notifempty
|
||||
sharedscripts
|
||||
endscript
|
||||
copytruncate
|
||||
}
|
||||
4
config/deploy/shared/secrets.yml.erb
Normal file
4
config/deploy/shared/secrets.yml.erb
Normal file
@@ -0,0 +1,4 @@
|
||||
<%= fetch(:rails_env) %>:
|
||||
recaptcha_public_key: <%= ENV["MADRID_RECAPTCHA_PUBLIC_KEY"] %>
|
||||
recaptcha_private_key: <%= ENV["MADRID_RECAPTCHA_PRIVATE_KEY"] %>
|
||||
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
||||
2
config/deploy/shared/sidekiq.yml.erb
Normal file
2
config/deploy/shared/sidekiq.yml.erb
Normal file
@@ -0,0 +1,2 @@
|
||||
<%= fetch(:rails_env) %>:
|
||||
:concurrency: <%= fetch(:sidekiq_concurrency, 5) %>
|
||||
42
config/deploy/shared/unicorn.rb.erb
Executable file
42
config/deploy/shared/unicorn.rb.erb
Executable file
@@ -0,0 +1,42 @@
|
||||
root = "<%= current_path %>"
|
||||
working_directory root
|
||||
pid "#{root}/tmp/pids/unicorn.pid"
|
||||
stderr_path "#{root}/log/unicorn.log"
|
||||
stdout_path "#{root}/log/unicorn.log"
|
||||
|
||||
listen 5000
|
||||
#listen "/tmp/unicorn.<%= fetch(:application) %>.sock"
|
||||
worker_processes 4
|
||||
timeout 40
|
||||
preload_app true
|
||||
|
||||
# Force unicorn to look at the Gemfile in the current_path
|
||||
# otherwise once we've first started a master process, it
|
||||
# will always point to the first one it started.
|
||||
before_exec do |server|
|
||||
ENV['BUNDLE_GEMFILE'] = "<%= current_path %>/Gemfile"
|
||||
end
|
||||
|
||||
before_fork do |server, worker|
|
||||
defined?(ActiveRecord::Base) and
|
||||
ActiveRecord::Base.connection.disconnect!
|
||||
# Quit the old unicorn process
|
||||
old_pid = "#{server.config[:pid]}.oldbin"
|
||||
if File.exists?(old_pid) && server.pid != old_pid
|
||||
puts "We've got an old pid and server pid is not the old pid"
|
||||
begin
|
||||
Process.kill("QUIT", File.read(old_pid).to_i)
|
||||
puts "killing master process (good thing tm)"
|
||||
rescue Errno::ENOENT, Errno::ESRCH
|
||||
puts "unicorn master already killed"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
after_fork do |server, worker|
|
||||
port = 5000 + worker.nr
|
||||
child_pid = server.config[:pid].sub('.pid', ".#{port}.pid")
|
||||
system("echo #{Process.pid} > #{child_pid}")
|
||||
defined?(ActiveRecord::Base) and
|
||||
ActiveRecord::Base.establish_connection
|
||||
end
|
||||
@@ -1,7 +1,11 @@
|
||||
set :deploy_to, deploysecret(:deploy_to)
|
||||
set :server_name, deploysecret(:server_name)
|
||||
set :db_server, deploysecret(:db_server)
|
||||
set :branch, :master
|
||||
set :ssh_options, port: deploysecret(:ssh_port)
|
||||
|
||||
set :passenger_restart_with_sudo, false
|
||||
set :stage, :staging
|
||||
set :rails_env, :staging
|
||||
|
||||
server deploysecret(:server), user: deploysecret(:user), roles: %w(web app db importer)
|
||||
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ search:
|
||||
# - '{devise,simple_form}.*'
|
||||
ignore_missing:
|
||||
- 'unauthorized.*'
|
||||
- 'errors.messages.blank'
|
||||
|
||||
## Consider these keys used:
|
||||
ignore_unused:
|
||||
@@ -99,6 +100,7 @@ ignore_unused:
|
||||
# - 'simple_form.{error_notification,required}.:'
|
||||
ignore_unused:
|
||||
- 'unauthorized.*'
|
||||
- 'simple_captcha.*'
|
||||
|
||||
## Exclude these keys from the `i18n-tasks eq-base' report:
|
||||
# ignore_eq_base:
|
||||
|
||||
@@ -6,7 +6,7 @@ Devise.setup do |config|
|
||||
# confirmation, reset password and unlock tokens in the database.
|
||||
# Devise will use the `secret_key_base` on Rails 4+ applications as its `secret_key`
|
||||
# by default. You can change it below and use your own secret key.
|
||||
# config.secret_key = '486ed5e25dcabac12a62c72a26e8057cfc2b822dd46c8b593a77aa95479bac481c3d70d5e5ee88a04aac3cf9b40e592575ca7674e248ff747f5afcdf3a320969'
|
||||
config.secret_key = '486ed5e25dcabac12a62c72a26e8057cfc2b822dd46c8b593a77aa95479bac481c3d70d5e5ee88a04aac3cf9b40e592575ca7674e248ff747f5afcdf3a320969'
|
||||
|
||||
# ==> Mailer Configuration
|
||||
# Configure the e-mail address which will be shown in Devise::Mailer,
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
Recaptcha.configure do |config|
|
||||
config.public_key = Rails.application.secrets.recaptcha_public_key
|
||||
config.private_key = Rails.application.secrets.recaptcha_private_key
|
||||
config.api_version = 'v2'
|
||||
end
|
||||
37
config/initializers/simple_captcha.rb
Normal file
37
config/initializers/simple_captcha.rb
Normal file
@@ -0,0 +1,37 @@
|
||||
SimpleCaptcha.always_pass = Rails.env.test?
|
||||
|
||||
SimpleCaptcha.setup do |sc|
|
||||
# default: 100x28
|
||||
sc.image_size = '120x40'
|
||||
|
||||
# default: 5
|
||||
sc.length = 6
|
||||
|
||||
# default: simply_blue
|
||||
# possible values:
|
||||
# 'embosed_silver',
|
||||
# 'simply_red',
|
||||
# 'simply_green',
|
||||
# 'simply_blue',
|
||||
# 'distorted_black',
|
||||
# 'all_black',
|
||||
# 'charcoal_grey',
|
||||
# 'almost_invisible'
|
||||
# 'random'
|
||||
sc.image_style = 'simply_green'
|
||||
|
||||
# default: low
|
||||
# possible values: 'low', 'medium', 'high', 'random'
|
||||
sc.distortion = 'random'
|
||||
|
||||
# default: medium
|
||||
# possible values: 'none', 'low', 'medium', 'high'
|
||||
sc.implode = 'medium'
|
||||
|
||||
# sc.image_style = 'mycaptha'
|
||||
# sc.add_image_style('mycaptha', [
|
||||
# "-background '#F4F7F8'",
|
||||
# "-fill '#86818B'",
|
||||
# "-border 1",
|
||||
# "-bordercolor '#E0E2E3'"])
|
||||
end
|
||||
3
config/initializers/social_share_button.rb
Normal file
3
config/initializers/social_share_button.rb
Normal file
@@ -0,0 +1,3 @@
|
||||
SocialShareButton.configure do |config|
|
||||
config.allow_sites = %w(twitter facebook google_plus)
|
||||
end
|
||||
13
config/initializers/vote_extensions.rb
Normal file
13
config/initializers/vote_extensions.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
ActsAsVotable::Vote.class_eval do
|
||||
def self.for_debates
|
||||
where(votable_type: 'Debate')
|
||||
end
|
||||
|
||||
def self.in(debates)
|
||||
where(votable_id: debates)
|
||||
end
|
||||
|
||||
def value
|
||||
vote_flag
|
||||
end
|
||||
end
|
||||
@@ -3,6 +3,7 @@ en:
|
||||
models:
|
||||
comment: Comment
|
||||
debate: Debate
|
||||
tag: Topic
|
||||
user: User
|
||||
vote: Vote
|
||||
organization: Organization
|
||||
@@ -21,5 +22,6 @@ en:
|
||||
last_name: "Last name"
|
||||
nickname: Nickname
|
||||
password: Password
|
||||
phone_number: Phone number
|
||||
organization:
|
||||
name: Organization name
|
||||
|
||||
@@ -3,6 +3,7 @@ es:
|
||||
models:
|
||||
comment: Comentario
|
||||
debate: Debate
|
||||
tag: Tema
|
||||
user: Usuario
|
||||
vote: Voto
|
||||
organization: Organización
|
||||
@@ -21,5 +22,6 @@ es:
|
||||
last_name: Apellidos
|
||||
nickname: Pseudónimo
|
||||
password: Contraseña
|
||||
phone_number: Teléfono
|
||||
organization:
|
||||
name: Nombre de organización
|
||||
|
||||
@@ -2,4 +2,12 @@ en:
|
||||
admin:
|
||||
dashboard:
|
||||
index:
|
||||
title: Administration
|
||||
title: Administration
|
||||
tags:
|
||||
index:
|
||||
title: 'Debate topics'
|
||||
add_tag: 'Add a new debate topic'
|
||||
mark_as_featured: 'Mark as featured'
|
||||
name:
|
||||
placeholder: 'Write a topic'
|
||||
destroy: Delete Tag
|
||||
|
||||
@@ -2,4 +2,12 @@ es:
|
||||
admin:
|
||||
dashboard:
|
||||
index:
|
||||
title: Administración
|
||||
title: Administración
|
||||
tags:
|
||||
index:
|
||||
title: 'Temas de debate'
|
||||
add_tag: 'Añade un nuevo tema de debate'
|
||||
mark_as_featured: 'Marcar como destacado'
|
||||
name:
|
||||
placeholder: 'Escribe el nombre del tema'
|
||||
destroy: Elimina la etiqueta
|
||||
|
||||
@@ -29,7 +29,6 @@ en:
|
||||
edit:
|
||||
title: "Change your password"
|
||||
password_label: "New password"
|
||||
min_length: "(%{min} characters minimum)"
|
||||
password_confirmation_label: "Confirm new password"
|
||||
change_submit: "Change my password"
|
||||
new:
|
||||
@@ -58,7 +57,6 @@ en:
|
||||
email_label: "Email"
|
||||
phone_number_label: "Phone number"
|
||||
password_label: "Password"
|
||||
min_length: "(%{min} characters minimum)"
|
||||
password_confirmation_label: "Confirm password"
|
||||
submit: "Sign up"
|
||||
organizations:
|
||||
@@ -69,7 +67,6 @@ en:
|
||||
email_label: "Email"
|
||||
password_label: "Password"
|
||||
phone_number_label: "Phone number"
|
||||
min_length: "(%{min} characters minimum)"
|
||||
password_confirmation_label: "Confirm password"
|
||||
submit: "Sign up"
|
||||
sessions:
|
||||
|
||||
@@ -8,7 +8,7 @@ es:
|
||||
confirmation_instructions:
|
||||
welcome: "Bienvenido"
|
||||
text: "Puedes confirmar tu cuenta de correo electrónico en el siguiente enlace:"
|
||||
confirm_link: "Confirmar my cuenta"
|
||||
confirm_link: "Confirmar mi cuenta"
|
||||
reset_password_instructions:
|
||||
hello: "Hola"
|
||||
text: "Se ha solicitado un enlace para cambiar tu contraseña, puedes hacerlo en el siguiente enlace:"
|
||||
@@ -29,7 +29,6 @@ es:
|
||||
edit:
|
||||
title: "Cambia tu contraseña"
|
||||
password_label: "Contraseña nueva"
|
||||
min_length: "(mínimo %{min} caracteres)"
|
||||
password_confirmation_label: "Confirmar contraseña nueva"
|
||||
change_submit: "Cambiar mi contraseña"
|
||||
new:
|
||||
@@ -58,7 +57,6 @@ es:
|
||||
email_label: "Email"
|
||||
phone_number_label: "Teléfono"
|
||||
password_label: "Contraseña"
|
||||
min_length: "(mínimo %{min} caracteres)"
|
||||
password_confirmation_label: "Confirmar contraseña"
|
||||
submit: "Registrarse"
|
||||
organizations:
|
||||
@@ -69,7 +67,6 @@ es:
|
||||
email_label: "Email"
|
||||
password_label: "Contraseña"
|
||||
phone_number_label: "Teléfono"
|
||||
min_length: "(mínimo %{min} caracteres)"
|
||||
password_confirmation_label: "Confirmar contraseña"
|
||||
submit: "Registrarse"
|
||||
sessions:
|
||||
|
||||
@@ -3,44 +3,71 @@ en:
|
||||
header:
|
||||
external_link_transparency: Transparency
|
||||
external_link_opendata: Open data
|
||||
external_link_blog: Blog
|
||||
open_gov: "%{open} government"
|
||||
open: "Open"
|
||||
participation: Participation
|
||||
menu: Menu
|
||||
open_city: We are opening Madrid
|
||||
open_city_slogan: So the citizens can decide what kind of city they want.
|
||||
create_debate: Create a debate
|
||||
see_all_debates: See all debates
|
||||
my_account_link: My account
|
||||
language: Site language
|
||||
administration: Administration
|
||||
moderation: Moderation
|
||||
footer:
|
||||
copyright: "Ayuntamiento de Madrid, 2015. All rights reserved"
|
||||
form:
|
||||
error: error
|
||||
errors: errors
|
||||
not_saved: "prohibited this %{resource} from being saved:"
|
||||
accept_terms: I accept the privacy policy and the legal terms
|
||||
user: account
|
||||
debate: debate
|
||||
debates:
|
||||
index:
|
||||
create_debate: Create a debate
|
||||
debate:
|
||||
debate: Debate
|
||||
vote: vote
|
||||
votes: votes
|
||||
comment: Comment
|
||||
comments: Comments
|
||||
comments:
|
||||
zero: No comments
|
||||
one: 1 Comment
|
||||
other: "%{count} Comments"
|
||||
votes:
|
||||
zero: No votes
|
||||
one: 1 vote
|
||||
other: "%{count} votes"
|
||||
comment:
|
||||
responses:
|
||||
zero: No Responses
|
||||
one: 1 Response
|
||||
other: "%{count} Responses"
|
||||
votes:
|
||||
zero: No votes
|
||||
one: 1 vote
|
||||
other: "%{count} votes"
|
||||
votes_weighted_score: "Total: %{score}"
|
||||
form:
|
||||
error: error
|
||||
errors: errors
|
||||
not_saved: "prohibited this debate from being saved:"
|
||||
debate_title: Debate title
|
||||
title_instructions: "SBe clear and precise with the title, but make it informative"
|
||||
debate_text: Ellaborate your opinion
|
||||
text_instructions: "Explain your opinion, go into details, tell us what's the purpose of your idea"
|
||||
tags_label: Topics
|
||||
tags_instructions: Comma separated
|
||||
accept_terms: I accept the privacy policy and the legal terms
|
||||
tags_instructions: >
|
||||
Tag this idea. You can choose among our proposals on the list or add any other topic you want by
|
||||
writing them separated by "," and then pressing "enter".
|
||||
Some suggestions:
|
||||
show:
|
||||
back_link: Back
|
||||
comment: Comment
|
||||
comments: Comments
|
||||
comments_title: Comments
|
||||
comments:
|
||||
zero: No comments
|
||||
one: 1 Comment
|
||||
other: "%{count} Comments"
|
||||
leave_comment: Write a comment
|
||||
login_to_comment: Log in to participate
|
||||
edit_debate_link: Edit
|
||||
share: Share
|
||||
edit:
|
||||
editing: Edit debate
|
||||
show_link: Show debate
|
||||
@@ -61,6 +88,9 @@ en:
|
||||
agree: I agree
|
||||
disagree: I disagree
|
||||
supports: Supports
|
||||
unauthenticated: "You need to %{signin} or %{signup} before continuing."
|
||||
signin: sign in
|
||||
signup: sign up
|
||||
account:
|
||||
show:
|
||||
title: "My account"
|
||||
@@ -68,17 +98,25 @@ en:
|
||||
email_on_debate_comment_label: "Receive email when someone comments on my debates"
|
||||
email_on_comment_reply_label: "Receive email when someone replies to my comments"
|
||||
change_credentials_link: "Change my credentials"
|
||||
avatar: "Avatar"
|
||||
personal: "Personal data"
|
||||
first_name_label: "First Name"
|
||||
last_name_label: "Last Name"
|
||||
phone_number_label: "Phone number"
|
||||
organization_name_label: "Organization name"
|
||||
use_nickname_label: "Use nickname"
|
||||
nickname_label: "Nickname"
|
||||
recaptcha:
|
||||
errors:
|
||||
verification_failed: "The captcha verification failed"
|
||||
notifications: Notifications
|
||||
simple_captcha:
|
||||
placeholder: "Enter the image value"
|
||||
label: "Enter the code in the box"
|
||||
refresh_button_text: "Refresh"
|
||||
message:
|
||||
user: "secret code did not match with the image"
|
||||
debate: "secret code did not match with the image"
|
||||
shared:
|
||||
tags_cloud:
|
||||
tags: Tags
|
||||
tags: Topics
|
||||
mailer:
|
||||
comment:
|
||||
subject: Someone has commented on your debate
|
||||
|
||||
@@ -1,46 +1,73 @@
|
||||
es:
|
||||
layouts:
|
||||
header:
|
||||
external_link_transparency: Portal de Transparencia
|
||||
external_link_transparency: Transparencia
|
||||
external_link_opendata: Datos abiertos
|
||||
external_link_blog: Blog
|
||||
open_gov: "Gobierno %{open}"
|
||||
open: "abierto"
|
||||
participation: Participación
|
||||
menu: Menú
|
||||
open_city: Estamos abriendo Madrid
|
||||
open_city_slogan: Para que todos los madrileños decidamos que ciudad queremos tener.
|
||||
create_debate: Crea un debate
|
||||
see_all_debates: Ver todos los debates
|
||||
my_account_link: Mi cuenta
|
||||
language: Idioma de la página
|
||||
administration: Administar
|
||||
moderation: Moderar
|
||||
footer:
|
||||
copyright: "Ayuntamiento de Madrid, %{year}. Todos los derechos reservados"
|
||||
form:
|
||||
error: error
|
||||
errors: errores
|
||||
not_saved: "impidieron guardar %{resource}:"
|
||||
accept_terms: Acepto la política de privacidad y el aviso legal
|
||||
user: la cuenta
|
||||
debate: el debate
|
||||
debates:
|
||||
index:
|
||||
create_debate: Crea un debate
|
||||
debate:
|
||||
debate: Debate
|
||||
vote: voto
|
||||
votes: votos
|
||||
comment: Comentario
|
||||
comments: Comentarios
|
||||
comments:
|
||||
zero: Sin comentarios
|
||||
one: 1 Comentario
|
||||
other: "%{count} Comentarios"
|
||||
votes:
|
||||
zero: Sin votos
|
||||
one: 1 voto
|
||||
other: "%{count} votos"
|
||||
comment:
|
||||
responses:
|
||||
zero: Sin respuestas
|
||||
one: 1 Respuesta
|
||||
other: "%{count} Respuestas"
|
||||
votes:
|
||||
zero: Sin votos
|
||||
one: 1 voto
|
||||
other: "%{count} votos"
|
||||
votes_weighted_score: "Total: %{score}"
|
||||
form:
|
||||
error: error
|
||||
errors: errores
|
||||
not_saved: "impidieron guardar el debate:"
|
||||
debate_title: Título del debate
|
||||
title_instructions: "Sé claro y conciso a la hora de poner un título, pero recuerda que debe explicar bien tu idea, ¡es tu carta de entrada!"
|
||||
debate_text: Describe tu opinión
|
||||
text_instructions: "Explica con todo el detalle que puedas y de una manera sencilla la idea y que crees que conseguiríamos con ella"
|
||||
tags_label: Temas
|
||||
tags_instructions: Separados por comas
|
||||
accept_terms: Acepto la política de privacidad y el aviso legal
|
||||
tags_instructions: >
|
||||
Etiqueta esta idea. Puedes elegir entre nuestras propuestas o introducir las que desees.
|
||||
Para ello solo tienes que escribir las etiquetas que desees separadas por "," y pulsar "intro".
|
||||
Algunas recomendaciones:
|
||||
show:
|
||||
back_link: Volver
|
||||
comment: Comentario
|
||||
comments: Comentarios
|
||||
comments_title: Comentarios
|
||||
comments:
|
||||
zero: Sin comentarios
|
||||
one: 1 Comentario
|
||||
other: "%{count} Comentarios"
|
||||
leave_comment: Deja tu comentario
|
||||
login_to_comment: Entra para participar
|
||||
edit_debate_link: Editar
|
||||
share: Compartir
|
||||
edit:
|
||||
editing: Editar debate
|
||||
show_link: Ver debate
|
||||
@@ -61,6 +88,9 @@ es:
|
||||
agree: Estoy de acuerdo
|
||||
disagree: No estoy de acuerdo
|
||||
supports: Apoyos
|
||||
unauthenticated: "Necesitas %{signin} o %{signup} para continuar."
|
||||
signin: iniciar sesión
|
||||
signup: registrarte
|
||||
account:
|
||||
show:
|
||||
title: "Mi cuenta"
|
||||
@@ -68,17 +98,25 @@ es:
|
||||
change_credentials_link: "Cambiar mis credenciales"
|
||||
email_on_debate_comment_label: "Recibir un email cuando alguien comenta en mis debates"
|
||||
email_on_comment_reply_label: "Recibir un email cuando alguien contesta a mis comentarios"
|
||||
avatar: "Avatar"
|
||||
personal: "Datos personales"
|
||||
first_name_label: "Nombre"
|
||||
last_name_label: "Apellidos"
|
||||
phone_number_label: "Teléfono"
|
||||
organization_name_label: "Nombre de la organización"
|
||||
use_nickname_label: "Usar pseudónimo"
|
||||
nickname_label: "Pseudónimo"
|
||||
recaptcha:
|
||||
errors:
|
||||
verification_failed: "La verificación por captcha falló"
|
||||
notifications: Notificaciones
|
||||
simple_captcha:
|
||||
placeholder: "Introduce el texto de la imagen"
|
||||
label: "Introduce el texto en la caja"
|
||||
refresh_button_text: "Refrescar"
|
||||
message:
|
||||
user: "el código secreto no coincide con la imagen"
|
||||
debate: "el código secreto no coincide con la imagen"
|
||||
shared:
|
||||
tags_cloud:
|
||||
tags: Etiquetas
|
||||
tags: Temas
|
||||
mailer:
|
||||
comment:
|
||||
subject: Alguien ha comentado en tu debate
|
||||
@@ -100,5 +138,3 @@ es:
|
||||
all: "No tienes permiso para borrar %{subject}"
|
||||
manage:
|
||||
all: "No tienes permiso para realizar la acción '%{action}' sobre %{subject}."
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,3 @@
|
||||
# available at http://guides.rubyonrails.org/i18n.html.
|
||||
|
||||
en:
|
||||
recaptcha:
|
||||
errors:
|
||||
verification_failed: "Incorrect Captcha"
|
||||
recaptcha_unreachable: "Internet connecion error. Could not load Captcha"
|
||||
|
||||
@@ -10,7 +10,7 @@ es:
|
||||
- vie
|
||||
- sáb
|
||||
abbr_month_names:
|
||||
-
|
||||
-
|
||||
- ene
|
||||
- feb
|
||||
- mar
|
||||
@@ -36,7 +36,7 @@ es:
|
||||
long: "%d de %B de %Y"
|
||||
short: "%d de %b"
|
||||
month_names:
|
||||
-
|
||||
-
|
||||
- enero
|
||||
- febrero
|
||||
- marzo
|
||||
@@ -195,8 +195,4 @@ es:
|
||||
default: "%A, %d de %B de %Y %H:%M:%S %z"
|
||||
long: "%d de %B de %Y %H:%M"
|
||||
short: "%d de %b %H:%M"
|
||||
pm: pm
|
||||
recaptcha:
|
||||
errors:
|
||||
verification_failed: "El Captcha no es correcto"
|
||||
recaptcha_unreachable: "Fallo de conexión a Internet. No se ha podido cargar el Captcha"
|
||||
pm: pm
|
||||
@@ -4,12 +4,11 @@ en:
|
||||
create:
|
||||
notice: '%{resource_name} was successfully created.'
|
||||
# alert: '%{resource_name} could not be created.'
|
||||
# update:
|
||||
# notice: '%{resource_name} was successfully updated.'
|
||||
update:
|
||||
notice: '%{resource_name} was successfully updated.'
|
||||
# alert: '%{resource_name} could not be updated.'
|
||||
# destroy:
|
||||
# notice: '%{resource_name} was successfully destroyed.'
|
||||
# alert: '%{resource_name} could not be destroyed.'
|
||||
save_changes:
|
||||
notice: "Saved"
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ es:
|
||||
actions:
|
||||
create:
|
||||
notice: "%{resource_name} creado correctamente."
|
||||
# update:
|
||||
# notice: "%{resource_name} actualizado correctamente."
|
||||
update:
|
||||
notice: "%{resource_name} actualizado correctamente."
|
||||
# destroy:
|
||||
# notice: "%{resource_name} borrado correctamente."
|
||||
# alert: "%{resource_name} no ha podido ser borrado."
|
||||
|
||||
19
config/locales/social_share_button.en.yml
Normal file
19
config/locales/social_share_button.en.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
en:
|
||||
social_share_button:
|
||||
share_to: Share to %{name}
|
||||
weibo: Sina Weibo
|
||||
twitter: Twitter
|
||||
facebook: Facebook
|
||||
douban: Douban
|
||||
qq: Qzone
|
||||
tqq: Tqq
|
||||
delicious: Delicious
|
||||
baidu: Baidu.com
|
||||
kaixin001: Kaixin001.com
|
||||
renren: Renren.com
|
||||
google_plus: Google+
|
||||
google_bookmark: Google Bookmark
|
||||
tumblr: Tumblr
|
||||
plurk: Plurk
|
||||
pinterest: Pinterest
|
||||
email: Email
|
||||
19
config/locales/social_share_button.es.yml
Normal file
19
config/locales/social_share_button.es.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
es:
|
||||
social_share_button:
|
||||
share_to: Compartir en %{name}
|
||||
weibo: Sina Weibo
|
||||
twitter: Twitter
|
||||
facebook: Facebook
|
||||
douban: Douban
|
||||
qq: Qzone
|
||||
tqq: Tqq
|
||||
delicious: Delicious
|
||||
baidu: Baidu.com
|
||||
kaixin001: Kaixin001.com
|
||||
renren: Renren.com
|
||||
google_plus: Google+
|
||||
google_bookmark: Google Bookmark
|
||||
tumblr: Tumblr
|
||||
plurk: Plurk
|
||||
pinterest: Pinterest
|
||||
email: Correo electrónico
|
||||
@@ -10,7 +10,7 @@ Rails.application.routes.draw do
|
||||
# See how all your routes lay out with "rake routes".
|
||||
|
||||
# You can have the root of your site routed with "root"
|
||||
root 'debates#index'
|
||||
root 'welcome#index'
|
||||
|
||||
resources :debates do
|
||||
member do
|
||||
@@ -28,6 +28,8 @@ Rails.application.routes.draw do
|
||||
|
||||
namespace :admin do
|
||||
root to: "dashboard#index"
|
||||
|
||||
resources :tags, only: [:index, :create, :update, :destroy]
|
||||
end
|
||||
|
||||
namespace :moderation do
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
# if you're sharing your code publicly.
|
||||
|
||||
default: &default
|
||||
recaptcha_public_key: <%= ENV["MADRID_RECAPTCHA_PUBLIC_KEY"] %>
|
||||
recaptcha_private_key: <%= ENV["MADRID_RECAPTCHA_PRIVATE_KEY"] %>
|
||||
|
||||
development:
|
||||
secret_key_base: 56792feef405a59b18ea7db57b4777e855103882b926413d4afdfb8c0ea8aa86ea6649da4e729c5f5ae324c0ab9338f789174cf48c544173bc18fdc3b14262e4
|
||||
|
||||
Reference in New Issue
Block a user