taitus
98074a9a73
Refactor specs from shared translatable
2019-06-27 09:19:36 +02:00
taitus
1687fb3a7b
Fix specs budget_phases_spec.rb:13
2019-06-27 09:19:36 +02:00
taitus
2964d91303
Fix specs active_polls_spec.rb:10
2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
b86579c40f
Avoid crash when adding new translations
...
Paranoia is activated on translation classes by reflection, this is
making Rails to load translation classes before to execute migration
that adds the new column.
With this extra check Rails will not execute this code until translation
table has this column created.
2019-06-27 09:19:36 +02:00
taitus
90df1faf07
Maganement of available locales in MicrosoftTranslateClient
...
- Create remote_available_locales method to recover available locales from microsoft tanslate client. This method will be useful to display the translation button as long as the locale sent is valid.
- Create parse_locale method: Need parse available locales in Consul to will be valid on Microsoft Translate Client
2019-06-27 09:19:36 +02:00
taitus
31011033a7
Create MicrosoftTranslateClient
...
- Conect to remote translation service and translate array of strings
- Create SentencesParser module with texts management methods:
- Detect split position method: When the text requested to translate is too large, we need split it in smaller parts for we can translate. This method search first valid point (dot or whitespace) for split this text so then we can get an response without dividing the word in half.
2019-06-27 09:19:36 +02:00
taitus
fa80d96249
Add new key to api's secrets group
2019-06-27 09:19:36 +02:00
taitus
f53043ee2a
Install gem 'translator-text' to conect with MicrosoftTranslation Service
...
API Wrapper for the Microsoft Translator Text API 3.0
2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
ba9e9887ed
Set globalize fallbacks for requests
...
New version of globalize uses RequestStore gem to store I18n.locale and
Globalize.fallbacks in a per request basis to avoid collissions between
different requests. This gem update broke Globalize.fallback results
because it tries to fetch fallbacks from RequestStore, where there is no
locale fallbacks definition.
2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
3d04b388ad
Adapt translatable shared specs
...
Adapt translatable shared specs to define an owner when running at
frontend feature specs.
2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
cf370cab84
Adapt suggest script for translations
...
Proposal, Debate, Budget Investment and Comment will be translatable
models soon. This commit prepares suggestions script to work well with
translatable forms elements too.
2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
4f0d1399f2
Fix html with links sanitization
...
Globalize attribute accessors were arriving here as Strings intead of
ActiveSupport::SafeBuffer so they were not sanitized correctly.
2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
5881f8241e
Sanitization shared spec
...
Create sanitization shared spec to check sanitizable concern features
in all translatable models.
2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
206f92b9fa
Enable soft_deletion of Banner::Translations
...
Also create missing banner model spec.
2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
caa9e1cd49
Enable soft_deletion of Poll::Question::Translations
2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
e451c4657c
Enable soft_deletion of Poll::Translations
2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
441f0773a6
Enable soft_deletion of Legislation::Question::Translations
2019-06-27 09:19:35 +02:00
Senén Rodero Rodríguez
e0649f983f
Enable soft_deletion of Legislation::QuestionOption::Translations
2019-06-27 09:19:35 +02:00
Senén Rodero Rodríguez
049c56e9f8
Enable soft_deletion of Legislation::Process::Translations
2019-06-27 09:19:35 +02:00
Senén Rodero Rodríguez
f6b41f916b
Enable soft_deletion of Legislation::DraftVersion::Translations
2019-06-27 09:19:35 +02:00
Senén Rodero Rodríguez
458fb750eb
Fix restore method for paranoid models
...
Do not try to update confirmed_hide_at column from models without this column.
2019-06-27 09:19:35 +02:00
Senén Rodero Rodríguez
db38a87205
Add specs to check how paranoia and globalize work together
...
Create shared model spec to test paranoia and globalize behavior on
globalizable and paranoid models.
2019-06-27 09:19:35 +02:00
Senén Rodero Rodríguez
1de23fc726
Add paranoid behavior to translations of paranoid models
...
We want to be able to fetch soft deleted translations without using
with_deleted scope.
2019-06-27 09:19:35 +02:00
Senén Rodero Rodríguez
2e8e7b83a5
Remove monkey patch
...
Since globalize version update this is no longer needed. New Globalize
version initializes globalized_model correctly when building new
translations.
2019-06-27 09:19:35 +02:00
Senén Rodero Rodríguez
5d0b74cb07
Initialize graphql after application initialization
...
Proposal, Debate and Comment "globalize_accessors" class method were
loaded before application available locales initialization because of
graphql initializer. This will cause unexpected translation errors at
any translatable classes declared at graphql api definition (api.yml).
Doing GraphQL initialization after application initialization should
solve this issue.
2019-06-27 09:19:35 +02:00
Javier Martín
836f9ba7b3
Merge pull request #3586 from LextrendIT/feature/3475_add_votation_types
...
Add custom votation types
2019-06-12 20:50:38 +02:00
German Galia
7028982103
Add set tests and change votation type tests
2019-06-12 19:44:14 +02:00
lalo
dcbd2cb379
Fix broken tests
2019-06-12 19:44:14 +02:00
German Galia
4e88de0e1f
Add feature test unique, multiple, prioritized and positive negative
2019-06-12 19:44:14 +02:00
lalo
c6e4b2480f
Add public changes to create and vote Poll:Questions with votation type
2019-06-12 19:44:14 +02:00
lalo
23d36835d7
Add Admin changes to create Poll:Questions with votation type
2019-06-12 19:44:14 +02:00
lalo
7c9c50f4c6
Add Model changes to work with votation_types
2019-06-12 19:32:41 +02:00
Javier Martín
c505fd373c
Merge pull request #3514 from LextrendIT/3481_add_historic_setings_to_budget
...
Add historic fields to participatory budget
2019-06-12 18:46:40 +02:00
German Galia
74083df10f
Add historic fields to participatory budget
2019-06-12 18:03:53 +02:00
Javier Martín
cc6dc0dc0c
Merge pull request #3480 from LextrendIT/3461_create_traker_rol
...
Create tracker rol
2019-06-12 16:49:53 +02:00
German Galia
9ce524e1f3
Create tracker rol
2019-06-12 16:23:40 +02:00
Javier Martín
800a701a40
Merge pull request #3614 from consul/increase_travis_workers
...
Use one more node in the Travis matrix
2019-06-12 16:22:39 +02:00
voodoorai2000
5564a0d74f
Use one more node in the Travis matrix
2019-06-12 16:19:54 +02:00
Raimond Garcia
a61f88b4f0
Merge pull request #3456 from LextrendIT/3433_change_log_participatory_budget
...
Add change log in investment participatory budget
2019-06-12 14:05:38 +02:00
German Galia
16ffa2a259
Add change log in investment participatory budget
2019-06-12 13:06:20 +02:00
Raimond Garcia
259e05c3e0
Merge pull request #3410 from LextrendIT/report_generation
...
Report generation, download CSV
2019-06-12 11:45:59 +02:00
German Galia
9d1ca3bfd4
Report generation. Download csv
2019-06-12 10:17:31 +02:00
Pierre Mesure
2705416842
Adding missing subtasks to upgrade task and adding info log
2019-06-11 22:35:57 +02:00
Raimond Garcia
22787151f5
Merge pull request #3439 from LextrendIT/feature/add_admin_investments_column_chooser
...
Add columns selector JS component and change Rails view to use it
2019-06-11 17:17:52 +02:00
Raimond Garcia
e0e1e1dac1
Merge pull request #3437 from LextrendIT/feature/add_valuator_role_actions_manager
...
Add abilities to valuator model for comment and edit dossiers
2019-06-11 17:13:13 +02:00
Raimond Garcia
c1b14943e6
Merge pull request #3473 from LextrendIT/3463_collaborative_legislation_summary
...
Collaborative legislation summary
2019-06-11 16:41:45 +02:00
lalo
c2860dda0e
Add can_comment and can_edit_dossier abilities to valuators
2019-06-11 16:24:02 +02:00
Raimond Garcia
d266cb33ce
Merge pull request #3427 from LextrendIT/feature/unify_valuator_and_admin_investment_pages
...
Display preview public page component on admin and valuators investment page
2019-06-11 14:44:45 +02:00
Julian Nicolas Herrero
c7ea0528e0
Merge pull request #3603 from consul/admin_stats_before_voting_phase
...
Avoid error when accessing final voting stats before the balloting phase
2019-06-11 14:34:42 +02:00
lalo
4740aeaddf
Add columns selector JS component and change Rails view to use it
2019-06-11 14:33:40 +02:00