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

Add option to enforce translations #1813

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Nerian
Copy link

@Nerian Nerian commented Mar 9, 2023

Hi,

This PR adds an option to enforce translations from location files instead of falling back to humanizing attribute names.

@Nerian
Copy link
Author

Nerian commented Mar 9, 2023

Also related to this is ruby-i18n/i18n#654.

The goal being to have this kind of errors:

I18n.t(
  :"role.name",
  scope: : "simple_form.placeholders",
  default: [:"defaults.new.name", :"defaults.name"], 
  raise: true)

Translation missing. Options considered were:
- en.simple_form.placeholders.role.new.name
- en.simple_form.placeholders.role.name
- en.simple_form.placeholders.defaults.new.name
- en.simple_form.placeholders.defaults.name

@Nerian Nerian force-pushed the enforce-translations branch 2 times, most recently from 561f3d4 to 59d08c1 Compare March 9, 2023 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant