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

Move pagination translations to active_admin scope #8218

Merged

Conversation

tagliala
Copy link
Contributor

@tagliala tagliala commented Jan 7, 2024

Active Admin uses the Kaminari gem for pagination, which may also be used by the host application. Moving the translations from views.pagination to active_admin.pagination prevents potential conflicts.

Fix #8215

@javierjulio javierjulio force-pushed the bugfix/8215-kaminari-translations branch from 4dbafe8 to da92324 Compare January 7, 2024 18:54
Copy link
Member

@javierjulio javierjulio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Feel free to remove the .html_safe if you want. I can release beta4 once you merge.

Copy link

codecov bot commented Jan 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (508e2a4) 99.10% compared to head (e714360) 99.10%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8218   +/-   ##
=======================================
  Coverage   99.10%   99.10%           
=======================================
  Files         140      140           
  Lines        4017     4017           
=======================================
  Hits         3981     3981           
  Misses         36       36           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tagliala tagliala force-pushed the bugfix/8215-kaminari-translations branch 2 times, most recently from 4dbafe8 to 8079c37 Compare January 8, 2024 08:45
Active Admin uses the Kaminari gem for pagination, which may also be
used by the host application. Moving the translations from
`views.pagination` to `active_admin.pagination` prevents potential
conflicts.

Also remove `html_safe`, since Active Admin will use translations just
as a fallback for screen readers

Fix activeadmin#8215
@tagliala tagliala force-pushed the bugfix/8215-kaminari-translations branch from 8079c37 to e714360 Compare January 8, 2024 08:47
Copy link
Member

@javierjulio javierjulio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! ❤️

@tagliala tagliala merged commit e242b89 into activeadmin:master Jan 8, 2024
25 checks passed
javierjulio added a commit that referenced this pull request Jan 10, 2024
This was introduced in #8218 but we forgot to update the Upgrading guide.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v4 beta 3: Kaminari translation override may affect the host application
2 participants