Giter Site home page Giter Site logo

mainio / decidim-module-term_customizer Goto Github PK

View Code? Open in Web Editor NEW
14.0 4.0 21.0 703 KB

Decidim module that allows customizing the localization terms in the system for specific contexts.

License: GNU Affero General Public License v3.0

Ruby 85.14% JavaScript 5.26% HTML 9.58% SCSS 0.02%

decidim-module-term_customizer's Introduction

Decidim::TermCustomizer

Build Status codecov

The gem has been developed by Mainio Tech.

A Decidim module to customize the localized terms in the system. The module allows administrators to add "translation sets" through the admin panel which contain customized terms for any module in the system. These sets can be applied against different scopes within the system, e.g. the whole system, participatory space scope (e.g. all participatory processes or a specific participatory process) or a specific component within a participatory space.

The term customizations will be only applied to the scope which the admin user has defined for the set. Multiple scopes can be defined against a single translation set.

Example use cases for this module:

  • Admin wants to change the term "Proposal" to "Idea" in all participatory processes within the system.
  • Admin wants to change the terms "accepted" and "rejected" in the proposals component to "possible" and "not possible" for a specific participatory process.
  • Admin wants to change the term "debate" to "discussion" for all assemblies within the system.

You can add the term customizations using either of the following methods:

  • Search the terms from all the system translations matching the term itself or the translation keys. This method is available in the "Add multiple" view.
  • Add the term customizations for specific translation keys in case you have the technical knowledge to find out the translation keys.

Installation

Add this line to your application's Gemfile:

gem "decidim-term_customizer"

And then execute:

$ bundle
$ bundle exec rails decidim_term_customizer:install:migrations
$ bundle exec rails db:migrate

To keep the gem up to date, you can use the commands above to also update it.

Usage

  • Install the gem.
  • Login to the system as an administrator.
  • Go to the admin panel > Term customizer.
  • Add a new translation set and give it a name (e.g. "All processes"). The name of the set is only relevant for the admin to identify what that set is used for. It is suggested to give the sets a name that identifies the scope where it is used.
  • Apply the set to the scope or scopes where you want these customizations to be active.
  • Save the set.
  • Add the translations to the set which you want to customize within the defined scope. You can either add specific translation keys manually or search the translations from all the system's translations using the translation terms or keys.
    • Using the "add multiple" view is definitely easier for beginners since it allows searching for the terms and then automatically adding all the keys where that translation exists.
    • In case you are directly adding the translations, please note that the translation key refers to the technical key that Rails uses to refer to the translatable terms. For example, decidim.menu.processes.

The UI is currently a bit rough, it could definitely use some improvement. Contributions regarding this are very welcome!

Contributing

For instructions how to setup your development environment for Decidim, see Decidim. Also follow Decidim's general instructions for development for this project as well.

Developing

To start contributing to this project, first:

  • Install the basic dependencies (such as Ruby and PostgreSQL)
  • Clone this repository

Decidim's main repository also provides a Docker configuration file if you prefer to use Docker instead of installing the dependencies locally on your machine.

You can create the development app by running the following commands after cloning this project:

$ bundle
$ DATABASE_USERNAME=<username> DATABASE_PASSWORD=<password> bundle exec rake development_app
$ npm i

Note that the database user has to have rights to create and drop a database in order to create the dummy test app database.

Then to test how the module works in Decidim, start the development server:

$ cd development_app
$ DATABASE_USERNAME=<username> DATABASE_PASSWORD=<password> bundle exec rails s

In case you are using rbenv and have the rbenv-vars plugin installed for it, you can add the environment variables to the root directory of the project in a file named .rbenv-vars. If these are defined for the environment, you can omit defining these in the commands shown above.

Code Styling

Please follow the code styling defined by the different linters that ensure we are all talking with the same language collaborating on the same project. This project is set to follow the same rules that Decidim itself follows.

The following linters are used:

You can run the code styling checks by running the following commands from the console:

$ bundle exec rubocop
$ npm run lint

To ease up following the style guide, you should install the plugins to your favorite editor, such as:

Testing

To run the tests run the following in the gem development path:

$ bundle
$ DATABASE_USERNAME=<username> DATABASE_PASSWORD=<password> bundle exec rake test_app
$ DATABASE_USERNAME=<username> DATABASE_PASSWORD=<password> bundle exec rspec

Note that the database user has to have rights to create and drop a database in order to create the dummy test app database.

In case you are using rbenv and have the rbenv-vars plugin installed for it, you can add these environment variables to the root directory of the project in a file named .rbenv-vars. In this case, you can omit defining these in the commands shown above.

Test code coverage

If you want to generate the code coverage report for the tests, you can use the SIMPLECOV=1 environment variable in the rspec command as follows:

$ SIMPLECOV=1 bundle exec rspec

This will generate a folder named coverage in the project root which contains the code coverage report.

Localization

If you would like to see this module in your own language, you can help with its translation at Crowdin:

https://crowdin.com/project/decidim-term-customizer

License

See LICENSE-AGPLv3.txt.

decidim-module-term_customizer's People

Contributors

ahukkanen avatar andreslucena avatar armandfardeau avatar kagemaru avatar mainio-integration-bot avatar moustachu avatar sinaeftekhar avatar takahashim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

decidim-module-term_customizer's Issues

bundle exec rails decidim_term_customizer:install:migrations fails

Hello,

I've just installed the gem, then attempted to install the migrations

This is the output from: bundle exec rails decidim_term_customizer:install:migrations --trace

zen:democracy matt$ bundle exec rails decidim_term_customizer:install:migrations --trace
rails aborted!
Don't know how to build task 'decidim_term_customizer:install:migrations' (See the list of available tasks with rake --tasks)
Did you mean? decidim_verifications:install:migrations
/Users/matt/.rvm/rubies/ruby-2.6.1/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task_manager.rb:59:in []' /Users/matt/.rvm/rubies/ruby-2.6.1/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:159:in invoke_task'
/Users/matt/.rvm/rubies/ruby-2.6.1/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:116:in block (2 levels) in top_level' /Users/matt/.rvm/rubies/ruby-2.6.1/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:116:in each'
/Users/matt/.rvm/rubies/ruby-2.6.1/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:116:in block in top_level' /Users/matt/.rvm/rubies/ruby-2.6.1/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:125:in run_with_threads'
/Users/matt/.rvm/rubies/ruby-2.6.1/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:110:in top_level' /Users/matt/.rvm/rubies/ruby-2.6.1/lib/ruby/gems/2.6.0/gems/railties-5.2.2/lib/rails/commands/rake/rake_command.rb:23:in block in perform'
/Users/matt/.rvm/rubies/ruby-2.6.1/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:186:in standard_exception_handling' /Users/matt/.rvm/rubies/ruby-2.6.1/lib/ruby/gems/2.6.0/gems/railties-5.2.2/lib/rails/commands/rake/rake_command.rb:20:in perform'
/Users/matt/.rvm/rubies/ruby-2.6.1/lib/ruby/gems/2.6.0/gems/railties-5.2.2/lib/rails/command.rb:48:in invoke' /Users/matt/.rvm/rubies/ruby-2.6.1/lib/ruby/gems/2.6.0/gems/railties-5.2.2/lib/rails/commands.rb:18:in

