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

Caching issues with Machine Translations #12663

Open
derayo94 opened this issue Apr 3, 2024 · 0 comments
Open

Caching issues with Machine Translations #12663

derayo94 opened this issue Apr 3, 2024 · 0 comments

Comments

@derayo94
Copy link
Contributor

derayo94 commented Apr 3, 2024

Describe the bug

When I toggle the machine translations feature on a participatory process "overview" page (The process tab), the machine translations are not displayed.

To Reproduce

See this repository for an example of a decidim app illustrating the issue.

See the README.md instructions to reproduce.

Expected behavior

I expect the machine translations toggle button to toggle between original text and automatically-translated text.

Screenshots

N/A

Stacktrace

N/A

Extra data

  • Device: N/A
  • Device OS: N/A
  • Browser: N/A
  • Decidim Version: 0.27.5
  • Decidim installation: N/A

Additional context

I discovered that the caching mechanism does not take the machine translations into account when creating the cache hash. For example, see the decidim-proposals/app/cells/decidim/proposals/highlighted_proposals_for_component_cell.rb's cache_hash method.

Here is a solution that fixed my issue.

Is this expected ? Is there another official way to handle cache when using Machine Translations ?

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

1 participant