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 locales errors.messages.already_in_use + clean up #466

Merged
merged 2 commits into from
Dec 14, 2015
Merged

Fix locales errors.messages.already_in_use + clean up #466

merged 2 commits into from
Dec 14, 2015

Conversation

ValentinTrinque
Copy link
Contributor

fixes #463

The message passed to the `errors.add()` method wasn't calling the I18n module. As a result, the locale wasn't properly applied.
1. The locale files have been cleaned to be more consistent. Some mistakes have been corrected.

2. By convention in Rails, `errors` locale key is structured as follow:

```yaml
errors:
  format: "%{attribute} %{message}"
    messages:
      accepted: must be accepted
```

It would be nicer to have devise_token_auth following it. So the structure as be re-arrange and the code updated.
@ValentinTrinque
Copy link
Contributor Author

I have tested it, calling my own repo and branch from my Gemfile. It works great.

The locale is correctly changed.

@booleanbetrayal
Copy link
Collaborator

This looks great @ValentinTrinque . Thanks!

booleanbetrayal added a commit that referenced this pull request Dec 14, 2015
Fix locales `errors.messages.already_in_use` + clean up
@booleanbetrayal booleanbetrayal merged commit 7a8f08a into lynndylanhurley:master Dec 14, 2015
@ValentinTrinque ValentinTrinque deleted the fix-locales branch December 14, 2015 17:40
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.

locales errors.messages.already_in_use seems broken
2 participants