bullet_train-core
bullet_train-core copied to clipboard
Wrong usage of I18n & missing translations
There is currently an issue in the teams edit view (that might actually affect other parts of the system too):
First of all, there is a translation missing (which is just a minor issue): In this line I currently (v1.7.2) get the error Translation missing: de.teams.fields.locale.options
and there are actually no options
here.
The second, more severe issue is the usage of the hash returned from I18n.t
here and here (where you try to modify the hash).
This throws the error can't modify frozen Hash
. The issue is known and described in detail here. In summary I18n returns a frozen hash since 3.0. The solution should be passing t("locale.locales").clone(freeze: false)
.
I didn't review the test coverage of BulletTrain, but shouldn't those kind of issue pop up automatically?