Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent translation behavior #120

Open
fblupi opened this issue May 10, 2024 · 8 comments
Open

Inconsistent translation behavior #120

fblupi opened this issue May 10, 2024 · 8 comments

Comments

@fblupi
Copy link

fblupi commented May 10, 2024

Description

We are encountering inconsistent translation behavior within the term customizer module of the Decidim Barcelona instance. Specifically, we have configured a translation set for both the participatory space and the specific proposals component, where we altered the translation for the evaluating status. The following keys were modified:

  • decidim.admin.filters.proposals.state_eq.values.evaluating
  • decidim.proposals.admin.proposal_answers.form.evaluating
  • decidim.proposals.answers.evaluating
  • decidim.proposals.application_helper.filter_state_values.evaluating

Despite these modifications, when accessing the public page of the proposals component, the translation is inconsistent. Sometimes it uses the custom translation, while other times it resorts to the default one.

Steps to Reproduce

  1. Configure a translation set for the participatory space and proposals component.
  2. Modify the translation for the evaluating status using the specified keys.
  3. Access the public page of the proposals component multiple times and check the inconsistent behavior.

Expected Behavior

The translation for the evaluating status should consistently reflect the custom value.

Actual Behavior

The translation for the evaluating status appears inconsistently, sometimes using the custom value and other times using the default one.

Screenshot

Screenshot_10-5-2024_132017_www decidim barcelona

Additional Information

@ahukkanen
Copy link
Collaborator

This is likely a duplicate of #107.

Suggest checking out #110.

@fblupi
Copy link
Author

fblupi commented May 13, 2024

@ahukkanen I tried the solution from #110 but it didn't fix the problem 😔

@ahukkanen
Copy link
Collaborator

Can you try disabling action controller caching by setting this in the environment configuration:

config.action_controller.perform_caching = false

It might be also cache related and if so, it would be hard to fix within term customizer alone because the cells can be shown inside different contexts.

This will obviously affect the performance of the app but at least would allow narrowing down the root cause of this issue.

@fblupi
Copy link
Author

fblupi commented May 13, 2024

I tried disabling action controller caching too. But the problem persists.

@ahukkanen
Copy link
Collaborator

Actually it seems caching for cells cannot be disabled with this config as far as I understand from here:
https://github.com/trailblazer/cells-rails/blob/b4c491fa22c63a21b91595ec8b13022406c0452f/lib/cell/rails.rb#L64C7-L66

This method is overridden in Decidim:
https://github.com/decidim/decidim/blob/484ee5f93215a7c4c6ab06d530b2bb9fcf78bbba/decidim-core/lib/decidim/view_model.rb#L85-L87

But I believe setting the cache store to the null_store should work, i.e. this config:

config.action_controller.cache_store = :null_store

@fblupi
Copy link
Author

fblupi commented May 13, 2024

Changing the setting to null_store gives me the impression of facing these inconsistencies less often but the problem is still present.

@Robin481
Copy link

Robin481 commented Oct 1, 2024

@fblupi Were you able to properly solve this on your end or did you try any other solutions or got any other hints?
We are facing similar problems and are a wit's end.

@fblupi
Copy link
Author

fblupi commented Oct 1, 2024

@fblupi Were you able to properly solve this on your end or did you try any other solutions or got any other hints? We are facing similar problems and are a wit's end.

No. I couldn't, sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants