Javi Martín
612fdb09dd
Share translatable specs
2018-09-17 20:34:43 +02:00
Javi Martín
726110c91e
Share Globalize JavaScript interface specs
2018-09-17 20:34:20 +02:00
Javi Martín
a64a290392
Extract commentable_path to an initializer
...
By doing so and including it in ActionDispatch::Routing::UrlFor, we make
it available in controllers, helpers and specs, and so we can remove the
duplication we had there with methods dealing with the same problem.
Even if monkey-patching is ugly, using a different module and executing
ActionDispatch::Routing::UrlFor.send(:include, MyModule) wouldn't make
the method available in the controller.
2018-09-17 20:28:55 +02:00
Raimond Garcia
b49b3ade68
Merge pull request #2881 from consul/dependabot/bundler/autoprefixer-rails-9.1.4
...
Bump autoprefixer-rails from 8.2.0 to 9.1.4
2018-09-17 19:09:20 +02:00
Raimond Garcia
34589443e3
Merge pull request #2884 from consul/dependabot/bundler/capistrano-rails-1.4.0
...
Bump capistrano-rails from 1.3.1 to 1.4.0
2018-09-17 19:08:58 +02:00
Raimond Garcia
14edf4b603
Merge pull request #2892 from consul/dependabot/bundler/mdl-0.5.0
...
Bump mdl from 0.4.0 to 0.5.0
2018-09-17 19:08:22 +02:00
Raimond Garcia
5aa84c139e
Merge pull request #2894 from consul/dependabot/bundler/unicorn-5.4.1
...
Bump unicorn from 5.4.0 to 5.4.1
2018-09-17 19:08:04 +02:00
Raimond Garcia
a160a9e694
Merge pull request #2895 from consul/dependabot/bundler/scss_lint-0.55.0
...
Bump scss_lint from 0.54.0 to 0.55.0
2018-09-17 19:07:39 +02:00
Raimond Garcia
cae210c155
Merge pull request #2887 from wairbut-m2c/backport/db_queries
...
[Backport] Replace `.all.each` with `.find_each` to reduce memory usage
2018-09-17 19:06:46 +02:00
Raimond Garcia
eb435930db
Merge pull request #2888 from wairbut-m2c/backport/test-suite-maintenance
...
[Backport] Test suite maintenance
2018-09-17 19:06:07 +02:00
Raimond Garcia
0b7eb35b22
Merge pull request #2896 from javierm/backport-refactor-translatable-shared-code
...
[Backport] Refactor code shared by admin-translatable resources
2018-09-17 18:26:55 +02:00
Raimond Garcia
b6602348e2
Merge pull request #2852 from tiagozini/fix-issue-2848
...
Fix bug in facebook share link
2018-09-17 18:23:29 +02:00
Raimond Garcia
12755b6446
Merge pull request #2900 from consul/smtp-configuration
...
Add placeholder configuration for SMTP
2018-09-14 18:13:41 +02:00
voodoorai2000
2892d0e1d5
Add placeholder configuration for SMTP
2018-09-13 20:38:42 +02:00
Javi Martín
29b9f172f6
Fix test for Portuguese
...
It fails because we try to follow a link without a Portuguese
translation. In Madrid they use Spanish as fallback, but in consul we
use English as fallback, and so the text in the link is different in
those repos.
A proper solution would be to update the Portuguese locales. However,
since this test is going to be removed in our next backport, I'm just
doing a quick patch.
2018-09-12 10:52:00 +02:00
Marko Lovic
700a60e4d7
Remove :es => :en Globalize fallback
...
This fallback was added with the following explanation:
The application default_locale is :es, while most seed data
is created in English. This means that translatable resources
might only have English translations. This change is so that,
when the locale is set to Spanish, the English translations
are shown instead of empty content.
Instead, we are going to make sure that all seed content for
translatable resources is available in both English and Spanish.
2018-09-11 18:48:28 +02:00
Marko Lovic
d2dd5f2a58
Test Translatable logic with a locale with non-underscored name
...
In the past there have been issues with the `pt-BR` locale because
it has a hyphen `-` and a uppercase letters.
I am adding the test only to spec/features/translations_spec.rb (which
tests Milestones) for now. We might want to also add it to the other
translatable resource specs in the future (banners, etc.).
2018-09-11 18:48:23 +02:00
Marko Lovic
f2b903e869
Add :es => :en locale fallback for translatable resources
...
The application default_locale is :es, while most seed data
is created in English. This means that translatable resources
might only have English translations. This change is so that,
when the locale is set to Spanish, the English translations
are shown instead of empty content.
2018-09-11 18:48:19 +02:00
Marko Lovic
c7fcdd9b0e
Use standard locale names for Globalize
...
It turns out it is not necessary to downcase and underscore
locale names to use the globalize-accessor gem. The gem
will automatically underscore the locale name when defining and
calling the accessor methods.
2018-09-11 18:48:14 +02:00
Marko Lovic
6fe7dc22bc
Fix translatable field labels to not include locale
...
Label for field :title should be "Title", not "Title en"
2018-09-11 18:48:09 +02:00
Marko Lovic
ca5f8719a8
Fix helper to merge style option correctly
2018-09-11 18:48:05 +02:00
Marko Lovic
1fb1437886
Fix merging_translatable_field_options helper
2018-09-11 18:48:01 +02:00
Marko Lovic
5ad3bf03cd
Nest TranslatableFormBuilder in helper module
...
To avoid having multiple top-level classes per file
2018-09-11 18:47:57 +02:00
Marko Lovic
e26500179a
Add missing blank line between methods
2018-09-11 18:47:52 +02:00
Marko Lovic
38e6c394e7
Change string manipulation to use interpolation for readability
2018-09-11 18:47:48 +02:00
Marko Lovic
b9f3ea2a33
Change variable name to reflect possibility of being array
2018-09-11 18:47:43 +02:00
Marko Lovic
a1567058b6
Fix type of field for Milestone form
2018-09-11 18:47:38 +02:00
Marko Lovic
7b0aa1e104
Extract merge_translatable_field_options helper method
2018-09-11 18:47:34 +02:00
Marko Lovic
61e3b3b406
Incorporate label into translatabel field
...
Suggested by @javierm so that we can take advantage of certain browser
features that rely on a <label> tag being associated with an <input> tag.
2018-09-11 18:47:28 +02:00
Marko Lovic
3f277c5cdf
Avoid duplicating list of locales
2018-09-11 18:46:58 +02:00
Marko Lovic
2cb3e4b111
Extract translatable field logic to FormBuilder
2018-09-11 18:46:50 +02:00
dependabot[bot]
6433e36c31
Bump scss_lint from 0.54.0 to 0.55.0
...
Bumps [scss_lint](https://github.com/brigade/scss-lint ) from 0.54.0 to 0.55.0.
- [Release notes](https://github.com/brigade/scss-lint/releases )
- [Changelog](https://github.com/brigade/scss-lint/blob/master/CHANGELOG.md )
- [Commits](https://github.com/brigade/scss-lint/compare/v0.54.0...v0.55.0 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-09-11 05:41:27 +00:00
dependabot[bot]
902e0eac6c
Bump unicorn from 5.4.0 to 5.4.1
...
Bumps [unicorn](https://bogomips.org/unicorn/ ) from 5.4.0 to 5.4.1.
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-09-11 05:40:25 +00:00
dependabot[bot]
e9d84b7c95
Bump mdl from 0.4.0 to 0.5.0
...
Bumps [mdl](https://github.com/mivok/markdownlint ) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/mivok/markdownlint/releases )
- [Changelog](https://github.com/markdownlint/markdownlint/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mivok/markdownlint/compare/v0.4.0...v0.5.0 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-09-11 05:38:36 +00:00
Angel Perez
1e1cb660e2
Add missing CommonActions#fill_in_signup_form method
...
This method allows to fill in CONSUL's signup form without interacting
with other UI elements, useful when using testing locales other than English
Backported from Decide Madrid
2018-09-10 16:05:55 -04:00
Raimond Garcia
dd1691ba8f
Merge pull request #2886 from javierm/backport-change-translatable-implementation
...
[Backport] Change Translatable implementation to accommodate new requirements
2018-09-10 20:10:31 +02:00
Angel Perez
7b95f4c320
Correct typos on nested documentable/imageable
2018-09-10 11:45:48 -04:00
Angel Perez
d86103db5a
Disable unnecessary JS usage on comments/topics specs
2018-09-10 11:45:41 -04:00
Angel Perez
19b0c410da
Remove JS driver usage for legislation/processes#update scenarios
2018-09-10 11:45:29 -04:00
Angel Perez
84b616256f
Fix spec to properly check emails are sent based on current locale
2018-09-10 11:45:13 -04:00
Angel Perez
08755524ef
Replace I18n calls with explicit text expectations
2018-09-10 11:44:00 -04:00
Angel Perez
601391954a
Refactor tests to interact directly with the UI rather than with the DOM
2018-09-10 11:41:37 -04:00
Angel Perez
fa9da9d573
Usage of let on emails specs to DRY scenarios
2018-09-10 11:41:25 -04:00
Angel Perez
bdda397bf1
Use new RSpec stub syntax to fix deprecation warnings
2018-09-10 11:41:20 -04:00
Angel Perez
ffe421ae69
Replace .all.each with .find_each on admin specs
2018-09-10 11:40:24 -04:00
Angel Perez
b6fe7ca9a7
Replace .all.each with .find_each when seeding the DB
2018-09-10 11:39:38 -04:00
Angel Perez
303b96553a
Replace .all.each with .find_each when rendering cards
2018-09-10 11:38:32 -04:00
Angel Perez
24adf4bc49
Improve Rake tasks performance replacing .all.each with .find_each
2018-09-10 11:38:19 -04:00
Marko Lovic
96b798865a
Refactor Translatable#translation_params to improve readability
...
Code by Javier Martín
2018-09-10 17:34:28 +02:00
Marko Lovic
9fdc8a8a35
Avoid checking DB records in feature spec
2018-09-10 17:34:02 +02:00