bullet_train-core icon indicating copy to clipboard operation
bullet_train-core copied to clipboard

Wrong usage of I18n & missing translations

Open tangopium opened this issue 10 months ago • 2 comments

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?

tangopium avatar Apr 13 '24 14:04 tangopium