Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback on "invalid" with missing translation #922

Merged
merged 1 commit into from
Oct 8, 2023

Conversation

tagliala
Copy link
Contributor

@tagliala tagliala commented Oct 8, 2023

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

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
@tagliala tagliala force-pushed the bugfix/920-fix-missing-translations branch from 00e297a to c2a360e Compare October 8, 2023 09:36
@coveralls
Copy link

Coverage Status

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

@tagliala tagliala merged commit b51b2e6 into main Oct 8, 2023
22 checks passed
@tagliala tagliala deleted the bugfix/920-fix-missing-translations branch October 8, 2023 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Raise on missing translations causes issues in Rails 7.1
2 participants