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

Fix #localize return error message if translation data is missing #464

Merged
merged 1 commit into from
Jan 21, 2019

Conversation

i7an
Copy link
Contributor

@i7an i7an commented Jan 19, 2019

If you try to localize a date without needed translations you will get a confusing result:

I18n.l(@date, :format => '%b', :locale => :fr) # => "r"

In that case, I'd expect to get some meaningful error message:

I18n.l(@date, :format => '%b', :locale => :fr) # => "translation missing: fr.date.abbr_month_names"

@i7an i7an force-pushed the localize_with_missing_translations branch from ac21413 to 8fc72b0 Compare January 19, 2019 18:05
Copy link
Collaborator

@radar radar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the patch! I will merge this and then release it as i18n 1.5.3.

@radar radar merged commit 548901b into ruby-i18n:master Jan 21, 2019
@radar
Copy link
Collaborator

radar commented Jan 21, 2019

@i7an i7an deleted the localize_with_missing_translations branch January 22, 2019 08:06
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.

4 participants