Commit Graph

175 Commits

Author SHA1 Message Date
rgarcia
4c8b174274 Display only translations for the current language
After creating a translation in spanish, it was also displaying it when selecting
the english locale.

This was due to the code picking the first translation available

With this commit, we are checking for an existing translation in the current locale
and displaying it if it exists
2018-07-26 21:55:07 -04:00
Angel Perez
113981c573 Avoid unnecessary DB call on I18nTranslation initializer 2018-07-26 19:09:36 -04:00
Angel Perez
7255c6cb9b Fallback to default I18n value if translation is not available 2018-07-26 19:07:47 -04:00
Angel Perez
bc152acaf2 Don't evaluate a conditional and assign a variable on the same line 2018-07-26 19:06:44 -04:00
Angel Perez
26965b43ee Clean I18n codebase 2018-07-26 19:06:29 -04:00
Raúl Fuentes
6d6dc32c38 Complete basic I18n backend and frontend 2018-07-26 19:06:19 -04:00
Javier Martín
54c82a53d7 Precompile CKEditor plugins in use.
As stated in #1196, compiling everything related to CKEditor made
compilations slower. However, not compiling any plugins meant Travis had
to compile them while running a test. It often resulted in a test
failing because the time Travis took to compile the plugins the
application uses exceeded Capybara's wait time.
2018-07-02 18:39:13 +02:00
Angel Perez
1cd47da9d4 Split routes into small files for easier customization (#1852) 2018-01-09 15:49:01 -04:00
rgarcia
56945d9bbe allows querying for a proposal's votes 2017-12-15 19:21:02 +01:00
Daniel
a715df3431 fix the warning of secret_key for devise 2017-11-15 08:10:14 -06:00
María Checa
841ef2a3a2 Merge branch 'master' into 1856-legislation_processes_proposals_phase 2017-10-09 17:19:07 +02:00
iagirre
4db2584f87 The tags are suggested based on the entries the user makes.
Cambios para hacer commit:
	modificado:    app/assets/javascripts/tag_autocomplete.js.coffee
	modificado:    app/assets/stylesheets/autocomplete_overrides.scss
	nuevo archivo: app/controllers/tags_controller.rb
	modificado:    app/models/abilities/common.rb
	modificado:    app/views/debates/_form.html.erb
	modificado:    app/views/proposals/_form.html.erb
	modificado:    config/initializers/acts_as_taggable_on.rb
	modificado:    config/routes.rb
	modificado:    spec/lib/acts_as_taggable_on_spec.rb
2017-09-21 18:21:45 +02:00
María Checa
ba041f90c8 Removed unnecessary parts in Legislation Proposals 2017-09-21 16:17:11 +02:00
María Checa
c1672bdbf4 Legislation proposals adaptation in some models and initializers 2017-09-19 10:10:10 +02:00
Bertocq
8b2b21c6d7 Remove Tolk, Crowdin substituted it
Why:

* Crowdin now hosts all consul translations publicly so anyone can contribute https://crowdin.com/project/consul/invite
* Crowdin makes easy for non-tech people to contribute, once we have a demo site we'll be able to offer "on site" translation
* If you still use Tolk, we recommend removing this commit (but adding tolk gem to ./Gemfile_custom file to avoid future merge conflicts)

How:

* Reverting changes introduced with 9610a6a933
2017-07-09 00:56:14 +02:00
Eduardo Martinez Echevarria
8dd52110db Use category scope instead of condition on kind on Tag 2017-06-23 17:34:55 +02:00
Eduardo Martinez Echevarria
debc98ac99 Add category scope and category? method to ActsAsTaggableOn::Tag 2017-06-23 17:34:55 +02:00
kikito
a580e60786 refactor public_for_api acts_as_taggable scopes 2017-06-13 16:14:24 +02:00
Alberto Miedes Garcés
9ec8b166d7 Use scopes for better query performance 2017-06-01 20:04:51 +02:00
Alberto Miedes Garcés
3c7f60d625 Fix initializer 2017-05-11 22:42:43 +02:00
Alberto Miedes Garcés
5d9054d284 Merge branch 'master' into api-dev-PRs
Conflicts:
	Gemfile.lock
	config/routes.rb
	db/dev_seeds.rb
	db/schema.rb
2017-05-11 21:59:42 +02:00
Alberto
6bbcc71ecb Merge branch 'master' into polls 2017-04-06 14:16:49 +02:00
Amaia Castro
5ee2c9efa0 Add telegram to footer and to social share button 2017-04-05 13:07:08 +02:00
Juanjo Bazán
d6cb76e491 removes not needed code
Kaminari has been updated
2017-04-03 12:30:57 +02:00
kikito
ba87eaa47c Moves Age calculation to a module instead of monkeypatching Date 2017-02-03 15:35:41 +01:00
kikito
3535cfc0d6 implements Date#age_in_years extension method 2017-02-03 12:46:07 +01:00
Alberto Miedes Garcés
073ce38a8d Improved API docs autogeneration 2017-01-27 12:39:44 +01:00
Alberto Miedes Garcés
4b7cebf686 Improved public_for_api scopes and corresponding specs 2017-01-26 18:29:59 +01:00
Alberto Miedes Garcés
5b7cbccd19 Merge branch 'master' into api-dev 2017-01-26 12:39:59 +01:00
Alberto Miedes Garcés
69fc161b83 Show taggings in API 2017-01-26 10:48:05 +01:00
Juanjo Bazán
238c01cecd Merge pull request #1345 from aspgems/bug_compile_ckeditor_locales
Fixes bug. Compiles all locales for ckeditor.
2017-01-13 11:49:58 +01:00
Juanma
119061bd4c Fixes bug. Compiles all locales for ckeditor. 2017-01-13 09:40:33 +01:00
Alberto Miedes Garcés
7a9373942a Testing GraphQL 1.3.0 in Travis 2017-01-12 20:11:47 +01:00
Alberto Miedes Garcés
d1f14ffb93 Simplify the way GraphQL 'resolve' is used 2017-01-12 19:51:58 +01:00
Raimond Garcia
f2dc822bfa Merge pull request #1334 from consul/budgets
WIP Budgets
2017-01-10 22:43:27 +01:00
rgarcia
0049b6154c testing devise mailer 2017-01-10 20:04:01 +01:00
Alberto Miedes Garcés
6940b90260 Add more fields to api.yml 2017-01-09 14:11:51 +01:00
Alberto Miedes Garcés
b0bd30e3d1 Move api config file parsing method into the ApiTypesCreator class 2017-01-09 13:36:53 +01:00
Alberto Miedes Garcés
398bc8c211 Split api types creation and query type creation between two different classes 2017-01-08 13:39:50 +01:00
rgarcia
3ba57bbab2 adds valuator tags 2017-01-08 13:24:05 +01:00
Alberto Miedes Garcés
b9d2bc2801 Wrote specs for QueryType creation 2017-01-08 12:45:48 +01:00
Alberto Miedes Garcés
7027164867 Clean code 2017-01-08 11:37:56 +01:00
Alberto Miedes Garcés
0b302c2afc Move code from GraphQL initializer into GraphQL::TypeCreator 2017-01-07 23:04:30 +01:00
Alberto Miedes Garcés
d76e4518e6 Extract QueryRoot resolve functions into its own classes 2017-01-07 22:43:42 +01:00
rgarcia
dde1d34172 fixes conflicts with master 2017-01-05 01:56:35 +01:00
Alberto Miedes Garcés
6445fffc0d Merge branch 'master' into api-dev-0.18.11 2017-01-04 16:21:32 +01:00
Alberto Miedes Garcés
b36deb0382 Read API types and fields from config/api.yml 2017-01-04 14:26:30 +01:00
Fernando Blat
8350143496 Don't fetch setting if table doesn't exist 2017-01-04 13:37:55 +01:00
Alberto Miedes Garcés
0b4004042f Expose age_range instead of date_of_birth for Voter/User class 2017-01-02 14:12:37 +01:00
kikito
68d598a43d Merge branch 'master' into budgets 2017-01-02 12:10:23 +01:00