-
Notifications
You must be signed in to change notification settings - Fork 50
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
Email translation missing: en.neo4j.errors.models.user.attributes.email.taken #12
Comments
That looks good and I can probably fix the error myself in this way. |
I've never run into it, either. What version of Rails, Neo4j gem, etc,...? Neo4j.rb has basic support for i18n in the sense that it'll load a config file if it finds it, but it doesn't get involved beyond that. By default, it looks like it's going into |
Rails 4.1.6, Neo4j: 4.1.6, devise-neo4j: 2.0.0 devise.en.yml does not have an entry like that. If you think that this bug is not worth the trouble if it comes alone, then I don't mind. I doubt that anyone will even recognize it in my project. Just wanted to help. |
I think it's worth figuring out, you are definitely helping. Maybe the settings in Neo4j.rb's en.yml are from an old version of... something? It might be better to add the new message than remove the old one. |
I think that the issue might be that in the Rails-specific ActiveRecord-like part of neo4j, it's trying to mimic the way ActiveRecord handles internationalisation and localisation, but is not conforming to the complete spec maybe? The way ActiveRecord localisation works is it looks for translation keys starting with the most detailed ("en.neo4j.errors.models.user.attributes.email.taken") and then works backwards if keys are blank until it would reach the top level ("en.errors.messages.taken"). So the quick fix would be: Add the full translation key ("en.neo4j.errors.models.user.attributes.email.taken") to @johannesE's project (because adding the full key to devise-neo4j would only work if the model is always going to be named, 'User'). The 'proper' fix would be: Alter the neo4j gem so it handles translations in that fallback way like ActiveRecord does. |
That sounds good and makes sense. The quick fix works for me. So I suppose we can close this issue here and open up a new one in the neo4j gem? |
I'm having the same issue while using simple_form in my application. Has this issue been open in the neo4j gem repository? |
When I try to register a user which already exists, I get the following error:
Email translation missing: en.neo4j.errors.models.user.attributes.email.taken
I am using
devise-neo4j (2.0.0)
bcrypt-ruby (
> 3.0)> 3.0)devise (
neo4j (>= 3.0.0.alpha.6)
orm_adapter (
> 0.5.0)> 1.2.1)railties (>= 3.1)
warden (
The text was updated successfully, but these errors were encountered: