FEATURE: Make site texts controller handle pages and locales (PR #8408)

GitHub

You’ve signed the CLA, nbianca. Thank you! This pull request is ready for review.

What happens if params[:locale] is some gibberish?

What if params[:page] is -99?

This test will fail if/when the translation changes. It’s best to call I18n.t() with the en locale to make this test less fragile.

Ditto about the test “fragility”

Why is this change needed? Can you add a description explaining why the change and how it solves the problem?

If page < 0, then you have calculated first and last for nothing :wink:

I wanted to keep all computations in one place hoping to make things more clear. :blush:

This one could also be moved near where it’s being used after the raise :wink: