Fixes #36574 - Update fast_gettext to ~> 2.1
I needed to avoid translating during startup because it led to infinite recursion. https://github.com/theforeman/foreman/pull/9771 is that PR and included here.
There's another case here: https://github.com/theforeman/foreman/blob/df3a0b0d970b229887e2d371568d16c8143c5aae/app/models/operatingsystem.rb#L82
The human method is here: https://github.com/grosser/gettext_i18n_rails/blob/master/lib/gettext_i18n_rails/active_model/name.rb
I'll dig a bit deeper.
Glad to see this getting tackled, for both Ruby / Rails reasons and to fix a conflict we've had in packaging for a while now:
Found conflict for rubygem-fast_gettext: 1.8.0 (foreman) != 2.3.0 (hammer-cli)
Thanks. Given the trace of the infinite loop I saw it makes sense. I'll see about giving it a spin. If that works, then I can also drop the 36757 commits from this PR. They'll still be good, but no longer a blocker to this PR.
In theory this is now ready, but I'd like to postpone this until after branching.
We've branched twice. Let's get this in.
@ekohl, could you please fix rubocop failures? So we can see if the tests are passing at least.
Updated, but didn't have time to test this myself. I'll check back what CI says after lunch.
Everything seems to be green, except that it cannot be built for some reason :/
Yeah, RPM will fail as it has no 2.1 package yet.
/usr/share/rubygems/rubygems/dependency.rb:313:in `to_specs': Could not find 'fast_gettext' (~> 2.1) - did find: [fast_gettext-1.8.0] (Gem::MissingSpecVersionError)
Let's see: https://github.com/theforeman/foreman-packaging/pull/10515
@ofedoren can I get an ACK on the code? I have not the slightest idea about gettext :/