'
/Users/matt/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in require' /Users/matt/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in block in require_with_bootsnap_lfi'
/Users/matt/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:83:in register' /Users/matt/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in require_with_bootsnap_lfi'
/Users/matt/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in require' /Users/matt/.rvm/rubies/ruby-2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in block in require'
/Users/matt/.rvm/rubies/ruby-2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in load_dependency' /Users/matt/.rvm/rubies/ruby-2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in require'
bin/rails:4:in `'

This is the output from bundle info decidim-term_customizer

zen:democracy matt$ bundle info decidim-term_customizer

I've just copied the migrations from github, then renamed them at it all seems ok.

Update to v0.25

As you know, since version 0.25.0 Decidim uses webpacker for its assets.

@leio10 had already made all the changes for this to work (this was actually in production in Metadecidim for the last couple of months), but I see that he hadn't time to make the PR.

I'm opening this PR just so you're aware of - I'll try to find time next week to make the PR with the cherry-picking myself, but just in case that I couldn't find time or if you prefer to do so yourselves.

https://github.com/AjuntamentdeBarcelona/decidim-module-term_customizer/tree/feature/webpacker-migration

Option to disable term customizer when the DB is not available

We have experienced a very weird problem which occurs when a decidim instance has both the term customizer and this other module for anonymous proposals installed. Basically, during the build of our containerized application, at some point, rake assets:precompile is called and fails, because the database is not available. Below is my analysis of the reasons why:

  • The anonymous proposals module internally uses the deface gem to override some of the decidim views.
  • During an assets:precompile, deface also precompiles the modified views, and in doing so happens to use String#parameterize (here)
  • parameterize uses transliterate, that uses enforce_available_locales!, and that in turn needs to read the available locales from I18n.
  • I18n questions its backends for the available locales, and therefore asks the term customizer.
  • The term customizer tries to look up the available locales in the DB, and fails because there is no DB during an asset build.

Funnily enough, I was able to work around this unfortunate chain of events by setting I18n.enforce_available_locales = false in application.rb. But to be honest, it would be a far superior solution, if the term customizer could somehow "deactivate itself" in case there is no DB available. As far as I can tell, this situation could come up with any other gem that uses parameterize or some other I18n function during the assets build, the only common denominators are I18n and the term customizer.

What do you think about this problem, and the proposed solution? Am I wrong in saying that this should be solved in the term customizer?

I can supply the stack trace in case it is of any interest.

Use i18n_key_finder in order to understand where translation keys display on the app

Hello @ahukkanen,

Thanks a lot for this module, it's sooooo useful.
Some of our client use it but are not as savy when it comes to understanding where the key they are translating is going to apply.

Alain, our CTO, shared with me this gem https://github.com/piotr-szachewicz/rails-i18n-key-finder which shows the translation keys in the front-end.

It would be great for the admin to have some kind of visual approach when it comes to adding custom keys.
Capture d’écran 2020-06-18 à 17 26 52

What do you think ?

Error when visiting consultations

Describe the bug

Consultations frontend crashes when using decidim-consultations with decidim-term_customizer.

To Reproduce

Steps to reproduce the behavior:

  1. Generate a development_app
$ bundle exec rake development_app
  1. Add the consultations gem to the development_app Gemfile
gem "decidim-consultations", Decidim::TermCustomizer::DECIDIM_VERSION
  1. Install the gem and run migrations
$ bundle
$ bundle exec rails decidim_consultations:install:migrations
$ bundle exec rails db:migrate
  1. Visit http://localhost:3000/consultations
  2. See error

Expected behavior

Should not crash.

Screenshots

If applicable, add screenshots to help explain your problem.

not_implemented_error

Stacktrace

If applicable, add the error stacktrace to help explain your problem.

/home/aitorlopez/workspace/decidim-codit/decidim/decidim-core/app/controllers/concerns/decidim/participatory_space_context.rb:42:in `current_participatory_space'
/home/aitorlopez/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/bundler/gems/decidim-module-term_customizer-a0055f708cfe/lib/decidim/term_customizer/context/controller_context.rb:19:in `resolve!'
/home/aitorlopez/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/bundler/gems/decidim-module-term_customizer-a0055f708cfe/lib/decidim/term_customizer/context/base.rb:24:in `initialize'
/home/aitorlopez/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/bundler/gems/decidim-module-term_customizer-a0055f708cfe/lib/decidim/term_customizer/engine.rb:20:in `new'
/home/aitorlopez/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/bundler/gems/decidim-module-term_customizer-a0055f708cfe/lib/decidim/term_customizer/engine.rb:20:in `block (2 levels) in <class:Engine>'

Stack level too deep error

When installing this gem in an existing Decidim project, I get a "stack sevel too deep" exception. Repeating part of the stack trace:

[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/bundler/gems/decidim-module-term_customizer-b9248e2abd52/lib/decidim/term_customizer/loader.rb:35:in `translations_hash'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/bundler/gems/decidim-module-term_customizer-b9248e2abd52/lib/decidim/term_customizer/i18n_backend.rb:37:in `translations'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/bundler/gems/decidim-module-term_customizer-b9248e2abd52/lib/decidim/term_customizer/i18n_backend.rb:50:in `lookup'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/gems/i18n-1.8.2/lib/i18n/backend/base.rb:32:in `translate'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/gems/i18n-1.8.2/lib/i18n/backend/chain.rb:63:in `block (2 levels) in translate'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/gems/i18n-1.8.2/lib/i18n/backend/chain.rb:61:in `catch'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/gems/i18n-1.8.2/lib/i18n/backend/chain.rb:61:in `block in translate'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/gems/i18n-1.8.2/lib/i18n/backend/chain.rb:60:in `each'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/gems/i18n-1.8.2/lib/i18n/backend/chain.rb:60:in `translate'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/gems/i18n-1.8.2/lib/i18n/backend/fallbacks.rb:48:in `block (2 levels) in translate'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/gems/i18n-1.8.2/lib/i18n/backend/fallbacks.rb:47:in `catch'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/gems/i18n-1.8.2/lib/i18n/backend/fallbacks.rb:47:in `block in translate'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/gems/i18n-1.8.2/lib/i18n/backend/fallbacks.rb:45:in `each'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/gems/i18n-1.8.2/lib/i18n/backend/fallbacks.rb:45:in `translate'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/gems/i18n-1.8.2/lib/i18n.rb:206:in `block in translate'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/gems/i18n-1.8.2/lib/i18n.rb:202:in `catch'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/gems/i18n-1.8.2/lib/i18n.rb:202:in `translate'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/gems/activesupport-5.2.4.3/lib/active_support/core_ext/array/conversions.rb:70:in `to_sentence'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/gems/activesupport-5.2.4.3/lib/active_support/duration.rb:379:in `inspect'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/gems/dalli-2.7.10/lib/active_support/cache/dalli_store.rb:404:in `inspect'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/gems/dalli-2.7.10/lib/active_support/cache/dalli_store.rb:404:in `log'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/gems/dalli-2.7.10/lib/active_support/cache/dalli_store.rb:385:in `instrument_with_log'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/gems/dalli-2.7.10/lib/active_support/cache/dalli_store.rb:106:in `fetch'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/bundler/gems/decidim-module-term_customizer-b9248e2abd52/lib/decidim/term_customizer/loader.rb:35:in `translations_hash'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/bundler/gems/decidim-module-term_customizer-b9248e2abd52/lib/decidim/term_customizer/i18n_backend.rb:37:in `translations'
[ec9c99d9-207c-435f-bb7a-3f51cf49ebd5] bundle/ruby/2.5.0/bundler/gems/decidim-module-term_customizer-b9248e2abd52/lib/decidim/term_customizer/i18n_backend.rb:50:in `lookup'
...

We are using Decidim v0.21, and decidim-module-term_customizer from the 0.21-stable branch.
Do you have any idea what could be causing this error? Thanks!

Error with installation

After inserting gem "decidim-term_customizer" to the Gemfile and run bundle I got the following error:

Bundler could not find compatible versions for gem "decidim-admin":
  In snapshot (Gemfile.lock):
    decidim-admin (= 0.23.1)

  In Gemfile:
    decidim-dev (= 0.23.1) was resolved to 0.23.1, which depends on
      decidim (= 0.23.1) was resolved to 0.23.1, which depends on
        decidim-admin (= 0.23.1)

    decidim-term_customizer was resolved to 0.16.6, which depends on
      decidim-admin (~> 0.16.0)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

After running bundle update I have got the following error:

Bundler could not find compatible versions for gem "decidim-core":
  In Gemfile:
    decidim-navbar_links was resolved to 0.23.1, which depends on
      decidim-core (= 0.23.1)

    decidim-term_customizer was resolved to 0.16.6, which depends on
      decidim-core (~> 0.16.0)

Conclusion:
This model is not compatible with the released version of decidim that I'm currently using..

Crash when attempting to create a new translation set

I have successfully installed the gem and run migrations.

I then restarted my server and went to the admin screen

I can now see the Term Customizer on the left hand menu, so I've click on that.

I can now see the Translation Sets menu, and I click on New Translation Set and then this error occurs.

screen shot 2019-03-06 at 8 56 28 am

This is my gem file

frozen_string_literal: true

source "https://rubygems.org"

ruby RUBY_VERSION

gem "decidim", "0.16.0"
gem "decidim-consultations", "0.16.0"
gem "decidim-initiatives", "0.16.0"
gem 'decidim-api'
gem 'decidim-meetings'
gem 'decidim-proposals'
gem 'decidim-sortitions'
gem 'decidim-conferences'
gem 'decidim-term_customizer'

gem "bootsnap", "~> 1.3"

gem "puma", "> 3.0"
gem "uglifier", "
> 4.1"

gem "faker", "~> 1.9"

group :development, :test do
gem "byebug", "~> 10.0", platform: :mri

gem "decidim-dev", "0.16.0"
end

gem "figaro"

group :development do
gem "letter_opener_web", "> 1.3"
gem "listen", "
> 3.1"
gem "spring", "> 2.0"
gem "spring-watcher-listen", "
> 2.0"
gem "web-console", "~> 3.5"
end

group :production do
gem "passenger"
gem 'delayed_job_active_record'
gem "daemons"
end

This is log output

["decidim_organization_id", 1]]
↳ /Users/matt/.rvm/gems/ruby-2.6.1/gems/decidim-term_customizer-0.16.1/app/views/decidim/term_customizer/admin/translation_sets/_constraint_fields.html.erb:40
Rendered /Users/matt/.rvm/gems/ruby-2.6.1/gems/decidim-term_customizer-0.16.1/app/views/decidim/term_customizer/admin/translation_sets/_constraint_fields.html.erb (306.7ms)
Rendered /Users/matt/.rvm/gems/ruby-2.6.1/gems/decidim-term_customizer-0.16.1/app/views/decidim/term_customizer/admin/translation_sets/_form.html.erb (313.2ms)
Rendered /Users/matt/.rvm/gems/ruby-2.6.1/gems/decidim-term_customizer-0.16.1/app/views/decidim/term_customizer/admin/translation_sets/new.html.erb within layouts/decidim/admin/application (764.4ms)
Completed 500 Internal Server Error in 831ms (ActiveRecord: 73.1ms)

