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 more helpful translation error when :default option is provided. #654

Merged

Conversation

Nerian
Copy link
Contributor

@Nerian Nerian commented Mar 9, 2023

Hi,

This PR add more information to the error message for missing translation when a default option array was provided.

Example of error message:

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 add-options-to-missing-trabslation-message branch from 79015ba to c5c6e75 Compare March 9, 2023 13:19
@radar
Copy link
Collaborator

radar commented Apr 26, 2023

Looks good to me. Thanks :)

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.

2 participants