Commit Graph

11379 Commits

Author SHA1 Message Date
Javi Martín
1ffaa680a3 Create correct translation when visiting root page
We set `I18n.locale = :en` before each test, and so creating a new card
will automatically create English translations.

So visiting the Spanish page won't show the card, since no Spanish
translation exists for it. If we visit the klingon page after doing so,
the last used locale (Spanish) will still be used, and so the test will
fail.

Specifically creating Spanish translations instead of the English ones
makes the translations visible when visiting the Spanish homepage.
2018-09-26 16:09:09 +02:00
Marko Lovic
832e6178d7 Add Spanish translation to Card seed data
Instead of using I18n for the field texts and forcing the
locale (e.g. `I18n.t('seeds...', locale: :es)`), I'm moving
content out of `config/locales/` and into the seed file.

This is because this content is less about reacting to different
locales (the locale would always be forced so we don't actually
use the main i18n functionality), and more about demonstrating
the "translatable fields" feature.
2018-09-26 16:09:09 +02:00
Marko Lovic
86dbe799ba Remove extra tag element from cards form 2018-09-26 16:09:09 +02:00
Javi Martín
5bb5cfa7fb Make Widget::Card translatable 2018-09-26 16:09:09 +02:00
dependabot[bot]
9dc164dd11 Bump i18n-tasks from 0.9.20 to 0.9.25
Bumps [i18n-tasks](https://github.com/glebm/i18n-tasks) from 0.9.20 to 0.9.25.
- [Release notes](https://github.com/glebm/i18n-tasks/releases)
- [Changelog](https://github.com/glebm/i18n-tasks/blob/master/CHANGES.md)
- [Commits](https://github.com/glebm/i18n-tasks/compare/v0.9.20...v0.9.25)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-09-26 13:50:59 +00:00
Raimond Garcia
2c22ab347d Merge pull request #2891 from consul/dependabot/bundler/savon-2.12.0
Bump savon from 2.11.2 to 2.12.0
2018-09-26 15:48:57 +02:00
Raimond Garcia
03e454585a Merge pull request #2905 from consul/dependabot/bundler/coveralls-0.8.22
Bump coveralls from 0.8.21 to 0.8.22
2018-09-26 15:47:22 +02:00
Raimond Garcia
1e23548e39 Merge pull request #2908 from consul/dependabot/bundler/ancestry-3.0.2
Bump ancestry from 3.0.1 to 3.0.2
2018-09-26 15:45:55 +02:00
Raimond Garcia
8adc778aa2 Merge pull request #2909 from consul/dependabot/bundler/paranoia-2.4.1
Bump paranoia from 2.4.0 to 2.4.1
2018-09-26 15:45:27 +02:00
Alberto
35ebe79d26 Merge pull request #2921 from consul/custom-js
[Backport] Adds custom javascripts folder
2018-09-26 14:24:47 +02:00
Raimond Garcia
4086220ebf Merge pull request #2914 from microweb10/make_polls_translatable
Make polls translatable
2018-09-26 13:19:17 +02:00
decabeza
62490c4640 Adds custom javascripts folder 2018-09-26 12:34:16 +02:00
Raimond Garcia
1fbb428004 Merge pull request #2898 from papayalabs/2889-show-active-tab-in-custom-info-texts
Show active tab in custom info texts
2018-09-24 21:11:25 +02:00
Papaya Labs
45da512ce9 Add Spec 2018-09-24 20:38:42 +02:00
Julian Herrero
4344165bce change translatable form helper for cktext_area 2018-09-24 19:40:51 +02:00
Julian Herrero
1d30909725 remove duplicated method 2018-09-24 19:38:59 +02:00
Javier Martín
ef0192c3ff Merge pull request #2912 from consul/backport-make-collaborative-legislation-translatable
Make collaborative legislation translatable
2018-09-24 17:45:59 +02:00
Javier Martín
758d3f8541 Merge pull request #2911 from consul/backport-fix_time_related_specs
Fix time related specs
2018-09-24 17:43:22 +02:00
Julian Herrero
1c6f0be856 remove unused locales 2018-09-21 20:54:11 +02:00
Julian Herrero
46030c72e8 remove unnecessary parameter 2018-09-21 20:53:20 +02:00
Julian Herrero
df9955e0c6 make use of the new spec helper it_behaves_like translatable 2018-09-21 20:52:35 +02:00
Julian Herrero
549c086574 put spec helper in the correct place 2018-09-21 20:51:51 +02:00
Julian Herrero
888ae8e6d6 neutral_locale not needed anymore 2018-09-21 20:51:13 +02:00
Julian Herrero
e6762d6bca handle non-underscored locale names for cktext_area 2018-09-21 20:50:23 +02:00
voodoorai2000
d0dbb16d72 Add unicorn restart task to deploy namespace 2018-09-21 18:11:21 +02:00
voodoorai2000
e3c6fc77c6 Update Unicorn restart task
We are using a simple unicorn.rb file in the Installer, which requires a different way of restarting the server

This task is still a little limited and hackish but it does the job for now 😌

We are killing any existing unicorn process and starting unicorn. It checks for existing processes in both the standard consul folder and in the capistrano `current` folder, and skipping any exception if unicorn was not running.
2018-09-21 15:39:56 +02:00
voodoorai2000
4f4769062a Use a single server by default
Capistrano configuration is prepared to deploy to multiple servers

For now assuming that we are going to use a single server for everthing (app, db, cron jobs, queue system, etc)
2018-09-21 15:34:40 +02:00
voodoorai2000
8cfcc7e693 Use master as the default deploy branch
It's a good practice to use a stable branch for deployments, but not all forks have this branch configured

Using master as the default branch for now
2018-09-21 15:32:41 +02:00
voodoorai2000
bebcc3da48 Skip ruby and bundler installations
Ruby and bundler should already be installed in the system

Before we can bring back these commands we need to review them, right now they are raising an interesting exception
2018-09-21 15:31:40 +02:00
voodoorai2000
335cd2b597 Link unicorn and production.rb to capistrano's shared folder 2018-09-21 15:29:57 +02:00
Alberto
e0d08a32dd Merge pull request #2916 from consul/custom-fonts
[Backport] Custom fonts
2018-09-21 14:29:50 +02:00
decabeza
a94591fe78 Loads custom fonts before default ones
Also includes a .keep file inside fonts/custom folder to track the directory by git
2018-09-21 13:46:50 +02:00
Alberto
6257d546b5 Merge pull request #2915 from consul/comments-processes
[Backport] Changes allegations dates label
2018-09-21 12:59:01 +02:00
decabeza
a1bbc82c8d Changes allegations dates label 2018-09-20 17:33:04 +02:00
Julian Herrero
673ec075eb Make answers translatable 2018-09-20 17:13:40 +02:00
Julian Herrero
5e6248d2ac Make questions translatable 2018-09-20 17:11:53 +02:00
Julian Herrero
9495208518 Make polls translatable 2018-09-20 17:07:43 +02:00
Papaya Labs
981281591e Show active tab in custom info texts 2018-09-19 13:20:10 -05:00
Javi Martín
4d238c5d07 Fix crash updating legislation process categories
We were expecting translation parameters in legislation processes
`update` action. However, those parameters aren't sent when we get to
that action through the "proposals" tab.
2018-09-19 14:54:52 +02:00
Javi Martín
58ad333791 Remove duplicate lines 2018-09-19 14:54:52 +02:00
Javi Martín
3fb98b1752 Fix typos 2018-09-19 14:54:52 +02:00
Javi Martín
a0f1a9ec1b Be consistent checking changes in draft versions
There's no reason to only convert Markdown to HTML in translations when
their body changes but to always convert it when the "main" body field
changes.

Whether we should always use the condition or never use it is something
we can debate about, though.
2018-09-19 14:54:24 +02:00
Javi Martín
cc6da6be28 Fix inputs in legislation process translations
They were accidentally changed from `text_area` to `text_field` when
making them translatable.
2018-09-19 14:54:24 +02:00
Marko Lovic
64d72ca8e7 Enable JS in shared translatable test
Due to its markdown editor, the admin draft version page
requires JS to correctly render the draft version form.
2018-09-19 14:54:24 +02:00
Marko Lovic
05bfa193cd Make Legislation Draft Versions translatable 2018-09-19 14:54:24 +02:00
Marko Lovic
06347062dd Make Legislation Questions translatable 2018-09-19 14:54:24 +02:00
Marko Lovic
d78aea1fd3 Make Legistlation Processes translatable 2018-09-19 14:54:24 +02:00
Marko Lovic
ee15295f54 Add migration for all collaborative legislation translations 2018-09-19 14:54:24 +02:00
Javi Martín
86aa56b5e8 Fix flaky legislation processes specs
They were failing if executed right before midnight. If the process is
created right before midnight and then the date changes, when we visit
the process path the phase will aready be open.
2018-09-19 14:24:09 +02:00
Javi Martín
c1bb1fb2e1 Fix flaky admin notifications spec
It was failing when executed right before midnight due to the date
changing between the moment the notification is created and the moment
the test checks the notification shows the current date.
2018-09-19 14:21:47 +02:00