ActionView::Template::Error (undefined method `components' for #Decidim::Consultation:0x00007fea28328088):
44: <%= fields_for "constraints[#{index}][subject_model][#{manifest.name}][component_model][#{model.id}]" do |component_fields| %>
45:


46: <%= component_fields.hidden_field :subject_id, value: model.id %>
47: <%= component_fields.select :component_id, model.components.map { |c| [translated_attribute(c.name), c.id] }, selected: selected_component, include_blank: true %>
48:

49: <% end %>
50: <% end %>

activemodel (5.2.2) lib/active_model/attribute_methods.rb:430:in method_missing' decidim-term_customizer (0.16.1) app/views/decidim/term_customizer/admin/translation_sets/_constraint_fields.html.erb:47:in block (4 levels) in ___sers_matt__rvm_gems_ruby_______gems_decidim_term_customizer________app_views_decidim_term_customizer_admin_translation_sets__constraint_fields_html_erb__4352627520298272677_70321835870160'
actionview (5.2.2) lib/action_view/helpers/capture_helper.rb:41:in block in capture' actionview (5.2.2) lib/action_view/helpers/capture_helper.rb:205:in with_output_buffer'
actionview (5.2.2) lib/action_view/helpers/capture_helper.rb:41:in capture' actionview (5.2.2) lib/action_view/helpers/form_helper.rb:1006:in fields_for'
decidim-term_customizer (0.16.1) app/views/decidim/term_customizer/admin/translation_sets/_constraint_fields.html.erb:44:in block (3 levels) in ___sers_matt__rvm_gems_ruby_______gems_decidim_term_customizer________app_views_decidim_term_customizer_admin_translation_sets__constraint_fields_html_erb__4352627520298272677_70321835870160' activerecord (5.2.2) lib/active_record/relation/delegation.rb:71:in each'
activerecord (5.2.2) lib/active_record/relation/delegation.rb:71:in each' decidim-term_customizer (0.16.1) app/views/decidim/term_customizer/admin/translation_sets/_constraint_fields.html.erb:43:in block (2 levels) in ___sers_matt__rvm_gems_ruby_______gems_decidim_term_customizer________app_views_decidim_term_customizer_admin_translation_sets__constraint_fields_html_erb__4352627520298272677_70321835870160'
actionview (5.2.2) lib/action_view/helpers/capture_helper.rb:41:in block in capture' actionview (5.2.2) lib/action_view/helpers/capture_helper.rb:205:in with_output_buffer'
actionview (5.2.2) lib/action_view/helpers/capture_helper.rb:41:in capture' actionview (5.2.2) lib/action_view/helpers/form_helper.rb:1006:in fields_for'
decidim-term_customizer (0.16.1) app/views/decidim/term_customizer/admin/translation_sets/_constraint_fields.html.erb:37:in block in ___sers_matt__rvm_gems_ruby_______gems_decidim_term_customizer________app_views_decidim_term_customizer_admin_translation_sets__constraint_fields_html_erb__4352627520298272677_70321835870160' decidim-term_customizer (0.16.1) app/views/decidim/term_customizer/admin/translation_sets/_constraint_fields.html.erb:33:in each'
decidim-term_customizer (0.16.1) app/views/decidim/term_customizer/admin/translation_sets/_constraint_fields.html.erb:33:in ___sers_matt__rvm_gems_ruby_______gems_decidim_term_customizer________app_views_decidim_term_customizer_admin_translation_sets__constraint_fields_html_erb__4352627520298272677_70321835870160' actionview (5.2.2) lib/action_view/template.rb:159:in block in render'
activesupport (5.2.2) lib/active_support/notifications.rb:170:in instrument' actionview (5.2.2) lib/action_view/template.rb:354:in instrument_render_template'
actionview (5.2.2) lib/action_view/template.rb:157:in render' actionview (5.2.2) lib/action_view/renderer/partial_renderer.rb:344:in block in render_partial'
actionview (5.2.2) lib/action_view/renderer/abstract_renderer.rb:44:in block in instrument' activesupport (5.2.2) lib/active_support/notifications.rb:168:in block in instrument'
activesupport (5.2.2) lib/active_support/notifications/instrumenter.rb:23:in instrument' activesupport (5.2.2) lib/active_support/notifications.rb:168:in instrument'
actionview (5.2.2) lib/action_view/renderer/abstract_renderer.rb:43:in instrument' actionview (5.2.2) lib/action_view/renderer/partial_renderer.rb:333:in render_partial'
actionview (5.2.2) lib/action_view/renderer/partial_renderer.rb:312:in render' actionview (5.2.2) lib/action_view/renderer/renderer.rb:49:in render_partial'
actionview (5.2.2) lib/action_view/helpers/rendering_helper.rb:36:in render' decidim-term_customizer (0.16.1) app/views/decidim/term_customizer/admin/translation_sets/_form.html.erb:14:in block in ___sers_matt__rvm_gems_ruby_______gems_decidim_term_customizer________app_views_decidim_term_customizer_admin_translation_sets__form_html_erb__3850512959667368718_70321835644880'
actionview (5.2.2) lib/action_view/helpers/capture_helper.rb:41:in block in capture' actionview (5.2.2) lib/action_view/helpers/capture_helper.rb:205:in with_output_buffer'
actionview (5.2.2) lib/action_view/helpers/capture_helper.rb:41:in capture' actionview (5.2.2) lib/action_view/helpers/form_helper.rb:1006:in fields_for'
decidim-term_customizer (0.16.1) app/views/decidim/term_customizer/admin/translation_sets/_form.html.erb:13:in ___sers_matt__rvm_gems_ruby_______gems_decidim_term_customizer________app_views_decidim_term_customizer_admin_translation_sets__form_html_erb__3850512959667368718_70321835644880' actionview (5.2.2) lib/action_view/template.rb:159:in block in render'
activesupport (5.2.2) lib/active_support/notifications.rb:170:in instrument' actionview (5.2.2) lib/action_view/template.rb:354:in instrument_render_template'
actionview (5.2.2) lib/action_view/template.rb:157:in render' actionview (5.2.2) lib/action_view/renderer/partial_renderer.rb:344:in block in render_partial'
actionview (5.2.2) lib/action_view/renderer/abstract_renderer.rb:44:in block in instrument' activesupport (5.2.2) lib/active_support/notifications.rb:168:in block in instrument'
activesupport (5.2.2) lib/active_support/notifications/instrumenter.rb:23:in instrument' activesupport (5.2.2) lib/active_support/notifications.rb:168:in instrument'
actionview (5.2.2) lib/action_view/renderer/abstract_renderer.rb:43:in instrument' actionview (5.2.2) lib/action_view/renderer/partial_renderer.rb:333:in render_partial'
actionview (5.2.2) lib/action_view/renderer/partial_renderer.rb:312:in render' actionview (5.2.2) lib/action_view/renderer/renderer.rb:49:in render_partial'
actionview (5.2.2) lib/action_view/renderer/renderer.rb:23:in render' actionview (5.2.2) lib/action_view/helpers/rendering_helper.rb:33:in render'
decidim-term_customizer (0.16.1) app/views/decidim/term_customizer/admin/translation_sets/new.html.erb:2:in block in ___sers_matt__rvm_gems_ruby_______gems_decidim_term_customizer________app_views_decidim_term_customizer_admin_translation_sets_new_html_erb__669156461250341517_70321841360900' actionview (5.2.2) lib/action_view/helpers/capture_helper.rb:41:in block in capture'
actionview (5.2.2) lib/action_view/helpers/capture_helper.rb:205:in with_output_buffer' actionview (5.2.2) lib/action_view/helpers/capture_helper.rb:41:in capture'
actionview (5.2.2) lib/action_view/helpers/form_helper.rb:452:in form_for' decidim-core (0.16.0) app/helpers/decidim/decidim_form_helper.rb:22:in decidim_form_for'
decidim-term_customizer (0.16.1) app/views/decidim/term_customizer/admin/translation_sets/new.html.erb:1:in ___sers_matt__rvm_gems_ruby_______gems_decidim_term_customizer________app_views_decidim_term_customizer_admin_translation_sets_new_html_erb__669156461250341517_70321841360900' actionview (5.2.2) lib/action_view/template.rb:159:in block in render'
activesupport (5.2.2) lib/active_support/notifications.rb:170:in instrument' actionview (5.2.2) lib/action_view/template.rb:354:in instrument_render_template'
actionview (5.2.2) lib/action_view/template.rb:157:in render' actionview (5.2.2) lib/action_view/renderer/template_renderer.rb:54:in block (2 levels) in render_template'
actionview (5.2.2) lib/action_view/renderer/abstract_renderer.rb:44:in block in instrument' activesupport (5.2.2) lib/active_support/notifications.rb:168:in block in instrument'
activesupport (5.2.2) lib/active_support/notifications/instrumenter.rb:23:in instrument' activesupport (5.2.2) lib/active_support/notifications.rb:168:in instrument'
actionview (5.2.2) lib/action_view/renderer/abstract_renderer.rb:43:in instrument' actionview (5.2.2) lib/action_view/renderer/template_renderer.rb:53:in block in render_template'
actionview (5.2.2) lib/action_view/renderer/template_renderer.rb:61:in render_with_layout' actionview (5.2.2) lib/action_view/renderer/template_renderer.rb:52:in render_template'
actionview (5.2.2) lib/action_view/renderer/template_renderer.rb:16:in render' actionview (5.2.2) lib/action_view/renderer/renderer.rb:44:in render_template'
actionview (5.2.2) lib/action_view/renderer/renderer.rb:25:in render' actionview (5.2.2) lib/action_view/rendering.rb:103:in _render_template'
actionpack (5.2.2) lib/action_controller/metal/streaming.rb:219:in _render_template' actionview (5.2.2) lib/action_view/rendering.rb:84:in render_to_body'
actionpack (5.2.2) lib/action_controller/metal/rendering.rb:52:in render_to_body' actionpack (5.2.2) lib/action_controller/metal/renderers.rb:142:in render_to_body'
actionpack (5.2.2) lib/abstract_controller/rendering.rb:25:in render' actionpack (5.2.2) lib/action_controller/metal/rendering.rb:36:in render'
actionpack (5.2.2) lib/action_controller/metal/instrumentation.rb:46:in block (2 levels) in render' activesupport (5.2.2) lib/active_support/core_ext/benchmark.rb:14:in block in ms'
/Users/matt/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/benchmark.rb:308:in realtime' activesupport (5.2.2) lib/active_support/core_ext/benchmark.rb:14:in ms'
actionpack (5.2.2) lib/action_controller/metal/instrumentation.rb:46:in block in render' actionpack (5.2.2) lib/action_controller/metal/instrumentation.rb:87:in cleanup_view_runtime'
activerecord (5.2.2) lib/active_record/railties/controller_runtime.rb:31:in cleanup_view_runtime' actionpack (5.2.2) lib/action_controller/metal/instrumentation.rb:45:in render'
wicked_pdf (1.1.0) lib/wicked_pdf/pdf_helper.rb:42:in render_with_wicked_pdf' wicked_pdf (1.1.0) lib/wicked_pdf/pdf_helper.rb:27:in render'
actionpack (5.2.2) lib/action_controller/metal/implicit_render.rb:35:in default_render' actionpack (5.2.2) lib/action_controller/metal/basic_implicit_render.rb:6:in block in send_action'
actionpack (5.2.2) lib/action_controller/metal/basic_implicit_render.rb:6:in tap' actionpack (5.2.2) lib/action_controller/metal/basic_implicit_render.rb:6:in send_action'
actionpack (5.2.2) lib/abstract_controller/base.rb:194:in process_action' actionpack (5.2.2) lib/action_controller/metal/rendering.rb:30:in process_action'
actionpack (5.2.2) lib/abstract_controller/callbacks.rb:42:in block in process_action' activesupport (5.2.2) lib/active_support/callbacks.rb:109:in block in run_callbacks'
i18n (1.6.0) lib/i18n.rb:297:in with_locale' decidim-core (0.16.0) app/controllers/concerns/decidim/locale_switcher.rb:24:in switch_locale'
activesupport (5.2.2) lib/active_support/callbacks.rb:118:in block in run_callbacks' activesupport (5.2.2) lib/active_support/callbacks.rb:136:in run_callbacks'
actionpack (5.2.2) lib/abstract_controller/callbacks.rb:41:in process_action' actionpack (5.2.2) lib/action_controller/metal/rescue.rb:22:in process_action'
actionpack (5.2.2) lib/action_controller/metal/instrumentation.rb:34:in block in process_action' activesupport (5.2.2) lib/active_support/notifications.rb:168:in block in instrument'
activesupport (5.2.2) lib/active_support/notifications/instrumenter.rb:23:in instrument' activesupport (5.2.2) lib/active_support/notifications.rb:168:in instrument'
actionpack (5.2.2) lib/action_controller/metal/instrumentation.rb:32:in process_action' actionpack (5.2.2) lib/action_controller/metal/params_wrapper.rb:256:in process_action'
activerecord (5.2.2) lib/active_record/railties/controller_runtime.rb:24:in process_action' actionpack (5.2.2) lib/abstract_controller/base.rb:134:in process'
actionview (5.2.2) lib/action_view/rendering.rb:32:in process' actionpack (5.2.2) lib/action_controller/metal.rb:191:in dispatch'
actionpack (5.2.2) lib/action_controller/metal.rb:252:in dispatch' actionpack (5.2.2) lib/action_dispatch/routing/route_set.rb:52:in dispatch'
actionpack (5.2.2) lib/action_dispatch/routing/route_set.rb:34:in serve' actionpack (5.2.2) lib/action_dispatch/journey/router.rb:52:in block in serve'
actionpack (5.2.2) lib/action_dispatch/journey/router.rb:35:in each' actionpack (5.2.2) lib/action_dispatch/journey/router.rb:35:in serve'
actionpack (5.2.2) lib/action_dispatch/routing/route_set.rb:840:in call' railties (5.2.2) lib/rails/engine.rb:524:in call'
railties (5.2.2) lib/rails/railtie.rb:190:in public_send' railties (5.2.2) lib/rails/railtie.rb:190:in method_missing'
actionpack (5.2.2) lib/action_dispatch/routing/mapper.rb:19:in block in <class:Constraints>' actionpack (5.2.2) lib/action_dispatch/routing/mapper.rb:48:in serve'
actionpack (5.2.2) lib/action_dispatch/journey/router.rb:52:in block in serve' actionpack (5.2.2) lib/action_dispatch/journey/router.rb:35:in each'
actionpack (5.2.2) lib/action_dispatch/journey/router.rb:35:in serve' actionpack (5.2.2) lib/action_dispatch/routing/route_set.rb:840:in call'
railties (5.2.2) lib/rails/engine.rb:524:in call' railties (5.2.2) lib/rails/railtie.rb:190:in public_send'
railties (5.2.2) lib/rails/railtie.rb:190:in method_missing' actionpack (5.2.2) lib/action_dispatch/routing/mapper.rb:19:in block in class:Constraints'
actionpack (5.2.2) lib/action_dispatch/routing/mapper.rb:48:in serve' actionpack (5.2.2) lib/action_dispatch/journey/router.rb:52:in block in serve'
actionpack (5.2.2) lib/action_dispatch/journey/router.rb:35:in each' actionpack (5.2.2) lib/action_dispatch/journey/router.rb:35:in serve'
actionpack (5.2.2) lib/action_dispatch/routing/route_set.rb:840:in call' batch-loader (1.3.0) lib/batch_loader/middleware.rb:11:in call'
omniauth (1.9.0) lib/omniauth/strategy.rb:192:in call!' omniauth (1.9.0) lib/omniauth/strategy.rb:169:in call'
warden (1.2.8) lib/warden/manager.rb:36:in block in call' warden (1.2.8) lib/warden/manager.rb:34:in catch'
warden (1.2.8) lib/warden/manager.rb:34:in call' decidim-core (0.16.0) app/middleware/decidim/current_organization.rb:21:in call'
rack (2.0.6) lib/rack/tempfile_reaper.rb:15:in call' rack (2.0.6) lib/rack/etag.rb:25:in call'
rack (2.0.6) lib/rack/conditional_get.rb:25:in call' rack (2.0.6) lib/rack/head.rb:12:in call'
actionpack (5.2.2) lib/action_dispatch/http/content_security_policy.rb:18:in call' rack (2.0.6) lib/rack/session/abstract/id.rb:232:in context'
rack (2.0.6) lib/rack/session/abstract/id.rb:226:in call' actionpack (5.2.2) lib/action_dispatch/middleware/cookies.rb:670:in call'
activerecord (5.2.2) lib/active_record/migration.rb:559:in call' actionpack (5.2.2) lib/action_dispatch/middleware/callbacks.rb:28:in block in call'
activesupport (5.2.2) lib/active_support/callbacks.rb:98:in run_callbacks' actionpack (5.2.2) lib/action_dispatch/middleware/callbacks.rb:26:in call'
actionpack (5.2.2) lib/action_dispatch/middleware/executor.rb:14:in call' actionpack (5.2.2) lib/action_dispatch/middleware/debug_exceptions.rb:61:in call'
web-console (3.7.0) lib/web_console/middleware.rb:135:in call_app' web-console (3.7.0) lib/web_console/middleware.rb:30:in block in call'
web-console (3.7.0) lib/web_console/middleware.rb:20:in catch' web-console (3.7.0) lib/web_console/middleware.rb:20:in call'
actionpack (5.2.2) lib/action_dispatch/middleware/show_exceptions.rb:33:in call' railties (5.2.2) lib/rails/rack/logger.rb:38:in call_app'
railties (5.2.2) lib/rails/rack/logger.rb:26:in block in call' activesupport (5.2.2) lib/active_support/tagged_logging.rb:71:in block in tagged'
activesupport (5.2.2) lib/active_support/tagged_logging.rb:28:in tagged' activesupport (5.2.2) lib/active_support/tagged_logging.rb:71:in tagged'
railties (5.2.2) lib/rails/rack/logger.rb:26:in call' sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in call'
actionpack (5.2.2) lib/action_dispatch/middleware/remote_ip.rb:81:in call' request_store (1.4.1) lib/request_store/middleware.rb:19:in call'
actionpack (5.2.2) lib/action_dispatch/middleware/request_id.rb:27:in call' rack (2.0.6) lib/rack/method_override.rb:22:in call'
rack (2.0.6) lib/rack/runtime.rb:22:in call' activesupport (5.2.2) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in call'
actionpack (5.2.2) lib/action_dispatch/middleware/executor.rb:14:in call' actionpack (5.2.2) lib/action_dispatch/middleware/static.rb:127:in call'
rack (2.0.6) lib/rack/sendfile.rb:111:in call' rack-cors (1.0.2) lib/rack/cors.rb:97:in call'
railties (5.2.2) lib/rails/engine.rb:524:in call' puma (3.12.0) lib/puma/configuration.rb:225:in call'
puma (3.12.0) lib/puma/server.rb:658:in handle_request' puma (3.12.0) lib/puma/server.rb:472:in process_client'
puma (3.12.0) lib/puma/server.rb:332:in block in run' puma (3.12.0) lib/puma/thread_pool.rb:133:in block in spawn_thread'

NameError: uninitialized constant I18n::HashRefinements

See ruby-i18n/i18n#602

decidim@marklar:~/decidim$ bundle exec rails db:migrate --trace                                   [58/1934]
** Invoke db:migrate (first_time)                                                                                  
** Invoke db:load_config (first_time)                                                                              ** Invoke environment (first_time)
** Execute environment                                                                                             rails aborted!      
NameError: uninitialized constant I18n::HashRefinements                                                            /home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/bundler/gems/decidim-module-term_customizer-0e823f4f768f/li
b/decidim/term_customizer/i18n_backend.rb:9:in `<class:I18nBackend>'                                           
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/bundler/gems/decidim-module-term_customizer-0e823f4f768f/li
b/decidim/term_customizer/i18n_backend.rb:8:in `<module:TermCustomizer>'                                           /home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/bundler/gems/decidim-module-term_customizer-0e823f4f768f/li
b/decidim/term_customizer/i18n_backend.rb:7:in `<module:Decidim>'                                                  /home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/bundler/gems/decidim-module-term_customizer-0e823f4f768f/li
b/decidim/term_customizer/i18n_backend.rb:6:in `<main>'                                                            
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/bootsnap-1.10.2/lib/bootsnap/load_path_cache/core_ext/
kernel_require.rb:30:in `require'                                                                                  
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/bootsnap-1.10.2/lib/bootsnap/load_path_cache/core_ext/
kernel_require.rb:30:in `require'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/bundler/gems/decidim-module-term_customizer-0e823f4f768f/li
b/decidim/term_customizer/engine.rb:9:in `block in <class:Engine>'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/railties-5.2.6/lib/rails/initializable.rb:32:in `insta
nce_exec'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/railties-5.2.6/lib/rails/initializable.rb:32:in `run'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/railties-5.2.6/lib/rails/initializable.rb:61:in `block
 in run_initializers'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_com
ponent'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/2.7.0/tsort.rb:347:in `each'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/2.7.0/tsort.rb:347:in `call'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/railties-5.2.6/lib/rails/initializable.rb:60:in `run_i
nitializers'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/railties-5.2.6/lib/rails/application.rb:361:in `initia
lize!'
/home/decidim/decidim-4motion/config/environment.rb:5:in `<main>'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/bootsnap-1.10.2/lib/bootsnap/load_path_cache/core_ext/
kernel_require.rb:30:in `require'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/bootsnap-1.10.2/lib/bootsnap/load_path_cache/core_ext/
kernel_require.rb:30:in `require'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/railties-5.2.6/lib/rails/application.rb:337:i[13/1934]
e_environment!'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/railties-5.2.6/lib/rails/application.rb:520:in `block 
in run_tasks_blocks'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_w
ith_call_chain'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_
chain'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_p
rerequisites'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisi
tes'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_w
ith_call_chain'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_
chain'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_p
rerequisites'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisi
tes'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_w
ith_call_chain'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_
chain'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_tas
k'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 l
evels) in top_level'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in t
op_level'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_t
hreads'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/railties-5.2.6/lib/rails/commands/rake/rake_command.rb
:23:in `block in perform'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_e
xception_handling'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/railties-5.2.6/lib/rails/commands/rake/rake_command.rb
:20:in `perform'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/railties-5.2.6/lib/rails/command.rb:48:in `invoke'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/railties-5.2.6/lib/rails/commands.rb:18:in `<main>'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/bootsnap-1.10.2/lib/bootsnap/load_path_cache/core_ext/
kernel_require.rb:30:in `require'
/home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/bootsnap-1.10.2/lib/bootsnap/load_path_cache/core_ext/
kernel_require.rb:30:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => db:migrate => db:load_config => environment

