[Proposal] Integrating model translations into Rails

There currently exists no gem which adds model translations to ActiveRecord models while supporting Rails 7’s Active Record Encryption:

  • Work on Globalize has stopped, and

  • The maintainer of the more recent Mobility does not wish to go as deep as it would be required for this feature.

Given that I18n is only becoming more important as the world is becoming a village, do you agree that it makes sense to integrate model translations into Rails?

do you agree that it makes sense to integrate model translations into Rails?

It is already possible to translate models using Mobility, or maybe I misunderstood the question? Is the question about specifically translating encrypted attributes?

NB: I wrote the Mobility Action Text gem to translate rich text.

Hi Sébastien,

yes, sorry, slight misunderstanding:

The issue is that Mobility fails to work as soon as (Rails 7’s) encrypted attributes come into play. (And the maintainer does not intend to support Rails 7 on this level.)

Actually the maintainer wrote “this is not a bug but a feature request”. So if you provide a PR to Mobility with the feature, he could be willing to merge it; or alternately, it could be added as a gem, like I did for ActionText translations as suggested by the maintainer. And he was willing to support the feature by making the necessary adaptations to the API.

https://github.com/shioyama/mobility/issues/385#issuecomment-638821472

https://github.com/shioyama/mobility/pull/488

(I have only basic web app developer skills, which means me attempting to produce a PR is unfortunately not something anybody in this community is going to want to see…)