DavyJonesLocker / client_side_validations

Client Side Validations made easy for Ruby on Rails
MIT License
2.69k stars 404 forks source link

Fallback on "invalid" with missing translation #922

Closed tagliala closed 1 year ago

tagliala commented 1 year ago

When config.i18n.raise_on_missing_translations is enabled, Rails 7.1 raises on missing translation error when validation messages are not translated, which is a new behavior causing CSV to fail

For unsupported validations, like comparison, and custom validations, like timeliness, CSV attempts to create a message for a key that is not present.

This commit standardizes the behavior and fallbacks on "invalid" when a translation is not found, which is supposed to be the desired behavior for this use case

Close #920

coveralls commented 1 year ago

Coverage Status

coverage: 100.0%. remained the same when pulling c2a360eec158e71b9a6a91b1e544af9456141dc9 on bugfix/920-fix-missing-translations into dc474bb684adaa91bee9572959afd61adf6dd821 on main.