Importing exported Excel fails

When importing the following excel file:
Grundplattform zusätzlich.xlsx
using the latest git commit version of term customizer (remote: https://github.com/mainio/decidim-module-term_customizer.git, revision: 0046905fff1fbf24ff721a8d8c30e2b767c448fb, ref: develop), we get the following error:

NoMethodError: undefined method `value' for nil:NilClass
  from decidim-module-term_customizer (0046905fff1f) lib/decidim/term_customizer/import/readers/xlsx.rb:18:in `map'
  from decidim-module-term_customizer (0046905fff1f) lib/decidim/term_customizer/import/readers/xlsx.rb:18:in `block in read_rows'
  from rubyXL (3.4.24) lib/rubyXL/worksheet.rb:23:in `block in each'
  from rubyXL (3.4.24) lib/rubyXL/worksheet.rb:23:in `each'
  from rubyXL (3.4.24) lib/rubyXL/worksheet.rb:23:in `each'
  from decidim-module-term_customizer (0046905fff1f) lib/decidim/term_customizer/import/readers/xlsx.rb:17:in `each_with_index'
  from decidim-module-term_customizer (0046905fff1f) lib/decidim/term_customizer/import/readers/xlsx.rb:17:in `read_rows'
  from decidim-module-term_customizer (0046905fff1f) lib/decidim/term_customizer/import/importer.rb:52:in `collection_data'
  from decidim-module-term_customizer (0046905fff1f) lib/decidim/term_customizer/import/importer.rb:40:in `collection'
  from decidim-module-term_customizer (0046905fff1f) lib/decidim/term_customizer/import/importer.rb:31:in `block in import'
  from activerecord (6.0.5) lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `block in transaction'
  from activerecord (6.0.5) lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'
  from activesupport (6.0.5) lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
  from activesupport (6.0.5) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
  from activesupport (6.0.5) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
  from activesupport (6.0.5) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
  from activesupport (6.0.5) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
  from activerecord (6.0.5) lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'
  from activerecord (6.0.5) lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `transaction'
  from activerecord (6.0.5) lib/active_record/transactions.rb:212:in `transaction'
  from decidim-module-term_customizer (0046905fff1f) lib/decidim/term_customizer/import/importer.rb:29:in `import'
  from decidim-module-term_customizer (0046905fff1f) app/commands/decidim/term_customizer/admin/import_set_translations.rb:70:in `import_file'
  from decidim-module-term_customizer (0046905fff1f) app/commands/decidim/term_customizer/admin/import_set_translations.rb:57:in `import_translations'
  from decidim-module-term_customizer (0046905fff1f) app/commands/decidim/term_customizer/admin/import_set_translations.rb:34:in `call'
  from rectify (0.13.0) lib/rectify/command.rb:30:in `call'
  from decidim-module-term_customizer (0046905fff1f) app/controllers/decidim/term_customizer/admin/translations_controller.rb:109:in `import'
  from actionpack (6.0.5) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
  from actionpack (6.0.5) lib/abstract_controller/base.rb:195:in `process_action'
  from actionpack (6.0.5) lib/action_controller/metal/rendering.rb:30:in `process_action'
  from actionpack (6.0.5) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
  from activesupport (6.0.5) lib/active_support/callbacks.rb:112:in `block in run_callbacks'
  from activesupport (6.0.5) lib/active_support/core_ext/time/zones.rb:66:in `use_zone'
  from decidim-core (0.26.1) app/controllers/concerns/decidim/use_organization_time_zone.rb:21:in `use_organization_time_zone'
  from activesupport (6.0.5) lib/active_support/callbacks.rb:121:in `block in run_callbacks'
  from i18n (1.10.0) lib/i18n.rb:328:in `with_locale'
  from decidim-core (0.26.1) app/controllers/concerns/decidim/locale_switcher.rb:24:in `switch_locale'
  from activesupport (6.0.5) lib/active_support/callbacks.rb:121:in `block in run_callbacks'
  from sentry-raven (3.1.2) lib/raven/integrations/rails/controller_transaction.rb:7:in `block in included'
  from activesupport (6.0.5) lib/active_support/callbacks.rb:121:in `instance_exec'
  from activesupport (6.0.5) lib/active_support/callbacks.rb:121:in `block in run_callbacks'
  from activesupport (6.0.5) lib/active_support/callbacks.rb:139:in `run_callbacks'
  from actionpack (6.0.5) lib/abstract_controller/callbacks.rb:41:in `process_action'
  from actionpack (6.0.5) lib/action_controller/metal/rescue.rb:22:in `process_action'
  from actionpack (6.0.5) lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
  from activesupport (6.0.5) lib/active_support/notifications.rb:180:in `block in instrument'
  from activesupport (6.0.5) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
  from activesupport (6.0.5) lib/active_support/notifications.rb:180:in `instrument'
  from actionpack (6.0.5) lib/action_controller/metal/instrumentation.rb:32:in `process_action'
  from actionpack (6.0.5) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
  from activerecord (6.0.5) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
  from actionpack (6.0.5) lib/abstract_controller/base.rb:136:in `process'
  from actionview (6.0.5) lib/action_view/rendering.rb:39:in `process'
  from actionpack (6.0.5) lib/action_controller/metal.rb:190:in `dispatch'
  from actionpack (6.0.5) lib/action_controller/metal.rb:254:in `dispatch'
  from actionpack (6.0.5) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
  from actionpack (6.0.5) lib/action_dispatch/routing/route_set.rb:33:in `serve'
  from actionpack (6.0.5) lib/action_dispatch/journey/router.rb:49:in `block in serve'
  from actionpack (6.0.5) lib/action_dispatch/journey/router.rb:32:in `each'
  from actionpack (6.0.5) lib/action_dispatch/journey/router.rb:32:in `serve'
  from actionpack (6.0.5) lib/action_dispatch/routing/route_set.rb:834:in `call'
  from railties (6.0.5) lib/rails/engine.rb:527:in `call'
  from railties (6.0.5) lib/rails/railtie.rb:190:in `public_send'
  from railties (6.0.5) lib/rails/railtie.rb:190:in `method_missing'
  from actionpack (6.0.5) lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
  from actionpack (6.0.5) lib/action_dispatch/routing/mapper.rb:48:in `serve'
  from actionpack (6.0.5) lib/action_dispatch/journey/router.rb:49:in `block in serve'
  from actionpack (6.0.5) lib/action_dispatch/journey/router.rb:32:in `each'
  from actionpack (6.0.5) lib/action_dispatch/journey/router.rb:32:in `serve'
  from actionpack (6.0.5) lib/action_dispatch/routing/route_set.rb:834:in `call'
  from railties (6.0.5) lib/rails/engine.rb:527:in `call'
  from railties (6.0.5) lib/rails/railtie.rb:190:in `public_send'
  from railties (6.0.5) lib/rails/railtie.rb:190:in `method_missing'
  from actionpack (6.0.5) lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
  from actionpack (6.0.5) lib/action_dispatch/routing/mapper.rb:48:in `serve'
  from actionpack (6.0.5) lib/action_dispatch/journey/router.rb:49:in `block in serve'
  from actionpack (6.0.5) lib/action_dispatch/journey/router.rb:32:in `each'
  from actionpack (6.0.5) lib/action_dispatch/journey/router.rb:32:in `serve'
  from actionpack (6.0.5) lib/action_dispatch/routing/route_set.rb:834:in `call'
  from batch-loader (1.5.0) lib/batch_loader/middleware.rb:11:in `call'
  from rack-attack (6.6.1) lib/rack/attack.rb:127:in `call'
  from omniauth (2.1.0) lib/omniauth/strategy.rb:202:in `call!'
  from omniauth (2.1.0) lib/omniauth/strategy.rb:169:in `call'
  from omniauth (2.1.0) lib/omniauth/strategy.rb:202:in `call!'
  from omniauth (2.1.0) lib/omniauth/strategy.rb:169:in `call'
  from omniauth (2.1.0) lib/omniauth/strategy.rb:202:in `call!'
  from omniauth (2.1.0) lib/omniauth/strategy.rb:169:in `call'
  from omniauth (2.1.0) lib/omniauth/builder.rb:44:in `call'
  from warden (1.2.9) lib/warden/manager.rb:36:in `block in call'
  from warden (1.2.9) lib/warden/manager.rb:34:in `catch'
  from warden (1.2.9) lib/warden/manager.rb:34:in `call'
  from decidim-core (0.26.1) lib/decidim/middleware/strip_x_forwarded_host.rb:12:in `call'
  from decidim-module-decidim_awesome (658d226e9ed1) app/middleware/decidim/decidim_awesome/current_config.rb:33:in `call'
  from decidim-core (0.26.1) lib/decidim/middleware/current_organization.rb:22:in `call'
  from rack (2.2.3) lib/rack/tempfile_reaper.rb:15:in `call'
  from rack (2.2.3) lib/rack/etag.rb:27:in `call'
  from rack (2.2.3) lib/rack/conditional_get.rb:40:in `call'
  from rack (2.2.3) lib/rack/head.rb:12:in `call'
  from actionpack (6.0.5) lib/action_dispatch/http/content_security_policy.rb:18:in `call'
  from rack (2.2.3) lib/rack/session/abstract/id.rb:266:in `context'
  from rack (2.2.3) lib/rack/session/abstract/id.rb:260:in `call'
  from actionpack (6.0.5) lib/action_dispatch/middleware/cookies.rb:654:in `call'
  from actionpack (6.0.5) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
  from activesupport (6.0.5) lib/active_support/callbacks.rb:101:in `run_callbacks'
  from actionpack (6.0.5) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
  from actionpack (6.0.5) lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
  from actionpack (6.0.5) lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'
  from actionpack (6.0.5) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
  from lograge (0.12.0) lib/lograge/rails_ext/rack/logger.rb:18:in `call_app'
  from railties (6.0.5) lib/rails/rack/logger.rb:26:in `block in call'
  from activesupport (6.0.5) lib/active_support/tagged_logging.rb:80:in `block in tagged'
  from activesupport (6.0.5) lib/active_support/tagged_logging.rb:28:in `tagged'
  from activesupport (6.0.5) lib/active_support/tagged_logging.rb:80:in `tagged'
  from railties (6.0.5) lib/rails/rack/logger.rb:26:in `call'
  from actionpack (6.0.5) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
  from request_store (1.5.1) lib/request_store/middleware.rb:19:in `call'
  from actionpack (6.0.5) lib/action_dispatch/middleware/request_id.rb:27:in `call'
  from rack (2.2.3) lib/rack/method_override.rb:24:in `call'
  from activesupport (6.0.5) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
  from actionpack (6.0.5) lib/action_dispatch/middleware/executor.rb:14:in `call'
  from rack (2.2.3) lib/rack/sendfile.rb:110:in `call'
  from actionpack (6.0.5) lib/action_dispatch/middleware/host_authorization.rb:97:in `call'
  from sentry-raven (3.1.2) lib/raven/integrations/rack.rb:51:in `call'
  from prometheus_exporter (2.0.2) lib/prometheus_exporter/middleware.rb:34:in `call'
  from rack-cors (1.1.1) lib/rack/cors.rb:100:in `call'
  from railties (6.0.5) lib/rails/engine.rb:527:in `call'
  from puma (5.6.4) lib/puma/configuration.rb:252:in `call'
  from puma (5.6.4) lib/puma/request.rb:77:in `block in handle_request'
  from puma (5.6.4) lib/puma/thread_pool.rb:340:in `with_force_shutdown'
  from puma (5.6.4) lib/puma/request.rb:76:in `handle_request'
  from puma (5.6.4) lib/puma/server.rb:441:in `process_client'
  from puma (5.6.4) lib/puma/thread_pool.rb:147:in `block in spawn_thread'

We are using decidim 0.26.1.

String not added when in a list

Description

When trying to add a translation key with a list in it, I encounter intermittent issues when clicking on the autocomplete proposed string:

  • the string is not added to the list
  • a different translation key is added to the list

To reproduce

  1. Go inside a translation set
  2. Click on "Add multiple translations" button
  3. Search for the string "Review the c"
  4. With your mouse, click quickly on the autocomplete solution proposed for decidim.initiatives.create_initiative.fill_data.fill_data_help
  5. See error

If you don't reproduce it the first time, try multiple times and you should encounter the error.

Screenshots

As this is hard to reproduce, here's a Loom video:
https://www.loom.com/share/b14316e1ac884f979cd95679e2f6a8f6?sid=f5297b97-fc8a-455f-a72c-855deeed7bb0

I have an error in console:
Capture d’écran 2023-10-25 à 16 25 05

Additional information:

I was able to add the translation key at the end, so I don't think it's a big issue but just wanted to report it if someone encounter it also.

When creating a new term, if the key is a child of another key that has assigned a value, clear cache gives a 500 server error

This issue has been updated, the real problem is as follows:

I have added some new terms with the following keys:
custom.pae.services
custom.pae.services.1
custom.pae.services.2

I have cleared cache.
The server has crashed (error 500 Internal server error).

@microstudi (https://github.com/microstudi) can give more technical details, but the problem is that according to the YAML format, a key (custom.pae.services) cannot have assigned a value if it has child keys (custom.pae.services.1). Since a user like me is not aware of this restriction, it is necessary to have some kind of validation that avoids this behaviour (otherwise, any admin user can crash a Decidim by adding new terms).

Different column separators for CSV import/export

I tried using TermCustomizer's CSV import/export and found that the column separator is different when Decidim.default_csv_col_sep is set.

This may be because export uses Decidim::Exporters and Decidim.default_csv_col_sep is used as separator, while import uses ; in Decidim::TermCustomizer::Import::Readers::CSV.

This is why an error seemed to occur when I tried to import an exported CSV file after processing it.

Export and import of translations

It should be possible to export and import all translations inside a set. This would make it easier to define the same customizations for multiple environments.

The format could be the same YML format that is used with the normal translations.

  • Implement export by implementing a serializer for the translations and creating an action to run the export through a job. Should work similarly as other exports in the system.
  • Implement an import view which takes in the exported file and imports the translations from that file to the system. Should accept all the same formats as the export. In case zip is provided, the exported zip file should be expected as the format.

return to the editing page after editing a term value

The problem occurs only when you have translation sets that are more than one page long. Then after editing a term value the page cursor jumps to the first page instead of the page from which you clicked the pencil. If the page cursor were given as a parameter when editing, you would find yourself back at the place where you were before editing. That would help a lot navigating larger translation sets.

Uninstall instructions in readme

I'm doing some troubleshooting and want to remove the module to make sure that it's not causing any problems.

Would you be able to put the uninstall process in the readme file, to help new users do it correctly?

Memcached throws NoMethodError in `clear_cache`

The method Decidim::TermCustomizer::Loader#clear_cache uses the Rails.cache.delete_matched method to avoid rebuilding the whole cache when applying translations.

Rails.cache.delete_matched("#{cache_key_base}/*")

But this method is not supported by all cache implementations. Then the Loader class controls this situation implementing a rescue NotImplementedError. The problem is that Memcached's dally adapter raises a NoMethodError instead, this causes the application to crash when the user clears term-customizer's cache.

Version compatibility error with decidim 0.22

Hello, we want to install this module on our decidim platform and when running we get the following error:

Resolving dependencies......
Bundler could not find compatible versions for gem "decidim-core":
In Gemfile:
decidim-dev (= 0.22.0) was resolved to 0.22.0, which depends on
decidim (= 0.22.0) was resolved to 0.22.0, which depends on
decidim-core (= 0.22.0)
decidim-term_customizer was resolved to 0.16.6, which depends on
decidim-core (~> 0.16.0)

Our version of decidim is 0.22 and we see in the code of
mainio / decidim-module-term_customizer that says "Update to dependencies of decidim 0.22" but for some reason it takes us a version of the module compatible with decidim 0.16.0

I will appreciate if you can help me install the version of the module compatible with decidim 0.22

We add the following line to the Gemfile file:
gem "decidim-term_customizer"

And then execute:
$ bundle
$ bundle exec rails decidim_term_customizer:install:migrations
$ bundle exec rails db:migrate

Add cancel buttons

Currently the forms are missing cancel buttons making it hard to browse back in the UI.

Add help texts in the UI

The users may not be easily aware of the following concepts:

  • What is a translation set?
  • What is a translation key and why are these needed?
  • How they can search translations by the term?

Fix deprecation warning during application initialization

Currently we receive the following deprecation warning when initializing the application:

DEPRECATION WARNING: Initialization autoloaded the constants Decidim::Meetings::CloseMeetingReminderGenerator, Decidim::Budgets::OrderReminderGenerator, Decidim::TermCustomizer::ApplicationRecord, and Decidim::TermCustomizer::Translation.

Being able to do this is deprecated. Autoloading during initialization is going
to be an error condition in future versions of Rails.

Reloading does not reboot the application, and therefore code executed during
initialization does not run again. So, if you reload Decidim::Meetings::CloseMeetingReminderGenerator, for example,
the expected changes won't be reflected in that stale Class object.

These autoloaded constants have been unloaded.

In order to autoload safely at boot time, please wrap your code in a reloader
callback this way:

    Rails.application.reloader.to_prepare do
      # Autoload classes and modules needed at boot time here.
    end

That block runs when the application boots, and every time there is a reload.
For historical reasons, it may run twice, so it has to be idempotent.

Check the "Autoloading and Reloading Constants" guide to learn more about how
Rails autoloads and reloads.
 (called from <top (required)> at /.../decidim-instance/config/environment.rb:5)

Fix this issue in Term Customizer.

Unable to translate devise mails

Steps to reproduce

  1. Generate development_app
  2. Update config/locales/en.yml with:
    devise:
      mailer:
        confirmation_instructions:
          subject: "Base Subject"
  3. Create Translation with:
    Translation key: devise.mailer.confirmation_instructions.subject
    Customized term: Overriden Subject
  4. Register a new user and get the confirmation mail

Expected Result
Get Overriden Subject as subject

Actual Result
Get Base Subject as subject

Create branch 0.17-stable

The latest stable version of decidim is now in 0.17, please create branch. If you need any help count on me.

500 Internal Server Error using module-term_customizer

Hi.

I've installed decidim 0.19.1

 bundle info decidim
  * decidim (0.19.1)
	Summary: Citizen participation framework for Ruby on Rails.
	Homepage: https://github.com/decidim/decidim
	Path: /home/decidim/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/decidim-0.19.1

And module decidim-term_customizer

bundle info decidim-term_customizer
  * decidim-term_customizer (0.19.0)
	Summary: Provides possibility to customize Decidim's localized terms.
	Homepage: https://github.com/mainio/decidim-module-term_customizer
	Path: /home/decidim/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/decidim-term_customizer-0.19.0

I've followed carefully instructions provided on https://github.com/mainio/decidim-module-term_customizer

I've added on Gemfile

gem "decidim-term_customizer"

And I've executed:

bundle
bundle exec rails decidim_term_customizer:install:migrations
bundle exec rails db:migrate
bin/rails restart

But when we try to use this feature we get message:

Hi ha hagut un problema amb el nostre servidor

Reading production log file looks like:

I, [2020-01-20T02:34:27.581414 #11239]  INFO -- : [ae801d5f-d246-402e-9108-9a3f3ea23d19] Completed 500 Internal Server Error in 31ms (ActiveRecord: 1.8ms)
F, [2020-01-20T02:34:27.583068 #11239] FATAL -- : [ae801d5f-d246-402e-9108-9a3f3ea23d19]
F, [2020-01-20T02:34:27.583175 #11239] FATAL -- : [ae801d5f-d246-402e-9108-9a3f3ea23d19] ActionView::Template::Error (The asset "decidim/term_customizer/admin/translation_sets_admin.js" is not present in the asset pipeline.):
F, [2020-01-20T02:34:27.583314 #11239] FATAL -- : [ae801d5f-d246-402e-9108-9a3f3ea23d19]     6:   </div>
[ae801d5f-d246-402e-9108-9a3f3ea23d19]     7: <% end %>
[ae801d5f-d246-402e-9108-9a3f3ea23d19]     8:
[ae801d5f-d246-402e-9108-9a3f3ea23d19]     9: <%= javascript_include_tag "decidim/term_customizer/admin/translation_sets_admin" %>
F, [2020-01-20T02:34:27.583396 #11239] FATAL -- : [ae801d5f-d246-402e-9108-9a3f3ea23d19]
F, [2020-01-20T02:34:27.583501 #11239] FATAL -- : [ae801d5f-d246-402e-9108-9a3f3ea23d19] sprockets-rails (3.2.1) lib/sprockets/rails/helper.rb:83:in `compute_asset_path'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] actionview (5.2.4.1) lib/action_view/helpers/asset_url_helper.rb:200:in `asset_path'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] actionview (5.2.4.1) lib/action_view/helpers/asset_url_helper.rb:318:in `javascript_path'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] actionview (5.2.4.1) lib/action_view/helpers/asset_tag_helper.rb:93:in `block in javascript_include_tag'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] actionview (5.2.4.1) lib/action_view/helpers/asset_tag_helper.rb:92:in `map'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] actionview (5.2.4.1) lib/action_view/helpers/asset_tag_helper.rb:92:in `javascript_include_tag'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] sprockets-rails (3.2.1) lib/sprockets/rails/helper.rb:156:in `block in javascript_include_tag'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] sprockets-rails (3.2.1) lib/sprockets/rails/helper.rb:154:in `map'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] sprockets-rails (3.2.1) lib/sprockets/rails/helper.rb:154:in `javascript_include_tag'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] decidim-term_customizer (0.19.0) app/views/decidim/term_customizer/admin/translation_sets/new.html.erb:9:in `__home_decidim__rbenv_versions_______lib_ruby_gems_______gems_decidim_term_customizer________app_views_decidim_term_customizer_admin_translation_sets_new_html_erb__399134481782619961_46980794651880'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] actionview (5.2.4.1) lib/action_view/template.rb:159:in `block in render'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] activesupport (5.2.4.1) lib/active_support/notifications.rb:170:in `instrument'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] actionview (5.2.4.1) lib/action_view/template.rb:354:in `instrument_render_template'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] actionview (5.2.4.1) lib/action_view/template.rb:157:in `render'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] actionview (5.2.4.1) lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] actionview (5.2.4.1) lib/action_view/renderer/abstract_renderer.rb:44:in `block in instrument'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] activesupport (5.2.4.1) lib/active_support/notifications.rb:168:in `block in instrument'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] activesupport (5.2.4.1) lib/active_support/notifications/instrumenter.rb:23:in `instrument'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] activesupport (5.2.4.1) lib/active_support/notifications.rb:168:in `instrument'
.
. 
.
ddleware.rb:29:in `call'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] actionpack (5.2.4.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] rack (2.1.1) lib/rack/sendfile.rb:113:in `call'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] rack-cors (1.1.1) lib/rack/cors.rb:100:in `call'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] railties (5.2.4.1) lib/rails/engine.rb:524:in `call'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:97:in `process_request'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:149:in `accept_and_process_next_request'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:415:in `block (3 levels) in start_threads'
[ae801d5f-d246-402e-9108-9a3f3ea23d19] /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'
I, [2020-01-20T02:34:27.584812 #11239]  INFO -- : [ae801d5f-d246-402e-9108-9a3f3ea23d19] Processing by Decidim::ErrorsController#internal_server_error as HTML

So, what do we need for get working this feature?

Thanks!

Upgrade decidim 0.23

Hey guys, thanks for this work. Do you plan to upgrade to support decidim new 0.23 release?

Term Customizer : cannot add a constraint for the landing page of a process group

Describe the bug
I want to customize some terms only in the landing page of a process group, but I cannot select the process group in the constraint filter of the term customizer module.

To Reproduce
Steps to reproduce the behavior:

  1. Create a process group
  2. Go to Term Customizer > New translation set
  3. Check the constraint filter, can you find and restrict by the process group you have created?

Expected behavior
Somewhere in the filter, the process groups should appear.

Screenshots
image

Extra data
Decidim Version: 0.24

Problem after install : can't add a new translation set

Hi,

I install the module without problem. I can see "Paramétage des traduction" (french user) in the admin panel but if I click to add a new set of translation, that's going on page which say " error with our server" (link : admin/term_customizer/sets/new)

Can you help me to resolv this ?
Thank's a lot.
Best regards

Force all pluralized formats to be added if one of them is added

Currently if the user decides to customize a pluralized format of a translatable string, error situations may arise because the other formats are nowhere to be found in that case. This is because the base translation is replaced with the customized term.

For example, if the user customizes this string:
participatory_process_groups.show.group_participatory_processes.other

It will cause an issue in the group processes page in case only a single process is shown. In that case, it tries to load the following translation which is nowhere to be found in that case:
participatory_process_groups.show.group_participatory_processes.one

To fix this, all pluralized formats should always be automatically added when adding one of them to the customized terms. This should also apply to translation imports.

When deleting one of the pluralized formats, it should delete all of them.

When adding the formats automatically, the following terms should be automatically searched for:

  • term.zero
  • term.one
  • term.other

The "zero" format is optional and may not be always defined. Therefore, check for its existence (does a corresponding translation exist for it) before adding it.

Alternatively, a completely different way of handling the pluralized formats could be considered. In this case, all the pluralized formats for the key would be managed in the same view instead of separating them to separate translation objects.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.